@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
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{a as n,dn as r,i,n as a}from"./portal-Sdfvrza9.js";import{t as o}from"./jsx-runtime-CFwixLRt.js";import{n as s,t as c}from"./v-stack-hkuSkmCA.js";import{Nn as l}from"./ProjectAvatar-DtI9dT1f.js";import{t as u}from"./badge-Cpc3eA-C.js";import{n as d}from"./toaster-BsYkODqs.js";import{$ as f,J as p,Q as m,X as h,Y as g,Z as _,et as v,tt as y}from"./Markdown-C9extmbX.js";import{L as b,t as x}from"./DashboardLayout-BhHe0vIT.js";import{r as S,t as C}from"./card-By_Mbslh.js";import{a as w,i as T,n as E,r as D,t as O}from"./empty-state-T8EYr5NF.js";import{t as k}from"./errors-e711UMq7.js";import{t as A}from"./spacer-C38e7o6r.js";import{n as j,r as M,t as N}from"./stat-CsyT0AnR.js";import{i as P,n as F,r as I,t as ee}from"./ReplayStateBadge-CTtWh9Ih.js";import{$ as te,D as L,et as R}from"./immer-CFru3D02.js";import{n as z}from"./api-l6Cnm0vQ.js";import{t as ne}from"./pause-CKua45Zd.js";import{$n as B,Mr as V,Pr as H,S as U,St as W,Yn as re,n as G}from"./index-CPtTUYLD.js";import{J as ie,d as ae,g as oe,on as se,u as ce}from"./CartesianChart-CgGSWzzH.js";import{t as le}from"./Line-B2wakHWw.js";import{n as K,t as ue}from"./AreaChart-BZjKjRMD.js";import{a as q,i as J,n as de,o as fe,r as pe,t as me}from"./formatters-BDO3Inyr.js";import{t as Y}from"./ConfirmDialog-CbyD4lof.js";import{t as he}from"./OpsPageShell-Ch1rtwuD.js";var X=e(t()),Z=o();function ge(){let e=z.ops.listAnomalies.useQuery(void 0,{refetchInterval:3e4}),t=z.ops.dismissAnomaly.useMutation({onSuccess:()=>e.refetch()}),r=e.data?.anomalies??[],o=r.length>0,c=e.isError&&!e.isFetching,l=(0,X.useMemo)(()=>r.filter(e=>e.tier===`hard`).length,[r]);return(0,Z.jsx)(S,{borderColor:l>0?`red.300`:void 0,children:(0,Z.jsxs)(C,{padding:0,children:[(0,Z.jsxs)(a,{paddingX:4,paddingY:2.5,children:[(0,Z.jsx)(s,{textStyle:`sm`,fontWeight:`medium`,children:`Anomalous tenants`}),l>0&&(0,Z.jsxs)(u,{colorPalette:`red`,variant:`solid`,children:[l,` hard`]}),o&&l===0&&(0,Z.jsxs)(u,{colorPalette:`yellow`,children:[r.length,` surfaced`]}),(0,Z.jsx)(A,{}),e.isFetching&&(0,Z.jsx)(n,{size:`xs`})]}),c&&(0,Z.jsx)(s,{paddingX:4,paddingBottom:3,color:`red.500`,textStyle:`xs`,children:`Could not load anomalies — Redis may be unavailable. Retrying every 30s. Do NOT interpret this as “all clear”.`}),!o&&!e.isLoading&&!c&&(0,Z.jsx)(s,{paddingX:4,paddingBottom:3,color:`gray.500`,textStyle:`xs`,children:`No active anomalies in the last 60 minutes.`}),o&&(0,Z.jsxs)(f,{size:`sm`,variant:`line`,children:[(0,Z.jsx)(m,{children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{children:`Tenant`}),(0,Z.jsx)(_,{children:`Kind`}),(0,Z.jsx)(_,{children:`Tier`}),(0,Z.jsx)(_,{children:`Current`}),(0,Z.jsx)(_,{children:`Baseline`}),(0,Z.jsx)(_,{children:`Triggered`}),(0,Z.jsx)(_,{children:`Reason`}),(0,Z.jsx)(_,{})]})}),(0,Z.jsx)(g,{children:r.map(e=>(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{fontFamily:`mono`,textStyle:`xs`,children:e.tenantId})}),(0,Z.jsx)(h,{children:e.kind.replace(`_`,` `)}),(0,Z.jsx)(h,{children:(0,Z.jsx)(u,{colorPalette:e.tier===`hard`?`red`:`yellow`,size:`xs`,children:e.tier})}),(0,Z.jsxs)(h,{children:[e.currentRate.toLocaleString(),`/min`]}),(0,Z.jsxs)(h,{children:[e.baseline.toLocaleString(),`/min`]}),(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{textStyle:`xs`,children:_e(e.triggeredAt)})}),(0,Z.jsx)(h,{maxW:`320px`,children:(0,Z.jsx)(s,{textStyle:`xs`,color:`gray.600`,lineClamp:2,children:e.reason})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(i,{size:`xs`,variant:`ghost`,onClick:()=>t.mutate({tenantId:e.tenantId,kind:e.kind}),children:`Dismiss`})})]},`${e.kind}:${e.tenantId}`))})]})]})})}function _e(e){let t=Date.now()-e,n=Math.floor(t/6e4);return n<1?`<1m ago`:n<60?`${n}m ago`:`${Math.floor(n/60)}h ${n%60}m ago`}function ve({count:e,rowHeight:t,columnCount:n,scrollContainerRef:r,renderRow:i,getItemKey:a,threshold:o=30,overscan:s=6}){let c=e>o,l=L({count:e,getScrollElement:(0,X.useCallback)(()=>r.current,[r]),estimateSize:(0,X.useCallback)(()=>t,[t]),overscan:s,enabled:c,getItemKey:a});if(!c){let t=[];for(let n=0;n<e;n++)t.push(i(n));return(0,Z.jsx)(Z.Fragment,{children:t})}let u=l.getVirtualItems(),d=l.getTotalSize(),f=u.length>0?u[0]?.start??0:0,p=u.length>0?d-(u[u.length-1]?.end??0):0;return(0,Z.jsxs)(Z.Fragment,{children:[f>0&&(0,Z.jsx)(v,{children:(0,Z.jsx)(h,{colSpan:n,style:{height:`${f}px`,padding:0,border:`none`}})}),u.map(e=>(0,Z.jsx)(X.Fragment,{children:i(e.index)},e.key)),p>0&&(0,Z.jsx)(v,{children:(0,Z.jsx)(h,{colSpan:n,style:{height:`${p}px`,padding:0,border:`none`}})})]})}var ye=360,be=36;function xe({queueNames:e}){let{hasAccess:t}=U(),n=z.useContext(),o=z.ops.getBlockedSummary.useQuery(),c=z.ops.listQueues.useQuery(),[l,u]=(0,X.useState)(null),[p,y]=(0,X.useState)(null),[b,x]=(0,X.useState)(null),[w,T]=(0,X.useState)(null),[E,D]=(0,X.useState)(5),O=(0,X.useRef)(null),j=z.ops.unblockAll.useMutation({onSuccess:e=>{d.create({title:`Unblocked ${e.unblockedCount} groups`,type:`success`}),u(null),n.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't unblock the groups`})}),M=z.ops.drainGroup.useMutation({onSuccess:e=>{d.create({title:`Drained, removed ${e.jobsRemoved} jobs`,type:`success`}),y(null),n.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't drain the group`})}),N=z.ops.moveAllBlockedToDlq.useMutation({onSuccess:e=>{d.create({title:`Moved ${e.movedCount} groups to DLQ`,type:`success`}),x(null),n.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't move the groups to the DLQ`})}),P=z.ops.canaryUnblock.useMutation({onSuccess:e=>{d.create({title:`Canary unblocked ${e.unblockedCount}`,type:`success`}),T(null),n.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't run the canary unblock`})}),F=(c.data??[]).filter(e=>e.blockedGroupCount>0);if(o.isLoading||!o.data||o.data.clusters.length===0)return null;let I=o.data.clusters;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(S,{children:(0,Z.jsxs)(C,{padding:0,children:[(0,Z.jsxs)(a,{paddingX:4,paddingY:2.5,borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,flexWrap:`wrap`,children:[(0,Z.jsxs)(s,{textStyle:`sm`,fontWeight:`medium`,color:`red.500`,children:[`Blocked — `,o.data.totalBlocked,` groups,`,` `,I.length,` error patterns`]}),(0,Z.jsx)(A,{}),t&&(0,Z.jsxs)(a,{gap:1.5,flexWrap:`wrap`,children:[F.map(e=>(0,Z.jsxs)(i,{variant:`outline`,size:`2xs`,colorPalette:`orange`,onClick:()=>u(e.name),children:[`Unblock All (`,e.blockedGroupCount,`)`]},e.name)),F.map(e=>(0,Z.jsx)(i,{variant:`outline`,size:`2xs`,colorPalette:`red`,onClick:()=>x(e.name),children:`→ DLQ`},`dlq-${e.name}`)),(0,Z.jsxs)(a,{gap:1,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Canary:`}),(0,Z.jsx)(V,{size:`xs`,type:`number`,value:E,onChange:e=>D(Math.max(1,Math.min(100,parseInt(e.target.value)||5))),width:`50px`}),F.map(e=>(0,Z.jsx)(i,{variant:`ghost`,size:`2xs`,onClick:()=>T(e.name),children:`Go`},`c-${e.name}`))]})]})]}),(0,Z.jsx)(r,{ref:O,maxHeight:`${ye}px`,overflowY:`auto`,children:(0,Z.jsxs)(f,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,Z.jsx)(m,{position:`sticky`,top:0,zIndex:1,bg:`bg`,children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{width:`60px`,textAlign:`end`,children:`Count`}),(0,Z.jsx)(_,{children:`Error`}),(0,Z.jsx)(_,{children:`Pipeline`}),(0,Z.jsx)(_,{children:`Sample Groups`}),(0,Z.jsx)(_,{width:`60px`,children:`Actions`})]})}),(0,Z.jsx)(g,{children:(0,Z.jsx)(ve,{count:I.length,rowHeight:be,columnCount:5,scrollContainerRef:O,getItemKey:e=>{let t=I[e];return`${t.queueName}::${t.normalizedMessage}`},renderRow:e=>{let t=I[e],n=`${t.queueName}::${t.normalizedMessage}`;return(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{textAlign:`end`,children:(0,Z.jsx)(s,{color:`red.500`,fontWeight:`medium`,textStyle:`xs`,children:t.count})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{textStyle:`xs`,truncate:!0,maxWidth:`300px`,title:t.sampleMessage,children:t.sampleMessage})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:t.pipelineName??`—`})}),(0,Z.jsx)(h,{children:(0,Z.jsxs)(s,{textStyle:`xs`,fontFamily:`mono`,truncate:!0,maxWidth:`160px`,children:[t.sampleGroupIds.slice(0,2).join(`, `),t.sampleGroupIds.length>2?` +${t.sampleGroupIds.length-2}`:``]})}),(0,Z.jsx)(h,{children:t.sampleGroupIds[0]&&(0,Z.jsx)(i,{variant:`outline`,size:`2xs`,colorPalette:`red`,onClick:()=>y({queueName:t.queueName,groupId:t.sampleGroupIds[0]}),children:`Drain`})})]},n)}})})]})})]})}),(0,Z.jsx)(Y,{open:!!l,onClose:()=>u(null),onConfirm:()=>{l&&j.mutate({queueName:l})},title:`Unblock All`,description:`Unblock all blocked groups in "${l}". They will retry immediately.`,isLoading:j.isPending}),(0,Z.jsx)(Y,{open:!!p,onClose:()=>y(null),onConfirm:()=>{p&&M.mutate(p)},title:`Drain Group`,description:`Permanently remove all jobs from "${p?.groupId}". Cannot be undone.`,isLoading:M.isPending}),(0,Z.jsx)(Y,{open:!!b,onClose:()=>x(null),onConfirm:()=>{b&&N.mutate({queueName:b})},title:`Move All to DLQ`,description:`Move all blocked groups in "${b}" to DLQ. They can be replayed later.`,isLoading:N.isPending}),(0,Z.jsx)(Y,{open:!!w,onClose:()=>T(null),onConfirm:()=>{w&&P.mutate({queueName:w,count:E})},title:`Canary Unblock`,description:`Unblock ${E} random groups in "${w}" as a canary test.`,isLoading:P.isPending})]})}var Se=360,Ce=36;function we({queueNames:e}){let{hasAccess:t}=U(),n=z.useContext(),o=z.ops.listAllDlqGroups.useQuery(void 0,{refetchInterval:1e4}),[c,l]=(0,X.useState)(null),[p,y]=(0,X.useState)(null),[b,x]=(0,X.useState)(null),[w,T]=(0,X.useState)(5),E=(0,X.useRef)(null),D=z.ops.replayFromDlq.useMutation({onSuccess:e=>{d.create({title:`Replayed ${e.jobsReplayed} jobs`,type:`success`}),l(null),n.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't replay the group`})}),O=z.ops.replayAllFromDlq.useMutation({onSuccess:e=>{d.create({title:`Replayed ${e.replayedCount} groups`,type:`success`}),y(null),n.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't replay the groups`})}),j=z.ops.canaryRedrive.useMutation({onSuccess:e=>{d.create({title:`Canary redrove ${e.redrivenCount}`,type:`success`}),x(null),n.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't run the canary redrive`})}),M=o.data??[],N=[...new Set(M.map(e=>e.queueName))];return o.isLoading||M.length===0?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(S,{children:(0,Z.jsxs)(C,{padding:0,children:[(0,Z.jsxs)(a,{paddingX:4,paddingY:2.5,borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,flexWrap:`wrap`,children:[(0,Z.jsxs)(s,{textStyle:`sm`,fontWeight:`medium`,color:`orange.500`,children:[`Dead Letter Queue — `,M.length,` group`,M.length===1?``:`s`]}),(0,Z.jsx)(A,{}),t&&(0,Z.jsxs)(a,{gap:1.5,flexWrap:`wrap`,children:[N.map(e=>{let t=M.filter(t=>t.queueName===e).length;return(0,Z.jsxs)(i,{variant:`outline`,size:`2xs`,colorPalette:`green`,onClick:()=>y(e),children:[`Replay All `,M.find(t=>t.queueName===e)?.queueDisplayName??e,` (`,t,`)`]},e)}),(0,Z.jsxs)(a,{gap:1,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Canary:`}),(0,Z.jsx)(V,{size:`xs`,type:`number`,value:w,onChange:e=>T(Math.max(1,Math.min(100,parseInt(e.target.value)||5))),width:`50px`}),N.map(e=>(0,Z.jsx)(i,{variant:`ghost`,size:`2xs`,onClick:()=>x(e),children:`Go`},`c-${e}`))]})]})]}),(0,Z.jsx)(r,{ref:E,maxHeight:`${Se}px`,overflowY:`auto`,children:(0,Z.jsxs)(f,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,Z.jsx)(m,{position:`sticky`,top:0,zIndex:1,bg:`bg`,children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{children:`Queue`}),(0,Z.jsx)(_,{children:`Group ID`}),(0,Z.jsx)(_,{children:`Pipeline`}),(0,Z.jsx)(_,{children:`Error`}),(0,Z.jsx)(_,{textAlign:`end`,width:`50px`,children:`Jobs`}),t&&(0,Z.jsx)(_,{width:`70px`,children:`Actions`})]})}),(0,Z.jsx)(g,{children:(0,Z.jsx)(ve,{count:M.length,rowHeight:Ce,columnCount:t?6:5,scrollContainerRef:E,getItemKey:e=>{let t=M[e];return`${t.queueName}:${t.groupId}`},renderRow:e=>{let n=M[e];return(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{children:(0,Z.jsx)(u,{size:`xs`,variant:`subtle`,children:n.queueDisplayName})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,truncate:!0,maxWidth:`160px`,children:n.groupId})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:n.pipelineName??`—`})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{textStyle:`xs`,color:`red.500`,truncate:!0,maxWidth:`220px`,title:n.error??void 0,children:n.error??``})}),(0,Z.jsx)(h,{textAlign:`end`,children:(0,Z.jsx)(s,{textStyle:`xs`,children:n.jobCount})}),t&&(0,Z.jsx)(h,{children:(0,Z.jsx)(i,{variant:`outline`,size:`2xs`,colorPalette:`green`,onClick:()=>l({queueName:n.queueName,groupId:n.groupId}),children:`Replay`})})]},`${n.queueName}:${n.groupId}`)}})})]})})]})}),(0,Z.jsx)(Y,{open:!!c,onClose:()=>l(null),onConfirm:()=>{c&&D.mutate(c)},title:`Replay from DLQ`,description:`Move "${c?.groupId}" back to main queue for reprocessing.`,isLoading:D.isPending}),(0,Z.jsx)(Y,{open:!!p,onClose:()=>y(null),onConfirm:()=>{p&&O.mutate({queueName:p})},title:`Replay All from DLQ`,description:`Move all DLQ groups in "${p}" back to main queue.`,isLoading:O.isPending}),(0,Z.jsx)(Y,{open:!!b,onClose:()=>x(null),onConfirm:()=>{b&&j.mutate({queueName:b,count:w})},title:`Canary Redrive`,description:`Replay ${w} random DLQ groups from "${b}" as canary.`,isLoading:j.isPending})]})}function Te({group:e,onClose:t}){let i=z.ops.getGroupDetail.useQuery({queueName:e?.queueName??``,groupId:e?.groupId??``},{enabled:!!e}),o=z.ops.getGroupJobs.useQuery({queueName:e?.queueName??``,groupId:e?.groupId??``,page:1,pageSize:20},{enabled:!!e}),l=i.data,d=o.data;return(0,Z.jsx)(W.Root,{open:!!e,onOpenChange:e=>!e.open&&t(),size:`lg`,children:(0,Z.jsxs)(W.Content,{bg:`bg`,children:[(0,Z.jsx)(W.Header,{children:(0,Z.jsx)(W.Title,{children:(0,Z.jsx)(s,{textStyle:`sm`,fontFamily:`mono`,wordBreak:`break-all`,children:e?.groupId})})}),(0,Z.jsx)(W.Body,{children:i.isLoading?(0,Z.jsx)(H,{paddingY:6,children:(0,Z.jsx)(n,{size:`sm`})}):l?(0,Z.jsxs)(c,{align:`stretch`,gap:4,children:[(0,Z.jsxs)(a,{gap:4,flexWrap:`wrap`,children:[(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Status`}),l.isStaleBlock?(0,Z.jsx)(u,{size:`sm`,colorPalette:`orange`,variant:`subtle`,children:`Stale`}):l.isBlocked?(0,Z.jsx)(u,{size:`sm`,colorPalette:`red`,variant:`subtle`,children:`Blocked`}):l.hasActiveJob?(0,Z.jsx)(u,{size:`sm`,colorPalette:`green`,variant:`subtle`,children:`Active`}):(0,Z.jsx)(u,{size:`sm`,colorPalette:`gray`,variant:`subtle`,children:`OK`})]}),(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Pipeline`}),(0,Z.jsx)(s,{textStyle:`sm`,children:l.pipelineName??`—`})]}),(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Pending`}),(0,Z.jsx)(s,{textStyle:`sm`,fontFamily:`mono`,children:l.pendingJobs})]}),(l.retryCount??0)>0&&(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Retries`}),(0,Z.jsx)(s,{textStyle:`sm`,fontFamily:`mono`,color:`orange.500`,children:l.retryCount})]}),l.activeJobId&&(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Active Job`}),(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,color:`green.500`,children:l.activeJobId})]})]}),(0,Z.jsxs)(a,{gap:4,children:[(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Oldest Job`}),(0,Z.jsx)(s,{textStyle:`sm`,children:fe(l.oldestJobMs)})]}),(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Newest Job`}),(0,Z.jsx)(s,{textStyle:`sm`,children:fe(l.newestJobMs)})]}),l.processingDurationMs!=null&&(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Processing`}),(0,Z.jsxs)(s,{textStyle:`sm`,children:[l.processingDurationMs,`ms`]})]})]}),l.errorMessage&&(0,Z.jsxs)(c,{align:`stretch`,gap:1,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Error`}),(0,Z.jsx)(S,{borderColor:`red.500/20`,children:(0,Z.jsxs)(C,{padding:3,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`red.500`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:l.errorMessage}),l.errorStack&&(0,Z.jsx)(r,{marginTop:2,maxHeight:`200px`,overflow:`auto`,bg:`bg.subtle`,borderRadius:`sm`,padding:2,children:(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,color:`fg.muted`,whiteSpace:`pre`,fontSize:`10px`,children:l.errorStack})})]})})]}),(0,Z.jsxs)(c,{align:`stretch`,gap:1,children:[(0,Z.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,children:[`Jobs `,d?`(${d.total})`:``]}),o.isLoading?(0,Z.jsx)(n,{size:`xs`}):d&&d.jobs.length>0?(0,Z.jsx)(c,{align:`stretch`,gap:2,children:d.jobs.map(e=>(0,Z.jsx)(S,{variant:`outline`,children:(0,Z.jsxs)(C,{padding:3,children:[(0,Z.jsxs)(a,{gap:3,marginBottom:e.data?2:0,children:[(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Job ID`}),(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,wordBreak:`break-all`,children:e.jobId})]}),(0,Z.jsxs)(c,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Score`}),(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,children:e.score})]})]}),e.data&&(0,Z.jsx)(r,{bg:`bg.subtle`,borderRadius:`sm`,padding:2,maxHeight:`200px`,overflow:`auto`,children:(0,Z.jsx)(s,{as:`pre`,textStyle:`xs`,fontFamily:`mono`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontSize:`11px`,children:JSON.stringify(e.data,null,2)})})]})},e.jobId))}):(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`No jobs in queue.`})]})]}):null}),(0,Z.jsx)(W.CloseTrigger,{})]})})}function Ee(e,t,n){let r=t?`${t}/${e.name}`:e.name;if(n.has(r))return!0;if(t){let e=t.split(`/`);for(let t=1;t<=e.length;t++){let r=e.slice(0,t).join(`/`);if(n.has(r))return!0}}return!1}function De(e,t){return t.has(e)}function Oe(e,t){if(!t.trim())return e;let n=t.toLowerCase();function r(e){if(e.name.toLowerCase().includes(n))return e;let t=e.children.map(r).filter(e=>e!==null);return t.length>0?{...e,children:t}:null}let i=e.map(r).filter(e=>e!==null);return i.length>0?i:null}function ke(e){return e===null?!1:Date.now()-e>300*1e3}function Ae(e,t){switch(t){case`all`:return!0;case`ok`:return!e.isBlocked&&!e.isStaleBlock;case`blocked`:return e.isBlocked&&!e.isStaleBlock;case`stale`:return e.isStaleBlock;case`active`:return e.hasActiveJob&&!e.isBlocked}}var je=480,Me=36;function Ne({queueNames:e}){let{hasAccess:t}=U(),o=z.useContext(),[c,l]=(0,X.useState)(`all`),[p,y]=(0,X.useState)(``),b=(0,X.useRef)(null),x=e[0],w=z.ops.listGroups.useQuery({queueName:x??``,page:1,pageSize:200},{refetchInterval:1e4,enabled:!!x}),T=(0,X.useMemo)(()=>{let e=[];if(w.data&&x)for(let t of w.data.groups)e.push({...t,queueName:x});return e},[w.data,x]),E=(0,X.useMemo)(()=>{let e=T;if(c!==`all`&&(e=e.filter(e=>Ae(e,c))),p.trim()){let t=p.toLowerCase();e=e.filter(e=>e.groupId.toLowerCase().includes(t)||e.pipelineName?.toLowerCase().includes(t)||e.errorMessage?.toLowerCase().includes(t))}return e},[T,c,p]),D=(0,X.useMemo)(()=>{let e=0,t=0,n=0,r=0;for(let i of T)i.isStaleBlock?n++:i.isBlocked?t++:e++,i.hasActiveJob&&!i.isBlocked&&r++;return{all:T.length,ok:e,blocked:t,stale:n,active:r}},[T]);(0,X.useEffect)(()=>{b.current&&(b.current.scrollTop=0)},[c,p]);let O=!!x&&w.isLoading,[j,M]=(0,X.useState)(null),[N,P]=(0,X.useState)(null),[F,I]=(0,X.useState)(null),ee=z.ops.drainGroup.useMutation({onSuccess:e=>{d.create({title:`Drained, removed ${e.jobsRemoved} jobs`,type:`success`}),P(null),o.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't drain the group`})}),te=z.ops.unblockGroup.useMutation({onSuccess:()=>{d.create({title:`Group unblocked`,type:`success`}),o.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't unblock the group`})}),L=(0,X.useMemo)(()=>{let e=p.trim();return!e||e.includes(`/`)||e.includes(` `)||!e.startsWith(`project_`)?null:e},[p]),R=z.ops.listPausedTenants.useQuery({queueName:x??``},{enabled:!!x,refetchInterval:1e4}),ne=!!(L&&R.data?.includes(L)),B=z.ops.pauseTenant.useMutation({onSuccess:(e,t)=>{d.create({title:`Paused tenant ${t.tenantId}`,type:`success`}),o.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't pause the tenant`})}),W=z.ops.unpauseTenant.useMutation({onSuccess:(e,t)=>{d.create({title:`Unpaused tenant ${t.tenantId}`,type:`success`}),o.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't unpause the tenant`})}),G=z.ops.drainTenant.useMutation({onSuccess:(e,t)=>{d.create({title:`Drained ${e.groupsDrained} groups (${e.jobsDrained} jobs) for ${t.tenantId}`,type:`success`}),I(null),o.ops.invalidate()},onError:e=>{k({error:e,fallbackTitle:`Couldn't drain the tenant's groups`}),I(null)}}),ie=[{value:`all`,label:`All`,count:D.all,color:`gray`},{value:`ok`,label:`OK`,count:D.ok,color:`green`},{value:`blocked`,label:`Blocked`,count:D.blocked,color:`red`},{value:`stale`,label:`Stale`,count:D.stale,color:`orange`},{value:`active`,label:`Active`,count:D.active,color:`blue`}];return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(S,{children:(0,Z.jsxs)(C,{padding:0,children:[t&&R.data&&R.data.length>0&&(0,Z.jsxs)(a,{paddingX:4,paddingY:2,borderBottom:`1px solid`,borderBottomColor:`border`,bg:`yellow.subtle`,gap:2,flexWrap:`wrap`,children:[(0,Z.jsx)(s,{textStyle:`xs`,fontWeight:`medium`,children:`Paused tenants:`}),R.data.map(e=>(0,Z.jsxs)(a,{gap:1,children:[(0,Z.jsx)(u,{size:`xs`,colorPalette:`yellow`,variant:`solid`,fontFamily:`mono`,children:e}),(0,Z.jsx)(i,{size:`2xs`,variant:`outline`,colorPalette:`green`,onClick:()=>x&&W.mutate({queueName:x,tenantId:e}),loading:W.isPending&&W.variables?.tenantId===e,children:`Unpause`})]},e))]}),(0,Z.jsxs)(a,{paddingX:4,paddingY:2.5,borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,flexWrap:`wrap`,children:[(0,Z.jsx)(s,{textStyle:`sm`,fontWeight:`medium`,children:`Groups`}),(0,Z.jsx)(A,{}),T.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(a,{gap:1,children:ie.map(e=>(0,Z.jsxs)(i,{size:`2xs`,variant:c===e.value?`solid`:`ghost`,colorPalette:e.color,onClick:()=>l(e.value),children:[e.label,` `,e.count>0?`(${e.count})`:``]},e.value))}),(0,Z.jsxs)(r,{position:`relative`,width:`200px`,children:[(0,Z.jsx)(r,{position:`absolute`,left:2.5,top:`50%`,transform:`translateY(-50%)`,zIndex:1,children:(0,Z.jsx)(re,{size:11,color:`var(--chakra-colors-fg-muted)`})}),(0,Z.jsx)(V,{size:`xs`,placeholder:`Search...`,value:p,onChange:e=>y(e.target.value),paddingLeft:7})]})]})]}),t&&L&&x&&(0,Z.jsxs)(a,{paddingX:4,paddingY:2,borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,flexWrap:`wrap`,bg:`bg.subtle`,children:[(0,Z.jsx)(s,{textStyle:`xs`,fontWeight:`medium`,children:`Tenant actions:`}),(0,Z.jsx)(u,{size:`xs`,variant:`subtle`,fontFamily:`mono`,children:L}),ne?(0,Z.jsx)(i,{size:`2xs`,variant:`outline`,colorPalette:`green`,onClick:()=>{B.reset(),W.mutate({queueName:x,tenantId:L})},loading:W.isPending,children:`Unpause Tenant`}):(0,Z.jsx)(i,{size:`2xs`,variant:`outline`,colorPalette:`yellow`,onClick:()=>{W.reset(),B.mutate({queueName:x,tenantId:L})},loading:B.isPending,children:`Pause Tenant`}),(0,Z.jsx)(i,{size:`2xs`,variant:`outline`,colorPalette:`red`,onClick:()=>I(L),children:`Drain All Tenant Groups`})]}),O?(0,Z.jsx)(H,{paddingY:6,children:(0,Z.jsx)(n,{size:`sm`})}):T.length===0?(0,Z.jsx)(r,{padding:4,children:(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`No groups — queues are idle.`})}):E.length===0?(0,Z.jsx)(r,{padding:4,children:(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`No groups match current filters.`})}):(0,Z.jsx)(r,{ref:b,maxHeight:`${je}px`,overflowY:`auto`,children:(0,Z.jsxs)(f,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,Z.jsx)(m,{position:`sticky`,top:0,zIndex:1,bg:`bg`,children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{children:`Group ID`}),(0,Z.jsx)(_,{width:`140px`,children:`Pipeline`}),(0,Z.jsx)(_,{textAlign:`end`,width:`50px`,children:`Pend.`}),(0,Z.jsx)(_,{textAlign:`end`,width:`45px`,children:`Retry`}),(0,Z.jsx)(_,{width:`75px`,children:`Oldest`}),(0,Z.jsx)(_,{width:`65px`,children:`Status`}),t&&(0,Z.jsx)(_,{width:`100px`,children:`Actions`})]})}),(0,Z.jsx)(g,{children:(0,Z.jsx)(ve,{count:E.length,rowHeight:Me,columnCount:t?7:6,scrollContainerRef:b,getItemKey:e=>{let t=E[e];return`${t.queueName}:${t.groupId}`},renderRow:e=>{let n=E[e],r=!n.isBlocked&&ke(n.oldestJobMs);return(0,Z.jsxs)(v,{cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:()=>M({queueName:n.queueName,groupId:n.groupId}),children:[(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,truncate:!0,title:n.groupId,children:n.groupId})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,truncate:!0,children:n.pipelineName??`—`})}),(0,Z.jsx)(h,{textAlign:`end`,children:(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,children:n.pendingJobs})}),(0,Z.jsx)(h,{textAlign:`end`,children:(n.retryCount??0)>0?(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,color:`orange.500`,children:n.retryCount}):(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,color:`fg.muted`,children:`—`})}),(0,Z.jsx)(h,{children:(0,Z.jsxs)(s,{textStyle:`xs`,color:r?`orange.500`:`fg.muted`,fontWeight:r?`medium`:void 0,children:[fe(n.oldestJobMs),r?` ⚠`:``]})}),(0,Z.jsx)(h,{children:n.isStaleBlock?(0,Z.jsx)(u,{size:`xs`,colorPalette:`orange`,variant:`subtle`,children:`Stale`}):n.isBlocked?(0,Z.jsx)(u,{size:`xs`,colorPalette:`red`,variant:`subtle`,children:`Blocked`}):n.hasActiveJob?(0,Z.jsx)(u,{size:`xs`,colorPalette:`green`,variant:`subtle`,children:`Active`}):(0,Z.jsx)(u,{size:`xs`,colorPalette:`gray`,variant:`subtle`,children:`OK`})}),t&&(0,Z.jsx)(h,{onClick:e=>e.stopPropagation(),children:(0,Z.jsxs)(a,{gap:1,children:[n.isBlocked&&(0,Z.jsx)(i,{variant:`outline`,size:`2xs`,colorPalette:`green`,onClick:()=>te.mutate({queueName:n.queueName,groupId:n.groupId}),loading:te.isPending,children:`Retry`}),(0,Z.jsx)(i,{variant:`outline`,size:`2xs`,colorPalette:`red`,onClick:()=>P({queueName:n.queueName,groupId:n.groupId}),children:`Drain`})]})})]},`${n.queueName}:${n.groupId}`)}})})]})})]})}),(0,Z.jsx)(Te,{group:j,onClose:()=>M(null)}),(0,Z.jsx)(Y,{open:!!N,onClose:()=>P(null),onConfirm:()=>{N&&ee.mutate(N)},title:`Drain Group`,description:`Permanently remove all jobs from "${N?.groupId}". Cannot be undone.`,isLoading:ee.isPending}),(0,Z.jsx)(Y,{open:!!F,onClose:()=>I(null),onConfirm:()=>{F&&x&&G.mutate({queueName:x,tenantId:F})},title:`Drain All Tenant Groups`,description:`Permanently remove ALL pending groups for tenant "${F}" across every pipeline. Cannot be undone. The event log in ClickHouse is preserved; you can replay later if needed.`,isLoading:G.isPending})]})}function Pe({node:e,parentPath:t,depth:n,pausedKeys:o,expandedPaths:c,onToggleExpand:l,onPause:d,onUnpause:f,hasAccess:p,queueNames:m}){let h=t?`${t}/${e.name}`:e.name,g=e.children.length>0,_=c.has(h),v=Ee(e,t,o),y=De(h,o),b=!g;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(a,{paddingY:1,paddingX:3,paddingLeft:`${n*20+12}px`,cursor:g?`pointer`:`default`,_hover:{bg:`bg.subtle`},onClick:()=>g&&l(h),borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,opacity:v?.6:1,children:[(0,Z.jsx)(r,{width:`14px`,flexShrink:0,children:g?_?(0,Z.jsx)(R,{size:12}):(0,Z.jsx)(te,{size:12}):null}),(0,Z.jsx)(s,{textStyle:`xs`,fontWeight:n===0?`semibold`:`medium`,fontFamily:b?`mono`:void 0,flex:1,color:v?`orange.500`:void 0,children:e.name}),v&&(0,Z.jsx)(u,{size:`xs`,colorPalette:`orange`,variant:`subtle`,children:`Paused`}),(0,Z.jsxs)(a,{gap:1,flexShrink:0,children:[e.pending>0&&(0,Z.jsx)(u,{size:`xs`,colorPalette:`blue`,variant:`subtle`,children:e.pending}),e.active>0&&(0,Z.jsx)(u,{size:`xs`,colorPalette:`green`,variant:`subtle`,children:e.active}),e.blocked>0&&(0,Z.jsx)(u,{size:`xs`,colorPalette:`red`,variant:`subtle`,children:e.blocked})]}),p&&(0,Z.jsx)(r,{flexShrink:0,onClick:e=>e.stopPropagation(),children:y?(0,Z.jsx)(i,{variant:`ghost`,size:`2xs`,colorPalette:`green`,onClick:()=>f(h),children:(0,Z.jsx)(B,{size:10})}):v?null:(0,Z.jsx)(i,{variant:`ghost`,size:`2xs`,colorPalette:`orange`,onClick:()=>d(h),children:(0,Z.jsx)(ne,{size:10})})})]}),g&&_&&e.children.map(e=>(0,Z.jsx)(Pe,{node:e,parentPath:h,depth:n+1,pausedKeys:o,expandedPaths:c,onToggleExpand:l,onPause:d,onUnpause:f,hasAccess:p,queueNames:m},e.name))]})}function Fe({pipelineTree:e,pausedKeys:t,queueNames:n}){let{hasAccess:o}=U(),c=z.useContext(),[l,u]=(0,X.useState)(``),[f,p]=(0,X.useState)(()=>new Set),m=(0,X.useMemo)(()=>new Set(t),[t]),h=(0,X.useMemo)(()=>Oe(e,l),[e,l]),g=z.ops.pausePipeline.useMutation({onSuccess:()=>{d.create({title:`Pipeline paused`,type:`success`}),c.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't pause the pipeline`})}),_=z.ops.unpausePipeline.useMutation({onSuccess:()=>{d.create({title:`Pipeline unpaused`,type:`success`}),c.ops.invalidate()},onError:e=>k({error:e,fallbackTitle:`Couldn't unpause the pipeline`})});function v(e){p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function y(){let t=new Set;function n(e,r){for(let i of e){let e=r?`${r}/${i.name}`:i.name;t.add(e),n(i.children,e)}}n(e,``),p(t)}let b=n[0];function x(e){b&&g.mutate({queueName:b,key:e})}function w(e){b&&_.mutate({queueName:b,key:e})}return(0,Z.jsx)(S,{children:(0,Z.jsxs)(C,{padding:0,children:[(0,Z.jsxs)(a,{paddingX:4,paddingY:2.5,borderBottom:`1px solid`,borderBottomColor:`border`,children:[(0,Z.jsx)(s,{textStyle:`sm`,fontWeight:`medium`,children:`Pipeline Tree`}),(0,Z.jsx)(A,{}),e.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(r,{position:`relative`,width:`200px`,children:[(0,Z.jsx)(r,{position:`absolute`,left:2.5,top:`50%`,transform:`translateY(-50%)`,zIndex:1,children:(0,Z.jsx)(re,{size:11,color:`var(--chakra-colors-fg-muted)`})}),(0,Z.jsx)(V,{size:`xs`,placeholder:`Filter...`,value:l,onChange:e=>u(e.target.value),paddingLeft:7})]}),(0,Z.jsx)(i,{variant:`ghost`,size:`2xs`,onClick:y,children:`Expand all`}),(0,Z.jsx)(i,{variant:`ghost`,size:`2xs`,onClick:()=>p(new Set),children:`Collapse`})]})]}),e.length===0?(0,Z.jsx)(r,{padding:4,children:(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`No pipelines discovered yet.`})}):h===null?(0,Z.jsx)(r,{padding:4,children:(0,Z.jsxs)(s,{textStyle:`xs`,color:`fg.muted`,children:[`No pipelines match "`,l,`"`]})}):h.map(e=>(0,Z.jsx)(Pe,{node:e,parentPath:``,depth:0,pausedKeys:m,expandedPaths:f,onToggleExpand:v,onPause:x,onUnpause:w,hasAccess:o,queueNames:n},e.name))]})})}function Ie({data:e}){let t=F().data,n=t?.state===`running`,r=e.pausedKeys,i=r.length>0;return!n&&!i?null:(0,Z.jsxs)(S,{overflow:`hidden`,children:[(0,Z.jsx)(s,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,paddingX:4,paddingTop:3,paddingBottom:2,children:`Active Operations`}),(0,Z.jsxs)(c,{align:`stretch`,gap:0,paddingX:4,paddingBottom:3,children:[n&&t&&(0,Z.jsxs)(a,{gap:2,paddingY:2,borderBottom:i?`1px solid`:void 0,borderBottomColor:`border`,children:[(0,Z.jsx)(P,{colorPalette:`blue`,size:`sm`,children:(0,Z.jsx)(I,{})}),(0,Z.jsx)(s,{textStyle:`sm`,fontWeight:`medium`,children:`Replay running`}),t.currentProjection&&(0,Z.jsx)(u,{size:`sm`,variant:`subtle`,colorPalette:`blue`,children:t.currentProjection}),(0,Z.jsx)(A,{}),t.runId&&(0,Z.jsx)(G,{href:`/ops/projections/${t.runId}`,style:{textDecoration:`none`},children:(0,Z.jsx)(s,{textStyle:`xs`,color:`blue.500`,cursor:`pointer`,children:`View progress`})})]}),i&&(0,Z.jsxs)(c,{align:`stretch`,gap:1,paddingY:2,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Paused pipelines`}),(0,Z.jsx)(a,{gap:2,flexWrap:`wrap`,children:r.map(e=>(0,Z.jsx)(u,{size:`sm`,colorPalette:`orange`,variant:`subtle`,children:e},e))})]})]})]})}function Q({label:e,value:t,sublabel:n,href:r,color:i,testId:o,warning:c}){let l=(0,Z.jsxs)(j,{cursor:r?`pointer`:void 0,_hover:r?{bg:`bg.subtle`}:void 0,borderRadius:`md`,padding:2,transition:`background 0.1s`,"data-testid":o,"data-warning":c===void 0?void 0:c?`true`:`false`,children:[(0,Z.jsx)(N,{whiteSpace:`nowrap`,children:(0,Z.jsxs)(a,{gap:1,children:[(0,Z.jsx)(s,{children:e}),r&&(0,Z.jsx)(p,{size:10})]})}),(0,Z.jsx)(M,{color:i,whiteSpace:`nowrap`,children:t}),n&&(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,fontWeight:`normal`,whiteSpace:`nowrap`,children:n})]});return r?(0,Z.jsx)(G,{href:r,style:{textDecoration:`none`},children:l}):l}var Le=80,Re=70;function ze({data:e}){let t=e.redisMemoryMaxBytes>0?e.redisMemoryUsedBytes/e.redisMemoryMaxBytes*100:null,n=t===null?null:Math.round(t*10)/10,r=t!==null&&t>=Le,i=e.redisEngineCpuPercent!==null&&e.redisEngineCpuPercent>=Re,a=n===null?e.redisMemoryPeakBytes>0?`peak ${me(e.redisMemoryPeakBytes)}`:void 0:`${n}% of ${me(e.redisMemoryMaxBytes)}`;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Q,{label:`Redis mem`,value:me(e.redisMemoryUsedBytes),sublabel:a,color:r?`red.500`:void 0,testId:`redis-memory-stat`,warning:r}),(0,Z.jsx)(Q,{label:`Redis CPU`,value:e.redisEngineCpuPercent===null?`-`:`${e.redisEngineCpuPercent}%`,sublabel:e.redisEngineCpuPercent===null?`sampling…`:`main-thread`,color:i?`red.500`:void 0,testId:`redis-engine-cpu-stat`,warning:i}),(0,Z.jsx)(Q,{label:`Redis conns`,value:e.redisConnectedClients.toString(),sublabel:`clients`,testId:`redis-clients-stat`})]})}function Be(){let e=z.ops.getReplayHistory.useQuery(void 0,{refetchInterval:1e4}).data?.[0];return(0,Z.jsxs)(S,{overflow:`hidden`,children:[(0,Z.jsx)(G,{href:`/ops/projections`,style:{textDecoration:`none`},children:(0,Z.jsxs)(a,{paddingX:4,paddingTop:3,paddingBottom:2,cursor:`pointer`,_hover:{color:`orange.500`},transition:`color 0.1s`,children:[(0,Z.jsx)(s,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,children:`Latest Replay`}),(0,Z.jsx)(p,{size:10})]})}),(0,Z.jsx)(r,{paddingX:4,paddingBottom:4,children:e?(0,Z.jsx)(G,{href:`/ops/projections/${e.runId}`,style:{textDecoration:`none`},children:(0,Z.jsxs)(a,{gap:3,cursor:`pointer`,_hover:{opacity:.8},transition:`opacity 0.1s`,children:[(0,Z.jsx)(u,{size:`sm`,variant:`subtle`,colorPalette:ee(e.state),children:e.state}),(0,Z.jsx)(s,{textStyle:`xs`,truncate:!0,maxWidth:`240px`,children:e.description||`—`}),(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:pe(e.startedAt,e.completedAt)}),(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,whiteSpace:`nowrap`,children:e.completedAt?new Date(e.completedAt).toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):`—`})]})}):(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`No replay history`})})]})}var $={staged:{stroke:`#06b6d4`,fill:`#06b6d4`},completed:{stroke:`#22c55e`,fill:`#22c55e`},failed:{stroke:`#ef4444`,fill:`#ef4444`},pending:`#a78bfa`,blocked:`#f97316`,parked:`#eab308`},Ve=[{label:`2s`,ms:0},{label:`5s`,ms:5e3},{label:`15s`,ms:15e3},{label:`30s`,ms:3e4},{label:`1m`,ms:6e4}];function He(e,t){if(e.length===0)return[];if(t<=0)return e.map(e=>({timestamp:e.timestamp,staged:e.ingestedPerSec,completed:e.completedPerSec,failed:e.failedPerSec,pending:e.pendingCount,blocked:e.blockedCount,parked:e.parkedCount}));let n=new Map;for(let r of e){let e=Math.floor(r.timestamp/t)*t,i=n.get(e);i?(i.sum.staged+=r.ingestedPerSec,i.sum.completed+=r.completedPerSec,i.sum.failed+=r.failedPerSec,i.sum.pending+=r.pendingCount,i.sum.blocked+=r.blockedCount,i.sum.parked+=r.parkedCount,i.count++):n.set(e,{sum:{timestamp:e,staged:r.ingestedPerSec,completed:r.completedPerSec,failed:r.failedPerSec,pending:r.pendingCount,blocked:r.blockedCount,parked:r.parkedCount},count:1})}let r=[];for(let[,{sum:e,count:t}]of n)r.push({timestamp:e.timestamp,staged:e.staged/t,completed:e.completed/t,failed:e.failed/t,pending:Math.round(e.pending/t),blocked:Math.round(e.blocked/t),parked:Math.round(e.parked/t)});return r.sort((e,t)=>e.timestamp-t.timestamp),r}function Ue(e){return new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}function We(e){return new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function Ge(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:e===0?`0`:Number.isInteger(e)?e.toString():e.toFixed(1)}function Ke(e){if(e.length<2)return[];let t=e[0].timestamp,n=e[e.length-1].timestamp,r=n-t,i=6e4;r>20*6e4?i=5*6e4:r>10*6e4&&(i=2*6e4);let a=Math.ceil(t/i)*i,o=[];for(let e=a;e<=n;e+=i)o.push(e);return o}function qe(e){if(e<=0)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t,r;return r=n<=1?1:n<=2?2:n<=5?5:10,r*t}function Je({active:e,payload:t,label:n}){if(!e||!t?.length||n==null)return null;let i=t.filter(e=>e.name!==`Pending`&&e.name!==`Blocked`&&e.name!==`Parked`),o=t.filter(e=>e.name===`Pending`||e.name===`Blocked`||e.name===`Parked`);return(0,Z.jsxs)(r,{bg:`bg.panel`,borderWidth:`1px`,borderColor:`border`,borderRadius:`md`,padding:2,shadow:`md`,minWidth:`140px`,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:We(n)}),i.map(e=>(0,Z.jsxs)(a,{justify:`space-between`,gap:3,children:[(0,Z.jsxs)(a,{gap:1.5,children:[(0,Z.jsx)(r,{width:`6px`,height:`6px`,borderRadius:`full`,bg:e.color}),(0,Z.jsx)(s,{textStyle:`xs`,children:e.name})]}),(0,Z.jsxs)(s,{textStyle:`xs`,fontFamily:`mono`,fontWeight:`medium`,children:[e.value.toFixed(1),`/s`]})]},e.name)),o.length>0&&o.some(e=>e.value>0)&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(r,{height:`1px`,bg:`border`,marginY:1}),o.map(e=>(0,Z.jsxs)(a,{justify:`space-between`,gap:3,children:[(0,Z.jsxs)(a,{gap:1.5,children:[(0,Z.jsx)(r,{width:`6px`,height:`2px`,bg:e.color}),(0,Z.jsx)(s,{textStyle:`xs`,children:e.name})]}),(0,Z.jsx)(s,{textStyle:`xs`,fontFamily:`mono`,children:e.value.toLocaleString()})]},e.name))]})]})}function Ye({showCounts:e}){return(0,Z.jsx)(a,{gap:3,justify:`center`,paddingTop:2,children:[{name:`Staged/s`,color:$.staged.stroke,type:`area`},{name:`Completed/s`,color:$.completed.stroke,type:`area`},{name:`Failed/s`,color:$.failed.stroke,type:`area`},...e?[{name:`Pending`,color:$.pending,type:`line`},{name:`Blocked`,color:$.blocked,type:`line`},{name:`Parked`,color:$.parked,type:`line`}]:[]].map(e=>(0,Z.jsxs)(a,{gap:1,children:[e.type===`area`?(0,Z.jsx)(r,{width:`6px`,height:`6px`,borderRadius:`full`,bg:e.color}):(0,Z.jsx)(r,{width:`10px`,height:`2px`,bg:e.color,borderRadius:`full`,opacity:.7}),(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:e.name})]},e.name))})}function Xe({data:e}){let t=(0,X.useRef)(1),[r,o]=(0,X.useState)(5e3),l=(0,X.useMemo)(()=>He(e.throughputHistory,r),[e.throughputHistory,r]),u=(0,X.useMemo)(()=>Ke(l),[l]),d=(0,X.useMemo)(()=>{if(l.length===0)return 1;let e=0;for(let t of l)e=Math.max(e,t.staged,t.completed,t.failed);let n=qe(e*1.3);return(n>t.current*1.2||n<t.current*.5)&&(t.current=n),t.current},[l]),f=(0,X.useMemo)(()=>l.some(e=>e.pending>0||e.blocked>0||e.parked>0),[l]),p=(0,X.useMemo)(()=>{if(!f)return 10;let e=0;for(let t of l)e=Math.max(e,t.pending,t.blocked,t.parked);return e<=0?10:qe(e*1.3)},[l,f]);return l.length<2?(0,Z.jsx)(H,{height:`280px`,children:(0,Z.jsxs)(c,{gap:2,children:[(0,Z.jsx)(n,{size:`sm`}),(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:`Collecting data...`})]})}):(0,Z.jsxs)(c,{align:`stretch`,gap:0,children:[(0,Z.jsxs)(a,{justify:`space-between`,paddingX:1,paddingBottom:1,children:[(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,fontStyle:`italic`,children:`events/s`}),(0,Z.jsx)(a,{gap:.5,children:Ve.map(e=>(0,Z.jsx)(i,{size:`2xs`,variant:r===e.ms?`subtle`:`ghost`,colorPalette:r===e.ms?`orange`:`gray`,onClick:()=>o(e.ms),fontFamily:`mono`,minWidth:`auto`,paddingX:1.5,children:e.label},e.ms))}),f&&(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,fontStyle:`italic`,children:`count`})]}),(0,Z.jsx)(se,{width:`100%`,height:280,children:(0,Z.jsxs)(ue,{data:l,margin:{top:8,right:f?4:12,bottom:4,left:-8},children:[(0,Z.jsxs)(`defs`,{children:[(0,Z.jsxs)(`linearGradient`,{id:`gradStaged`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,Z.jsx)(`stop`,{offset:`0%`,stopColor:$.staged.fill,stopOpacity:.2}),(0,Z.jsx)(`stop`,{offset:`100%`,stopColor:$.staged.fill,stopOpacity:.02})]}),(0,Z.jsxs)(`linearGradient`,{id:`gradCompleted`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,Z.jsx)(`stop`,{offset:`0%`,stopColor:$.completed.fill,stopOpacity:.2}),(0,Z.jsx)(`stop`,{offset:`100%`,stopColor:$.completed.fill,stopOpacity:.02})]}),(0,Z.jsxs)(`linearGradient`,{id:`gradFailed`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,Z.jsx)(`stop`,{offset:`0%`,stopColor:$.failed.fill,stopOpacity:.25}),(0,Z.jsx)(`stop`,{offset:`100%`,stopColor:$.failed.fill,stopOpacity:.02})]})]}),(0,Z.jsx)(oe,{strokeDasharray:`3 3`,stroke:`var(--chakra-colors-border)`,strokeOpacity:.4,vertical:!1}),(0,Z.jsx)(ae,{dataKey:`timestamp`,type:`number`,domain:[`dataMin`,`dataMax`],scale:`time`,ticks:u,tickFormatter:Ue,tick:{fontSize:10,fill:`var(--chakra-colors-fg-muted)`},axisLine:!1,tickLine:!1}),(0,Z.jsx)(ce,{yAxisId:`rate`,tick:{fontSize:10,fill:`var(--chakra-colors-fg-muted)`},axisLine:!1,tickLine:!1,width:40,domain:[0,d],allowDataOverflow:!0,tickFormatter:Ge}),f&&(0,Z.jsx)(ce,{yAxisId:`count`,orientation:`right`,tick:{fontSize:10,fill:`var(--chakra-colors-fg-muted)`},axisLine:!1,tickLine:!1,width:40,domain:[0,p],allowDataOverflow:!0,tickFormatter:Ge}),(0,Z.jsx)(ie,{content:(0,Z.jsx)(Je,{}),cursor:{stroke:`var(--chakra-colors-fg-muted)`,strokeWidth:1,strokeDasharray:`3 3`,strokeOpacity:.3}}),(0,Z.jsx)(K,{yAxisId:`rate`,type:`monotone`,dataKey:`staged`,stroke:$.staged.stroke,fill:`url(#gradStaged)`,strokeWidth:1.5,name:`Staged/s`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:0}}),(0,Z.jsx)(K,{yAxisId:`rate`,type:`monotone`,dataKey:`completed`,stroke:$.completed.stroke,fill:`url(#gradCompleted)`,strokeWidth:1.5,name:`Completed/s`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:0}}),(0,Z.jsx)(K,{yAxisId:`rate`,type:`monotone`,dataKey:`failed`,stroke:$.failed.stroke,fill:`url(#gradFailed)`,strokeWidth:1.5,name:`Failed/s`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:0}}),(0,Z.jsx)(le,{yAxisId:f?`count`:`rate`,type:`monotone`,dataKey:`pending`,stroke:$.pending,strokeWidth:1,strokeOpacity:.6,strokeDasharray:`4 3`,dot:!1,activeDot:{r:2,strokeWidth:0},name:`Pending`,isAnimationActive:!1}),(0,Z.jsx)(le,{yAxisId:f?`count`:`rate`,type:`monotone`,dataKey:`blocked`,stroke:$.blocked,strokeWidth:1,strokeOpacity:.6,strokeDasharray:`4 3`,dot:!1,activeDot:{r:2,strokeWidth:0},name:`Blocked`,isAnimationActive:!1}),(0,Z.jsx)(le,{yAxisId:f?`count`:`rate`,type:`monotone`,dataKey:`parked`,stroke:$.parked,strokeWidth:1,strokeOpacity:.6,strokeDasharray:`4 3`,dot:!1,activeDot:{r:2,strokeWidth:0},name:`Parked`,isAnimationActive:!1})]})}),(0,Z.jsx)(Ye,{showCounts:f})]})}function Ze({data:e}){let t=e.queues.reduce((e,t)=>e+t.blockedGroupCount,0),n=e.queues.reduce((e,t)=>e+t.parkedGroupCount,0),i=e.queues.reduce((e,t)=>e+t.dlqCount,0),o=z.ops.listQueues.useQuery(void 0,{refetchInterval:1e4}),u=(0,X.useMemo)(()=>(o.data??[]).map(e=>e.name),[o.data]);return(0,Z.jsxs)(c,{align:`stretch`,gap:5,width:`full`,children:[(0,Z.jsx)(Ie,{data:e}),(0,Z.jsxs)(l,{columns:{base:2,md:5,lg:10},gap:1,children:[(0,Z.jsx)(Q,{label:`Staged/s`,value:q(e.throughputIngestedPerSec),sublabel:`peak ${q(e.peakIngestedPerSec)}`}),(0,Z.jsx)(Q,{label:`Completed/s`,value:q(e.completedPerSec),sublabel:`peak ${q(e.peakCompletedPerSec)} · ${de(e.totalCompleted)} total`}),(0,Z.jsx)(Q,{label:`Failed/s`,value:q(e.failedPerSec),sublabel:e.totalFailed>0?`${de(e.totalFailed)} total`:void 0,color:e.failedPerSec>0?`red.500`:void 0}),(0,Z.jsx)(Q,{label:`Blocked`,value:t.toString(),sublabel:`${e.totalGroups} groups`,color:t>0?`red.500`:void 0}),(0,Z.jsx)(Q,{label:`Parked`,value:n.toString(),sublabel:`over cap`,color:n>0?`orange.500`:void 0}),(0,Z.jsx)(Q,{label:`P50`,value:J(e.latencyP50Ms),sublabel:`peak ${J(e.peakLatencyP50Ms)}`}),(0,Z.jsx)(Q,{label:`P99`,value:J(e.latencyP99Ms),sublabel:`peak ${J(e.peakLatencyP99Ms)}`}),(0,Z.jsx)(Q,{label:`DLQ`,value:i.toString(),color:i>0?`orange.500`:void 0}),(0,Z.jsx)(ze,{data:e})]}),(0,Z.jsx)(S,{overflow:`hidden`,children:(0,Z.jsxs)(C,{padding:4,children:[(0,Z.jsx)(s,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,marginBottom:2,children:`Throughput`}),(0,Z.jsx)(Xe,{data:e})]})}),(0,Z.jsx)(Fe,{pipelineTree:e.pipelineTree,pausedKeys:e.pausedKeys,queueNames:u}),(0,Z.jsxs)(S,{overflow:`hidden`,children:[(0,Z.jsx)(a,{paddingX:4,paddingTop:3,paddingBottom:2,children:(0,Z.jsx)(s,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,children:`Top Errors`})}),e.topErrors.length>0?(0,Z.jsx)(y,{children:(0,Z.jsxs)(f,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,Z.jsx)(m,{children:(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{width:`60px`,children:`Count`}),(0,Z.jsx)(_,{children:`Error`}),(0,Z.jsx)(_,{children:`Pipeline`})]})}),(0,Z.jsx)(g,{children:e.topErrors.slice(0,5).map(e=>(0,Z.jsxs)(v,{children:[(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{color:`red.500`,fontWeight:`medium`,children:e.count})}),(0,Z.jsx)(h,{children:(0,Z.jsx)(s,{truncate:!0,maxWidth:`400px`,children:e.sampleMessage})}),(0,Z.jsx)(h,{color:`fg.muted`,children:e.pipelineName??`—`})]},`${e.queueName}::${e.normalizedMessage}`))})]})}):(0,Z.jsx)(r,{paddingX:4,paddingBottom:4,children:(0,Z.jsx)(s,{textStyle:`xs`,color:`fg.muted`,children:t>0?`0 errors`:`No errors`})})]}),(0,Z.jsx)(ge,{}),(0,Z.jsx)(xe,{queueNames:u}),(0,Z.jsx)(we,{queueNames:u}),(0,Z.jsx)(Ne,{queueNames:u}),(0,Z.jsx)(Be,{})]})}var Qe={connected:`green`,connecting:`orange`,disconnected:`red`},$e={connected:`Live`,connecting:`Connecting`,disconnected:`Disconnected`};function et({status:e}){return(0,Z.jsxs)(P,{size:`sm`,colorPalette:Qe[e],children:[(0,Z.jsx)(I,{}),$e[e]]})}function tt(){let[e,t]=(0,X.useState)(null),[n,r]=(0,X.useState)(`connecting`);return z.ops.dashboardStream.useSubscription(void 0,{onStarted:()=>r(`connecting`),onData:e=>{t(e),r(`connected`)},onError:()=>r(`disconnected`)}),{data:e,status:n}}function nt(){let{data:e,status:t}=tt(),r=z.ops.getDashboardSnapshot.useQuery(void 0,{enabled:!e,refetchInterval:e?!1:5e3}),i=e??r.data??null;return(0,Z.jsx)(he,{children:(0,Z.jsxs)(x,{children:[(0,Z.jsxs)(b.Header,{children:[(0,Z.jsx)(b.Heading,{children:`Ops Dashboard`}),(0,Z.jsx)(A,{}),(0,Z.jsx)(et,{status:t})]}),(0,Z.jsx)(b.Container,{children:i?(0,Z.jsx)(Ze,{data:i}):(0,Z.jsx)(H,{paddingY:20,children:(0,Z.jsx)(T,{children:(0,Z.jsxs)(O,{children:[(0,Z.jsx)(D,{children:(0,Z.jsx)(n,{size:`lg`})}),(0,Z.jsx)(w,{children:`Loading metrics`}),(0,Z.jsx)(E,{children:`Waiting for the first collection cycle...`})]})})})})]})})}export{nt as default};
|
|
2
|
-
//# sourceMappingURL=ops-Djcw5_lX.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
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"./heading-C0sACr0w.js";import{n as s,t as c}from"./v-stack-hkuSkmCA.js";import{An as l}from"./ProjectAvatar-DtI9dT1f.js";import{n as u}from"./toaster-BsYkODqs.js";import{$ as d,L as f,Q as p,X as m,Y as h,Z as g,et as _,nt as v}from"./Markdown-C9extmbX.js";import{a as y,n as b,r as x}from"./field-BadoNaN5.js";import{n as S}from"./personalProject-DMRX2-SI.js";import{t as C}from"./errors-e711UMq7.js";import{n as w,r as T,t as E}from"./native-select-DL2k8x0o.js";import{t as D}from"./spacer-C38e7o6r.js";import{tt as O}from"./immer-CFru3D02.js";import{r as k}from"./next-router-CWLrMXvP.js";import{Mr as A,nr as j,zn as M}from"./index-CPtTUYLD.js";import{n as N}from"./index.module-CJLn6vye.js";import{t as P}from"./switch-DGatWO8v.js";import{a as F,i as I,n as L,r as R,t as z}from"./_shell-BGaZUKLi.js";import{n as B,r as V}from"./useAdminResource-CU4T3p5x.js";var H=M(),U=e(t()),W=a(),G=25;function K(){let e=k(),t=(0,U.useRef)(typeof e.query.q==`string`?e.query.q:``),[r,i]=(0,U.useState)(1),[a,o]=(0,U.useState)(t.current),[c]=N(a,300),[u,v]=(0,U.useState)(null),y=B(`organization`,{pagination:{page:r,perPage:G},sort:{field:`createdAt`,order:`DESC`},filter:c?{query:c}:{}});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(L,{title:`Organizations`,searchValue:a,onSearchChange:e=>{o(e),i(1)},searchPlaceholder:`Search by ID, name, or slug`,isLoading:y.isLoading,isFetching:y.isFetching,error:y.error,pagination:{page:r,perPage:G,total:y.data?.total??0,onPageChange:i},children:(0,W.jsxs)(d,{variant:`line`,size:`md`,width:`full`,children:[(0,W.jsx)(p,{children:(0,W.jsxs)(_,{children:[(0,W.jsx)(g,{children:`ID`}),(0,W.jsx)(g,{children:`Name`}),(0,W.jsx)(g,{children:`Slug`}),(0,W.jsx)(g,{children:`Plan model`}),(0,W.jsx)(g,{children:`Currency`}),(0,W.jsx)(g,{children:`SSO domain`}),(0,W.jsx)(g,{children:`Created`}),(0,W.jsx)(g,{width:`60px`,textAlign:`right`})]})}),(0,W.jsxs)(h,{children:[y.data?.data.length===0&&(0,W.jsx)(_,{children:(0,W.jsx)(m,{colSpan:8,children:(0,W.jsx)(s,{color:`fg.muted`,textAlign:`center`,paddingY:6,children:`No organizations match your search.`})})}),y.data?.data.map(e=>(0,W.jsxs)(_,{children:[(0,W.jsx)(m,{fontSize:`xs`,color:`fg.muted`,children:e.id}),(0,W.jsx)(m,{children:e.name}),(0,W.jsx)(m,{children:e.slug}),(0,W.jsx)(m,{children:e.pricingModel}),(0,W.jsx)(m,{children:e.currency}),(0,W.jsx)(m,{children:e.ssoDomain??(0,W.jsx)(R,{})}),(0,W.jsx)(m,{children:F(e.createdAt)}),(0,W.jsx)(m,{textAlign:`right`,children:(0,W.jsx)(n,{width:`full`,height:`full`,display:`flex`,justifyContent:`end`,children:(0,W.jsxs)(f.Root,{children:[(0,W.jsx)(f.Trigger,{children:(0,W.jsx)(l,{size:16})}),(0,W.jsx)(f.Content,{children:(0,W.jsxs)(f.Item,{value:`edit`,onClick:()=>v(e),children:[(0,W.jsx)(j,{size:16}),`Edit`]})})]})})})]},e.id))]})]})}),(0,W.jsx)(X,{organization:u,onClose:()=>v(null)})]})}function q(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString().slice(0,10)}function J(e){if(e===``)return null;let t=Number(e);return Number.isFinite(t)?t:null}function Y(e){return e.trim()===``?null:e}function X({organization:e,onClose:t}){let n=V(`organization`),[a,o]=(0,U.useState)(null);(0,U.useEffect)(()=>{e&&o({name:e.name??``,slug:e.slug??``,phoneNumber:e.phoneNumber??``,ssoDomain:e.ssoDomain??``,ssoProvider:e.ssoProvider??``,usageSpendingMaxLimit:e.usageSpendingMaxLimit?.toString()??``,signedDPA:!!e.signedDPA,promoCode:e.promoCode??``,stripeCustomerId:e.stripeCustomerId??``,currency:e.currency,pricingModel:e.pricingModel,license:e.license??``,licenseExpiresAt:q(e.licenseExpiresAt),useCustomS3:!!e.useCustomS3,s3Endpoint:``,s3AccessKeyId:``,s3SecretAccessKey:``,s3Bucket:``})},[e]);let l=(e,t)=>o(n=>n&&{...n,[e]:t});return(0,W.jsx)(S.Root,{open:!!e,onOpenChange:({open:e})=>{e||t()},size:`md`,children:(0,W.jsxs)(S.Content,{children:[(0,W.jsx)(S.Header,{children:(0,W.jsx)(S.Title,{children:`Edit Organization`})}),(0,W.jsx)(S.CloseTrigger,{}),(0,W.jsx)(S.Body,{children:e&&a&&(0,W.jsxs)(c,{gap:4,align:`stretch`,children:[(0,W.jsx)(Z,{children:`Identity`}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Name`}),(0,W.jsx)(A,{value:a.name,onChange:e=>l(`name`,e.target.value)})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Slug`}),(0,W.jsx)(A,{value:a.slug,onChange:e=>l(`slug`,e.target.value)}),(0,W.jsx)(b,{children:`URL-safe identifier. Changing this can break existing links.`})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Phone number`}),(0,W.jsx)(A,{type:`tel`,value:a.phoneNumber,onChange:e=>l(`phoneNumber`,e.target.value)})]}),(0,W.jsx)(Z,{children:`Billing`}),(0,W.jsxs)(i,{gap:3,align:`start`,children:[(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Currency`}),(0,W.jsx)(Q,{value:a.currency,options:Object.values(H.Currency),onChange:e=>l(`currency`,e)})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Pricing model`}),(0,W.jsx)(Q,{value:a.pricingModel,options:Object.values(H.PricingModel),onChange:e=>l(`pricingModel`,e)})]})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Stripe customer ID`}),(0,W.jsx)(A,{value:a.stripeCustomerId,onChange:e=>l(`stripeCustomerId`,e.target.value)})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Promo code`}),(0,W.jsx)(A,{value:a.promoCode,onChange:e=>l(`promoCode`,e.target.value)})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Usage spending max limit`}),(0,W.jsx)(A,{type:`number`,value:a.usageSpendingMaxLimit,onChange:e=>l(`usageSpendingMaxLimit`,e.target.value),placeholder:`Leave empty for no cap`})]}),(0,W.jsx)($,{label:`Signed DPA`,hint:`Enterprise data processing agreement on file.`,checked:a.signedDPA,onChange:e=>l(`signedDPA`,e)}),(0,W.jsx)(Z,{children:`Authentication`}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`SSO domain`}),(0,W.jsx)(A,{value:a.ssoDomain,onChange:e=>l(`ssoDomain`,e.target.value),placeholder:`e.g. acme.com`}),(0,W.jsx)(b,{children:`Lowercased server-side. Users with this email domain can sign in via SSO.`})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`SSO provider`}),(0,W.jsx)(A,{value:a.ssoProvider,onChange:e=>l(`ssoProvider`,e.target.value)})]}),(0,W.jsx)(Z,{children:`License`}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`License key`}),(0,W.jsx)(O,{rows:4,value:a.license,onChange:e=>l(`license`,e.target.value),fontFamily:`mono`,fontSize:`xs`})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`License expires at`}),(0,W.jsx)(A,{type:`date`,value:a.licenseExpiresAt,onChange:e=>l(`licenseExpiresAt`,e.target.value)})]}),(0,W.jsx)(Z,{children:`Custom S3`}),(0,W.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`Credentials below are write-only — the server never reads them back. Leave blank to keep the stored value; type to replace.`}),(0,W.jsx)($,{label:`Use custom S3`,hint:`Store large blobs (datasets, uploads) in the tenant's own bucket.`,checked:a.useCustomS3,onChange:e=>l(`useCustomS3`,e)}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Endpoint`}),(0,W.jsx)(A,{type:`url`,value:a.s3Endpoint,onChange:e=>l(`s3Endpoint`,e.target.value),placeholder:`Leave blank to keep current`,disabled:!a.useCustomS3})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Bucket`}),(0,W.jsx)(A,{value:a.s3Bucket,onChange:e=>l(`s3Bucket`,e.target.value),placeholder:`Leave blank to keep current`,disabled:!a.useCustomS3})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Access key ID`}),(0,W.jsx)(A,{type:`password`,value:a.s3AccessKeyId,onChange:e=>l(`s3AccessKeyId`,e.target.value),placeholder:`Leave blank to keep current`,disabled:!a.useCustomS3,autoComplete:`new-password`})]}),(0,W.jsxs)(y,{children:[(0,W.jsx)(x,{children:`Secret access key`}),(0,W.jsx)(A,{type:`password`,value:a.s3SecretAccessKey,onChange:e=>l(`s3SecretAccessKey`,e.target.value),placeholder:`Leave blank to keep current`,autoComplete:`new-password`,disabled:!a.useCustomS3})]}),(0,W.jsx)(v,{my:2}),(0,W.jsxs)(c,{align:`start`,gap:0,children:[(0,W.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,children:[`Organization ID: `,e.id]}),(0,W.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,children:[`Created: `,F(e.createdAt)]})]})]})}),(0,W.jsx)(S.Footer,{children:(0,W.jsxs)(i,{width:`full`,children:[(0,W.jsx)(D,{}),(0,W.jsx)(r,{variant:`ghost`,onClick:t,children:`Cancel`}),(0,W.jsx)(r,{loading:n.isPending,onClick:()=>{if(!e||!a)return;let r={};a.name!==e.name&&(r.name=a.name),a.slug!==e.slug&&(r.slug=a.slug),a.phoneNumber!==(e.phoneNumber??``)&&(r.phoneNumber=Y(a.phoneNumber)),a.ssoDomain!==(e.ssoDomain??``)&&(r.ssoDomain=Y(a.ssoDomain)),a.ssoProvider!==(e.ssoProvider??``)&&(r.ssoProvider=Y(a.ssoProvider));let i=J(a.usageSpendingMaxLimit);i!==e.usageSpendingMaxLimit&&(r.usageSpendingMaxLimit=i),a.signedDPA!==!!e.signedDPA&&(r.signedDPA=a.signedDPA),a.promoCode!==(e.promoCode??``)&&(r.promoCode=Y(a.promoCode)),a.stripeCustomerId!==(e.stripeCustomerId??``)&&(r.stripeCustomerId=Y(a.stripeCustomerId)),a.currency!==e.currency&&(r.currency=a.currency),a.pricingModel!==e.pricingModel&&(r.pricingModel=a.pricingModel),a.license!==(e.license??``)&&(r.license=Y(a.license));let o=I(a.licenseExpiresAt);if(o!==e.licenseExpiresAt&&(r.licenseExpiresAt=o),a.useCustomS3!==!!e.useCustomS3&&(r.useCustomS3=a.useCustomS3),a.s3Endpoint.trim()!==``&&(r.s3Endpoint=a.s3Endpoint),a.s3AccessKeyId.trim()!==``&&(r.s3AccessKeyId=a.s3AccessKeyId),a.s3SecretAccessKey.trim()!==``&&(r.s3SecretAccessKey=a.s3SecretAccessKey),a.s3Bucket.trim()!==``&&(r.s3Bucket=a.s3Bucket),Object.keys(r).length===0){t();return}n.mutate({id:e.id,data:r},{onSuccess:()=>{u.create({title:`Organization updated`,type:`success`,duration:3e3,meta:{closable:!0}}),t()},onError:e=>C({error:e,fallbackTitle:`Couldn't update the organization`})})},children:`Save`})]})})]})})}function Z({children:e}){return(0,W.jsx)(o,{as:`h3`,size:`xs`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,pt:2,children:e})}function Q({value:e,options:t,onChange:n}){return(0,W.jsxs)(T,{size:`sm`,width:`full`,children:[(0,W.jsx)(E,{value:e,onChange:e=>n(e.target.value),children:t.map(e=>(0,W.jsx)(`option`,{value:e,children:e},e))}),(0,W.jsx)(w,{})]})}function $({label:e,hint:t,checked:n,onChange:r}){return(0,W.jsx)(y,{children:(0,W.jsxs)(i,{width:`full`,children:[(0,W.jsxs)(c,{align:`start`,gap:0,children:[(0,W.jsx)(x,{children:e}),t&&(0,W.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:t})]}),(0,W.jsx)(D,{}),(0,W.jsx)(P,{checked:n,onCheckedChange:e=>r(e.checked)})]})})}function ee(){return(0,W.jsx)(z,{children:(0,W.jsx)(K,{})})}export{ee as default};
|
|
2
|
-
//# sourceMappingURL=organizations-F6Q6gYJ3.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{n as r}from"./api-l6Cnm0vQ.js";import{r as i}from"./next-router-CWLrMXvP.js";import{Ln as a,Vt as o}from"./index-CPtTUYLD.js";import{t as s}from"./LoadingScreen-DQ62wqSN.js";var c=e(t());function l({resolverDestination:e,isOverride:t,intentPinned:n,governanceUiEnabled:r,lastVisitedHomeKind:i,lastProjectSlug:a}){return t?e:n?e===`/me`?e:i===`project`&&a?`/${a}`:e:r&&i===`personal`&&e!==`/me`?`/me`:i===`project`&&a?`/${a}`:e}var u=n();function d(){let{project:e,organization:t,organizations:n,isLoading:d}=o({redirectToOnboarding:!1}),f=i(),p=r.governance.resolveHome.useQuery({organizationId:t?.id??``},{enabled:!!t?.id,staleTime:6e4,retry:!1}),[m]=a(`lastVisitedHomeKind`,``);return(0,c.useEffect)(()=>{if(p.data?.destination){f.replace(l({resolverDestination:p.data.destination,isOverride:p.data.isOverride,intentPinned:p.data.intentPinned,governanceUiEnabled:p.data.governanceUiEnabled,lastVisitedHomeKind:m,lastProjectSlug:e&&!e.isPersonal?e.slug:null}));return}if(p.isError&&e){f.replace(`/${e.slug}`);return}!d&&!t&&(n?.length??0)===0&&f.replace(`/onboarding/welcome`)},[p.data,p.isError,e,t,n,d,f,m]),(0,u.jsx)(s,{})}export{d as default};
|
|
2
|
-
//# sourceMappingURL=pages-BXwixFEM.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{An as e,En as t,Nn as n,Tn as r,kn as i,pn as a}from"./index-CPtTUYLD.js";import{a as o,l as s,o as c,u as l}from"./types-CCALFpCT.js";var u=t({runId:e().optional(),versionId:e().optional(),targetOutputs:i(a(n())),targetMetadata:i(a(l.nullish())),evaluatorResults:i(i(a(n()))),errors:i(a(e().nullish()))}),d=t({experimentId:e().optional(),experimentSlug:e().optional(),name:e(),datasets:a(o),activeDatasetId:e(),evaluators:a(c),targets:a(s),results:u.optional(),hiddenColumns:a(e()).optional(),concurrency:r().min(1).max(24).optional()}),f=e=>{if(Object.keys(e.targetOutputs).length>0||Object.keys(e.targetMetadata).length>0||Object.keys(e.evaluatorResults).length>0||Object.keys(e.errors).length>0)return{runId:e.runId,versionId:e.versionId,targetOutputs:e.targetOutputs,targetMetadata:e.targetMetadata,evaluatorResults:e.evaluatorResults,errors:e.errors}},p=e=>{let{ui:t,results:n,datasets:r}=e,i=f(n),a=r.map(e=>{if(e.type===`saved`){let{savedRecords:t,...n}=e;return n}return e});return d.parse({experimentId:e.experimentId,experimentSlug:e.experimentSlug,name:e.name,datasets:a,activeDatasetId:e.activeDatasetId,evaluators:e.evaluators,targets:e.targets,results:i,hiddenColumns:Array.from(t.hiddenColumns),concurrency:t.concurrency})};export{p as t};
|
|
2
|
-
//# sourceMappingURL=persistence-DZOtzFnQ.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{_ as n,fn as r,t as i}from"./portal-Sdfvrza9.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{c as o}from"./select-D17PWjH9.js";import{a as s,o as c,r as l,t as u}from"./IsolatedErrorBoundary-CZ4MnYEN.js";import{Q as d}from"./index-CPtTUYLD.js";var f=a(),p=e(t(),1),{withRootProvider:m,withContext:h,useStyles:g,PropsProvider:_}=n({key:`drawer`});m(s.RootProvider,{defaultProps:{unmountOnExit:!0,lazyMount:!0}});var v=m(s.Root,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),y=h(s.Trigger,`trigger`,{forwardAsChild:!0}),b=h(s.Positioner,`positioner`,{forwardAsChild:!0}),x=h(s.Content,`content`,{forwardAsChild:!0}),S=h(s.Description,`description`,{forwardAsChild:!0}),C=h(s.Title,`title`,{forwardAsChild:!0}),w=h(s.CloseTrigger,`closeTrigger`,{forwardAsChild:!0}),T=(0,p.forwardRef)(function(e,t){let n=c();return(0,f.jsx)(r.button,{...e,ref:t,onClick:()=>n.setOpen(!1)})});h(s.Backdrop,`backdrop`,{forwardAsChild:!0});var E=h(`div`,`body`),D=h(`div`,`footer`),O=h(`div`,`header`);s.Context;var k=p.createContext({}),A=k.Provider,j=p.forwardRef(function(e,t){let{children:n,portalled:r=!0,portalRef:a,offset:s,withErrorBoundary:c=!0,errorScope:l,...m}=e,{marginTop:h}=p.useContext(k),g=m.marginTop??(h?`${h}px`:void 0),_=d(e=>e.isOpen&&e.panelMode===`sidebar`)?`412px`:void 0,v=d(e=>e.isOpen&&e.panelMode===`floating`),[y]=p.useState(()=>v),S=y?{animationDelay:`450ms`,animationFillMode:`backwards`}:void 0,C=c?(0,f.jsx)(u,{scope:l,children:n}):n;return(0,f.jsx)(i,{disabled:!r,container:a,children:(0,f.jsx)(b,{padding:s,pointerEvents:`none`,children:(0,f.jsx)(x,{ref:t,margin:2,pointerEvents:`auto`,borderRadius:`lg`,background:`color-mix(in srgb, var(--chakra-colors-bg-surface) var(--lw-panel-alpha, 80%), transparent)`,backdropFilter:`var(--lw-backdrop-blur, blur(25px))`,...m,marginTop:g,marginEnd:_,transition:`margin ${o}`,...S?{_open:S}:{},asChild:!1,children:C})})})}),M=p.forwardRef(function(e,t){return(0,f.jsx)(w,{position:`absolute`,top:`2`,insetEnd:`2`,...e,asChild:!0,children:(0,f.jsx)(l,{size:`sm`,ref:t})})}),N=function(e){return(0,f.jsx)(v,{modal:!1,closeOnInteractOutside:!1,preventScroll:!1,...e})},P=y,F=D,I=O,L=E,R=S,z=C,B={Root:N,CloseTrigger:M,Trigger:P,Content:j,Header:I,Body:L,Footer:F,Description:R,Title:z,ActionTrigger:T};function V({organizations:e,userId:t}){if(!t||!e)return null;for(let n of e)for(let e of n.teams??[])if(e.isPersonal&&e.ownerUserId===t){let t=e.projects?.[0];if(t)return{id:t.id,slug:t.slug}}return null}export{j as a,A as c,M as i,N as l,B as n,F as o,L as r,I as s,V as t,z as u};
|
|
2
|
-
//# sourceMappingURL=personalProject-DMRX2-SI.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
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{Nn as u}from"./ProjectAvatar-DtI9dT1f.js";import{t as d}from"./badge-Cpc3eA-C.js";import{d as f,i as p,s as m}from"./toaster-BsYkODqs.js";import{A as h,C as g}from"./DashboardLayout-BhHe0vIT.js";import{r as _,t as v}from"./card-By_Mbslh.js";import{T as y}from"./fetchSSE-5rVPow_l.js";import{n as b}from"./api-l6Cnm0vQ.js";import{n as x}from"./log-out-CUZz1cYc.js";import{Vt as S,hr as C,t as w,zn as T}from"./index-CPtTUYLD.js";import{t as E}from"./WithPermissionGuard-Cr6Aljmy.js";import{t as D}from"./SettingsLayout-sixsNIX_.js";import{i as O,l as k,n as A,o as j,s as M,t as N}from"./billing-plans-DUVLJ_Sk.js";var P=f(`euro`,[[`path`,{d:`M4 10h12`,key:`1y6xl8`}],[`path`,{d:`M4 14h9`,key:`1loblj`}],[`path`,{d:`M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2`,key:`1j6lzo`}]]),F=e(t()),I=T();function L(e){if(!e)return null;let t=e.type?.toUpperCase();return e.free||t===`FREE`?`free`:t===`GROWTH`||t&&g(t)?`growth`:t===`ENTERPRISE`?`enterprise`:null}var R=o(),z=e=>[{id:`free`,name:`Free`,subtitle:`For teams getting started`,actionLabel:`Get Started`,actionHref:`/settings/subscription`,actionColor:`blue`,features:A},{id:`growth`,name:`Growth`,subtitle:`Seat and usage pricing for growing teams`,actionLabel:`Get Started`,actionHref:`/settings/subscription`,actionColor:`orange`,features:j(e)},{id:`enterprise`,name:`Enterprise`,subtitle:`Regulated and high-volume deployments`,actionLabel:`Contact Sales`,actionHref:h,actionColor:`blue`,features:N}];function B(e,t,n){if(e===`free`)return`${O[t]}0 per user/month`;if(e===`growth`){let e=k();return`${M({cents:n===`annual`?Math.round(e[t].annual/12):e[t].monthly,currency:t})} per seat/month`}return`Custom pricing`}function V({plan:e,currentPlan:t}){return e.id===`free`?null:e.id===`growth`?t===`growth`?(0,R.jsx)(l,{width:`full`,gap:2,children:(0,R.jsx)(i,{asChild:!0,width:`full`,color:`bg.emphasized`,backgroundColor:`orange.600`,variant:`solid`,children:(0,R.jsx)(w,{href:`/settings/members`,children:`Add Members`})})}):(0,R.jsx)(i,{asChild:!0,width:`full`,colorPalette:`orange`,variant:`solid`,children:(0,R.jsx)(w,{color:`white`,href:`/settings/subscription`,children:`Upgrade Now`})}):e.id===`enterprise`&&t!==`enterprise`?(0,R.jsx)(i,{asChild:!0,width:`full`,colorPalette:`muted`,variant:`outline`,children:(0,R.jsx)(w,{href:h,isExternal:!0,children:`Contact Sales`})}):null}function H({plan:e,isCurrent:t,currentPlan:n,currency:r,billingPeriod:i}){return(0,R.jsx)(_,{"data-testid":`plan-column-${e.id}`,borderWidth:1,borderColor:`border.emphasized`,bg:`bg.panel`,borderRadius:`2xl`,height:`full`,transition:`all 0.2s ease-in-out`,_hover:{transform:`scale(1.02)`,boxShadow:`lg`},children:(0,R.jsx)(v,{paddingY:6,paddingX:6,children:(0,R.jsxs)(l,{align:`stretch`,gap:5,height:`full`,children:[(0,R.jsxs)(l,{align:`start`,gap:1,children:[(0,R.jsxs)(a,{gap:2,children:[(0,R.jsx)(s,{as:`h2`,size:`xl`,children:e.name}),t&&(0,R.jsx)(d,{colorPalette:`green`,variant:`surface`,size:`lg`,children:`Current`})]}),(0,R.jsx)(c,{color:`fg`,fontSize:`md`,fontWeight:`medium`,children:B(e.id,r,i)}),(0,R.jsx)(c,{color:`fg.muted`,fontSize:`sm`,children:e.subtitle})]}),(0,R.jsx)(l,{align:`start`,gap:2,flex:1,children:e.features.map(e=>(0,R.jsxs)(a,{align:`start`,gap:2,children:[(0,R.jsx)(m,{size:14,style:{marginTop:`4px`,flexShrink:0},color:`var(--chakra-colors-blue-500)`}),(0,R.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:e})]},e))}),(0,R.jsx)(l,{width:`full`,marginTop:`auto`,paddingTop:4,children:(0,R.jsx)(V,{plan:e,currentPlan:n})})]})})})}function U({activePlan:e,pricingModel:t}){let o=L(e),d=t===`TIERED`&&!e?.free,f=b.currency.detectCurrency.useQuery({}),[m,h]=(0,F.useState)(null),g=m??f.data?.currency??I.Currency.EUR,[_,v]=(0,F.useState)(`monthly`);return f.isLoading?(0,R.jsx)(n,{}):(0,R.jsxs)(l,{gap:6,width:`full`,align:`stretch`,maxWidth:`900px`,marginX:`auto`,children:[(0,R.jsxs)(y,{justifyContent:`space-between`,alignItems:`flex-start`,children:[(0,R.jsx)(r,{flex:1,children:(0,R.jsx)(w,{href:`/settings/subscription`,children:(0,R.jsxs)(i,{variant:`ghost`,size:`sm`,color:`gray.600`,children:[(0,R.jsx)(x,{size:14}),` Subscription`]})})}),(0,R.jsxs)(l,{align:`center`,gap:1,flex:2,children:[(0,R.jsx)(s,{size:`xl`,as:`h2`,children:`Plans`}),(0,R.jsx)(c,{color:`fg.muted`,children:`Compare plans and choose the right tier for your organization.`})]}),(0,R.jsx)(r,{flex:1})]}),(0,R.jsxs)(a,{width:`full`,justifyContent:{base:`center`,md:`center`},flexWrap:`wrap`,gap:3,children:[(0,R.jsx)(r,{flex:{md:1}}),(0,R.jsx)(a,{gap:0,bg:`bg.muted`,borderRadius:`full`,padding:`1`,"data-testid":`billing-period-toggle`,children:[{label:`Monthly`,value:`monthly`},{label:`Annually`,value:`annual`}].map(e=>(0,R.jsx)(r,{as:`button`,"aria-pressed":_===e.value,onClick:()=>v(e.value),paddingX:4,paddingY:1.5,borderRadius:`full`,fontSize:`sm`,fontWeight:_===e.value?`semibold`:`normal`,color:_===e.value?`orange.500`:`fg.muted`,bg:_===e.value?`bg.panel`:`transparent`,boxShadow:_===e.value?`xs`:`none`,transition:`all 0.15s ease-in-out`,cursor:`pointer`,_hover:{color:_===e.value?`orange.500`:`fg`},children:e.label},e.value))}),(0,R.jsx)(r,{flex:{md:1},display:`flex`,justifyContent:`flex-end`,children:(0,R.jsxs)(i,{"data-testid":`currency-toggle`,variant:`subtle`,size:`sm`,_hover:{bgColor:`orange.400`,color:`bg.muted`},onClick:()=>h(g===I.Currency.EUR?I.Currency.USD:I.Currency.EUR),children:[g===I.Currency.EUR?(0,R.jsx)(P,{size:14}):(0,R.jsx)(C,{size:14}),g]})})]}),d&&(0,R.jsx)(r,{"data-testid":`tiered-discontinued-notice`,backgroundColor:`orange.50`,borderWidth:1,borderColor:`orange.200`,borderRadius:`md`,padding:4,children:(0,R.jsxs)(a,{gap:2,alignItems:`start`,children:[(0,R.jsx)(p,{size:16,color:`var(--chakra-colors-orange-500)`}),(0,R.jsxs)(c,{fontSize:`sm`,color:`orange.900`,children:[`Your current pricing model has been discontinued.`,` `,(0,R.jsx)(w,{href:`/settings/subscription`,fontWeight:`semibold`,color:`orange.700`,_hover:{color:`orange.900`},children:`Update your plan`}),` `,`to move to seat and usage billing.`]})]})}),(0,R.jsx)(u,{columns:{base:1,md:3},gap:4,children:z(g).map(e=>(0,R.jsx)(H,{plan:e,isCurrent:o===e.id,currentPlan:o,currency:g,billingPeriod:_},e.id))})]})}function W(){let{organization:e}=S(),t=b.plan.getActivePlan.useQuery({organizationId:e?.id??``},{enabled:!!e?.id,refetchOnWindowFocus:!1,refetchOnMount:!1});return t.isLoading&&!t.data?(0,R.jsx)(D,{children:(0,R.jsx)(n,{})}):(0,R.jsx)(D,{children:(0,R.jsx)(U,{activePlan:t.data,pricingModel:e?.pricingModel})})}var G=E(`organization:view`,{layoutComponent:D})(W);export{G as default};
|
|
2
|
-
//# sourceMappingURL=plans-C_VYB2VX.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{l as e}from"./ProjectAvatar-DtI9dT1f.js";var t={input:e=>e.input,output:e=>e.output,"traces.origin":e=>e.origin??null,"traces.error":e=>e.hasError==null?`false`:e.hasError?`true`:`false`,"traces.name":null,"metadata.user_id":e=>e.userId,"metadata.thread_id":e=>e.threadId,"metadata.customer_id":e=>e.customerId,"metadata.labels":e=>e.labels,"metadata.prompt_ids":e=>e.promptIds,"metadata.key":null,"metadata.value":(e,t,n)=>n?e.customMetadata?.[n]??null:null,"spans.type":e=>e.spanTypes,"spans.model":e=>e.spanModels,"topics.topics":e=>e.topicId?[e.topicId]:null,"topics.subtopics":e=>e.subTopicId?[e.subTopicId]:null,"evaluations.evaluator_id":null,"evaluations.evaluator_id.guardrails_only":null,"evaluations.evaluator_id.has_passed":null,"evaluations.evaluator_id.has_score":null,"evaluations.evaluator_id.has_label":null,"evaluations.passed":null,"evaluations.score":null,"evaluations.state":null,"evaluations.label":null,"events.event_type":e=>e.events?.map(e=>e.event_type)??null,"events.metrics.key":(e,t,n)=>!n||!e.events?null:e.events.find(e=>e.event_type===n)?.metrics.map(e=>e.key)??null,"events.metrics.value":null,"events.event_details.key":(e,t,n)=>!n||!e.events?null:e.events.find(e=>e.event_type===n)?.event_details.map(e=>e.key)??null,"annotations.hasAnnotation":e=>e.annotationIds==null?null:e.annotationIds.length>0?`true`:`false`},n=[`is`,`contains`,`not_contains`,`matches_regex`],r=[`is`],i=[`is`],a=[`is`,`contains`,`not_contains`],o=[],s={input:n,output:n,"traces.origin":i,"traces.error":r,"traces.name":o,"metadata.user_id":n,"metadata.thread_id":n,"metadata.customer_id":n,"metadata.labels":a,"metadata.prompt_ids":a,"metadata.key":o,"metadata.value":n,"spans.type":i,"spans.model":i,"topics.topics":a,"topics.subtopics":a,"evaluations.evaluator_id":o,"evaluations.evaluator_id.guardrails_only":o,"evaluations.evaluator_id.has_passed":o,"evaluations.evaluator_id.has_score":o,"evaluations.evaluator_id.has_label":o,"evaluations.passed":o,"evaluations.score":o,"evaluations.state":o,"evaluations.label":o,"events.event_type":i,"events.metrics.key":i,"events.metrics.value":o,"events.event_details.key":i,"annotations.hasAnnotation":r};function c(e){return{...e,origin:e.origin??`application`}}var l={input:`Input`,output:`Output`};function u(){return Object.entries(s).filter(([,e])=>e.length>0).map(([e,t])=>({field:e,label:d(e),allowedRules:t}))}function d(t){let n=l[t];if(n)return n;let r=e[t];return r?r.name:t}var f={contains:`contains`,not_contains:`does not contain`,matches_regex:`matches regex`,is:`is`};function p(e){if(e===`input`||e===`output`)return`Trace`;switch(e.split(`.`)[0]){case`traces`:return`Trace`;case`metadata`:return`Metadata`;case`spans`:return`Spans`;case`topics`:return`Topics`;case`evaluations`:return`Evaluations`;case`events`:return`Events`;case`annotations`:return`Annotations`;default:return`Other`}}function m(){let e=u(),t=new Map;for(let n of e){let e=p(n.field);t.has(e)||t.set(e,[]),t.get(e).push({value:n.field,label:n.label})}return Array.from(t.entries()).map(([e,t])=>({category:e,fields:t}))}function h(e){return s[e]??[]}function g(e){return e===`traces.error`||e===`annotations.hasAnnotation`}function _(e){return g(e)?`boolean`:`text`}function v(t){let n=e[t];if(!n?.requiresKey)return null;let r=e[n.requiresKey.filter];return r?{keyFilterField:n.requiresKey.filter,label:r.name}:null}function y(e,t){let n=s[e];return n?n.includes(t):!1}function b(e){return e.length===1&&e[0]?.field===`traces.origin`&&e[0]?.rule===`is`&&e[0]?.value===`application`}var x={field:`traces.origin`,rule:`is`,value:`application`};export{m as a,y as c,h as i,t as l,f as n,_ as o,v as r,b as s,x as t,c as u};
|
|
2
|
-
//# sourceMappingURL=preconditionFieldUtils-B7QfymK4.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
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{c as l,s as u}from"./shikiAdapter-CbWAxLvq.js";import{n as d}from"./toaster-BsYkODqs.js";import{J as f}from"./Markdown-C9extmbX.js";import{t as p}from"./grid-DVy6ELOp.js";import{t as m}from"./icon-D6xQEiPb.js";import{t as h}from"./grid-item-CKAuKzga.js";import{n as g}from"./api-l6Cnm0vQ.js";import{t as _}from"./arrow-right-Cn6z_njp.js";import{t as ee}from"./code-MiD0yvEx.js";import{t as v}from"./usePublicEnv-ue4-Igop.js";import{r as y}from"./next-router-CWLrMXvP.js";import{Ft as b,Jn as te,Kn as ne,Or as x,Vt as re,kr as S,pr as C,qn as w,rr as T,t as E,wr as ie,xr as ae}from"./index-CPtTUYLD.js";import{t as oe}from"./react-B5vhk-dA.js";import{t as se}from"./check-circle-_-uT708a.js";import{t as ce}from"./LoadingScreen-DQ62wqSN.js";import"./TabButton-Cp8UA45p.js";import{t as D}from"./DocsLinks-vsvIA7dY.js";import{t as O}from"./ModelProviderScreen-BVBKstQm.js";import{t as k}from"./CopyableInputWithPrefix-DhfQEE7R.js";import{a as A,c as j,d as M,f as N,h as P,l as F,m as I,o as L,s as R,t as z,u as B}from"./ViaClaudeDesktopScreen-B9EYtw_g.js";import{t as V}from"./OnboardingContainer-e4kVlnyx.js";import{a as H,i as U,n as W,t as G}from"./use-generic-onboarding-flow-DZY28ya2.js";var K=e(t());function le(e){let t=y().query.projectSlug,n=Array.isArray(t)?t[0]:t,r=(0,K.useMemo)(()=>{if(!e)return;let t=(e.teams??[]).flatMap(e=>e?.projects??[]).filter(Boolean);if(!t.length)return;let r=e=>{if(!e)return 0;if(e instanceof Date)return e.getTime();let t=new Date(e).getTime();return Number.isNaN(t)?0:t};if(n){let e=t.filter(e=>e.slug===n).sort((e,t)=>r(t.createdAt)-r(e.createdAt));if(e[0])return e[0]}return t.sort((e,t)=>r(t.createdAt)-r(e.createdAt))[0]},[e,n]);return{project:r,slug:r?.slug??n??void 0}}var q=()=>{let{emit:e}=S(),t=(0,K.useRef)(e);return t.current=e,(0,K.useEffect)(()=>{let e=Date.now();return()=>{t.current(`exited`,void 0,{timeOnScreenMs:Date.now()-e})}},[]),null},J={variant:`product`,visibleScreens:[U.SELECTION],first:U.SELECTION,last:U.SELECTION,total:1},Y=[`via-claude-code`,`via-platform`,`via-claude-desktop`,`manually`],X={"via-claude-code":[U.VIA_CLAUDE_CODE],"via-platform":[U.MODEL_PROVIDER,U.VIA_PLATFORM],"via-claude-desktop":[U.VIA_CLAUDE_DESKTOP],manually:[U.MANUALLY]},Z=e=>X[e][0];function ue(){let e=y(),[t,n]=(0,K.useState)(void 0),[r,i]=(0,K.useState)(J);(0,K.useEffect)(()=>{let r=e.query.product,i=e.query.step,a;if(r&&typeof r==`string`&&Y.includes(r))a=r;else if(i&&typeof i==`string`&&Y.includes(i))a=i;else{let t=((typeof e.asPath==`string`?e.asPath:``).split(`?`)[0]??``).split(`/`).filter(e=>!!e&&e.length>0),n=t.length>0?t[t.length-1]:void 0;n&&Y.includes(n)&&(a=n)}a&&a!==t&&n(a)},[e.query.product,e.query.step,t]);let a=(0,K.useMemo)(()=>{let e=new Map([[U.SELECTION,`product-selection`],[U.VIA_CLAUDE_CODE,`via-claude-code`],[U.VIA_PLATFORM,`via-platform`],[U.VIA_CLAUDE_DESKTOP,`via-claude-desktop`],[U.MANUALLY,`manually`],[U.MODEL_PROVIDER,`model-provider`]]),t=new Map;return e.forEach((e,n)=>{t.set(e,n)}),{indexToId:e,idToIndex:t}},[]);(0,K.useEffect)(()=>{if(t){let e=X[t];i({variant:`product`,visibleScreens:[U.SELECTION,...e],first:U.SELECTION,last:e[e.length-1]??e[0],total:1+e.length})}else i(J)},[t]);let{currentScreenIndex:o,direction:s,navigation:c,canGoBack:l,setCurrentScreenIndex:u}=G(r,(0,K.useCallback)(()=>!0,[]),{queryParamName:`step`,screenIdMap:a,firstScreenId:`product-selection`});return(0,K.useEffect)(()=>{t&&s!==W.BACKWARD&&typeof e.query.step!=`string`&&u(Z(t))},[t,e.query.step,s,u]),{selectedProduct:t,currentScreenIndex:o,direction:s,flow:r,navigation:c,canGoBack:l,handleSelectProduct:(0,K.useCallback)(t=>{n(t);let r=Z(t),i=a.indexToId.get(r)??t,o={...e.query};delete o.product,o.step=i,i!==t&&(o.product=t),u(r),e.push({pathname:e.pathname,query:o},void 0,{shallow:!0})},[e,a,u])}}var Q=o();function de({onContinue:e}){let{emit:t}=S();return(0,Q.jsxs)(c,{align:`stretch`,gap:0,w:`full`,children:[(0,Q.jsx)(O,{variant:`onboarding`,onComplete:e}),(0,Q.jsx)(a,{justify:`center`,children:(0,Q.jsx)(i,{variant:`ghost`,size:`sm`,color:`fg.subtle`,fontWeight:`semibold`,fontSize:`14px`,borderRadius:`8px`,_hover:{color:`fg`,bg:`bg.muted`},onClick:()=>{t(`clicked`,`skip`),e()},children:`Skip for now`})})]})}function fe(){let{project:e}=P(),t=v(),n=e?.apiKey??``,r=t.data?.BASE_HOST??``;async function i({withBashPrefix:e}){try{await navigator.clipboard.writeText(e?`LANGWATCH_API_KEY=${n}`:n),d.create({title:`Copied`,description:`API key copied to clipboard`,type:`success`,meta:{closable:!0}})}catch{d.create({title:`Copy failed`,description:`Couldn't copy the API key. Please try again.`,type:`error`,meta:{closable:!0}})}}async function a({withBashPrefix:e}){try{await navigator.clipboard.writeText(e?`LANGWATCH_ENDPOINT=${r}`:r),d.create({title:`Copied`,description:`Endpoint copied to clipboard`})}catch{d.create({title:`Copy failed`,description:`Couldn't copy the endpoint. Please try again.`,type:`error`,meta:{closable:!0}})}}return(0,Q.jsxs)(c,{align:`stretch`,gap:3,children:[(0,Q.jsxs)(c,{align:`stretch`,gap:.5,children:[(0,Q.jsx)(s,{fontSize:`md`,fontWeight:`semibold`,letterSpacing:`-0.01em`,children:`Your LangWatch Integration Info`}),(0,Q.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,lineHeight:`tall`,children:[`You can access your API key again anytime in the project's settings `,`page.`]})]}),(0,Q.jsx)(k,{prefix:`LANGWATCH_API_KEY=`,value:n,ariaLabel:`Your API key`,showVisibilityToggle:!0,onCopy:i}),r&&r!==`https://app.langwatch.ai`&&(0,Q.jsx)(k,{prefix:`LANGWATCH_ENDPOINT=`,value:r,ariaLabel:`Your LangWatch Endpoint`,showVisibilityToggle:!1,onCopy:a})]})}function pe(){let e=b(`orange.400`),t=b(`green.400`),i=y(),{project:o}=P(),[c,l]=(0,K.useState)(!1),[u,d]=(0,K.useState)(null),[f,p]=(0,K.useState)(typeof document>`u`?!0:document.visibilityState===`visible`);(0,K.useEffect)(()=>{let e=()=>p(document.visibilityState===`visible`);return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]);let m=(0,K.useMemo)(()=>{let e=Date.now();return{startDate:e-10080*60*1e3,endDate:e+1440*60*1e3}},[]),h=g.traces.getAllForProject.useQuery({projectId:o?.id??``,startDate:m.startDate,endDate:m.endDate,filters:{},groupBy:`none`,pageSize:1},{enabled:!!o?.id&&!c,refetchInterval:f?3e3:!1,refetchOnWindowFocus:!1});(0,K.useEffect)(()=>{let e=h.data?.groups?.flat().length??0;!c&&e>0&&l(!0)},[h.data,c]);let _=(0,K.useCallback)(()=>{if(!o?.slug)return;let e=h.data?.groups?.flat().at(0)?.trace_id??void 0;if(!e){window.location.href=`/${o.slug}/traces`;return}let t=new URLSearchParams({"drawer.open":`traceV2Details`,"drawer.traceId":e});window.location.href=`/${o.slug}/traces?${t.toString()}`},[o?.slug,i,h.status,h.data?.groups?.length]);return(0,K.useEffect)(()=>{c&&u===null&&d(3)},[c,u]),(0,K.useEffect)(()=>{if(!c||u===null)return;if(u<=0){_();return}let e=setTimeout(()=>d(e=>(e??1)-1),1e3);return()=>clearTimeout(e)},[c,u,_]),(0,Q.jsx)(r,{position:`fixed`,left:`50%`,bottom:`24px`,transform:`translateX(-50%)`,zIndex:10,children:(0,Q.jsx)(r,{position:`relative`,display:`inline-block`,children:(0,Q.jsx)(a,{position:`relative`,bg:`bg.panel/50`,backdropFilter:`blur(24px) saturate(1.4)`,borderWidth:`1px`,borderColor:`gray.200`,boxShadow:`0 4px 30px rgba(0,0,0,0.08)`,borderRadius:`full`,px:4,py:2,gap:2,overflow:`hidden`,transition:`all 0.2s ease`,"aria-live":`polite`,children:c?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(r,{color:t,display:`flex`,alignItems:`center`,children:(0,Q.jsx)(se,{size:16})}),(0,Q.jsxs)(s,{fontWeight:`medium`,fontSize:`sm`,children:[`Traces detected.`,u!==null&&u>0&&` redirecting in ${u}..`,u!==null&&u===0&&` redirecting...`]})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(n,{color:e,borderWidth:`2px`,animationDuration:`2s`,size:`sm`}),(0,Q.jsx)(s,{fontWeight:`medium`,fontSize:`sm`,children:`Waiting to receive traces…`})]})})})})}function $(){let[e,t]=(0,K.useState)(`typescript`),[n,i]=(0,K.useState)(`vercel_ai`);function a(e){t(e);let n=B[e]?.[0]?.key;i(n||null)}let o=(0,K.useMemo)(()=>B[e]?.length>0,[e]),s=(0,K.useMemo)(()=>N(e,o?n:void 0),[e,n,o]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(p,{templateColumns:{base:`1fr`,xl:`1fr 1fr`},gap:{base:6,xl:10},alignItems:`start`,mb:20,children:[(0,Q.jsxs)(c,{align:`stretch`,gap:8,overflow:`visible`,children:[(0,Q.jsx)(L,{selectedLanguage:e,onSelectLanguage:a}),o&&(0,Q.jsx)(F,{language:e,selectedFramework:n,onSelectFramework:i}),(0,Q.jsx)(fe,{})]}),(0,Q.jsx)(c,{align:`stretch`,gap:3,minW:0,w:`full`,children:s?.customComponent?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(s.customComponent,{}),(0,Q.jsx)(D,{docs:s?.docs,label:s?.label??``})]}):(0,Q.jsxs)(c,{align:`stretch`,gap:3,minW:0,w:`full`,children:[(0,Q.jsx)(R,{install:s?.install}),(0,Q.jsx)(r,{minW:0,w:`full`,overflowX:`auto`,children:(0,Q.jsx)(j,{platform:e,framework:n,languageIconUrl:M.find(t=>t.key===e)?.iconUrl})}),(0,Q.jsx)(D,{docs:s?.docs,label:s?.label??``})]})})]}),(0,Q.jsx)(pe,{})]})}var me=oe.create(r),he=[{key:`via-platform`,title:`Via the Platform`,description:`Configure everything directly from the LangWatch dashboard`,icon:T,gradient:`linear-gradient(135deg, rgba(49,130,206,0.05) 0%, transparent 50%)`},{key:`via-claude-code`,title:`Via Coding Agent`,description:`Set up with prompts, skills, or MCP. Works with Claude Code, Cursor, Windsurf, and more`,icon:ne,gradient:`linear-gradient(135deg, rgba(237,137,38,0.06) 0%, transparent 50%)`},{key:`via-claude-desktop`,title:`Via MCP`,description:`Connect any MCP client. Claude Desktop, ChatGPT, Cursor, Windsurf, and more`,icon:u,gradient:`linear-gradient(135deg, rgba(128,90,213,0.05) 0%, transparent 50%)`},{key:`manually`,title:`Manually`,description:`Integrate the LangWatch SDK directly into your codebase`,icon:ee,gradient:`linear-gradient(135deg, rgba(56,161,105,0.05) 0%, transparent 50%)`}],ge=({onSelectProduct:e})=>{let t=g.onboarding.setIntegrationMethod.useMutation();return(0,Q.jsx)(c,{gap:3,align:`stretch`,w:`full`,maxW:`520px`,mx:`auto`,children:he.map((n,i)=>(0,Q.jsxs)(me,{as:`button`,w:`full`,position:`relative`,overflow:`hidden`,borderRadius:`2xl`,bg:`bg.panel/80`,border:`1px solid`,borderColor:{base:`orange.200`,_dark:`orange.800`},boxShadow:`sm`,backdropFilter:`blur(20px) saturate(1.3)`,px:6,py:5,cursor:`pointer`,role:`button`,tabIndex:0,onClick:()=>{t.mutate({integrationMethod:n.key}),e(n.key)},textAlign:`left`,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.27,delay:i*.054,ease:`easeOut`},whileHover:{y:-3,boxShadow:`0 12px 40px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04)`,borderColor:`var(--chakra-colors-orange-emphasized)`,transition:{duration:.25,ease:`easeOut`}},whileTap:{scale:.98,transition:{duration:.1}},children:[(0,Q.jsx)(r,{position:`absolute`,inset:0,style:{background:n.gradient},opacity:.5,transition:`opacity 0.3s ease`,pointerEvents:`none`,css:{"button:hover &":{opacity:1}}}),(0,Q.jsxs)(a,{gap:5,align:`center`,position:`relative`,children:[(0,Q.jsx)(r,{flexShrink:0,p:3,borderRadius:`xl`,bg:`orange.50`,border:`1px solid`,borderColor:`orange.100`,transition:`all 0.25s ease`,css:{"button:hover &":{background:`var(--chakra-colors-orange-100)`,borderColor:`var(--chakra-colors-orange-200)`,transform:`scale(1.05)`}},children:(0,Q.jsx)(m,{color:`orange.500`,boxSize:6,children:(0,Q.jsx)(n.icon,{strokeWidth:1.5})})}),(0,Q.jsxs)(c,{gap:.5,align:`start`,flex:1,children:[(0,Q.jsx)(s,{fontSize:`md`,fontWeight:`semibold`,color:`fg`,letterSpacing:`-0.01em`,children:n.title}),(0,Q.jsx)(s,{fontSize:`sm`,color:`fg.muted`,lineHeight:`tall`,children:n.description})]}),(0,Q.jsx)(r,{flexShrink:0,color:`fg.muted`,opacity:0,transform:`translateX(-6px)`,transition:`all 0.25s ease`,css:{"button:hover &":{opacity:.5,transform:`translateX(0)`}},children:(0,Q.jsx)(_,{size:18})})]})]},n.key))})},_e=[{icon:ie,title:`Traces & Analytics`,description:`Monitor LLM calls, latency, costs, and user interactions`,path:`/traces`},{icon:w,title:`Online Evaluations`,description:`Run automated quality checks on live LLM outputs`,path:`/online-evaluations`},{icon:l,title:`Prompts`,description:`Version, test, and manage your prompts from the dashboard`,path:`/prompts`},{icon:C,title:`Scenarios`,description:`Create test scenarios to validate agent behavior`,path:`/simulations`},{icon:ae,title:`Datasets`,description:`Build and curate datasets for evaluation and fine-tuning`,path:`/datasets`},{icon:te,title:`Model Providers`,description:`Configure API keys for the models you use`,path:`/settings/model-providers`,absolute:!0}];function ve({icon:e,title:t,description:n,href:i}){return(0,Q.jsx)(c,{asChild:!0,align:`start`,gap:3,p:5,flex:1,borderRadius:`xl`,border:`1px solid`,borderColor:{base:`orange.200`,_dark:`orange.800`},bg:`bg.panel/70`,backdropFilter:`blur(20px) saturate(1.3)`,boxShadow:`0 1px 3px rgba(0,0,0,0.04)`,transition:`all 0.2s ease`,cursor:`pointer`,_hover:{borderColor:`orange.emphasized`,boxShadow:`0 6px 28px rgba(237,137,38,0.06)`,transform:`translateY(-2px)`,textDecoration:`none`},children:(0,Q.jsxs)(E,{href:i,textDecoration:`none`,color:`inherit`,children:[(0,Q.jsx)(r,{flexShrink:0,p:2.5,borderRadius:`xl`,bg:`orange.50`,color:`orange.500`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:(0,Q.jsx)(e,{size:20,strokeWidth:1.5})}),(0,Q.jsxs)(c,{align:`stretch`,gap:1,children:[(0,Q.jsx)(s,{fontSize:`sm`,fontWeight:`semibold`,color:`fg`,letterSpacing:`-0.01em`,children:t}),(0,Q.jsx)(s,{fontSize:`xs`,color:`fg.muted`,lineHeight:`tall`,children:n})]})]})})}function ye(){let{project:e}=P();return(0,Q.jsx)(Q.Fragment,{children:(0,Q.jsxs)(c,{align:`stretch`,gap:6,mb:20,w:`full`,children:[(0,Q.jsx)(p,{templateColumns:{base:`1fr`,md:`repeat(2, 1fr)`,lg:`repeat(3, 1fr)`},gap:3,children:_e.map(t=>(0,Q.jsx)(h,{display:`flex`,children:(0,Q.jsx)(ve,{...t,href:t.absolute?t.path:e?.slug?`/${e.slug}${t.path}`:`#`})},t.title))}),(0,Q.jsx)(a,{justify:`center`,pt:2,children:(0,Q.jsxs)(`a`,{href:`https://docs.langwatch.ai`,target:`_blank`,rel:`noopener noreferrer`,style:{display:`inline-flex`,alignItems:`center`,gap:`4px`,fontSize:`13px`,color:`var(--chakra-colors-fg-muted)`,textDecoration:`none`},children:[`Read the docs`,(0,Q.jsx)(f,{size:14})]})})]})})}var be=({onSelectProduct:e})=>{let{emit:t}=S();return(0,Q.jsx)(ge,{onSelectProduct:n=>{t(`selected`,`product`,{product:n}),e(n)}})},xe=({flow:e,onSelectProduct:t,onContinue:n})=>{let r=(0,K.useMemo)(()=>function(){return(0,Q.jsx)(be,{onSelectProduct:t})},[t]),i=(0,K.useRef)(n);(0,K.useEffect)(()=>{i.current=n},[n]);let a=(0,K.useMemo)(()=>function(){return(0,Q.jsx)(de,{onContinue:()=>i.current()})},[]),o=(0,K.useMemo)(()=>({[U.SELECTION]:{id:`product-selection`,required:!1,heading:`Pick your flavour`,subHeading:`Choose a starting point. You can explore the rest anytime.`,component:r},[U.VIA_CLAUDE_CODE]:{id:`via-claude-code`,required:!1,heading:`Via Coding Agent`,subHeading:`Pick how you want to work with LangWatch in your coding agent`,widthVariant:`full`,component:A},[U.VIA_PLATFORM]:{id:`via-platform`,required:!1,heading:`Via the Platform`,subHeading:`Configure everything from the dashboard, no code changes needed`,widthVariant:`full`,component:ye},[U.VIA_CLAUDE_DESKTOP]:{id:`via-claude-desktop`,required:!1,heading:`Connect via MCP`,subHeading:`Add LangWatch to any MCP-compatible app in under a minute`,widthVariant:`full`,component:z},[U.MANUALLY]:{id:`manually`,required:!1,heading:`Manual Setup`,subHeading:`Add LangWatch to your codebase in minutes`,widthVariant:`full`,component:$},[U.MODEL_PROVIDER]:{id:`model-provider`,required:!1,heading:`Set up a model provider`,subHeading:`Connect the model that powers LangWatch's AI features`,component:a}}),[r,a]);return e.visibleScreens.map(e=>o[e])},Se=()=>{let{currentScreenIndex:e,flow:t,navigation:n,canGoBack:i,handleSelectProduct:a}=ue(),{organization:o,isLoading:s}=re({redirectToOnboarding:!0}),{project:c,slug:l}=le(o),[u,d]=(0,K.useState)(!1);(0,K.useEffect)(()=>{let e;return s?e=setTimeout(()=>d(!0),200):d(!1),()=>{e&&clearTimeout(e)}},[s]);let f=xe({flow:t,onSelectProduct:a,onContinue:n.nextScreen}),p=(0,K.useMemo)(()=>t.visibleScreens.findIndex(t=>Number(t)===Number(e)),[t.visibleScreens,e]),m=p>=0?f[p]:void 0;return m?s?(0,Q.jsx)(ce,{}):(0,Q.jsxs)(x,{name:`onboarding_product`,sendViewedEvent:!0,children:[(0,Q.jsx)(q,{}),(0,Q.jsx)(V,{title:m.heading,subTitle:m.subHeading,loading:u,compressedHeader:!0,widthVariant:m.widthVariant??`narrow`,showBackButton:i,onBack:()=>n.prevScreen(),skipHref:l?`/${l}`:void 0,children:(0,Q.jsx)(r,{w:`full`,children:(0,Q.jsx)(I,{value:{project:c,organization:o},children:!s&&m.component?(0,Q.jsxs)(x,{name:m.id,sendViewedEvent:!0,children:[(0,Q.jsx)(q,{}),(0,Q.jsx)(m.component,{})]},m.id):null})})})]}):null},Ce=()=>(0,Q.jsx)(H,{children:(0,Q.jsx)(Se,{})});export{Ce as default};
|
|
2
|
-
//# sourceMappingURL=product-D0RNZ3Ls.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
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{a as u,r as d}from"./field-BadoNaN5.js";import{a as f,n as p,t as m}from"./radio-group-CWz2nJi3.js";import{n as h,r as g,t as _}from"./native-select-DL2k8x0o.js";import{n as v}from"./api-l6Cnm0vQ.js";import{r as y}from"./next-router-CWLrMXvP.js";import{s as b,t as x}from"./index.esm-Cpy5fWo1.js";import{Mr as S,Ut as C,Vt as w}from"./index-CPtTUYLD.js";import{t as T}from"./code-kZIt0FhA.js";import{t as E}from"./SetupLayout-CGv1kebj.js";import{n as D,t as O}from"./OpenAI-DFYm1n1s.js";import{t as k}from"./getSafeReturnToPath-DhtoOW7y.js";var A=o();function j(){return(0,A.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`100%`,x:`0`,y:`0`,version:`1.1`,viewBox:`0 0 135 129`,xmlSpace:`preserve`,children:[(0,A.jsx)(`path`,{fill:`#EF4036`,d:`M57 130c-4.025 0-8.05 0-12.738-.388-12.655-.796-24.644-1.307-36.637-1.554-3.991-.083-6.077-1.088-5.733-5.642.233-3.099-.559-6.275-.892-9.416 0-3.03 0-6.061.388-9.747.462-2.482.601-4.307.602-6.133.014-28.16-.128-56.32.08-84.478C2.15 1.665 4.737 1.884 12.41 1.961 26.237 2.099 40.067 2 53.897 2c23.327 0 46.664-.387 69.978.174 10.618.255 11.252.618 11.144 10.772-.384 36.255-.697 72.512-1.011 108.768-.063 7.28-.013 7.162-7.504 7.328-4.84.108-9.67.625-14.505.958-8.354 0-16.708 0-25.733-.388-8.722-.462-16.774-.589-24.825-.565-1.482.004-2.961.62-4.442.953M9 54.37v5.385c5.808.445 11.04.881 16.277 1.237 5.138.348 6.526 2.156 5.266 6.98-.328 1.257-.997 2.613-.769 3.779.294 1.5 1.229 3.992 2.07 4.069 3.052.281 6.499.404 9.122-.838 1.039-.492.732-4.787.3-7.219-.819-4.617.47-6.87 5.055-6.698 5.693.212 11.368.896 17.68 1.43l2.831-14.063c-11.667-1.47-15.167-5.947-13.826-17.463.75-6.428 6.2-10.251 13.753-9.707V9.276H9V54.37m64.082-2.606l-1.38 12.12 13.042 1.246c1.312-4.52 1.405-9.022 3.686-11.54 2.31-2.55 6.69-3.895 10.341-4.36 3.148-.4 7.653.122 9.58 2.132 2.98 3.11 4.275 7.835 6.748 12.808l12.9-1.35c0-16.546-.12-32.688.085-48.827.052-4.056-1.325-5.12-5.207-5.07-14.662.192-29.329.069-43.994.093-1.26.002-2.52.22-3.452.308-.515 4.216-1.159 7.953-1.39 11.716-.47 7.613-.648 7.774-7.874 8.045-1.72.064-4.6.878-4.86 1.886-.63 2.44-.675 5.493.339 7.705.533 1.165 3.868 1.697 5.795 1.44 4.502-.6 6.512.763 6.532 5.461.007 1.8-.291 3.601-.89 6.187M109.762 71c-5.78-.108-6.12-.549-4.792-6.265.256-1.103.93-2.244.78-3.276-.216-1.48-.97-4.086-1.568-4.107-3.389-.12-6.903.039-10.115.984-.63.186-.452 4.3-.072 6.504.987 5.722-.073 7.151-5.944 7.158-5.867.008-11.734.002-17.823.002v11.717c16.259.062 17.997 1.8 16.626 17.732-.199 2.315-1.803 5.683-3.636 6.441-3.964 1.64-8.497 1.904-13.218 2.812 0 1.524.022 4.009-.005 6.493-.037 3.38 1.188 5.165 4.985 4.87 3.64-.282 7.322-.005 10.986-.003 13.615.007 27.231.003 41.434.003V71h-17.638M69.03 92.467c-5.086 1.942-5.712-1.924-5.923-5.102-.373-5.611-.105-11.265-.105-17.1l-12.395-2.002c-1.735 4.8-2.101 10.653-5.15 12.962-3.419 2.588-9.372 2.996-14.028 2.506-6.93-.728-11.226-6.305-8.924-15.41H9.342v53.577h53.659c0-5.359-.093-10.168.026-14.972.122-4.967 2.62-6.667 7.336-5.211 1.395.43 2.869 1.342 4.176 1.149 1.785-.263 4.736-1.147 4.912-2.16.482-2.774.426-6.073-.763-8.507-.528-1.08-4.292-.65-6.594-.754-.76-.035-1.543.404-3.064 1.024z`,opacity:`1`}),(0,A.jsx)(`path`,{fill:`#FFF`,d:`M112.469 130c4.366-.333 9.196-.85 14.036-.958 7.49-.166 7.44-.048 7.504-7.328.314-36.256.627-72.513 1.011-108.768.108-10.154-.526-10.517-11.144-10.772C100.562 1.614 77.226 2 53.898 2c-13.83 0-27.66.1-41.489-.04C4.738 1.885 2.15 1.666 2.07 12.643 1.862 40.8 2.004 68.96 1.99 97.12c0 1.826-.14 3.651-.602 5.678C1 69.038 1 35.076 1 1.058h134.867V130h-23.398zM1 113.47c.333 2.671 1.125 5.847.892 8.946-.344 4.554 1.742 5.56 5.733 5.642 11.993.247 23.982.758 36.173 1.554C29.773 130 15.546 130 1 130v-16.53zM57.469 130c1.012-.333 2.491-.949 3.973-.953 8.051-.024 16.103.103 24.356.565-9.152.388-18.506.388-28.33.388z`,opacity:`1`}),(0,A.jsx)(`path`,{fill:`#FFF`,d:`M9 53.885V9.275h57.759v11.987c-7.553-.544-13.004 3.28-13.753 9.707-1.341 11.516 2.16 15.993 13.826 17.463l-2.83 14.062c-6.313-.533-11.988-1.217-17.681-1.43-4.584-.17-5.874 2.082-5.054 6.7.431 2.431.738 6.726-.301 7.218-2.623 1.242-6.07 1.119-9.121.838-.842-.077-1.777-2.568-2.071-4.069-.228-1.166.441-2.522.77-3.779 1.259-4.824-.13-6.632-5.267-6.98C20.04 60.636 14.808 60.2 9 59.755v-5.87z`,opacity:`1`}),(0,A.jsx)(`path`,{fill:`#FFF`,d:`M73.302 51.371c.38-2.193.678-3.994.67-5.794-.019-4.698-2.03-6.06-6.531-5.46-1.927.256-5.262-.276-5.795-1.44-1.014-2.213-.968-5.266-.339-7.706.26-1.008 3.14-1.822 4.86-1.886 7.226-.271 7.405-.432 7.873-8.045.232-3.763.876-7.5 1.39-11.716.933-.087 2.193-.306 3.453-.308 14.665-.024 29.332.099 43.994-.093 3.882-.05 5.26 1.014 5.207 5.07-.205 16.139-.084 32.281-.084 48.828l-12.901 1.35c-2.473-4.974-3.768-9.699-6.748-12.809-1.927-2.01-6.432-2.532-9.58-2.131-3.652.464-8.03 1.808-10.34 4.359-2.282 2.518-2.375 7.02-3.687 11.54l-13.043-1.245c.473-4.145.927-8.133 1.601-12.514z`,opacity:`1`}),(0,A.jsx)(`path`,{fill:`#FFF`,d:`M110.235 71h17.166v51.065c-14.203 0-27.819.004-41.434-.003-3.664-.002-7.346-.28-10.986.004-3.797.294-5.022-1.491-4.985-4.87.027-2.485.005-4.97.005-6.494 4.72-.908 9.254-1.172 13.218-2.812 1.833-.758 3.437-4.126 3.636-6.441 1.371-15.932-.367-17.67-16.626-17.732V72c6.089 0 11.956.006 17.823-.002 5.87-.007 6.931-1.436 5.944-7.158-.38-2.204-.558-6.318.072-6.504 3.212-.945 6.726-1.103 10.115-.984.598.02 1.352 2.627 1.568 4.107.15 1.032-.524 2.173-.78 3.276-1.329 5.716-.987 6.157 5.264 6.265z`,opacity:`1`}),(0,A.jsx)(`path`,{fill:`#FFF`,d:`M69.405 92.268c1.146-.421 1.928-.86 2.689-.825 2.302.104 6.066-.326 6.594.754 1.19 2.434 1.245 5.733.763 8.506-.176 1.014-3.127 1.898-4.912 2.161-1.307.193-2.78-.719-4.176-1.15-4.716-1.455-7.214.245-7.336 5.212-.12 4.804-.026 9.613-.026 14.972H9.342V68.322h13.165c-2.304 9.104 1.991 14.68 8.922 15.41 4.656.489 10.61.081 14.027-2.507 3.05-2.31 3.416-8.161 5.151-12.962l12.395 2.002c0 5.835-.268 11.489.105 17.1.211 3.178.837 7.044 6.298 4.903z`,opacity:`1`})]})}function M(){return(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,preserveAspectRatio:`xMinYMid meet`,viewBox:`0 0 75 75`,children:(0,A.jsx)(`text`,{y:`65`,fontSize:`65px`,style:{fontSize:`65px`},children:`🦜`})})}function N({size:e=24,color:t,style:n}){return(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 100 100`,...n,width:e,height:e,children:(0,A.jsx)(`path`,{fill:t??`currentColor`,d:`M81.32 47.807c1.89 0 3.65.648 5.144 1.825a3.696 3.696 0 003.928.476 3.666 3.666 0 002.103-3.32V23.224a3.69 3.69 0 00-3.69-3.69H71.071c.344-1.283.502-2.605.502-3.928C71.573 7.01 64.564 0 55.968 0S40.363 7.01 40.363 15.605c0 1.35.172 2.672.503 3.928L35 19.5s-15.6-1-15.6 16v57.06h27.564c1.455 0 2.777-.846 3.346-2.169a3.691 3.691 0 00-.582-3.967 8.144 8.144 0 01-2.037-5.383c0-4.535 3.69-8.225 8.226-8.225 4.536 0 8.226 3.69 8.226 8.225a8.143 8.143 0 01-2.037 5.383 3.691 3.691 0 00-.582 3.967c.609 1.323 1.931 2.17 3.346 2.17h23.87a3.691 3.691 0 003.69-3.69V65.305a3.643 3.643 0 00-2.103-3.32 3.7 3.7 0 00-3.927.476 8.073 8.073 0 01-5.145 1.825c-4.536 0-8.225-3.69-8.225-8.226.066-4.522 3.754-8.253 8.29-8.253zM19.4 71.189V35.5v5.43a15.71 15.71 0 00-3.795-.475C7.01 40.455 0 47.464 0 56.06s7.009 15.605 15.605 15.605c1.283 0 2.54-.172 3.796-.476zm61.92.422c1.283 0 2.539-.172 3.795-.476v14.018H71.031c.37-1.322.542-2.71.542-4.126 0-8.596-7.009-15.605-15.605-15.605s-15.605 7.009-15.605 15.605c0 1.389.198 2.777.542 4.126H26.781V65.29a3.643 3.643 0 00-2.102-3.32 3.7 3.7 0 00-3.928.477 8.072 8.072 0 01-5.145 1.825c-4.535 0-8.225-3.69-8.225-8.226 0-4.536 3.69-8.226 8.226-8.226 1.89 0 3.689.648 5.144 1.825a3.697 3.697 0 003.928.476 3.666 3.666 0 002.102-3.32V35.5c0-9.5 8.719-8.562 8.719-8.562h11.29a3.729 3.729 0 003.346-2.129 3.696 3.696 0 00-.503-3.928 8.246 8.246 0 01-1.89-5.25c0-4.536 3.689-8.226 8.225-8.226s8.226 3.69 8.226 8.226c0 1.931-.675 3.796-1.93 5.25a3.702 3.702 0 00-.504 3.928 3.7 3.7 0 003.346 2.13h20.01v14.017a15.71 15.71 0 00-3.796-.476c-8.596 0-15.605 7.01-15.605 15.606 0 8.582 6.995 15.525 15.605 15.525z`})})}function P(){return(0,A.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,version:`1`,viewBox:`0 0 122 134`,children:[(0,A.jsxs)(`defs`,{children:[(0,A.jsxs)(`linearGradient`,{id:`linearGradient2795`,children:[(0,A.jsx)(`stop`,{offset:`0`,stopColor:`#b8b8b8`,stopOpacity:`0.498`}),(0,A.jsx)(`stop`,{offset:`1`,stopColor:`#7f7f7f`,stopOpacity:`0`})]}),(0,A.jsxs)(`linearGradient`,{children:[(0,A.jsx)(`stop`,{offset:`0`,stopColor:`#7f7f7f`,stopOpacity:`0.5`}),(0,A.jsx)(`stop`,{offset:`1`,stopColor:`#7f7f7f`,stopOpacity:`0`})]}),(0,A.jsxs)(`linearGradient`,{children:[(0,A.jsx)(`stop`,{offset:`0`,stopColor:`#b2b2b2`,stopOpacity:`0.5`}),(0,A.jsx)(`stop`,{offset:`1`,stopColor:`#b3b3b3`,stopOpacity:`0`})]}),(0,A.jsxs)(`linearGradient`,{children:[(0,A.jsx)(`stop`,{offset:`0`,stopColor:`#f4f4f4`,stopOpacity:`1`}),(0,A.jsx)(`stop`,{offset:`1`,stopColor:`#fff`,stopOpacity:`1`})]}),(0,A.jsxs)(`linearGradient`,{id:`linearGradient4671`,children:[(0,A.jsx)(`stop`,{offset:`0`,stopColor:`#ffd43b`,stopOpacity:`1`}),(0,A.jsx)(`stop`,{offset:`1`,stopColor:`#ffe873`,stopOpacity:`1`})]}),(0,A.jsxs)(`linearGradient`,{id:`linearGradient4689`,children:[(0,A.jsx)(`stop`,{offset:`0`,stopColor:`#5a9fd4`,stopOpacity:`1`}),(0,A.jsx)(`stop`,{offset:`1`,stopColor:`#306998`,stopOpacity:`1`})]}),(0,A.jsx)(`linearGradient`,{x1:`224.24`,x2:`-65.309`,y1:`144.757`,y2:`144.757`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,A.jsx)(`linearGradient`,{x1:`172.942`,x2:`26.67`,y1:`77.476`,y2:`76.313`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,A.jsx)(`linearGradient`,{x1:`172.942`,x2:`26.67`,y1:`77.476`,y2:`76.313`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,A.jsx)(`linearGradient`,{x1:`224.24`,x2:`-65.309`,y1:`144.757`,y2:`144.757`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,A.jsx)(`linearGradient`,{x1:`172.942`,x2:`26.67`,y1:`77.476`,y2:`76.313`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,A.jsx)(`linearGradient`,{x1:`224.24`,x2:`-65.309`,y1:`144.757`,y2:`144.757`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,A.jsx)(`linearGradient`,{x1:`224.24`,x2:`-65.309`,y1:`144.757`,y2:`144.757`,gradientTransform:`matrix(.56254 0 0 .56797 -11.597 -7.61)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,A.jsx)(`linearGradient`,{x1:`172.942`,x2:`26.67`,y1:`76.176`,y2:`76.313`,gradientTransform:`matrix(.56254 0 0 .56797 -11.597 -7.61)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,A.jsx)(`radialGradient`,{cx:`61.519`,cy:`132.286`,r:`29.037`,fx:`61.519`,fy:`132.286`,gradientTransform:`matrix(1 0 0 .17797 0 108.743)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient2795`}),(0,A.jsx)(`linearGradient`,{id:`linearGradient1475`,x1:`150.961`,x2:`112.031`,y1:`192.352`,y2:`137.273`,gradientTransform:`matrix(.56254 0 0 .56797 -14.991 -11.702)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,A.jsx)(`linearGradient`,{id:`linearGradient1478`,x1:`26.649`,x2:`135.665`,y1:`20.604`,y2:`114.398`,gradientTransform:`matrix(.56254 0 0 .56797 -14.991 -11.702)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,A.jsx)(`radialGradient`,{id:`radialGradient1480`,cx:`61.519`,cy:`132.286`,r:`29.037`,fx:`61.519`,fy:`132.286`,gradientTransform:`matrix(0 -.23995 1.05467 0 -83.7 142.462)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient2795`})]}),(0,A.jsxs)(`g`,{transform:`translate(0,0)`,children:[(0,A.jsx)(`path`,{fill:`url(#linearGradient1478)`,fillOpacity:`1`,d:`M54.919 0c-4.584.022-8.961.413-12.813 1.095C30.76 3.099 28.7 7.295 28.7 15.032v10.219h26.813v3.406H18.638c-7.793 0-14.616 4.684-16.75 13.594-2.462 10.213-2.571 16.586 0 27.25 1.905 7.938 6.457 13.594 14.25 13.594h9.218v-12.25c0-8.85 7.657-16.657 16.75-16.657h26.782c7.454 0 13.406-6.138 13.406-13.625v-25.53c0-7.267-6.13-12.726-13.406-13.938C64.282.328 59.502-.02 54.918 0zm-14.5 8.22c2.77 0 5.031 2.298 5.031 5.125 0 2.816-2.262 5.093-5.031 5.093-2.78 0-5.031-2.277-5.031-5.093 0-2.827 2.251-5.125 5.03-5.125z`}),(0,A.jsx)(`path`,{fill:`url(#linearGradient1475)`,fillOpacity:`1`,d:`M85.638 28.657v11.906c0 9.231-7.826 17-16.75 17H42.106c-7.336 0-13.406 6.279-13.406 13.625V96.72c0 7.266 6.319 11.54 13.406 13.625 8.488 2.495 16.627 2.946 26.782 0 6.75-1.955 13.406-5.888 13.406-13.625V86.5H55.513v-3.405H95.7c7.793 0 10.696-5.436 13.406-13.594 2.8-8.399 2.68-16.476 0-27.25-1.925-7.758-5.604-13.594-13.406-13.594zM70.575 93.313c2.78 0 5.031 2.278 5.031 5.094 0 2.827-2.251 5.125-5.031 5.125-2.77 0-5.031-2.298-5.031-5.125 0-2.816 2.261-5.094 5.031-5.094z`})]})]})}function F(){return(0,A.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`512`,fill:`none`,viewBox:`0 0 512 512`,children:[(0,A.jsx)(`rect`,{width:`512`,height:`512`,fill:`#3178c6`,rx:`50`}),(0,A.jsx)(`rect`,{width:`512`,height:`512`,fill:`#3178c6`,rx:`50`}),(0,A.jsx)(`path`,{fill:`#fff`,fillRule:`evenodd`,d:`M316.939 407.424v50.061c8.138 4.172 17.763 7.3 28.875 9.386S368.637 470 380.949 470c11.999 0 23.397-1.147 34.196-3.442 10.799-2.294 20.268-6.075 28.406-11.342 8.138-5.266 14.581-12.15 19.328-20.65S470 415.559 470 403.044c0-9.074-1.356-17.026-4.069-23.857s-6.625-12.906-11.738-18.225c-5.112-5.319-11.242-10.091-18.389-14.315s-15.207-8.213-24.18-11.967c-6.573-2.712-12.468-5.345-17.685-7.9-5.217-2.556-9.651-5.163-13.303-7.822-3.652-2.66-6.469-5.476-8.451-8.448-1.982-2.973-2.974-6.336-2.974-10.091 0-3.441.887-6.544 2.661-9.308s4.278-5.136 7.512-7.118c3.235-1.981 7.199-3.52 11.894-4.615 4.696-1.095 9.912-1.642 15.651-1.642 4.173 0 8.581.313 13.224.938 4.643.626 9.312 1.591 14.008 2.894a97.514 97.514 0 0113.694 4.928c4.434 1.982 8.529 4.276 12.285 6.884v-46.776c-7.616-2.92-15.937-5.084-24.962-6.492S415.797 238 404.112 238c-11.895 0-23.163 1.278-33.805 3.833s-20.006 6.544-28.093 11.967c-8.086 5.424-14.476 12.333-19.171 20.729-4.695 8.395-7.043 18.433-7.043 30.114 0 14.914 4.304 27.638 12.912 38.172 8.607 10.533 21.675 19.45 39.204 26.751 6.886 2.816 13.303 5.579 19.25 8.291s11.086 5.528 15.415 8.448c4.33 2.92 7.747 6.101 10.252 9.543 2.504 3.441 3.756 7.352 3.756 11.733 0 3.233-.783 6.231-2.348 8.995s-3.939 5.162-7.121 7.196-7.147 3.624-11.894 4.771c-4.748 1.148-10.303 1.721-16.668 1.721-10.851 0-21.597-1.903-32.24-5.71-10.642-3.806-20.502-9.516-29.579-17.13zM232.78 284.082H297V243H118v41.082h63.906V467h50.874z`,clipRule:`evenodd`})]})}function I(){return(0,A.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`100%`,height:`100%`,viewBox:`0 0 512 512`,children:(0,A.jsx)(`path`,{d:`M2310 5109c-502-55-974-249-1355-556-129-104-340-321-433-445-265-354-434-758-498-1193-22-147-29-428-15-575 42-433 180-833 405-1174C828 537 1461 134 2205 24c147-22 428-29 575-15 433 42 833 180 1174 405 629 414 1032 1047 1142 1791 22 147 29 428 15 575-51 524-238 988-558 1385-104 129-321 340-445 433-354 265-755 432-1193 498-121 18-487 26-605 13zm909-2348c347-607 631-1105 631-1107s-569-4-1265-4-1265 2-1265 5c0 8 1263 2216 1266 2212 1-1 287-499 633-1106z`,transform:`matrix(.1 0 0 -.1 0 512)`,fill:`currentColor`})})}var L={python:{label:`Python`,icon:(0,A.jsx)(P,{})},typescript:{label:`TypeScript`,icon:(0,A.jsx)(F,{})},other:{label:`Other`,icon:(0,A.jsx)(N,{})}},R={python_openai:{label:`Python OpenAI`,icon:(0,A.jsx)(P,{}),href:`https://docs.langwatch.ai/integration/python/guide`},python_azure_openai:{label:`Python Azure OpenAI`,icon:(0,A.jsx)(P,{}),href:`https://docs.langwatch.ai/integration/python/guide`},python_langchain:{label:`Python LangChain`,icon:(0,A.jsx)(P,{}),href:`https://docs.langwatch.ai/integration/python/guide`},python_dspy:{label:`Python DSPy`,icon:(0,A.jsx)(P,{}),href:`https://docs.langwatch.ai/integration/python/guide`},python_custom:{label:`Python Custom`,icon:(0,A.jsx)(P,{}),href:`https://docs.langwatch.ai/integration/python/guide`},typescript_guide:{label:`TypeScript`,icon:(0,A.jsx)(F,{}),href:`https://docs.langwatch.ai/integration/typescript/guide`},custom_rest:{label:`Custom REST`,icon:(0,A.jsx)(T,{}),href:`https://docs.langwatch.ai/integration/rest-api`}},z={openai:{label:`OpenAI`,icon:(0,A.jsx)(O,{}),languages:{python:R.python_openai,typescript:R.typescript_guide}},azure_openai:{label:`Azure OpenAI`,icon:(0,A.jsx)(D,{}),languages:{python:R.python_azure_openai,typescript:R.typescript_guide}},vercel_ai:{label:`Vercel AI SDK`,icon:(0,A.jsx)(I,{}),languages:{typescript:R.typescript_guide}},langchain:{label:`LangChain`,icon:(0,A.jsx)(M,{}),languages:{python:R.python_langchain,typescript:R.typescript_guide}},dspy:{label:`DSPy`,icon:(0,A.jsx)(j,{}),languages:{python:R.python_dspy}},other:{label:`Other`,icon:(0,A.jsx)(N,{}),languages:{python:R.python_custom,typescript:R.typescript_guide,other:R.custom_rest}}},B=e=>{let t=e.language,n=e.framework;return{language:L[t]??L.other,framework:z[n]??z.other}};function V({form:e}){let t=e,n=({children:e})=>(0,A.jsx)(r,{width:`32px`,height:`32px`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,_icon:{width:`32px`,height:`32px`},children:e}),i=t.watch(`language`)||Object.keys(L)[0],o=e=>{let n=Object.entries(z).filter(([t,n])=>Object.keys(n.languages).includes(e));t.setValue(`language`,e),n[0]&&t.setValue(`framework`,n[0][0])};return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(u,{children:[(0,A.jsx)(d,{children:`Language`}),(0,A.jsx)(x,{name:`language`,control:t.control,render:({field:e})=>(0,A.jsx)(f,{...e,onChange:void 0,onValueChange:e=>{o(e.value??``)},children:(0,A.jsx)(a,{gap:6,alignItems:`stretch`,wrap:`wrap`,children:Object.entries(L).map(([e,t])=>(0,A.jsx)(K,{value:e,children:(0,A.jsxs)(l,{width:`64px`,children:[(0,A.jsx)(n,{children:t.icon}),(0,A.jsx)(r,{fontSize:`sm`,textAlign:`center`,children:t.label})]})},e))})})})]}),(0,A.jsxs)(u,{children:[(0,A.jsx)(d,{children:`Library or Framework`}),(0,A.jsx)(x,{name:`framework`,control:t.control,render:({field:e})=>(0,A.jsx)(f,{...e,children:(0,A.jsx)(a,{gap:6,alignItems:`stretch`,wrap:`wrap`,children:Object.entries(z).filter(([e,t])=>Object.keys(t.languages).includes(i??``)).map(([e,t])=>(0,A.jsx)(K,{value:e,children:(0,A.jsxs)(l,{width:`64px`,children:[(0,A.jsx)(n,{children:t.icon}),(0,A.jsx)(r,{fontSize:`sm`,textAlign:`center`,children:t.label})]})},e))})})})]})]})}var H=({project:e})=>{let t=({children:e})=>(0,A.jsx)(r,{width:`16px`,height:`16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:e}),{language:n,framework:i}=B(e);return n.label===`Other`&&i.label===`Other`?(0,A.jsx)(a,{gap:0,align:`center`,justify:`center`,color:`fg.muted`,children:(0,A.jsx)(t,{children:(0,A.jsx)(N,{})})}):(0,A.jsxs)(a,{gap:0,children:[(0,A.jsx)(r,{marginRight:`-6px`,children:(0,A.jsx)(t,{children:n.icon})}),(0,A.jsx)(t,{children:i.icon})]})};function U({statusCode:e,title:t}){return(0,A.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,fontFamily:`system-ui, sans-serif`},children:(0,A.jsxs)(`div`,{style:{textAlign:`center`},children:[e&&(0,A.jsx)(`h1`,{style:{fontSize:`2rem`,fontWeight:700,margin:`0 0 0.5rem`},children:e}),(0,A.jsx)(`p`,{style:{fontSize:`1rem`,color:`#666`},children:t??`An error occurred`})]})})}var W=t({RadioCard:()=>K,default:()=>q}),G=e(n()),K=(0,G.forwardRef)(function(e,t){let{children:n,value:i}=e;return(0,A.jsxs)(m,{value:i,_checked:{backgroundColor:`gray.50`},children:[(0,A.jsx)(p,{ref:t}),(0,A.jsx)(r,{cursor:`pointer`,borderRadius:`md`,_hover:{backgroundColor:`gray.50`},px:5,py:3,height:`full`,display:`flex`,alignItems:`center`,children:n})]})});function q(){C();let e=b({defaultValues:{language:`python`,framework:`openai`}}),{watch:t}=e,n=t(`teamId`),r=y(),{organization:o}=w({redirectToProjectOnboarding:!1}),{team:f}=r.query,p=v.team.getBySlug.useQuery({slug:typeof f==`string`?f:``,organizationId:o?.id??``},{enabled:!!o}),m=v.team.getTeamsWithMembers.useQuery({organizationId:o?.id??``},{enabled:!!o}),x=k(r.query.return_to);(0,G.useEffect)(()=>{p.data&&e.setValue(`teamId`,p.data.id)},[e,p.data]);let T=v.project.create.useMutation();return p.isFetched&&!p.data?(0,A.jsx)(U,{statusCode:404}):(0,A.jsx)(E,{children:(0,A.jsx)(`form`,{onSubmit:e.handleSubmit(e=>{p.data&&T.mutate({organizationId:o?.id??``,name:e.name,teamId:e.teamId==`NEW`?void 0:e.teamId,newTeamName:e.newTeamName,language:e.language,framework:e.framework},{onSuccess:e=>{if(x){r.push(x);return}r.push(`/${e.projectSlug}`)}})}),children:(0,A.jsxs)(l,{gap:4,alignItems:`left`,children:[(0,A.jsx)(s,{as:`h1`,fontSize:`x-large`,children:`Create New Project`}),(0,A.jsxs)(c,{paddingBottom:4,fontSize:`14px`,children:[`You can set up separate projects for each service or LLM feature of your application (for example, one for your ChatBot, another for that Content Generation feature).`,(0,A.jsx)(`br`,{})]}),(0,A.jsxs)(u,{children:[(0,A.jsx)(d,{children:`Project Name`}),(0,A.jsx)(S,{...e.register(`name`,{required:!0})})]}),m.data?.some(e=>e.projects.length>0)&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(u,{children:[(0,A.jsx)(d,{children:`Team`}),(0,A.jsxs)(g,{children:[(0,A.jsxs)(_,{...e.register(`teamId`,{required:!0}),children:[m.data?.map(e=>(0,A.jsx)(`option`,{value:e.id,children:e.name},e.id)),(0,A.jsx)(`option`,{value:`NEW`,children:`(+) Create new team`})]}),(0,A.jsx)(h,{})]})]}),n==`NEW`&&(0,A.jsxs)(u,{children:[(0,A.jsx)(d,{children:`New Team Name`}),(0,A.jsx)(S,{...e.register(`newTeamName`,{required:!0})})]})]}),(0,A.jsx)(V,{form:e}),T.error&&(0,A.jsx)(`p`,{children:`Something went wrong!`}),(0,A.jsx)(a,{width:`full`,children:(0,A.jsx)(i,{colorPalette:`orange`,type:`submit`,disabled:T.isLoading||T.isSuccess,children:T.isSuccess?`Created`:T.isLoading?`Loading...`:`Next`})})]})})})}export{H as n,V as r,W as t};
|
|
2
|
-
//# sourceMappingURL=project-ZTQzA2gY.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{$t as n,At as r,C as i,Ct as a,D as o,E as s,J as c,O as l,Qt as u,S as d,U as f,V as p,Z as m,_ as ee,a as h,b as g,ct as _,dn as v,dt as y,i as b,j as x,k as te,lt as ne,n as S,p as C,pt as w,q as re,w as T,wt as E,x as ie}from"./portal-Sdfvrza9.js";import{t as D}from"./jsx-runtime-CFwixLRt.js";import{n as O,t as k}from"./v-stack-hkuSkmCA.js";import{Gn as ae,Jn as oe,Kn as se,qn as ce}from"./ProjectAvatar-DtI9dT1f.js";import{o as le,t as A}from"./badge-Cpc3eA-C.js";import{n as ue}from"./toaster-BsYkODqs.js";import{n as de,t as fe}from"./dist-B7coEPw4.js";import{r as pe}from"./dismissable-layer-DBn7OJNY.js";import{c as me,r as he,s as ge}from"./visually-hidden-0SZJZ5dQ.js";import{$ as _e,O as ve,Q as ye,X as j,Y as be,Z as M,et as N,nt as xe,tt as Se}from"./Markdown-C9extmbX.js";import{i as Ce,l as we,n as Te,o as Ee,s as De}from"./icon-D6xQEiPb.js";import{a as Oe}from"./field-uFetMRUQ.js";import{Jt as ke,Kt as Ae,L as je,qt as Me,t as Ne}from"./DashboardLayout-BhHe0vIT.js";import{r as P,t as F}from"./card-By_Mbslh.js";import{a as Pe,i as Fe,l as Ie,o as Le,r as Re,s as ze,u as Be}from"./personalProject-DMRX2-SI.js";import{a as Ve,i as He,n as Ue,t as We}from"./empty-state-T8EYr5NF.js";import{t as Ge}from"./errors-e711UMq7.js";import{n as I,r as L,t as R}from"./stat-CsyT0AnR.js";import{i as Ke,n as z,r as qe,t as Je}from"./ReplayStateBadge-CTtWh9Ih.js";import{et as Ye,tt as Xe}from"./immer-CFru3D02.js";import{n as B}from"./api-l6Cnm0vQ.js";import{t as Ze}from"./arrow-right-Cn6z_njp.js";import{r as Qe}from"./next-router-CWLrMXvP.js";import{Ir as V,Mr as $e,Pr as et,S as H,Yn as tt}from"./index-CPtTUYLD.js";import{r as nt}from"./formatters-BDO3Inyr.js";import{t as rt}from"./OpsPageShell-Ch1rtwuD.js";import{i as it,n as at,r as ot,t as st}from"./PhaseTimeline-BXHqjiZI.js";function ct(e){if(!e)return;let t=_(e);return`box-sizing:`+t.boxSizing+`;border-left:`+t.borderLeftWidth+` solid red;border-right:`+t.borderRightWidth+` solid red;font-family:`+t.fontFamily+`;font-feature-settings:`+t.fontFeatureSettings+`;font-kerning:`+t.fontKerning+`;font-size:`+t.fontSize+`;font-stretch:`+t.fontStretch+`;font-style:`+t.fontStyle+`;font-variant:`+t.fontVariant+`;font-variant-caps:`+t.fontVariantCaps+`;font-variant-ligatures:`+t.fontVariantLigatures+`;font-variant-numeric:`+t.fontVariantNumeric+`;font-weight:`+t.fontWeight+`;letter-spacing:`+t.letterSpacing+`;margin-left:`+t.marginLeft+`;margin-right:`+t.marginRight+`;padding-left:`+t.paddingLeft+`;padding-right:`+t.paddingRight+`;text-indent:`+t.textIndent+`;text-transform:`+t.textTransform}function lt(e){let t=e.createElement(`div`);return t.id=`ghost`,t.style.cssText=`display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;`,e.body.appendChild(t),t}function ut(e){if(!e)return;let t=y(e),n=w(e),r=lt(t),i=ct(e);i&&(r.style.cssText+=i);function a(){n.requestAnimationFrame(()=>{r.innerHTML=e.value;let t=n.getComputedStyle(r);e?.style.setProperty(`width`,t.width)})}return a(),e?.addEventListener(`input`,a),e?.addEventListener(`change`,a),()=>{t.body.removeChild(r),e?.removeEventListener(`input`,a),e?.removeEventListener(`change`,a)}}var dt=e=>e.ids?.root??`tags-input:${e.id}`,ft=e=>e.ids?.input??`tags-input:${e.id}:input`,pt=e=>e.ids?.clearBtn??`tags-input:${e.id}:clear-btn`,mt=e=>e.ids?.hiddenInput??`tags-input:${e.id}:hidden-input`,ht=e=>e.ids?.label??`tags-input:${e.id}:label`,gt=e=>e.ids?.control??`tags-input:${e.id}:control`,U=(e,t)=>e.ids?.item?.(t)??`tags-input:${e.id}:tag:${t.value}:${t.index}`,_t=(e,t)=>e.ids?.itemDeleteTrigger?.(t)??`${U(e,t)}:delete-btn`,vt=(e,t)=>e.ids?.itemInput?.(t)??`${U(e,t)}:input`,yt=e=>`${e}:input`,bt=(e,t)=>e.getById(yt(t)),xt=e=>we(Ct(e),`[data-part=item]`),St=(e,t)=>e.getById(vt(e,t)),Ct=e=>e.getById(dt(e)),W=e=>e.getById(ft(e)),wt=e=>e.getById(mt(e)),G=e=>we(Ct(e),`[data-part=item-preview]:not([data-disabled])`),Tt=e=>G(e)[0],Et=e=>G(e)[G(e).length-1],Dt=(e,t)=>De(G(e),t,!1),Ot=(e,t)=>Ee(G(e),t,!1),kt=(e,t)=>G(e)[t],K=(e,t)=>Ce(G(e),t),At=e=>{let t=e.closest(`[data-part=item-preview]`);t&&(t.dataset.deleteIntent=``)},jt=e=>{let t=e.closest(`[data-part=item-preview]`);t&&delete t.dataset.deleteIntent},Mt=(e,t)=>{let n=wt(e);n&&he(n,{value:t})};function Nt(e,t){let{state:n,send:r,computed:i,prop:o,scope:s,context:l}=e,u=i(`isInteractive`),d=!!o(`disabled`),p=!!o(`readOnly`),ee=!!o(`required`),h=o(`invalid`)||i(`isOverflowing`),g=o(`translations`),_=n.hasTag(`focused`),v=n.matches(`editing:tag`),y=i(`count`)===0;function b(e){let t=U(s,e),n=l.get(`editedTagId`),r=l.get(`highlightedTagId`);return{id:t,editing:v&&n===t,highlighted:t===r,disabled:!!(e.disabled||d)}}return{empty:y,inputValue:l.get(`inputValue`),value:l.get(`value`),valueAsString:i(`valueAsString`),count:i(`count`),atMax:i(`isAtMax`),setValue(e){r({type:`SET_VALUE`,value:e})},clearValue(e){r(e?{type:`CLEAR_TAG`,id:e}:{type:`CLEAR_VALUE`})},addValue(e){r({type:`ADD_TAG`,value:e})},setValueAtIndex(e,t){r({type:`SET_VALUE_AT_INDEX`,index:e,value:t})},setInputValue(e){r({type:`SET_INPUT_VALUE`,value:e})},clearInputValue(){r({type:`SET_INPUT_VALUE`,value:``})},focus(){W(s)?.focus()},getItemState:b,getRootProps(){return t.element({dir:o(`dir`),...V.root.attrs,"data-invalid":E(h),"data-readonly":E(p),"data-disabled":E(d),"data-focus":E(_),"data-empty":E(y),id:dt(s),onPointerDown(){u&&r({type:`POINTER_DOWN`})}})},getLabelProps(){return t.label({...V.label.attrs,"data-disabled":E(d),"data-invalid":E(h),"data-readonly":E(p),"data-required":E(ee),id:ht(s),dir:o(`dir`),htmlFor:ft(s)})},getControlProps(){return t.element({id:gt(s),...V.control.attrs,dir:o(`dir`),tabIndex:p?0:void 0,"data-disabled":E(d),"data-readonly":E(p),"data-invalid":E(h),"data-focus":E(_)})},getInputProps(){return t.input({...V.input.attrs,dir:o(`dir`),"data-invalid":E(h),"aria-invalid":a(h),"data-readonly":E(p),"data-empty":E(y),maxLength:o(`maxLength`),id:ft(s),defaultValue:l.get(`inputValue`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,enterKeyHint:`done`,disabled:d||p,placeholder:y?o(`placeholder`):void 0,onInput(e){let t=re(e),n=e.currentTarget.value;if(t.inputType===`insertFromPaste`){r({type:`PASTE`,value:n});return}if(Pt(n,o(`delimiter`))){r({type:`DELIMITER_KEY`});return}r({type:`TYPE`,value:n,key:t.inputType})},onFocus(){queueMicrotask(()=>{r({type:`FOCUS`})})},onKeyDown(e){if(e.defaultPrevented||c(e))return;let t=e.currentTarget,n=t.getAttribute(`role`)===`combobox`,i=t.ariaExpanded===`true`,a={ArrowDown(){r({type:`ARROW_DOWN`})},ArrowLeft(){n&&i||r({type:`ARROW_LEFT`})},ArrowRight(e){l.get(`highlightedTagId`)&&e.preventDefault(),!(n&&i)&&r({type:`ARROW_RIGHT`})},Escape(e){e.preventDefault(),r({type:`ESCAPE`})},Backspace(){r({type:`BACKSPACE`})},Delete(){r({type:`DELETE`})},Enter(e){let a=t.getAttribute(`aria-activedescendant`);n&&i&&a||(r({type:`ENTER`}),e.preventDefault())}}[f(e,{dir:o(`dir`)})];if(a){a(e);return}}})},getHiddenInputProps(){return t.input({type:`text`,hidden:!0,name:o(`name`),form:o(`form`),disabled:d,readOnly:p,required:o(`required`),id:mt(s),defaultValue:i(`valueAsString`)})},getItemProps(e){return t.element({...V.item.attrs,dir:o(`dir`),"data-value":e.value,"data-disabled":E(d)})},getItemPreviewProps(e){let n=b(e);return t.element({...V.itemPreview.attrs,id:n.id,dir:o(`dir`),hidden:n.editing,"data-value":e.value,"data-disabled":E(d),"data-highlighted":E(n.highlighted),onPointerDown(e){!u||n.disabled||m(e)&&(e.preventDefault(),r({type:`POINTER_DOWN_TAG`,id:n.id}))},onDoubleClick(){!u||n.disabled||r({type:`DOUBLE_CLICK_TAG`,id:n.id})}})},getItemTextProps(e){let n=b(e);return t.element({...V.itemText.attrs,dir:o(`dir`),"data-disabled":E(d),"data-highlighted":E(n.highlighted)})},getItemInputProps(e){let n=b(e);return t.input({...V.itemInput.attrs,dir:o(`dir`),"aria-label":g?.tagEdited?.(e.value),disabled:d,id:vt(s,e),tabIndex:-1,hidden:!n.editing,maxLength:o(`maxLength`),defaultValue:n.editing?l.get(`editedTagValue`):``,onInput(e){r({type:`TAG_INPUT_TYPE`,value:e.currentTarget.value})},onBlur(e){queueMicrotask(()=>{r({type:`TAG_INPUT_BLUR`,target:e.relatedTarget,id:n.id})})},onKeyDown(e){if(e.defaultPrevented||c(e))return;let t={Enter(){r({type:`TAG_INPUT_ENTER`})},Escape(){r({type:`TAG_INPUT_ESCAPE`})}}[e.key];t&&(e.preventDefault(),t(e))}})},getItemDeleteTriggerProps(e){let n=b(e);return t.button({...V.itemDeleteTrigger.attrs,dir:o(`dir`),"data-disabled":E(n.disabled),"aria-disabled":n.disabled,"data-highlighted":E(n.highlighted),id:_t(s,e),type:`button`,disabled:n.disabled,"aria-label":g?.deleteTagTriggerLabel?.(e.value),tabIndex:-1,onPointerDown(e){m(e)&&(u||e.preventDefault())},onPointerMove(e){u&&At(e.currentTarget)},onPointerLeave(e){u&&jt(e.currentTarget)},onClick(e){e.defaultPrevented||u&&r({type:`CLICK_DELETE_TAG`,id:n.id})}})},getClearTriggerProps(){return t.button({...V.clearTrigger.attrs,dir:o(`dir`),id:pt(s),type:`button`,"data-readonly":E(p),disabled:d,"aria-label":g?.clearTriggerLabel,hidden:y,onClick(){u&&r({type:`CLEAR_VALUE`})}})}}}function Pt(e,t){return t?typeof t==`string`?e.endsWith(t):RegExp(`${t.source}$`).test(e):!1}var{and:q,not:J,or:Ft}=l(),It=te({props({props:e}){return{dir:`ltr`,addOnPaste:!1,editable:!0,validate:()=>!0,allowDuplicates:!1,delimiter:`,`,defaultValue:[],defaultInputValue:``,max:1/0,sanitizeValue:e=>e.trim(),...e,translations:{clearTriggerLabel:`Clear all tags`,deleteTagTriggerLabel:e=>`Delete tag ${e}`,tagAdded:e=>`Added tag ${e}`,tagsPasted:e=>`Pasted ${e.length} tags`,tagEdited:e=>`Editing tag ${e}. Press enter to save or escape to cancel.`,tagUpdated:e=>`Tag update to ${e}`,tagDeleted:e=>`Tag ${e} deleted`,tagSelected:e=>`Tag ${e} selected. Press enter to edit, delete or backspace to remove.`,...e.translations}}},initialState({prop:e}){return e(`autoFocus`)?`focused:input`:`idle`},refs(){return{liveRegion:null,log:{current:null,prev:null}}},context({bindable:e,prop:t}){return{value:e(()=>({defaultValue:t(`defaultValue`),value:t(`value`),isEqual:le,hash(e){return e.join(`, `)},onChange(e){t(`onValueChange`)?.({value:e})}})),inputValue:e(()=>({sync:!0,defaultValue:t(`defaultInputValue`),value:t(`inputValue`),onChange(e){t(`onInputValueChange`)?.({inputValue:e})}})),fieldsetDisabled:e(()=>({defaultValue:!1})),editedTagValue:e(()=>({defaultValue:``})),editedTagId:e(()=>({defaultValue:null})),editedTagIndex:e(()=>({defaultValue:null,sync:!0})),highlightedTagId:e(()=>({defaultValue:null,sync:!0,onChange(e){t(`onHighlightChange`)?.({highlightedValue:e})}}))}},computed:{count:({context:e})=>e.get(`value`).length,valueAsString:({context:e})=>e.hash(`value`),sanitizedInputValue:({context:e,prop:t})=>t(`sanitizeValue`)(e.get(`inputValue`)),isDisabled:({prop:e})=>!!e(`disabled`),isInteractive:({prop:e})=>!(e(`readOnly`)||e(`disabled`)),isAtMax:({context:e,prop:t})=>e.get(`value`).length===t(`max`),isOverflowing:({context:e,prop:t})=>e.get(`value`).length>t(`max`)},watch({track:e,context:t,action:n,computed:r,refs:i}){e([()=>t.get(`editedTagValue`)],()=>{n([`syncEditedTagInputValue`])}),e([()=>t.get(`inputValue`)],()=>{n([`syncInputValue`])}),e([()=>t.get(`highlightedTagId`)],()=>{n([`logHighlightedTag`])}),e([()=>r(`isOverflowing`)],()=>{n([`invokeOnInvalid`])}),e([()=>JSON.stringify(i.get(`log`))],()=>{n([`announceLog`])})},effects:[`trackLiveRegion`,`trackFormControlState`],exit:[`clearLog`],on:{DOUBLE_CLICK_TAG:{guard:`isTagEditable`,target:`editing:tag`,actions:[`setEditedId`]},POINTER_DOWN_TAG:{target:`navigating:tag`,actions:[`highlightTag`,`focusInput`]},CLICK_DELETE_TAG:{target:`focused:input`,actions:[`deleteTag`]},SET_INPUT_VALUE:{actions:[`setInputValue`]},SET_VALUE:{actions:[`setValue`]},CLEAR_TAG:{actions:[`deleteTag`]},SET_VALUE_AT_INDEX:{actions:[`setValueAtIndex`]},CLEAR_VALUE:{actions:[`clearTags`,`clearInputValue`,`focusInput`]},ADD_TAG:{actions:[`addTag`]},INSERT_TAG:{guard:q(Ft(J(`isAtMax`),`allowOverflow`),J(`isInputValueEmpty`)),actions:[`addTag`,`clearInputValue`]},EXTERNAL_BLUR:[{guard:`addOnBlur`,actions:[`raiseInsertTagEvent`]},{guard:`clearOnBlur`,actions:[`clearInputValue`]}]},states:{idle:{on:{FOCUS:{target:`focused:input`},POINTER_DOWN:{guard:J(`hasHighlightedTag`),target:`focused:input`}}},"focused:input":{tags:[`focused`],entry:[`focusInput`,`clearHighlightedId`],effects:[`trackInteractOutside`],on:{TYPE:{actions:[`setInputValue`]},BLUR:[{guard:`addOnBlur`,target:`idle`,actions:[`raiseInsertTagEvent`]},{guard:`clearOnBlur`,target:`idle`,actions:[`clearInputValue`]},{target:`idle`}],ENTER:{actions:[`raiseInsertTagEvent`]},DELIMITER_KEY:{actions:[`raiseInsertTagEvent`]},ARROW_LEFT:{guard:q(`hasTags`,`isCaretAtStart`),target:`navigating:tag`,actions:[`highlightLastTag`]},BACKSPACE:{target:`navigating:tag`,guard:q(`hasTags`,`isCaretAtStart`),actions:[`highlightLastTag`]},DELETE:{guard:`hasHighlightedTag`,actions:[`deleteHighlightedTag`,`highlightTagAtIndex`]},PASTE:[{guard:`addOnPaste`,actions:[`setInputValue`,`addTagFromPaste`]},{actions:[`setInputValue`]}]}},"navigating:tag":{tags:[`focused`],effects:[`trackInteractOutside`],on:{ARROW_RIGHT:[{guard:q(`hasTags`,`isCaretAtStart`,J(`isLastTagHighlighted`)),actions:[`highlightNextTag`]},{target:`focused:input`}],ARROW_LEFT:[{guard:J(`isCaretAtStart`),target:`focused:input`},{actions:[`highlightPrevTag`]}],BLUR:{target:`idle`,actions:[`clearHighlightedId`]},ENTER:{guard:q(`isTagEditable`,`hasHighlightedTag`),target:`editing:tag`,actions:[`setEditedId`,`focusEditedTagInput`]},ARROW_DOWN:{target:`focused:input`},ESCAPE:{target:`focused:input`},TYPE:{target:`focused:input`,actions:[`setInputValue`]},BACKSPACE:[{guard:J(`isCaretAtStart`),target:`focused:input`},{guard:`isFirstTagHighlighted`,actions:[`deleteHighlightedTag`,`highlightFirstTag`]},{guard:`hasHighlightedTag`,actions:[`deleteHighlightedTag`,`highlightPrevTag`]},{actions:[`highlightLastTag`]}],DELETE:[{guard:J(`isCaretAtStart`),target:`focused:input`},{target:`focused:input`,actions:[`deleteHighlightedTag`,`highlightTagAtIndex`]}],PASTE:[{guard:`addOnPaste`,target:`focused:input`,actions:[`setInputValue`,`addTagFromPaste`]},{target:`focused:input`,actions:[`setInputValue`]}]}},"editing:tag":{tags:[`editing`,`focused`],entry:[`focusEditedTagInput`],effects:[`autoResize`],on:{TAG_INPUT_TYPE:{actions:[`setEditedTagValue`]},TAG_INPUT_ESCAPE:{target:`navigating:tag`,actions:[`clearEditedTagValue`,`focusInput`,`clearEditedId`,`highlightTagAtIndex`]},TAG_INPUT_BLUR:[{guard:`isInputRelatedTarget`,target:`navigating:tag`,actions:[`clearEditedTagValue`,`clearHighlightedId`,`clearEditedId`]},{target:`idle`,actions:[`clearEditedTagValue`,`clearHighlightedId`,`clearEditedId`,`raiseExternalBlurEvent`]}],TAG_INPUT_ENTER:[{guard:`isEditedTagEmpty`,target:`navigating:tag`,actions:[`deleteHighlightedTag`,`focusInput`,`clearEditedId`,`highlightTagAtIndex`]},{target:`navigating:tag`,actions:[`submitEditedTagValue`,`focusInput`,`clearEditedId`,`highlightTagAtIndex`]}]}}},implementations:{guards:{isInputRelatedTarget:({scope:e,event:t})=>t.relatedTarget===W(e),isAtMax:({computed:e})=>e(`isAtMax`),hasHighlightedTag:({context:e})=>e.get(`highlightedTagId`)!=null,isFirstTagHighlighted:({context:e,scope:t})=>U(t,{value:e.get(`value`)[0],index:0})===e.get(`highlightedTagId`),isEditedTagEmpty:({context:e,prop:t})=>t(`sanitizeValue`)(e.get(`editedTagValue`))===``,isLastTagHighlighted:({context:e,scope:t})=>{let n=e.get(`value`),r=n.length-1;return U(t,{value:n[r],index:r})===e.get(`highlightedTagId`)},isInputValueEmpty:({context:e,prop:t})=>t(`sanitizeValue`)(e.get(`inputValue`)).length===0,hasTags:({context:e})=>e.get(`value`).length>0,allowOverflow:({prop:e})=>!!e(`allowOverflow`),autoFocus:({prop:e})=>!!e(`autoFocus`),addOnBlur:({prop:e})=>e(`blurBehavior`)===`add`,clearOnBlur:({prop:e})=>e(`blurBehavior`)===`clear`,addOnPaste:({prop:e})=>!!e(`addOnPaste`),isTagEditable:({prop:e})=>!!e(`editable`),isCaretAtStart:({scope:e})=>de(W(e))},effects:{trackInteractOutside({scope:e,prop:t,send:n}){return pe(W(e),{exclude(t){return xt(e).some(e=>ne(e,t))},onFocusOutside:t(`onFocusOutside`),onPointerDownOutside:t(`onPointerDownOutside`),onInteractOutside(e){t(`onInteractOutside`)?.(e),!e.defaultPrevented&&n({type:`BLUR`,src:`interact-outside`})}})},trackFormControlState({context:e,send:t,scope:n}){return me(wt(n),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){t({type:`SET_VALUE`,value:e.initial(`value`),src:`form-reset`})}})},autoResize({context:e,prop:t,scope:n}){let r;return queueMicrotask(()=>{let i=e.get(`editedTagValue`),a=e.get(`editedTagIndex`);!i||a==null||!t(`editable`)||(r=ut(St(n,{value:i,index:a})))}),()=>{r?.()}},trackLiveRegion({scope:e,refs:t}){let n=fe({level:`assertive`,document:e.getDoc()});return t.set(`liveRegion`,n),()=>n.destroy()}},actions:{raiseInsertTagEvent({send:e}){e({type:`INSERT_TAG`})},raiseExternalBlurEvent({send:e,event:t}){e({type:`EXTERNAL_BLUR`,id:t.id})},dispatchChangeEvent({scope:e,computed:t}){Mt(e,t(`valueAsString`))},highlightNextTag({context:e,scope:t}){let n=e.get(`highlightedTagId`);if(n==null)return;let r=Ot(t,n);e.set(`highlightedTagId`,r?.id??null)},highlightFirstTag({context:e,scope:t}){p(()=>{let n=Tt(t);e.set(`highlightedTagId`,n?.id??null)})},highlightLastTag({context:e,scope:t}){let n=Et(t);e.set(`highlightedTagId`,n?.id??null)},highlightPrevTag({context:e,scope:t}){let n=e.get(`highlightedTagId`);if(n==null)return;let r=Dt(t,n);e.set(`highlightedTagId`,r?.id??null)},highlightTag({context:e,event:t}){e.set(`highlightedTagId`,t.id)},highlightTagAtIndex({context:e,scope:t}){p(()=>{let n=e.get(`editedTagIndex`);if(n==null)return;let r=kt(t,n);r!=null&&(e.set(`highlightedTagId`,r.id),e.set(`editedTagIndex`,null))})},deleteTag({context:e,scope:t,event:n,refs:r}){let i=K(t,n.id),a=e.get(`value`)[i],o=r.get(`log`);r.set(`log`,{prev:o.current,current:{type:`delete`,value:a}}),e.set(`value`,e=>u(e,i))},deleteHighlightedTag({context:e,scope:t,refs:n}){let r=e.get(`highlightedTagId`);if(r==null)return;let i=K(t,r);e.set(`editedTagIndex`,i);let a=e.get(`value`),o=n.get(`log`);n.set(`log`,{prev:o.current,current:{type:`delete`,value:a[i]}}),e.set(`value`,e=>u(e,i))},setEditedId({context:e,event:t,scope:n}){let r=e.get(`highlightedTagId`),i=t.id??r;e.set(`editedTagId`,i);let a=K(n,i),o=e.get(`value`)[a];e.set(`editedTagIndex`,a),e.set(`editedTagValue`,o)},clearEditedId({context:e}){e.set(`editedTagId`,null)},clearEditedTagValue({context:e}){e.set(`editedTagValue`,``)},setEditedTagValue({context:e,event:t}){e.set(`editedTagValue`,t.value)},submitEditedTagValue({context:e,scope:t,refs:n,prop:r}){let i=e.get(`editedTagId`);if(!i)return;let a=K(t,i),o=e.get(`editedTagValue`),s=e.get(`value`),c=s.some((e,t)=>t!==a&&e===o);if(!r(`allowDuplicates`)&&c||s[a]===o)return;e.set(`value`,e=>{let t=e.slice();return t[a]=o,t});let l=n.get(`log`);n.set(`log`,{prev:l.current,current:{type:`update`,value:o}})},setValueAtIndex({context:e,event:t,refs:n,prop:i}){if(t.value){let r=e.get(`value`),a=r.some((e,n)=>n!==t.index&&e===t.value);if(!i(`allowDuplicates`)&&a||r[t.index]===t.value)return;e.set(`value`,e=>{let n=e.slice();return n[t.index]=t.value,n});let o=n.get(`log`);n.set(`log`,{prev:o.current,current:{type:`update`,value:t.value}})}else r(`You need to provide a value for the tag`)},focusEditedTagInput({context:e,scope:t}){p(()=>{let n=e.get(`editedTagId`);n&&bt(t,n)?.select()})},setInputValue({context:e,event:t}){e.set(`inputValue`,t.value)},clearHighlightedId({context:e}){e.set(`highlightedTagId`,null)},focusInput({scope:e}){p(()=>{W(e)?.focus()})},clearInputValue({context:e}){p(()=>{e.set(`inputValue`,``)})},syncInputValue({context:e,scope:t}){let n=W(t);n&&ge(n,e.get(`inputValue`))},syncEditedTagInputValue({context:e,event:t,scope:n}){let r=e.get(`editedTagId`)||e.get(`highlightedTagId`)||t.id;if(r==null)return;let i=bt(n,r);i&&ge(i,e.get(`editedTagValue`))},addTag({context:e,event:t,computed:r,prop:i,refs:a}){let o=t.value??r(`sanitizedInputValue`),s=e.get(`value`);if(i(`validate`)?.({inputValue:o,value:Array.from(s)})){let t=i(`allowDuplicates`)?s.concat(o):n(s.concat(o));e.set(`value`,t);let r=a.get(`log`);a.set(`log`,{prev:r.current,current:{type:`add`,value:o}})}else i(`onValueInvalid`)?.({reason:`invalidTag`})},addTagFromPaste({context:e,computed:t,prop:r,refs:i}){p(()=>{let a=t(`sanitizedInputValue`),o=e.get(`value`),s=r(`sanitizeValue`);if(r(`validate`)?.({inputValue:a,value:Array.from(o)})){let t=r(`delimiter`),c=t?a.split(t).map(s):[a],l=r(`allowDuplicates`)?o.concat(...c):n(o.concat(...c));e.set(`value`,l);let u=i.get(`log`);i.set(`log`,{prev:u.current,current:{type:`paste`,values:c}})}else r(`onValueInvalid`)?.({reason:`invalidTag`});e.set(`inputValue`,``)})},clearTags({context:e,refs:t}){e.set(`value`,[]);let n=t.get(`log`);t.set(`log`,{prev:n.current,current:{type:`clear`}})},setValue({context:e,event:t}){e.set(`value`,t.value)},invokeOnInvalid({prop:e,computed:t}){t(`isOverflowing`)&&e(`onValueInvalid`)?.({reason:`rangeOverflow`})},clearLog({refs:e}){let t=e.get(`log`);t.prev=t.current=null},logHighlightedTag({refs:e,context:t,scope:n}){let r=t.get(`highlightedTagId`),i=e.get(`log`);if(r==null||!i.current)return;let a=K(n,r),o=t.get(`value`)[a],s=e.get(`log`);e.set(`log`,{prev:s.current,current:{type:`select`,value:o}})},announceLog({refs:e,prop:t}){let n=e.get(`liveRegion`),r=t(`translations`),i=e.get(`log`);if(!i.current||n==null)return;let a=n,{current:o,prev:s}=i,c;switch(o.type){case`add`:c=r.tagAdded(o.value);break;case`delete`:c=r.tagDeleted(o.value);break;case`update`:c=r.tagUpdated(o.value);break;case`paste`:c=r.tagsPasted(o.values);break;case`select`:c=r.tagSelected(o.value),s?.type===`delete`?c=`${r.tagDeleted(s.value)}. ${c}`:s?.type===`update`&&(c=`${r.tagUpdated(s.value)}. ${c}`);break;default:break}c&&a.announce(c)}}}}),[Lt,Y]=s({name:`TagsInputContext`,hookName:`useTagsInputContext`,providerName:`<TagsInputProvider />`}),X=e(t(),1),Z=D(),Rt=(0,X.forwardRef)((e,t)=>{let n=x(Y().getClearTriggerProps(),e);return(0,Z.jsx)(T.button,{...n,ref:t})});Rt.displayName=`TagsInputClearTrigger`;var zt=e=>e.children(Y()),Bt=(0,X.forwardRef)((e,t)=>{let n=x(Y().getControlProps(),e);return(0,Z.jsx)(T.div,{...n,ref:t})});Bt.displayName=`TagsInputControl`;var Vt=(0,X.forwardRef)((e,t)=>{let n=x(Y().getHiddenInputProps(),e),r=Oe();return(0,Z.jsx)(T.input,{"aria-describedby":r?.ariaDescribedby,...n,ref:t})});Vt.displayName=`TagsInputHiddenInput`;var Ht=(0,X.forwardRef)((e,t)=>{let n=x(Y().getInputProps(),e);return(0,Z.jsx)(T.input,{...n,ref:t})});Ht.displayName=`TagsInputInput`;var[Ut,Wt]=s({name:`TagsInputItemContext`,hookName:`useTagsInputItemContext`,providerName:`<TagsInputItemProvider />`}),[Gt,Kt]=s({name:`TagsInputItemPropsContext`,hookName:`useTagsInputItemPropsContext`,providerName:`<TagsInputItemPropsProvider />`}),qt=Te(),Jt=(0,X.forwardRef)((e,t)=>{let[n,r]=qt(e,[`index`,`disabled`,`value`]),i=Y(),a=x(i.getItemProps(n),r);return(0,Z.jsx)(Gt,{value:n,children:(0,Z.jsx)(Ut,{value:i.getItemState(n),children:(0,Z.jsx)(T.div,{...a,ref:t})})})});Jt.displayName=`TagsInputItem`;var Yt=e=>e.children(Wt()),Xt=(0,X.forwardRef)((e,t)=>{let n=Y(),r=Kt(),i=x(n.getItemDeleteTriggerProps(r),e);return(0,Z.jsx)(T.button,{...i,ref:t})});Xt.displayName=`TagsInputItemDeleteTrigger`;var Zt=(0,X.forwardRef)((e,t)=>{let n=Y(),r=Kt(),i=x(n.getItemInputProps(r),e);return(0,Z.jsx)(T.input,{...i,ref:t})});Zt.displayName=`TagsInputItemInput`;var Qt=(0,X.forwardRef)((e,t)=>{let n=Y(),r=Kt(),i=x(n.getItemPreviewProps(r),e);return(0,Z.jsx)(T.div,{...i,ref:t})});Qt.displayName=`TagsInputItemPreview`;var $t=(0,X.forwardRef)((e,t)=>{let n=Y(),r=Kt(),i=x(n.getItemTextProps(r),e);return(0,Z.jsx)(T.span,{...i,ref:t})});$t.displayName=`TagsInputItemText`;var en=(0,X.forwardRef)((e,t)=>{let n=x(Y().getLabelProps(),e);return(0,Z.jsx)(T.label,{...n,ref:t})});en.displayName=`TagsInputLabel`;var tn=e=>{let t=(0,X.useId)(),{getRootNode:n}=i(),{dir:r}=d(),a=Oe();return Nt(ie(It,{id:t,ids:{label:a?.ids.label,hiddenInput:a?.ids.control},dir:r,disabled:a?.disabled,invalid:a?.invalid,readOnly:a?.readOnly,required:a?.required,getRootNode:n,...e}),g)},nn=Te(),rn=(0,X.forwardRef)((e,t)=>{let[n,r]=nn(e,`addOnPaste.allowDuplicates.allowOverflow.autoFocus.blurBehavior.defaultInputValue.defaultValue.delimiter.disabled.editable.form.id.ids.inputValue.invalid.max.maxLength.name.onFocusOutside.onHighlightChange.onInputValueChange.onInteractOutside.onPointerDownOutside.onValueChange.onValueInvalid.placeholder.readOnly.required.sanitizeValue.translations.validate.value`.split(`.`)),i=tn(n),a=x(i.getRootProps(),r);return(0,Z.jsx)(Lt,{value:i,children:(0,Z.jsx)(T.div,{...a,ref:t})})});rn.displayName=`TagsInputRoot`;var an=Te(),on=(0,X.forwardRef)((e,t)=>{let[{value:n},r]=an(e,[`value`]),i=x(n.getRootProps(),r);return(0,Z.jsx)(Lt,{value:n,children:(0,Z.jsx)(T.div,{...i,ref:t})})});on.displayName=`TagsInputRootProvider`;var Q=o({ClearTrigger:()=>Rt,Context:()=>zt,Control:()=>Bt,HiddenInput:()=>Vt,Input:()=>Ht,Item:()=>Jt,ItemContext:()=>Yt,ItemDeleteTrigger:()=>Xt,ItemInput:()=>Zt,ItemPreview:()=>Qt,ItemText:()=>$t,Label:()=>en,Root:()=>rn,RootProvider:()=>on}),{withProvider:sn,withContext:$,useStyles:cn,PropsProvider:ln}=ee({key:`tagsInput`});sn(Q.RootProvider,`root`,{forwardAsChild:!0});var un=sn(Q.Root,`root`,{forwardAsChild:!0,defaultProps:{editable:!1}}),dn=$(Q.Label,`label`,{forwardAsChild:!0}),fn=$(Q.Control,`control`,{forwardAsChild:!0}),pn=$(Q.Input,`input`,{forwardAsChild:!0}),mn=$(Q.Item,`item`,{forwardAsChild:!0}),hn=$(Q.ItemText,`itemText`,{forwardAsChild:!0}),gn=$(Q.ItemDeleteTrigger,`itemDeleteTrigger`,{forwardAsChild:!0,defaultProps:{children:(0,Z.jsx)(C,{})}}),_n=$(Q.ItemPreview,`itemPreview`,{forwardAsChild:!0}),vn=$(Q.ItemInput,`itemInput`,{forwardAsChild:!0}),yn=$(Q.ClearTrigger,`clearTrigger`,{forwardAsChild:!0,defaultProps:{children:(0,Z.jsx)(C,{})}}),bn=e=>(0,Z.jsx)(ae,{each:Y().value,children:(t,n)=>(0,Z.jsxs)(mn,{index:n,value:t,...e,children:[(0,Z.jsxs)(_n,{children:[(0,Z.jsx)(hn,{children:t}),(0,Z.jsx)(gn,{})]}),(0,Z.jsx)(vn,{})]},n)});Q.Context,Q.HiddenInput,Q.ItemContext;function xn({open:e,onClose:t}){let n=Qe(),{hasAccess:r}=H(),i=z({refetchInterval:e?1e3:!1}),a=B.ops.cancelReplay.useMutation({onSuccess:()=>void i.refetch()}),o=i.data,s=o?.state===`running`,c=it(o?.currentProjection),l=new Set(c),u=o?.state===`completed`?`green`:o?.state===`failed`?`red`:o?.state===`cancelled`?`orange`:`blue`,d=o&&o.aggregatesTotal>0?Math.round(o.aggregatesProcessed/o.aggregatesTotal*100):0,f=(0,X.useMemo)(()=>{if(!o?.startedAt||!o.eventsProcessed)return null;let e=((o.completedAt?new Date(o.completedAt).getTime():Date.now())-new Date(o.startedAt).getTime())/1e3;return e<1?null:Math.round(o.eventsProcessed/e)},[o?.startedAt,o?.completedAt,o?.eventsProcessed]);return(0,Z.jsx)(Ie,{open:e,onOpenChange:e=>{e.open||t()},placement:`end`,size:`sm`,children:(0,Z.jsxs)(Pe,{children:[(0,Z.jsxs)(ze,{children:[(0,Z.jsx)(Be,{children:(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsx)(Ke,{colorPalette:u,size:`sm`,children:(0,Z.jsx)(qe,{})}),`Replay `,o?.state??`idle`]})}),(0,Z.jsx)(Fe,{})]}),(0,Z.jsx)(Re,{children:!o||o.state===`idle`?(0,Z.jsx)(O,{textStyle:`sm`,color:`fg.muted`,children:`No replay is currently running.`}):(0,Z.jsxs)(k,{align:`stretch`,gap:4,children:[(0,Z.jsx)(ot,{currentPhase:o.currentPhase,completedState:o.state===`running`?null:o.state}),o.currentPhase&&(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsx)(O,{textStyle:`lg`,children:st[o.currentPhase]??`·`}),(0,Z.jsxs)(k,{align:`start`,gap:0,children:[(0,Z.jsx)(O,{textStyle:`sm`,fontWeight:`medium`,children:at[o.currentPhase]??o.currentPhase}),c.length>0&&(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:c.length===1?c[0]:`${c.length} projections`})]})]}),o.aggregatesTotal>0&&(0,Z.jsxs)(k,{align:`stretch`,gap:1,children:[(0,Z.jsxs)(S,{justify:`space-between`,children:[(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:`Aggregates`}),(0,Z.jsxs)(O,{textStyle:`xs`,fontWeight:`medium`,children:[o.aggregatesProcessed.toLocaleString(),` /`,` `,o.aggregatesTotal.toLocaleString(),` (`,d,`%)`]})]}),(0,Z.jsx)(Me,{value:d,size:`sm`,colorPalette:u,children:(0,Z.jsx)(ke,{children:(0,Z.jsx)(Ae,{})})})]}),(0,Z.jsx)(xe,{}),(0,Z.jsxs)(S,{gap:4,flexWrap:`wrap`,children:[(0,Z.jsxs)(I,{children:[(0,Z.jsx)(R,{children:`Events`}),(0,Z.jsx)(L,{textStyle:`lg`,children:o.eventsProcessed.toLocaleString()})]}),(0,Z.jsxs)(I,{children:[(0,Z.jsx)(R,{children:`Projections`}),(0,Z.jsx)(L,{textStyle:`lg`,children:o.projectionNames.length})]}),f!==null&&(0,Z.jsxs)(I,{children:[(0,Z.jsx)(R,{children:`Events/s`}),(0,Z.jsx)(L,{textStyle:`lg`,children:f.toLocaleString()})]}),(0,Z.jsxs)(I,{children:[(0,Z.jsx)(R,{children:`Elapsed`}),(0,Z.jsx)(L,{textStyle:`lg`,children:o.startedAt?nt(o.startedAt,o.completedAt):`—`})]})]}),(0,Z.jsxs)(k,{align:`stretch`,gap:1,children:[(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:`Projections`}),(0,Z.jsx)(S,{gap:1,flexWrap:`wrap`,children:o.projectionNames.map(e=>(0,Z.jsx)(A,{size:`sm`,variant:s&&l.has(e)?`solid`:`subtle`,colorPalette:s&&l.has(e)?`orange`:`gray`,children:e},e))})]}),o.description&&(0,Z.jsxs)(k,{align:`stretch`,gap:1,children:[(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:`Description`}),(0,Z.jsx)(O,{textStyle:`sm`,children:o.description})]}),o.error&&(0,Z.jsxs)(v,{padding:3,borderRadius:`md`,bg:`red.subtle`,borderWidth:`1px`,borderColor:`red.200`,children:[(0,Z.jsx)(O,{textStyle:`xs`,fontWeight:`medium`,color:`red.fg`,marginBottom:1,children:`Error`}),(0,Z.jsx)(O,{textStyle:`xs`,color:`red.fg`,children:o.error})]})]})}),(0,Z.jsx)(Le,{children:(0,Z.jsxs)(S,{gap:2,width:`full`,children:[o?.runId&&(0,Z.jsx)(b,{size:`sm`,variant:`outline`,flex:1,onClick:()=>{n.push(`/ops/projections/${o.runId}`),t()},children:`Full Page View`}),s&&r&&(0,Z.jsx)(b,{size:`sm`,colorPalette:`red`,variant:`outline`,loading:a.isPending,onClick:()=>a.mutate(),children:`Cancel`})]})})]})})}function Sn({tenantIds:e,onTenantIdsChange:t}){let[n,r]=(0,X.useState)(``),i=B.ops.searchTenants.useQuery({query:n},{enabled:n.length>=2});return(0,Z.jsxs)(k,{align:`stretch`,gap:2,children:[(0,Z.jsxs)(un,{size:`sm`,value:e,onValueChange:e=>t(e.value),addOnPaste:!0,delimiter:`,`,blurBehavior:`add`,validate:e=>e.inputValue.trim().length>0,children:[(0,Z.jsx)(dn,{children:(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:`Tenants`})}),(0,Z.jsxs)(fn,{children:[(0,Z.jsx)(bn,{}),(0,Z.jsx)(pn,{placeholder:`Type tenant ID and press Enter...`}),(0,Z.jsx)(yn,{})]})]}),(0,Z.jsxs)(v,{position:`relative`,children:[(0,Z.jsxs)(S,{gap:2,borderWidth:`1px`,borderRadius:`md`,paddingX:3,paddingY:1.5,children:[(0,Z.jsx)(tt,{size:12,color:`var(--chakra-colors-fg-muted)`}),(0,Z.jsx)(`input`,{style:{flex:1,background:`transparent`,border:`none`,outline:`none`,fontSize:`12px`,color:`inherit`},placeholder:`Search tenants by name or ID...`,value:n,onChange:e=>r(e.target.value)})]}),i.data&&i.data.length>0&&(0,Z.jsx)(v,{position:`absolute`,zIndex:10,width:`full`,borderWidth:`1px`,borderRadius:`md`,bg:`bg.panel`,shadow:`md`,maxHeight:`200px`,overflowY:`auto`,marginTop:1,children:i.data.map(n=>(0,Z.jsx)(v,{paddingX:3,paddingY:2,cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:()=>{e.includes(n.id)||t([...e,n.id]),r(``)},children:(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsx)(O,{textStyle:`xs`,fontWeight:`medium`,children:n.name}),(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,fontFamily:`mono`,children:n.id}),e.includes(n.id)&&(0,Z.jsx)(A,{size:`sm`,colorPalette:`green`,children:`added`})]})},n.id))})]})]})}function Cn({onReplayStarted:e}){let{hasAccess:t}=H(),[n,r]=(0,X.useState)([]),[i,a]=(0,X.useState)(!1),[o,s]=(0,X.useState)(``),[c,l]=(0,X.useState)(new Set),[u,d]=(0,X.useState)(``),f=B.ops.listProjections.useQuery(),p=z(),m=i||n.length>0,ee=o.length>0,g=m&&ee,_=B.ops.discoverAggregates.useQuery({projectionNames:f.data?.projections.map(e=>e.projectionName)??[],since:o,tenantIds:i?[]:n},{enabled:!1}),y=(0,X.useRef)(``);(0,X.useEffect)(()=>{if(!g)return;let e=JSON.stringify({tenantIds:i?[]:n,since:o});e!==y.current&&(y.current=e,_.refetch().then(e=>{e.data&&l(new Set(e.data.projections.filter(e=>e.aggregateCount>0).map(e=>e.projectionName)))}))},[g,i,n,o]);let x=(0,X.useMemo)(()=>new Map((f.data?.projections??[]).map(e=>[e.projectionName,e])),[f.data?.projections]),te=!!_.data,ne=new Set(_.data?.projections.filter(e=>e.aggregateCount>0).map(e=>e.projectionName)??[]),C=B.ops.startReplay.useMutation({onSuccess:()=>{p.refetch(),ue.create({title:`Projection replay started`,description:`Replaying ${c.size} projection${c.size===1?``:`s`}...`,type:`success`}),e()},onError:e=>Ge({error:e,fallbackTitle:`Couldn't start the replay`})}),[w,re]=(0,X.useState)(null),T=B.ops.dryRunReplay.useMutation({onSuccess:e=>{re(e),ue.create({title:`Dry run complete`,description:e.message,type:`info`})},onError:e=>Ge({error:e,fallbackTitle:`Couldn't complete the dry run`})});function E(e){ne.has(e)&&l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function ie(){l(new Set(ne))}let D=_.data?.projections.filter(e=>c.has(e.projectionName)).reduce((e,t)=>e+t.aggregateCount,0)??0,ae=p.data?.state===`running`;function oe(){C.mutate({projectionNames:[...c],since:o,tenantIds:i?[]:n,description:u||`Manual replay`})}function se(){T.mutate({projectionNames:[...c],since:o,tenantIds:i?[]:n})}return f.isLoading?(0,Z.jsx)(et,{paddingY:20,children:(0,Z.jsx)(h,{size:`lg`})}):f.data&&f.data.projections.length===0?(0,Z.jsx)(et,{paddingY:20,children:(0,Z.jsx)(He,{children:(0,Z.jsxs)(We,{children:[(0,Z.jsx)(Ve,{children:`No projections registered`}),(0,Z.jsx)(Ue,{children:`No projections were found in the pipeline registry.`})]})})}):f.data?(0,Z.jsxs)(k,{align:`stretch`,gap:4,children:[(0,Z.jsx)(P,{children:(0,Z.jsxs)(F,{padding:4,children:[(0,Z.jsxs)(S,{marginBottom:3,justify:`space-between`,children:[(0,Z.jsx)(O,{textStyle:`sm`,fontWeight:`medium`,children:`1. Select tenants`}),(0,Z.jsx)(ve,{size:`sm`,checked:i,onCheckedChange:e=>{a(!!e.checked),e.checked&&r([])},children:(0,Z.jsx)(O,{textStyle:`xs`,children:`All tenants`})})]}),(0,Z.jsx)(v,{opacity:i?.4:1,pointerEvents:i?`none`:`auto`,children:(0,Z.jsx)(Sn,{tenantIds:n,onTenantIdsChange:r})}),!m&&!i&&(0,Z.jsx)(O,{textStyle:`xs`,color:`orange.500`,marginTop:2,children:`At least 1 tenant is required to proceed`})]})}),(0,Z.jsx)(P,{opacity:m?1:.5,pointerEvents:m?`auto`:`none`,children:(0,Z.jsxs)(F,{padding:4,children:[(0,Z.jsx)(O,{textStyle:`sm`,fontWeight:`medium`,marginBottom:3,children:`2. Choose date range`}),(0,Z.jsxs)(S,{gap:3,alignItems:`end`,flexWrap:`wrap`,children:[(0,Z.jsxs)(v,{maxWidth:`220px`,children:[(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Replay events since`}),(0,Z.jsx)($e,{type:`date`,size:`sm`,value:o,onChange:e=>s(e.target.value)})]}),(0,Z.jsx)(S,{gap:1,children:[{label:`This month`,months:0},{label:`2 months`,months:2},{label:`3 months`,months:3},{label:`6 months`,months:6}].map(({label:e,months:t})=>{let n=new Date;t===0?n.setDate(1):n.setMonth(n.getMonth()-t);let r=n.toISOString().slice(0,10);return(0,Z.jsx)(b,{size:`sm`,height:`36px`,variant:o===r?`solid`:`outline`,onClick:()=>s(r),children:e},e)})})]}),g&&_.isFetching&&(0,Z.jsxs)(S,{gap:2,marginTop:3,children:[(0,Z.jsx)(h,{size:`xs`}),(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:`Discovering aggregates...`})]})]})}),te&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(P,{children:(0,Z.jsxs)(F,{padding:0,overflowX:`auto`,children:[(0,Z.jsxs)(S,{paddingX:4,paddingY:3,justify:`space-between`,children:[(0,Z.jsx)(O,{textStyle:`sm`,fontWeight:`medium`,children:`3. Select projections to replay`}),(0,Z.jsx)(b,{variant:`ghost`,size:`xs`,onClick:ie,children:`Select all with data`})]}),(0,Z.jsxs)(_e,{size:`sm`,variant:`line`,children:[(0,Z.jsx)(ye,{children:(0,Z.jsxs)(N,{children:[(0,Z.jsx)(M,{width:`40px`}),(0,Z.jsx)(M,{children:`Projection`}),(0,Z.jsx)(M,{children:`Pipeline`}),(0,Z.jsx)(M,{textAlign:`end`,children:`Aggregates`}),(0,Z.jsx)(M,{children:`Tenants`})]})}),(0,Z.jsx)(be,{children:_.data.projections.map(e=>{let t=e.aggregateCount>0,n=x.get(e.projectionName),r=c.has(e.projectionName);return(0,Z.jsxs)(N,{cursor:t?`pointer`:`default`,opacity:t?1:.4,onClick:()=>E(e.projectionName),_hover:t?{bg:`bg.subtle`}:void 0,bg:r?`bg.subtle`:void 0,children:[(0,Z.jsx)(j,{children:(0,Z.jsx)(ve,{checked:r,disabled:!t,onCheckedChange:()=>E(e.projectionName)})}),(0,Z.jsx)(j,{children:(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsx)(O,{textStyle:`sm`,children:e.projectionName}),n&&(0,Z.jsx)(A,{size:`sm`,variant:`subtle`,colorPalette:n.kind===`map`?`purple`:`blue`,children:n.kind===`map`?`map`:`fold`}),!t&&(0,Z.jsx)(A,{size:`sm`,variant:`subtle`,colorPalette:`gray`,children:`no data`})]})}),(0,Z.jsx)(j,{children:(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:n?.pipelineName??`—`})}),(0,Z.jsx)(j,{textAlign:`end`,children:(0,Z.jsx)(O,{fontWeight:`medium`,children:e.aggregateCount})}),(0,Z.jsx)(j,{children:(0,Z.jsxs)(O,{textStyle:`xs`,color:`fg.muted`,children:[e.tenantBreakdown.length,` tenant`,e.tenantBreakdown.length===1?``:`s`]})})]},e.projectionName)})})]})]})}),c.size>0&&(0,Z.jsx)(P,{children:(0,Z.jsxs)(F,{padding:4,children:[(0,Z.jsxs)(S,{gap:6,marginBottom:4,children:[(0,Z.jsxs)(I,{children:[(0,Z.jsx)(R,{children:`Selected Aggregates`}),(0,Z.jsx)(L,{children:D})]}),(0,Z.jsxs)(I,{children:[(0,Z.jsx)(R,{children:`Projections`}),(0,Z.jsx)(L,{children:c.size})]}),(0,Z.jsxs)(I,{children:[(0,Z.jsx)(R,{children:`Tenants`}),(0,Z.jsx)(L,{children:i?`All`:n.length})]})]}),t&&(0,Z.jsxs)(k,{align:`stretch`,gap:3,children:[(0,Z.jsxs)(v,{children:[(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Description (for audit log)`}),(0,Z.jsx)(Xe,{size:`sm`,placeholder:`Describe the reason for this replay...`,value:u,onChange:e=>d(e.target.value),rows:2})]}),(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsx)(b,{size:`sm`,colorPalette:`orange`,disabled:ae||D===0,loading:C.isPending,onClick:oe,children:`Start Full Replay`}),(0,Z.jsx)(b,{size:`sm`,variant:`outline`,disabled:ae||D===0,loading:T.isPending,onClick:se,children:`Dry Run (5 aggregates)`}),ae&&(0,Z.jsx)(O,{textStyle:`xs`,color:`orange.500`,children:`A replay is already running`})]}),(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:`Full replay pauses projections, drains active jobs, replays events from ClickHouse, then unpauses. Dry run processes 5 sample aggregates in memory without writing.`}),w&&(0,Z.jsx)(P,{borderColor:`blue.200`,borderWidth:`1px`,children:(0,Z.jsxs)(F,{padding:3,children:[(0,Z.jsx)(O,{textStyle:`xs`,fontWeight:`medium`,color:`blue.500`,marginBottom:1,children:`Dry Run Result`}),(0,Z.jsx)(O,{textStyle:`sm`,children:w.message}),(0,Z.jsxs)(O,{textStyle:`xs`,color:`fg.muted`,marginTop:1,children:[`Projections:`,` `,w.projectionNames.join(`, `),` | Sample size: `,w.sampleSize]})]})})]})]})})]})]}):null}function wn(){let e=Qe(),t=B.ops.getReplayHistory.useQuery(void 0,{refetchInterval:1e4}).data;return!t||t.length===0?null:(0,Z.jsx)(P,{overflow:`hidden`,children:(0,Z.jsxs)(F,{padding:0,children:[(0,Z.jsx)(S,{paddingX:4,paddingY:3,children:(0,Z.jsx)(O,{textStyle:`sm`,fontWeight:`medium`,children:`Replay History`})}),(0,Z.jsx)(Se,{children:(0,Z.jsxs)(_e,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,Z.jsx)(ye,{children:(0,Z.jsxs)(N,{children:[(0,Z.jsx)(M,{children:`Status`}),(0,Z.jsx)(M,{children:`Description`}),(0,Z.jsx)(M,{children:`Projections`}),(0,Z.jsx)(M,{textAlign:`end`,children:`Duration`}),(0,Z.jsx)(M,{textAlign:`end`,children:`Aggregates`}),(0,Z.jsx)(M,{textAlign:`end`,children:`Events`}),(0,Z.jsx)(M,{children:`When`}),(0,Z.jsx)(M,{width:`40px`})]})}),(0,Z.jsx)(be,{children:t.map(t=>{let n=Je(t.state);return(0,Z.jsxs)(N,{cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:()=>void e.push(`/ops/projections/${t.runId}`),children:[(0,Z.jsx)(j,{children:(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsx)(Ke,{colorPalette:n,children:(0,Z.jsx)(qe,{})}),(0,Z.jsx)(A,{size:`sm`,variant:`subtle`,colorPalette:n,children:t.state})]})}),(0,Z.jsx)(j,{children:(0,Z.jsx)(O,{textStyle:`xs`,truncate:!0,maxW:`300px`,children:t.description??`—`})}),(0,Z.jsx)(j,{children:(0,Z.jsxs)(O,{textStyle:`xs`,color:`fg.muted`,children:[t.projectionNames?.length??0,` projection`,(t.projectionNames?.length??0)===1?``:`s`]})}),(0,Z.jsx)(j,{textAlign:`end`,children:(0,Z.jsx)(O,{textStyle:`xs`,children:nt(t.startedAt,t.completedAt)})}),(0,Z.jsx)(j,{textAlign:`end`,children:(0,Z.jsx)(O,{textStyle:`xs`,children:(t.aggregatesProcessed??0).toLocaleString()})}),(0,Z.jsx)(j,{textAlign:`end`,children:(0,Z.jsx)(O,{textStyle:`xs`,children:(t.eventsProcessed??0).toLocaleString()})}),(0,Z.jsx)(j,{children:(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,whiteSpace:`nowrap`,children:t.startedAt?new Date(t.startedAt).toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):`—`})}),(0,Z.jsx)(j,{children:(0,Z.jsx)(Ze,{size:12,style:{opacity:.5}})})]},t.runId)})})]})})]})})}function Tn(){let e=Qe(),t=z(),n=B.ops.cancelReplay.useMutation({onSuccess:()=>void t.refetch()}),{hasAccess:r}=H(),i=t.data;if(i?.state!==`running`)return null;let a=it(i.currentProjection);return(0,Z.jsx)(P,{borderColor:`blue.200`,borderWidth:`1px`,children:(0,Z.jsx)(F,{padding:4,children:(0,Z.jsxs)(S,{justify:`space-between`,children:[(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsx)(Ke,{colorPalette:`blue`,children:(0,Z.jsx)(qe,{})}),(0,Z.jsx)(O,{textStyle:`sm`,fontWeight:`semibold`,children:`Replay running`}),a.length>0&&(0,Z.jsx)(A,{size:`sm`,variant:`subtle`,children:a.length===1?a[0]:`${a.length} projections`})]}),(0,Z.jsxs)(S,{gap:2,children:[i.runId&&(0,Z.jsx)(b,{size:`xs`,variant:`outline`,onClick:()=>void e.push(`/ops/projections/${i.runId}`),children:`View Progress`}),r&&(0,Z.jsx)(b,{size:`xs`,colorPalette:`red`,variant:`outline`,loading:n.isPending,onClick:()=>n.mutate(),children:`Cancel`})]})]})})})}function En({projections:e,onReplayStarted:t}){let n=z(),r=n.data?.state===`running`,[i,a]=(0,X.useState)(``),[o,s]=(0,X.useState)(``),[c,l]=(0,X.useState)(new Set),[u]=(0,X.useState)(()=>{let e=new Date;return e.setMonth(e.getMonth()-3),e.toISOString().slice(0,10)}),d=B.ops.startReplay.useMutation({onSuccess:()=>{n.refetch(),ue.create({title:`Single aggregate replay started`,type:`success`}),t()},onError:e=>Ge({error:e,fallbackTitle:`Couldn't start the replay`})});function f(e){l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}return(0,Z.jsxs)(k,{align:`stretch`,gap:2,children:[(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsxs)(v,{flex:1,children:[(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Aggregate ID`}),(0,Z.jsx)($e,{size:`sm`,placeholder:`e.g. trace_abc123`,value:i,onChange:e=>a(e.target.value),fontFamily:`mono`})]}),(0,Z.jsxs)(v,{flex:1,children:[(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Tenant ID`}),(0,Z.jsx)($e,{size:`sm`,placeholder:`e.g. project_xyz`,value:o,onChange:e=>s(e.target.value),fontFamily:`mono`})]})]}),(0,Z.jsxs)(v,{children:[(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Projections`}),(0,Z.jsx)(S,{gap:1,flexWrap:`wrap`,children:e.map(e=>(0,Z.jsx)(A,{size:`sm`,variant:c.has(e.projectionName)?`solid`:`outline`,colorPalette:c.has(e.projectionName)?`orange`:`gray`,cursor:`pointer`,onClick:()=>f(e.projectionName),children:e.projectionName},e.projectionName))})]}),(0,Z.jsxs)(S,{gap:2,children:[(0,Z.jsx)(b,{size:`sm`,variant:`outline`,disabled:!i.trim()||!o.trim()||c.size===0||r,loading:d.isPending,onClick:()=>{d.mutate({projectionNames:[...c],since:u,tenantIds:[o.trim()],aggregateIds:[i.trim()],description:`Single aggregate replay: ${i.trim()}`})},children:`Replay Single`}),(0,Z.jsx)(O,{textStyle:`xs`,color:`fg.muted`,children:`Replays selected projections for a single tenant (events from last 3 months)`})]})]})}function Dn(){let{hasAccess:e}=H(),[t,n]=(0,X.useState)(!1),[r,i]=(0,X.useState)(!1),a=B.ops.listProjections.useQuery().data?.projections??[];return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(k,{align:`stretch`,gap:4,children:[(0,Z.jsx)(Tn,{}),(0,Z.jsx)(Cn,{onReplayStarted:()=>n(!0)}),e&&a.length>0&&(0,Z.jsxs)(ce,{open:r,onOpenChange:e=>i(e.open),children:[(0,Z.jsx)(oe,{asChild:!0,children:(0,Z.jsx)(v,{cursor:`pointer`,userSelect:`none`,children:(0,Z.jsxs)(S,{gap:2,paddingY:1,children:[(0,Z.jsx)(O,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,children:`Advanced: Single Aggregate Replay`}),(0,Z.jsx)(Ye,{size:12,style:{transform:r?`rotate(180deg)`:`none`,transition:`transform 0.15s`}})]})})}),(0,Z.jsx)(se,{children:(0,Z.jsx)(P,{marginTop:2,children:(0,Z.jsx)(F,{padding:4,children:(0,Z.jsx)(En,{projections:a,onReplayStarted:()=>n(!0)})})})})]}),(0,Z.jsx)(wn,{})]}),(0,Z.jsx)(xn,{open:t,onClose:()=>n(!1)})]})}function On(){return(0,Z.jsx)(rt,{children:(0,Z.jsxs)(Ne,{children:[(0,Z.jsx)(je.Header,{children:(0,Z.jsx)(je.Heading,{children:`Projection Replay`})}),(0,Z.jsx)(je.Container,{children:(0,Z.jsx)(Dn,{})})]})})}export{On as default};
|
|
2
|
-
//# sourceMappingURL=projections-DocSauqq.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
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"./heading-C0sACr0w.js";import{n as s,t as c}from"./v-stack-hkuSkmCA.js";import{An as l}from"./ProjectAvatar-DtI9dT1f.js";import{t as u}from"./badge-Cpc3eA-C.js";import{n as d}from"./toaster-BsYkODqs.js";import{$ as f,L as p,Q as m,X as h,Y as g,Z as _,et as v,nt as y}from"./Markdown-C9extmbX.js";import{a as b,n as x,r as S}from"./field-BadoNaN5.js";import{n as C}from"./personalProject-DMRX2-SI.js";import{t as w}from"./errors-e711UMq7.js";import{t as T}from"./spacer-C38e7o6r.js";import{r as E}from"./next-router-CWLrMXvP.js";import{Mr as D,nr as O}from"./index-CPtTUYLD.js";import{n as k}from"./index.module-CJLn6vye.js";import{t as A}from"./switch-DGatWO8v.js";import{a as j,n as M,r as N,t as P}from"./_shell-BGaZUKLi.js";import{n as F,r as I}from"./useAdminResource-CU4T3p5x.js";var L=e(t()),R=a(),z=25;function B(){let e=E(),t=(0,L.useRef)(typeof e.query.q==`string`?e.query.q:``),[r,i]=(0,L.useState)(1),[a,o]=(0,L.useState)(t.current),[c]=k(a,300),[d,y]=(0,L.useState)(null),b=F(`project`,{pagination:{page:r,perPage:z},sort:{field:`createdAt`,order:`DESC`},filter:c?{query:c}:{}});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(M,{title:`Projects`,searchValue:a,onSearchChange:e=>{o(e),i(1)},searchPlaceholder:`Search by ID, name, or slug`,isLoading:b.isLoading,isFetching:b.isFetching,error:b.error,pagination:{page:r,perPage:z,total:b.data?.total??0,onPageChange:i},children:(0,R.jsxs)(f,{variant:`line`,size:`md`,width:`full`,children:[(0,R.jsx)(m,{children:(0,R.jsxs)(v,{children:[(0,R.jsx)(_,{children:`ID`}),(0,R.jsx)(_,{children:`Name`}),(0,R.jsx)(_,{children:`Slug`}),(0,R.jsx)(_,{children:`Language`}),(0,R.jsx)(_,{children:`Framework`}),(0,R.jsx)(_,{children:`Status`}),(0,R.jsx)(_,{children:`Created`}),(0,R.jsx)(_,{width:`60px`,textAlign:`right`})]})}),(0,R.jsxs)(g,{children:[b.data?.data.length===0&&(0,R.jsx)(v,{children:(0,R.jsx)(h,{colSpan:8,children:(0,R.jsx)(s,{color:`fg.muted`,textAlign:`center`,paddingY:6,children:`No projects match your search.`})})}),b.data?.data.map(e=>(0,R.jsxs)(v,{children:[(0,R.jsx)(h,{fontSize:`xs`,color:`fg.muted`,children:e.id}),(0,R.jsx)(h,{children:e.name}),(0,R.jsx)(h,{children:e.slug}),(0,R.jsx)(h,{children:e.language??(0,R.jsx)(N,{})}),(0,R.jsx)(h,{children:e.framework??(0,R.jsx)(N,{})}),(0,R.jsx)(h,{children:e.archivedAt?(0,R.jsx)(u,{size:`sm`,colorPalette:`gray`,children:`Archived`}):e.integrated?(0,R.jsx)(u,{size:`sm`,colorPalette:`green`,children:`Integrated`}):(0,R.jsx)(u,{size:`sm`,colorPalette:`yellow`,children:`Pending`})}),(0,R.jsx)(h,{children:j(e.createdAt)}),(0,R.jsx)(h,{textAlign:`right`,children:(0,R.jsx)(n,{width:`full`,height:`full`,display:`flex`,justifyContent:`end`,children:(0,R.jsxs)(p.Root,{children:[(0,R.jsx)(p.Trigger,{children:(0,R.jsx)(l,{size:16})}),(0,R.jsx)(p.Content,{children:(0,R.jsxs)(p.Item,{value:`edit`,onClick:()=>y(e),children:[(0,R.jsx)(O,{size:16}),`Edit`]})})]})})})]},e.id))]})]})}),(0,R.jsx)(H,{project:d,onClose:()=>y(null)})]})}function V(e){return e.trim()===``?null:e}function H({project:e,onClose:t}){let n=I(`project`),[a,o]=(0,L.useState)(null);(0,L.useEffect)(()=>{e&&o({name:e.name,slug:e.slug,language:e.language??``,framework:e.framework??``,firstMessage:!!e.firstMessage,integrated:!!e.integrated,userLinkTemplate:e.userLinkTemplate??``,traceSharingEnabled:!!e.traceSharingEnabled,s3Endpoint:``,s3AccessKeyId:``,s3SecretAccessKey:``,s3Bucket:``,archive:!!e.archivedAt})},[e]);let l=(e,t)=>o(n=>n&&{...n,[e]:t});return(0,R.jsx)(C.Root,{open:!!e,onOpenChange:({open:e})=>{e||t()},size:`md`,children:(0,R.jsxs)(C.Content,{children:[(0,R.jsx)(C.Header,{children:(0,R.jsx)(C.Title,{children:`Edit Project`})}),(0,R.jsx)(C.CloseTrigger,{}),(0,R.jsx)(C.Body,{children:e&&a&&(0,R.jsxs)(c,{gap:4,align:`stretch`,children:[(0,R.jsx)(U,{children:`Identity`}),(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`Name`}),(0,R.jsx)(D,{value:a.name,onChange:e=>l(`name`,e.target.value)})]}),(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`Slug`}),(0,R.jsx)(D,{value:a.slug,onChange:e=>l(`slug`,e.target.value)}),(0,R.jsx)(x,{children:`URL-safe identifier. Changing this can break existing links.`})]}),(0,R.jsxs)(i,{gap:3,children:[(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`Language`}),(0,R.jsx)(D,{value:a.language,onChange:e=>l(`language`,e.target.value)})]}),(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`Framework`}),(0,R.jsx)(D,{value:a.framework,onChange:e=>l(`framework`,e.target.value)})]})]}),(0,R.jsx)(U,{children:`Onboarding flags`}),(0,R.jsx)(W,{label:`First message received`,hint:`Flipped by the collector on the first ingested trace.`,checked:a.firstMessage,onChange:e=>l(`firstMessage`,e)}),(0,R.jsx)(W,{label:`Integrated`,hint:`Tenant-visible ‘setup complete’ state.`,checked:a.integrated,onChange:e=>l(`integrated`,e)}),(0,R.jsx)(U,{children:`Privacy`}),(0,R.jsx)(W,{label:`Trace sharing enabled`,hint:`Allow operators to generate public share links for traces.`,checked:a.traceSharingEnabled,onChange:e=>l(`traceSharingEnabled`,e)}),(0,R.jsx)(U,{children:`Integrations`}),(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`User link template`}),(0,R.jsx)(D,{value:a.userLinkTemplate,onChange:e=>l(`userLinkTemplate`,e.target.value),placeholder:`e.g. https://app.acme.com/users/{{userId}}`})]}),(0,R.jsx)(U,{children:`Project S3`}),(0,R.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`Credentials below are write-only — the server never reads them back. Leave blank to keep the stored value; type to replace.`}),(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`Endpoint`}),(0,R.jsx)(D,{type:`url`,value:a.s3Endpoint,onChange:e=>l(`s3Endpoint`,e.target.value),placeholder:`Leave blank to keep current`})]}),(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`Bucket`}),(0,R.jsx)(D,{value:a.s3Bucket,onChange:e=>l(`s3Bucket`,e.target.value),placeholder:`Leave blank to keep current`})]}),(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`Access key ID`}),(0,R.jsx)(D,{type:`password`,value:a.s3AccessKeyId,onChange:e=>l(`s3AccessKeyId`,e.target.value),placeholder:`Leave blank to keep current`,autoComplete:`new-password`})]}),(0,R.jsxs)(b,{children:[(0,R.jsx)(S,{children:`Secret access key`}),(0,R.jsx)(D,{type:`password`,value:a.s3SecretAccessKey,onChange:e=>l(`s3SecretAccessKey`,e.target.value),placeholder:`Leave blank to keep current`,autoComplete:`new-password`})]}),(0,R.jsx)(U,{children:`Lifecycle`}),(0,R.jsx)(W,{label:`Archived`,hint:`Hides the project from the UI and stops it from accruing limits.`,checked:a.archive,onChange:e=>l(`archive`,e)}),(0,R.jsx)(y,{my:2}),(0,R.jsxs)(c,{align:`start`,gap:0,children:[(0,R.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,children:[`Project ID: `,e.id]}),(0,R.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,children:[`Team: `,e.teamId]}),(0,R.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,children:[`API key: `,e.apiKey]}),e.archivedAt&&(0,R.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,children:[`Archived at: `,j(e.archivedAt)]})]})]})}),(0,R.jsx)(C.Footer,{children:(0,R.jsxs)(i,{width:`full`,children:[(0,R.jsx)(T,{}),(0,R.jsx)(r,{variant:`ghost`,onClick:t,children:`Cancel`}),(0,R.jsx)(r,{loading:n.isPending,onClick:()=>{if(!e||!a)return;let r={};a.name!==e.name&&(r.name=a.name),a.slug!==e.slug&&(r.slug=a.slug),a.language!==(e.language??``)&&(r.language=a.language),a.framework!==(e.framework??``)&&(r.framework=a.framework),a.firstMessage!==!!e.firstMessage&&(r.firstMessage=a.firstMessage),a.integrated!==!!e.integrated&&(r.integrated=a.integrated),a.userLinkTemplate!==(e.userLinkTemplate??``)&&(r.userLinkTemplate=V(a.userLinkTemplate)),a.traceSharingEnabled!==!!e.traceSharingEnabled&&(r.traceSharingEnabled=a.traceSharingEnabled),a.s3Endpoint.trim()!==``&&(r.s3Endpoint=a.s3Endpoint),a.s3AccessKeyId.trim()!==``&&(r.s3AccessKeyId=a.s3AccessKeyId),a.s3SecretAccessKey.trim()!==``&&(r.s3SecretAccessKey=a.s3SecretAccessKey),a.s3Bucket.trim()!==``&&(r.s3Bucket=a.s3Bucket);let i=!!e.archivedAt;if(a.archive!==i&&(r.archivedAt=a.archive?new Date().toISOString():null),Object.keys(r).length===0){t();return}n.mutate({id:e.id,data:r},{onSuccess:()=>{d.create({title:`Project updated`,type:`success`,duration:3e3,meta:{closable:!0}}),t()},onError:e=>w({error:e,fallbackTitle:`Couldn't update the project`})})},children:`Save`})]})})]})})}function U({children:e}){return(0,R.jsx)(o,{as:`h3`,size:`xs`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,pt:2,children:e})}function W({label:e,hint:t,checked:n,onChange:r}){return(0,R.jsx)(b,{children:(0,R.jsxs)(i,{width:`full`,children:[(0,R.jsxs)(c,{align:`start`,gap:0,children:[(0,R.jsx)(S,{children:e}),t&&(0,R.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:t})]}),(0,R.jsx)(T,{}),(0,R.jsx)(A,{checked:n,onCheckedChange:e=>r(e.checked)})]})})}function G(){return(0,R.jsx)(P,{children:(0,R.jsx)(B,{})})}export{G as default};
|
|
2
|
-
//# sourceMappingURL=projects-ClyGKBO9.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./_baseEach-BGeacxUS.js";import{O as n}from"./_Uint8Array-DZ50H-2q.js";import{t as r}from"./_baseAssignValue-BqKt0w0a.js";function i(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function a(e,n,r,i){return t(e,function(e,t,a){n(i,e,r(e),a)}),i}function o(t,r){return function(o,s){var c=n(o)?i:a,l=r?r():{};return c(o,t,e(s,2),l)}}var s=Object.prototype.hasOwnProperty,c=o(function(e,t,n){s.call(e,n)?e[n].push(t):r(e,n,[t])}),l=`New Prompt`;function u(e){return e?e.split(`/`).at(-1)||e:l}function d(e){return e?.includes(`/`)&&e.split(`/`)[0]||void 0}export{c as i,u as n,d as r,l as t};
|
|
2
|
-
//# sourceMappingURL=promptHandle-Cen_6YRW.js.map
|
|
@@ -1,8 +0,0 @@
|
|
|
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{r as s,t as c}from"./skeleton-0JSrjbwm.js";import{n as l,t as u}from"./v-stack-hkuSkmCA.js";import{C as d,E as f,S as p,h as m,m as h,tr as g,y as _}from"./ProjectAvatar-DtI9dT1f.js";import{t as v}from"./tooltip-gjZ4s2dt.js";import{n as y}from"./toaster-BsYkODqs.js";import{B as b,G as x,L as S,R as C,U as w}from"./Markdown-C9extmbX.js";import{t as T}from"./icon-D6xQEiPb.js";import{L as E,_ as D,b as O,f as k,h as A,l as j,m as M,s as N,t as P,v as F,x as I,y as ee}from"./DashboardLayout-BhHe0vIT.js";import{a as te,i as L,n as R,r as z,t as B}from"./empty-state-T8EYr5NF.js";import{t as V}from"./errors-e711UMq7.js";import{t as ne}from"./spacer-C38e7o6r.js";import{i as re,o as ie,r as ae,t as oe}from"./tabs-U8n5D55_.js";import{L as se,s as ce}from"./immer-CFru3D02.js";import{n as H,o as le}from"./api-l6Cnm0vQ.js";import{f as ue}from"./trpcError-CFsR-0nB.js";import{D as de,E as U,S as fe,d as pe,f as W,g as me,h as he,n as ge,p as _e,r as ve}from"./variables-DF2_abiB.js";import{i as ye}from"./PropertySectionTitle-Da2IdhM3.js";import{r as be}from"./next-router-CWLrMXvP.js";import{H as xe,Jt as Se,L as Ce,On as we,S as G,Wt as Te,_n as Ee,cn as De,et as Oe,p as ke,q as Ae,z as je}from"./lu-DlSq9Be4.js";import{Pr as K,St as q,Vt as J,pr as Me}from"./index-CPtTUYLD.js";import{t as Ne}from"./arrow-up-D_DfWcfb.js";import{t as Pe}from"./copy-DPUyWClX.js";import{t as Fe}from"./refresh-cw-C7FbMWoi.js";import{i as Ie,n as Y,r as Le}from"./promptHandle-Cen_6YRW.js";import{t as Re}from"./WithPermissionGuard-Cr6Aljmy.js";import{t as ze}from"./useLicenseEnforcement-DOI0dcqD.js";import{t as Be}from"./useModelProvidersSettings-CzJv8_Jy.js";import{n as Ve,t as He}from"./useProjectsForCopy-B8F_BY79.js";import{t as Ue}from"./PushToCopiesDialog-B_hvn6aW.js";import{t as We}from"./DeleteConfirmationDialog-w7WZ7lHP.js";import{i as Ge}from"./types-CCALFpCT.js";import{i as Ke,t as qe}from"./VersionBadge-BPxGh4w7.js";import{t as Je}from"./useAllPromptsForProject-DCZJ0_-p.js";import{t as Ye}from"./LangyContextTarget-CIlp_Zew.js";import{n as Xe}from"./SetupWithAgentButton-Bhxb1yOj.js";import{t as Ze}from"./persistence-DZOtzFnQ.js";import{t as Qe}from"./humanReadableId-ClEZjP0Y.js";var X=e(t()),$e=`Welcome to the LangWatch Prompt Playground
|
|
2
|
-
|
|
3
|
-
Edit this template to get started
|
|
4
|
-
|
|
5
|
-
Add variables via double brackets like this: {{input}}
|
|
6
|
-
|
|
7
|
-
`;function et(){let{project:e}=J(),{modelMetadata:t}=Be({projectId:e?.id}),{addTab:n}=m(({addTab:e})=>({addTab:e})),r=H.modelProvider.getResolvedDefault.useQuery({projectId:e?.id??``,featureKey:`prompt.create_default`},{enabled:!!e?.id});return{createDraftPrompt:(0,X.useCallback)(async()=>{let e=r.data?.model??``,i=f({version:{configData:{llm:{model:e,maxTokens:ye(e?t?.[e]:void 0)},messages:[{content:$e}]}}});return n({data:{chat:{initialMessagesFromSpanData:[]},form:{currentValues:i},meta:{title:i.handle},variableValues:{}}}),setTimeout(()=>{document.querySelector(`textarea[data-role="system"]`)?.focus()},100),{defaultValues:i}},[n,t,r.data?.model])}}var Z=o();function tt({iconOnly:e}){let{createDraftPrompt:t}=et(),{checkAndProceed:n}=ze(`prompts`),{hasPermission:r}=J(),i=le(e=>e.openLiteMemberRestriction);return(0,Z.jsx)(v,{content:`New Prompt`,disabled:!e,children:(0,Z.jsxs)(E.HeaderButton,{onClick:()=>{if(!r(`prompts:create`)){i({resource:`prompts`});return}n(()=>{t()})},children:[(0,Z.jsx)(Se,{size:14}),!e&&`New Prompt`]})})}var nt=e=>{let t=e.form.currentValues.version?.configData;if(!t)return;let n=t.llm,r=t.messages??[],i=t.inputs??[],a=t.outputs??[],o=n?.litellmParams?Object.fromEntries(Object.entries(n.litellmParams).filter(e=>e[1]!==void 0)):void 0;return{llm:{model:n?.model??`openai/gpt-4o`,temperature:n?.temperature??void 0,maxTokens:n?.maxTokens??void 0,litellmParams:o},messages:r.filter(e=>e!==void 0).map(e=>({role:e.role,content:e.content??``})),inputs:i.filter(e=>e!==void 0).map(e=>({identifier:e.identifier??`input`,type:e.type??`str`})),outputs:a.filter(e=>e!==void 0).map(e=>({identifier:e.identifier??`output`,type:e.type??`str`,json_schema:e.json_schema??void 0}))}},rt=(e,t)=>{let n=e.form.currentValues.configId,r=e.form.currentValues;return!n||!r.handle||!t?!0:r?!_e(_({prompt:t,useSystemMessage:!0}),r):!1},it=(e,t,n,r)=>{let i=e.form.currentValues.configId,a=e.form.currentValues.versionMetadata?.versionId,o=e.form.currentValues.version?.configData,s=(o?.inputs??[]).filter(e=>e!==void 0).map(e=>({identifier:e.identifier??`input`,type:e.type??`str`})),c=(o?.outputs??[]).filter(e=>e!==void 0).map(e=>({identifier:e.identifier??`output`,type:e.type??`str`})),l=rt(e,r),u={id:`target_${Date.now()}_${t}`,type:`prompt`,promptId:i??void 0,promptVersionId:a??void 0,promptVersionNumber:i?e.meta.versionNumber:void 0,localPromptConfig:l?nt(e):void 0,inputs:s,outputs:c,mappings:{}},d=Ke(u,n);return{...u,mappings:d}};function at({iconOnly:e}){let{project:t,hasPermission:r}=J(),a=be(),[o,s]=(0,X.useState)(!1),[c,u]=(0,X.useState)(!1),d=H.useContext(),{isComparing:f,allTabs:p,activeTab:h}=m(e=>{let t=e.windows.find(t=>t.id===e.activeWindowId);return{isComparing:e.windows.length>1,allTabs:e.windows.flatMap(e=>e.tabs),activeTab:t?.tabs.find(e=>e.id===t?.activeTabId)}}),g=p.length,_=g===0||!r(`evaluations:manage`),y=(0,X.useMemo)(()=>p.map(e=>e.data.form.currentValues.configId).filter(e=>!!e),[p]),b=H.useQueries(e=>y.map(n=>{let r=p.find(e=>e.data.form.currentValues.configId===n)?.data.form.currentValues.versionMetadata?.versionId;return e.prompts.getByIdOrHandle({idOrHandle:n,projectId:t?.id??``,versionId:r},{enabled:!!t?.id&&o,staleTime:6e4})})),x=b.some(e=>e.isLoading),S=(0,X.useMemo)(()=>{let e=new Map;return y.forEach((t,n)=>{let r=b[n];r?.isLoading||e.set(t,r?.data??null)}),e},[y,b]),C=H.experiments.saveEvaluationsV3.useMutation({onSuccess:e=>{d.experiments.getAllForEvaluationsList.invalidate(),a.push(`/${t?.slug}/experiments/workbench/${e.slug}`),u(!1),s(!1)},onError:()=>{u(!1)}});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(v,{content:`Experiment`,disabled:!e,children:(0,Z.jsxs)(E.HeaderButton,{onClick:()=>s(!0),disabled:_,title:_?`Open a prompt to create an experiment`:void 0,children:[(0,Z.jsx)(Me,{size:`18px`}),!e&&`Experiment`]})}),(0,Z.jsx)(q.Root,{open:o,onOpenChange:({open:e})=>s(e),children:(0,Z.jsxs)(q.Content,{bg:`bg`,children:[(0,Z.jsx)(q.Header,{children:(0,Z.jsx)(q.Title,{children:`Create Experiment`})}),(0,Z.jsx)(q.Body,{children:(0,Z.jsx)(l,{children:!f||g===1?`Create new experiment with this prompt?`:`Create new experiment with these prompts? (${g} prompts)`})}),(0,Z.jsxs)(q.Footer,{children:[(0,Z.jsx)(i,{variant:`ghost`,onClick:()=>s(!1),disabled:c,children:`Cancel`}),(0,Z.jsxs)(i,{colorPalette:`blue`,onClick:()=>{if(!t?.id||c||x)return;u(!0);let e=Qe(),n=Ge();n.name=e,n.targets=(f||!h?p:[h]).map((e,t)=>{let r=e.data.form.currentValues.configId,i=r?S.get(r):null;return it(e.data,t,n.datasets,i)});let r=Ze(n);C.mutate({projectId:t.id,experimentId:void 0,state:{...r,experimentSlug:e}})},disabled:c||x,children:[(c||x)&&(0,Z.jsx)(n,{size:`sm`,marginRight:2}),x?`Loading...`:`Create`]})]}),(0,Z.jsx)(q.CloseTrigger,{})]})})]})}var ot=({isOutdated:e,configId:t,allTabsData:n})=>{if(e)return!0;if(!t)return!1;let r=n.filter(e=>e.configId===t);return r.length<=1?!1:new Set(r.map(e=>e.versionNumber)).size>1};function st(e){let t=W(e),n=pe(e),r=t?.data.form.currentValues?.configId,i=t?.data.meta.versionNumber,{latestVersion:a,isOutdated:o}=fe({configId:r,currentVersion:i,isLiveRefetchEnabled:!1}),s=m(e=>ot({isOutdated:o,configId:r,allTabsData:e.windows.flatMap(e=>e.tabs).map(e=>({configId:e.data.form.currentValues?.configId,versionNumber:e.data.meta.versionNumber}))}));return{title:t?.data.meta.title??`New Prompt`,hasUnsavedChanges:n,versionNumber:i,latestVersion:a,isOutdated:o,showVersionBadge:s}}function ct({tabIds:e,activeTabId:t,onSelect:n,scrollerRef:r,isStripOverflowing:a}){if(!a||e.length<=1)return null;let o=e=>{let t=r.current;t&&Array.from(t.querySelectorAll(`[data-tab-strip-id]`)).find(t=>t.getAttribute(`data-tab-strip-id`)===e)?.scrollIntoView({behavior:`smooth`,inline:`nearest`,block:`nearest`})},s=e=>{e!==t&&n(e),o(e)};return(0,Z.jsxs)(w,{lazyMount:!0,unmountOnExit:!0,children:[(0,Z.jsx)(x,{asChild:!0,children:(0,Z.jsxs)(i,{size:`2xs`,variant:`plain`,flexShrink:0,alignSelf:`center`,height:`24px`,minWidth:`auto`,gap:.5,paddingX:1,borderRadius:`sm`,whiteSpace:`nowrap`,color:`fg.subtle`,_hover:{background:`bg.subtle`,color:`fg`},_focusVisible:{outline:`none`,background:`bg.subtle`},"aria-label":`Show ${e.length} open prompts`,children:[(0,Z.jsx)(l,{fontSize:`xs`,fontWeight:`medium`,children:e.length}),(0,Z.jsx)(G,{size:11})]})}),(0,Z.jsx)(C,{minWidth:`240px`,children:e.map(e=>(0,Z.jsx)(lt,{tabId:e,isActive:e===t,onSelect:s},e))})]})}function lt({tabId:e,isActive:t,onSelect:n}){let{title:r,hasUnsavedChanges:i,versionNumber:o,showVersionBadge:c}=st(e),u=Le(r),d=Y(r);return(0,Z.jsx)(b,{value:e,onClick:()=>n(e),"aria-current":t?`true`:void 0,fontWeight:t?`semibold`:void 0,children:(0,Z.jsxs)(a,{gap:2,width:`full`,minWidth:0,children:[(0,Z.jsxs)(l,{textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,minWidth:0,children:[u&&(0,Z.jsxs)(l,{as:`span`,color:`fg.subtle`,children:[u,`/`]}),d]}),i&&(0,Z.jsx)(s,{"data-testid":`unsaved-indicator`,size:`8px`,bg:`orange.solid`,flexShrink:0}),c&&o!=null&&(0,Z.jsxs)(l,{fontSize:`xs`,color:`fg.muted`,flexShrink:0,children:[`v`,o]})]})})}function ut(e,t){let n=n=>{let r=t(n);return(0,Z.jsx)(e,{...n,...r})};return n.displayName=`withController(${e.displayName??e.name??`Component`})`,n}function dt(){let e=de(),{title:t,hasUnsavedChanges:n,versionNumber:r,latestVersion:i,isOutdated:a,showVersionBadge:o}=st(e),s=W(e),c=m(e=>e.removeTab),l=m(e=>e.updateTabData),u=s?.data.form.currentValues?.configId,f=!u,{getPromptById:h}=d();return{tab:s,title:t,hasUnsavedChanges:n,handleClose:t=>{t.stopPropagation(),!((n||f)&&!confirm(`Your unsaved changes will be lost. Proceed anyway?`))&&c({tabId:e})},versionNumber:r,latestVersion:i,isOutdated:a,handleUpgrade:(0,X.useCallback)(async()=>{if(u)try{let t=await h({id:u});if(!t)throw Error(`Prompt not found`);let n=p(t);l({tabId:e,updater:e=>({...e,form:{currentValues:n},meta:{...e.meta,versionNumber:t.version}})})}catch(e){console.error(`Failed to load latest prompt version:`,e)}},[u,h,e,l]),showVersionBadge:o}}function ft({tab:e,title:t,hasUnsavedChanges:n,dimmed:i,isActive:o,isCrowded:c,handleClose:u,versionNumber:d,latestVersion:f,isOutdated:p,handleUpgrade:m,showVersionBadge:h,...g}){let[_,v]=(0,X.useState)(!1);if(!e)return null;let y=Y(t),b=!c||o||_;return(0,Z.jsxs)(a,{gap:2,height:`full`,width:`full`,minWidth:0,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),...g,children:[(0,Z.jsxs)(a,{gap:2,minWidth:0,flex:`1 1 0`,children:[(0,Z.jsx)(l,{textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,minWidth:0,title:t,children:y}),n&&(0,Z.jsx)(r,{flexShrink:0,children:(0,Z.jsx)(s,{size:`10px`,bg:`orange.solid`})}),h&&d!=null&&(0,Z.jsx)(r,{flexShrink:0,children:(0,Z.jsx)(qe,{version:d,latestVersion:f,onUpgrade:p?m:void 0})})]}),b&&(0,Z.jsx)(r,{role:`button`,"aria-label":`Close ${y}`,borderRadius:`3px`,transition:`all 0.1s ease-in-out`,opacity:i?.25:1,flexShrink:0,_hover:{opacity:1},onPointerDown:e=>{e.stopPropagation()},onClick:u,marginRight:-1,children:(0,Z.jsx)(we,{width:`18px`})})]})}var pt=ut(ft,dt),mt=X.createContext(null),ht=X.createContext(null);function gt(){let e=X.useContext(ht);if(!e)throw Error(`Tab components must be used within DraggableTabsBrowser.Window`);return e}function _t({children:e,onTabMove:t}){let[n,r]=X.useState(null),i=O(ee(D,{activationConstraint:{distance:8}}));function o(e){let{windowId:t,tabId:n,label:i}=e.active.data.current;r({windowId:t,tabId:n,label:i})}function s(e){r(null);let{active:n,over:i}=e;if(!i)return;let a=n.data.current,o=i.data.current;if(!a||!o)return;let s=a.sortable?.index,c=o.sortable?.index;t({tabId:a.tabId,from:{windowId:a.windowId,index:s},to:{windowId:o.windowId,index:c}})}let c={onTabMove:t,activeDrag:n,setActiveDrag:r};return(0,Z.jsx)(mt.Provider,{value:c,children:(0,Z.jsx)(M,{sensors:i,onDragStart:o,onDragEnd:s,collisionDetection:F,children:(0,Z.jsxs)(a,{width:`full`,gap:2,padding:2,height:`full`,children:[e,(0,Z.jsx)(A,{children:n?(0,Z.jsx)(vt,{activeDrag:n}):null})]})})})}function vt({activeDrag:e}){return(0,Z.jsx)(`div`,{style:{background:`var(--chakra-colors-bg-panel)`,padding:8,border:`1px solid var(--chakra-colors-border)`,borderRadius:6,boxShadow:`0 2px 8px rgba(0,0,0,0.15)`,pointerEvents:`none`},children:e.label??`Dragging tab...`})}function yt({children:e,windowId:t,activeTabId:n,onTabChange:r,onWindowClick:i,...a}){let o={windowId:t,activeTabId:n};return(0,Z.jsx)(ht.Provider,{value:o,children:(0,Z.jsx)(u,{height:`full`,gap:0,align:`stretch`,width:`full`,children:(0,Z.jsx)(re,{value:n,onValueChange:e=>r?.({windowId:t,tabId:e.value}),onClick:()=>i?.({windowId:t,tabId:n??``}),width:`full`,height:`full`,display:`flex`,flexDirection:`column`,variant:`enclosed`,lazyMount:!0,unmountOnExit:!0,...a,children:e})})})}function bt({children:e,tabIds:t,...n}){return(0,Z.jsx)(a,{gap:0,width:`full`,flexWrap:`nowrap`,minWidth:0,...n,children:(0,Z.jsx)(N,{items:t??[],strategy:j,children:(0,Z.jsx)(ae,{width:`full`,gap:0,height:`full`,paddingY:0,background:`none`,flexWrap:`nowrap`,alignItems:`center`,minWidth:0,children:e})})})}var xt=`88px`,St=`180px`;function Ct({value:e,children:t}){return(0,Z.jsx)(ie,{value:e,minWidth:0,width:`full`,overflow:`hidden`,cursor:`pointer`,transition:`all 0.15s ease-in-out`,children:t})}function wt({id:e,children:t,...n}){let{windowId:i}=gt(),{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u,isOver:d}=k({id:e,data:{windowId:i,tabId:e,label:(0,Z.jsx)(U,{tabId:e,children:(0,Z.jsx)(pt,{dimmed:!1})})}});return(0,Z.jsx)(r,{...n,ref:s,"data-tab-strip-id":e,flex:`1 1 0`,minWidth:xt,maxWidth:St,alignItems:`stretch`,cursor:u?`grabbing`:`grab`,transform:I.Transform.toString(c),transition:l,opacity:u||d?.5:1,...a,...o,children:t})}var Q={Root:_t,Window:yt,TabBar:bt,Trigger:Ct,Tab:wt,Content:oe};function Tt(e,t){let[n,r]=(0,X.useState)(!1),i=(0,X.useCallback)(()=>{let t=e.current;t&&r(t.scrollWidth-t.clientWidth>1)},[e]);return(0,X.useLayoutEffect)(()=>{i()},[i,t]),(0,X.useEffect)(()=>{let t=e.current;if(!t)return;let n=new ResizeObserver(i);return n.observe(t),()=>n.disconnect()},[e,i]),n}function Et({tabs:e,activeTabId:t,isActiveWindow:n,onSelectTab:r}){let i=(0,X.useRef)(null),o=Tt(i,e.length);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(a,{ref:i,gap:0,overflow:`auto`,height:`full`,paddingY:2,paddingX:2,flex:`1 1 0`,minWidth:0,children:e.map(e=>(0,Z.jsx)(U,{tabId:e.id,children:(0,Z.jsx)(Q.Tab,{id:e.id,height:`full`,children:(0,Z.jsx)(Q.Trigger,{value:e.id,children:(0,Z.jsx)(pt,{dimmed:!n,isActive:e.id===t,isCrowded:o})})})},e.id))}),(0,Z.jsx)(ct,{tabIds:e.map(e=>e.id),activeTabId:t,onSelect:r,scrollerRef:i,isStripOverflowing:o})]})}function Dt(){let{windows:e,splitTab:t,moveTab:n,setActiveTab:r,activeWindowId:i,setActiveWindow:o}=m(({windows:e,splitTab:t,moveTab:n,setActiveTab:r,activeWindowId:i,setActiveWindow:a})=>({windows:e,splitTab:t,moveTab:n,setActiveTab:r,activeWindowId:i,setActiveWindow:a}));function s(e){n({tabId:e.tabId,windowId:e.to.windowId,index:e.to.index})}function c({windowId:e,tabId:t}){r({windowId:e,tabId:t})}function l(e){t({tabId:e})}return(0,Z.jsx)(Q.Root,{onTabMove:s,children:e.map(t=>(0,Z.jsxs)(Q.Window,{windowId:t.id,activeTabId:t.activeTabId??void 0,onTabChange:c,onWindowClick:()=>o({windowId:t.id}),maxWidth:e.length>1?`calc((100vw - 340px) / ${e.length})`:`auto`,paddingTop:0,children:[(0,Z.jsxs)(Q.TabBar,{tabIds:t.tabs.map(e=>e.id),children:[(0,Z.jsx)(Et,{tabs:t.tabs,activeTabId:t.activeTabId??void 0,isActiveWindow:t.id===i,onSelectTab:e=>c({windowId:t.id,tabId:e})}),t.id===i&&(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsxs)(a,{flexShrink:0,paddingLeft:1,position:`relative`,_before:{content:`""`,position:`absolute`,left:`-10px`,top:0,bottom:0,width:`10px`,height:`50px`,background:`linear-gradient(to right, transparent, var(--chakra-colors-bg-panel))`,zIndex:10,pointerEvents:`none`},children:[(0,Z.jsx)(at,{iconOnly:e.length>1}),(0,Z.jsx)(v,{content:`Compare`,disabled:e.length<=1,children:(0,Z.jsxs)(E.HeaderButton,{onClick:()=>t.activeTabId&&l(t.activeTabId),disabled:!t.activeTabId,title:`Split tab to compare prompts side by side`,children:[(0,Z.jsx)(je,{size:`18px`}),e.length<=1&&`Compare`]})}),(0,Z.jsx)(tt,{iconOnly:e.length>1})]})})]}),t.tabs.map(e=>(0,Z.jsx)(U,{tabId:e.id,children:(0,Z.jsx)(Q.Content,{value:e.id,height:`full`,borderRadius:`lg`,boxShadow:`md`,background:`bg.panel`,padding:0,minHeight:`0`,children:(0,Z.jsx)(ge,{})})},e.id))]},t.id))})}function Ot(){let{createDraftPrompt:e}=et();return(0,Z.jsx)(K,{width:`full`,height:`full`,bg:`bg.panel`,children:(0,Z.jsx)(L,{children:(0,Z.jsxs)(B,{children:[(0,Z.jsx)(z,{children:(0,Z.jsx)(De,{})}),(0,Z.jsx)(te,{children:`Create Your First Prompt`}),(0,Z.jsx)(R,{children:`Get started on the prompt playground to design, test, and optimize your AI prompts in one place.`}),(0,Z.jsxs)(a,{gap:2,children:[(0,Z.jsx)(i,{variant:`outline`,size:`sm`,onClick:()=>void e(),children:`Create First Prompt`}),(0,Z.jsx)(Xe,{surface:`prompts`})]})]})})})}function kt(){return(0,Z.jsxs)(u,{width:`full`,height:`full`,children:[(0,Z.jsxs)(a,{width:`full`,paddingTop:`18px`,paddingRight:`12px`,children:[(0,Z.jsx)(ne,{}),(0,Z.jsx)(tt,{})]}),(0,Z.jsx)(K,{width:`full`,height:`full`,bg:`bg.panel`,children:(0,Z.jsx)(L,{children:(0,Z.jsxs)(B,{children:[(0,Z.jsx)(z,{children:(0,Z.jsx)(Oe,{})}),(0,Z.jsx)(te,{children:`No prompts open`}),(0,Z.jsx)(R,{children:`Create a new prompt or select an existing prompt to get started.`})]})})})]})}function At(){let{data:e}=Je();return e?.filter(e=>e.version>0)?.length===0?(0,Z.jsx)(Ot,{}):(0,Z.jsx)(kt,{})}function jt(){return h(),m(({windows:e})=>e.length===0||e.every(e=>e.tabs.length===0))?(0,Z.jsx)(At,{}):(0,Z.jsx)(a,{width:`full`,height:`full`,gap:0,overflowX:`scroll`,children:(0,Z.jsx)(Dt,{})})}function Mt(){return(0,Z.jsx)(v,{content:`This prompt is available to all projects in the organization`,children:(0,Z.jsx)(T,{color:`purple`,children:(0,Z.jsx)(ke,{})})})}var Nt=({open:e,onClose:t,onSuccess:n,promptId:r,promptName:i})=>{let{project:a}=J(),o=H.prompts.copy.useMutation(),s=He(`prompts:create`);return a?(0,Z.jsx)(Ve,{open:e,onClose:t,onSuccess:n,title:`Replicate Prompt`,entityLabel:`Prompt`,sourceName:i,sourceId:r,sourceProjectId:a.id,projects:s,onCopy:async({projectId:e,sourceProjectId:t})=>{await o.mutateAsync({idOrHandle:r,projectId:e,sourceProjectId:t})},isLoading:o.isLoading}):null},Pt=({open:e,onClose:t,promptId:n,promptName:r})=>{let{project:i}=J(),a=H.prompts.pushToCopies.useMutation(),o=H.useContext(),[s,c]=(0,X.useState)(new Set),{data:l,isLoading:u,error:d}=H.prompts.getCopies.useQuery({projectId:i?.id??``,idOrHandle:n},{enabled:e&&!!i?.id&&!!n}),[f,p]=(0,X.useState)([]);return(0,X.useEffect)(()=>{l&&(p(l),c(new Set(l.map(e=>e.id))))},[l]),(0,Z.jsx)(Ue,{open:e,onClose:t,entityLabel:`Prompt`,sourceName:r,copies:f,isLoading:u,error:d,selectedCopyIds:s,onToggleCopy:e=>{let t=new Set(s);t.has(e)?t.delete(e):t.add(e),c(t)},onPush:async()=>{let e=await a.mutateAsync({idOrHandle:n,projectId:i.id,copyIds:Array.from(s)});return await o.prompts.getAllPromptsForProject.invalidate(),e},pushLoading:a.isLoading,bodyIntro:`Select which replicas to push the latest version to:`,onSuccess:()=>c(new Set)})},Ft=ue(`langwatch:prompt-configs:use-rename-prompt-handle`),It=({promptId:e,onSuccess:t})=>{let{triggerChangeHandle:n}=me(),{project:r}=J(),i=H.useContext(),{data:a}=H.prompts.checkModifyPermission.useQuery({idOrHandle:e,projectId:r?.id??``},{enabled:!!e&&!!r?.id}),o=a?.hasPermission??!1;return{renameHandle:(0,X.useCallback)(()=>{if(!e){y.create({title:`Couldn't change the prompt handle`,description:`Save this prompt before renaming its handle.`,type:`error`,meta:{closable:!0}});return}n({id:e,onSuccess:e=>{i.prompts.getAllPromptsForProject.invalidate(),y.create({title:`Prompt handle changed`,description:`Prompt handle has been changed to ${e.handle}`,type:`success`}),t?.(e)},onError:e=>{Ft.error({error:e},`Failed to change prompt handle`),V({error:e,fallbackTitle:`Couldn't change the prompt handle`})}})},[e,n,i,t]),canRename:o,permissionReason:a?.reason}};function Lt({promptId:e,promptHandle:t,prompt:n}){let[a,o]=(0,X.useState)(!1),[s,c]=(0,X.useState)(!1),[u,f]=(0,X.useState)(!1),{open:p,setOpen:h}=g(),{deletePrompt:b}=d(),{project:x}=J(),{addTab:C}=m(({addTab:e})=>({addTab:e})),{renameHandle:w,canRename:T,permissionReason:E}=It({promptId:e}),D=H.prompts.syncFromSource.useMutation(),O=H.prompts.duplicate.useMutation(),k=H.useContext(),A=H.modelProvider.getResolvedDefault.useQuery({projectId:x?.id??``,featureKey:`prompt.create_default`},{enabled:p&&!!x?.id}),j=!!n?.copiedFromPromptId,M=(n?._count?.copiedPrompts??0)>0,N=(0,X.useCallback)(async()=>{if(x)try{await D.mutateAsync({idOrHandle:e,projectId:x.id}),await k.prompts.getAllPromptsForProject.invalidate(),y.create({title:`Prompt updated`,description:`Prompt "${Y(t)}" has been updated from source.`,type:`success`,meta:{closable:!0}})}catch(e){V({error:e,fallbackTitle:`Couldn't update the prompt from its source`})}},[D,x,k,e,t]),P=(0,X.useCallback)(async()=>{if(x)try{let n=await O.mutateAsync({idOrHandle:e,projectId:x.id});await k.prompts.getAllPromptsForProject.invalidate(),y.create({title:`Prompt duplicated`,description:`"${Y(t)}" was duplicated as "${Y(n.handle)}"`,type:`success`,meta:{closable:!0}})}catch(e){V({error:e,fallbackTitle:`Couldn't duplicate the prompt`})}},[O,x,k,e,t]),{data:F}=H.prompts.checkModifyPermission.useQuery({idOrHandle:e,projectId:x?.id??``},{enabled:p&&!!x?.id}),I=F?.hasPermission===!0,ee=(0,X.useCallback)(async()=>{if(x?.id)try{await b({projectId:x.id,idOrHandle:e}),y.create({title:`Prompt deleted`,description:`"${Y(t)}" has been deleted`,type:`success`})}catch(e){V({error:e,fallbackTitle:`Couldn't delete the prompt`})}finally{o(!1)}},[e,t,x?.id,b]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(r,{onClick:e=>e.stopPropagation(),opacity:0,_groupHover:{opacity:1},transition:`opacity 0.2s`,children:(0,Z.jsxs)(S.Root,{open:p,onOpenChange:({open:e})=>h(e),children:[(0,Z.jsx)(S.Trigger,{asChild:!0,children:(0,Z.jsx)(i,{variant:`ghost`,size:`xs`,onClick:e=>e.stopPropagation(),children:(0,Z.jsx)(Ae,{size:14})})}),(0,Z.jsxs)(S.Content,{onClick:e=>e.stopPropagation(),children:[j&&(0,Z.jsxs)(S.Item,{value:`sync`,onClick:()=>void N(),children:[(0,Z.jsx)(Fe,{size:16}),` Update from source`]}),M&&(0,Z.jsxs)(S.Item,{value:`push`,onClick:()=>f(!0),children:[(0,Z.jsx)(Ne,{size:16}),` Push to replicas`]}),(0,Z.jsxs)(S.Item,{value:`copy`,onClick:()=>c(!0),children:[(0,Z.jsx)(Pe,{size:16}),` Replicate to another project`]}),(0,Z.jsxs)(S.Item,{value:`duplicate`,onClick:()=>void P(),children:[(0,Z.jsx)(xe,{size:16}),` Duplicate prompt`]}),(0,Z.jsxs)(S.Item,{value:`view-history`,onClick:()=>{if(!n)return;let e=_({prompt:n,defaultModel:A.data?.model??``,useSystemMessage:!0});C({data:{chat:{initialMessagesFromSpanData:[]},form:{currentValues:e},meta:{title:e.handle??null,versionNumber:e.versionMetadata?.versionNumber,openHistoryOnLoad:!0},variableValues:{}}})},children:[(0,Z.jsx)(Ce,{size:16}),` View history`]}),(0,Z.jsx)(v,{content:E,disabled:T,positioning:{placement:`right`},showArrow:!0,children:(0,Z.jsxs)(S.Item,{value:`rename`,onClick:T?w:void 0,disabled:!T,opacity:T?1:.5,cursor:T?`pointer`:`not-allowed`,children:[(0,Z.jsx)(Te,{size:16}),(0,Z.jsx)(l,{as:`span`,children:`Rename handle`})]})}),(0,Z.jsx)(v,{content:F?.reason,disabled:I,positioning:{placement:`right`},showArrow:!0,children:(0,Z.jsxs)(S.Item,{value:`delete`,onClick:()=>I&&o(!0),disabled:!I,opacity:I?1:.5,cursor:I?`pointer`:`not-allowed`,children:[(0,Z.jsx)(Ee,{size:16}),(0,Z.jsx)(l,{as:`span`,children:`Delete prompt`})]})})]})]})}),(0,Z.jsx)(We,{title:`Are you really sure?`,description:`There is no going back, and you will lose all versions of this prompt. If you're sure you want to delete this prompt, type 'delete' below:`,open:a,onClose:()=>o(!1),onConfirm:()=>void ee()}),(0,Z.jsx)(Nt,{open:s,onClose:()=>c(!1),onSuccess:()=>void k.prompts.getAllPromptsForProject.invalidate(),promptId:e,promptName:Y(t)}),(0,Z.jsx)(Pt,{open:u,onClose:()=>f(!1),promptId:e,promptName:Y(t)})]})}function Rt({promptId:e,promptHandle:t,prompt:n}){return(0,Z.jsxs)(a,{justify:`space-between`,width:`full`,className:`group`,children:[n?.scope===`ORGANIZATION`&&(0,Z.jsx)(r,{marginLeft:`-12px`,children:(0,Z.jsx)(Mt,{})}),(0,Z.jsx)(l,{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:`sm`,fontWeight:`normal`,flex:1,children:Y(t)}),(0,Z.jsx)(Lt,{promptId:e,promptHandle:t,prompt:n})]})}function zt({children:e,...t}){return(0,Z.jsx)(r,{as:`nav`,width:`full`,height:`100%`,overflowY:`auto`,paddingBottom:`2`,...t,children:(0,Z.jsx)(u,{gap:0,align:`stretch`,children:e})})}function Bt({children:e}){return(0,Z.jsx)(r,{padding:`4`,fontSize:`lg`,fontWeight:`semibold`,children:e})}function Vt({children:e,...t}){return(0,Z.jsx)(r,{paddingX:`3`,paddingY:`2`,fontSize:`sm`,fontWeight:`medium`,color:`fg`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,...t,children:e})}function Ht({children:e}){return(0,Z.jsx)(r,{children:e})}function Ut({children:e,title:t,collapsible:n=!1,defaultOpen:i=!1,action:o}){let[s,c]=(0,X.useState)(i);return t?(0,Z.jsxs)(u,{gap:0,align:`stretch`,children:[(0,Z.jsxs)(Vt,{onClick:()=>c(!s),cursor:`pointer`,children:[(0,Z.jsxs)(a,{gap:2,children:[n&&(0,Z.jsx)(r,{transform:s?`rotate(0deg)`:`rotate(-90deg)`,transition:`transform 0.2s`,children:(0,Z.jsx)(G,{size:14})}),(0,Z.jsx)(l,{children:t})]}),o&&(0,Z.jsx)(r,{onClick:e=>e.stopPropagation(),children:o})]}),(!n||s)&&(0,Z.jsx)(u,{gap:0,align:`stretch`,paddingX:4,children:e})]}):(0,Z.jsx)(u,{gap:.5,align:`stretch`,paddingX:2,children:e})}function Wt({children:e,onClick:t,active:n=!1,icon:i,meta:a,variant:o=`default`,...s}){return o===`empty`?(0,Z.jsx)(r,{padding:`3`,fontSize:`sm`,color:`fg.muted`,textAlign:`center`,children:e}):(0,Z.jsxs)(r,{fontSize:`sm`,color:n?`blue.fg`:`fg`,bg:n?`blue.subtle`:`transparent`,borderRadius:`md`,cursor:`pointer`,_hover:{bg:n?`blue.muted`:`bg.muted`},onClick:t,display:`flex`,alignItems:`center`,gap:2,width:`full`,...s,children:[i&&(0,Z.jsx)(r,{width:`16px`,borderRadius:`full`,bg:`bg.muted`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,children:i}),(0,Z.jsxs)(r,{flex:1,minWidth:0,children:[e,a&&(0,Z.jsx)(l,{fontSize:`xs`,color:`fg.muted`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,children:a})]})]})}var $={Root:zt,Header:Bt,SectionHeader:Vt,List:Ut,Item:Wt,Section:Ht};function Gt(){return(0,Z.jsx)(l,{fontSize:`sm`,color:`fg.muted`,textAlign:`center`,paddingY:6,paddingX:4,children:`No prompts yet`})}function Kt(){let{data:e,isLoading:t}=Je(),{addTab:n}=m(({addTab:e})=>({addTab:e})),{project:r}=J(),i=H.modelProvider.getResolvedDefault.useQuery({projectId:r?.id??``,featureKey:`prompt.create_default`},{enabled:!!r?.id}),a=(0,X.useMemo)(()=>{let t=e?.filter(e=>e.version>0),n=Ie(t,e=>e.handle?.includes(`/`)?e.handle?.split(`/`)[0]:`default`);return Object.entries(n).sort((e,t)=>e[0]==="default"?1:t[0]==="default"?-1:0)},[e]),o=e?.filter(e=>e.version>0);return t?(0,Z.jsx)($.List,{children:[1,2,3,4].map(e=>(0,Z.jsx)($.Item,{paddingY:1,paddingLeft:2,children:(0,Z.jsx)(c,{width:`full`,height:`20px`,borderRadius:`sm`})},e))}):o?.length===0?(0,Z.jsx)(Gt,{}):(0,Z.jsx)(Z.Fragment,{children:a.map(([e,t])=>(0,Z.jsx)($.List,{title:e==="default"?void 0:e,collapsible:e!=="default",defaultOpen:!1,children:t.map(e=>(0,Z.jsx)(Ye,{target:se({promptId:e.id,handle:e.handle}),children:(0,Z.jsx)($.Item,{icon:ce[e.model?.split(`/`)[0]],onClick:()=>{let t=_({prompt:e,defaultModel:i.data?.model??``,useSystemMessage:!0});n({data:{chat:{initialMessagesFromSpanData:[]},form:{currentValues:t},meta:{title:t.handle??null,versionNumber:t.versionMetadata?.versionNumber},variableValues:{}}})},paddingY:1,paddingLeft:2,children:(0,Z.jsx)(Rt,{promptId:e.id,promptHandle:e.handle,prompt:e})})},e.id))},e))})}function qt(){return(0,Z.jsx)($.Root,{children:(0,Z.jsx)($.Section,{children:(0,Z.jsx)(Kt,{})})})}function Jt(){return(0,Z.jsx)(P,{position:`relative`,compactMenu:!0,children:(0,Z.jsx)(he,{children:(0,Z.jsx)(ve,{children:(0,Z.jsxs)(a,{width:`full`,height:`full`,gap:0,position:`relative`,children:[(0,Z.jsxs)(u,{position:`relative`,top:0,left:0,width:`250px`,height:`full`,children:[(0,Z.jsx)(E.Header,{withBorder:!1,children:(0,Z.jsx)(E.Heading,{children:`Prompts`})}),(0,Z.jsx)(qt,{})]}),(0,Z.jsx)(jt,{})]})})})})}function Yt(){return(0,Z.jsx)(Jt,{})}var Xt=Re(`prompts:view`,{layoutComponent:P})(Yt);export{Xt as default};
|
|
8
|
-
//# sourceMappingURL=prompts-CLb2R5Fd.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{C as n,D as r,E as i,K as a,O as o,S as s,Z as c,_ as l,b as u,cn as d,fn as f,j as p,k as m,o as h,ot as g,un as _,w as v,wt as y,x as ee}from"./portal-Sdfvrza9.js";import{t as te}from"./jsx-runtime-CFwixLRt.js";import{p as b,t as ne}from"./resize-observer-CeVrDdU8.js";import{c as re,n as ie,t as x}from"./visually-hidden-0SZJZ5dQ.js";import{l as ae,n as S}from"./icon-D6xQEiPb.js";import{l as oe,s as se}from"./field-BadoNaN5.js";import{i as ce}from"./field-uFetMRUQ.js";import{qr as C}from"./index-CPtTUYLD.js";var w=e=>e.ids?.root??`radio-group:${e.id}`,T=e=>e.ids?.label??`radio-group:${e.id}:label`,E=(e,t)=>e.ids?.item?.(t)??`radio-group:${e.id}:radio:${t}`,D=(e,t)=>e.ids?.itemHiddenInput?.(t)??`radio-group:${e.id}:radio:input:${t}`,le=(e,t)=>e.ids?.itemControl?.(t)??`radio-group:${e.id}:radio:control:${t}`,O=(e,t)=>e.ids?.itemLabel?.(t)??`radio-group:${e.id}:radio:label:${t}`,k=e=>e.ids?.indicator??`radio-group:${e.id}:indicator`,A=e=>e.getById(w(e)),ue=(e,t)=>e.getById(D(e,t)),de=e=>e.getById(k(e)),fe=e=>A(e)?.querySelector(`input:not(:disabled)`),pe=e=>A(e)?.querySelector(`input:not(:disabled):checked`),j=e=>{let t=`input[type=radio][data-ownedby='${CSS.escape(w(e))}']:not([disabled])`;return ae(A(e),t)},me=(e,t)=>{if(t)return e.getById(E(e,t))},he=e=>({x:e?.offsetLeft??0,y:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function M(e,t){let{context:n,send:r,computed:i,prop:o,scope:s}=e,l=i(`isDisabled`),u=o(`invalid`),d=o(`readOnly`);function f(e){return{value:e.value,invalid:!!e.invalid||!!u,disabled:!!e.disabled||l,checked:n.get(`value`)===e.value,focused:n.get(`focusedValue`)===e.value,focusVisible:n.get(`focusVisibleValue`)===e.value,hovered:n.get(`hoveredValue`)===e.value,active:n.get(`activeValue`)===e.value}}function p(e){let t=f(e);return{"data-focus":y(t.focused),"data-focus-visible":y(t.focusVisible),"data-disabled":y(t.disabled),"data-readonly":y(d),"data-state":t.checked?`checked`:`unchecked`,"data-hover":y(t.hovered),"data-invalid":y(t.invalid),"data-orientation":o(`orientation`),"data-ssr":y(n.get(`ssr`))}}let m=()=>{(pe(s)??fe(s))?.focus()};return{focus:m,value:n.get(`value`),setValue(e){r({type:`SET_VALUE`,value:e,isTrusted:!1})},clearValue(){r({type:`SET_VALUE`,value:null,isTrusted:!1})},getRootProps(){return t.element({...C.root.attrs,role:`radiogroup`,id:w(s),"aria-labelledby":T(s),"aria-required":o(`required`)||void 0,"aria-disabled":l||void 0,"aria-readonly":d||void 0,"data-orientation":o(`orientation`),"data-disabled":y(l),"data-invalid":y(u),"data-required":y(o(`required`)),"aria-orientation":o(`orientation`),dir:o(`dir`),style:{position:`relative`}})},getLabelProps(){return t.element({...C.label.attrs,dir:o(`dir`),"data-orientation":o(`orientation`),"data-disabled":y(l),"data-invalid":y(u),"data-required":y(o(`required`)),id:T(s),onClick:m})},getItemState:f,getItemProps(e){let n=f(e);return t.label({...C.item.attrs,dir:o(`dir`),id:E(s,e.value),htmlFor:D(s,e.value),...p(e),onPointerMove(){n.disabled||n.hovered||r({type:`SET_HOVERED`,value:e.value,hovered:!0})},onPointerLeave(){n.disabled||r({type:`SET_HOVERED`,value:null})},onPointerDown(t){n.disabled||c(t)&&(n.focused&&t.pointerType===`mouse`&&t.preventDefault(),r({type:`SET_ACTIVE`,value:e.value,active:!0}))},onPointerUp(){n.disabled||r({type:`SET_ACTIVE`,value:null})},onClick(){!n.disabled&&g()&&ue(s,e.value)?.focus()}})},getItemTextProps(e){return t.element({...C.itemText.attrs,dir:o(`dir`),id:O(s,e.value),...p(e)})},getItemControlProps(e){let n=f(e);return t.element({...C.itemControl.attrs,dir:o(`dir`),id:le(s,e.value),"data-active":y(n.active),"aria-hidden":!0,...p(e)})},getItemHiddenInputProps(e){let n=f(e);return t.input({"data-ownedby":w(s),id:D(s,e.value),type:`radio`,name:o(`name`)||o(`id`),form:o(`form`),value:e.value,required:o(`required`),"aria-labelledby":O(s,e.value),"aria-invalid":n.invalid||void 0,onClick(t){if(d){t.preventDefault();return}t.currentTarget.checked&&r({type:`SET_VALUE`,value:e.value,isTrusted:!0})},onBlur(){r({type:`SET_FOCUSED`,value:null,focused:!1,focusVisible:!1})},onFocus(){let t=se();r({type:`SET_FOCUSED`,value:e.value,focused:!0,focusVisible:t})},onKeyDown(t){t.defaultPrevented||t.key===` `&&r({type:`SET_ACTIVE`,value:e.value,active:!0})},onKeyUp(e){e.defaultPrevented||e.key===` `&&r({type:`SET_ACTIVE`,value:null})},disabled:n.disabled||d,defaultChecked:n.checked,style:x})},getIndicatorProps(){let e=n.get(`indicatorRect`),i=n.get(`animateIndicator`);return t.element({id:k(s),...C.indicator.attrs,dir:o(`dir`),hidden:n.get(`value`)==null||ge(e),"data-disabled":y(l),"data-orientation":o(`orientation`),onTransitionEnd(e){a(e)===e.currentTarget&&r({type:`INDICATOR_TRANSITION_END`})},style:{"--transition-property":`left, top, width, height`,"--left":b(e?.x),"--top":b(e?.y),"--width":b(e?.width),"--height":b(e?.height),position:`absolute`,willChange:i?`var(--transition-property)`:`auto`,transitionProperty:i?`var(--transition-property)`:`none`,transitionDuration:i?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[o(`orientation`)===`horizontal`?`left`:`top`]:o(`orientation`)===`horizontal`?`var(--left)`:`var(--top)`}})}}}var ge=e=>e==null||e.width===0&&e.height===0&&e.x===0&&e.y===0,{not:N}=o(),P=m({props({props:e}){return{orientation:`vertical`,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),focusVisibleValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:null})),animateIndicator:t(()=>({defaultValue:!1})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null,prevValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`)},entry:[`syncPrevValue`,`syncIndicatorRect`,`syncSsr`],exit:[`cleanupObserver`],effects:[`trackFormControlState`,`trackFocusVisible`],watch({track:e,action:t,context:n}){e([()=>n.get(`value`)],()=>{t([`syncIndicatorAnimation`,`syncIndicatorRect`,`syncInputElements`])})},on:{SET_VALUE:[{guard:N(`isTrusted`),actions:[`setValue`,`dispatchChangeEvent`]},{actions:[`setValue`]}],SET_HOVERED:{actions:[`setHovered`]},SET_ACTIVE:{actions:[`setActive`]},SET_FOCUSED:{actions:[`setFocused`]},INDICATOR_TRANSITION_END:{actions:[`clearIndicatorAnimation`]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return re(A(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},trackFocusVisible({scope:e}){return oe({root:e.getRootNode?.()})}},actions:{setValue({context:e,event:t}){e.set(`value`,t.value)},setHovered({context:e,event:t}){e.set(`hoveredValue`,t.value)},setActive({context:e,event:t}){e.set(`activeValue`,t.value)},setFocused({context:e,event:t}){e.set(`focusedValue`,t.value);let n=t.value!=null&&t.focusVisible?t.value:null;e.set(`focusVisibleValue`,n)},syncPrevValue({context:e,refs:t}){t.set(`prevValue`,e.get(`value`))},syncIndicatorAnimation({context:e,refs:t}){let n=t.get(`prevValue`),r=e.get(`value`),i=n!=null&&r!=null&&n!==r;e.set(`animateIndicator`,i),t.set(`prevValue`,r)},clearIndicatorAnimation({context:e}){e.set(`animateIndicator`,!1)},syncInputElements({context:e,scope:t}){j(t).forEach(t=>{t.checked=t.value===e.get(`value`)})},cleanupObserver({refs:e}){e.get(`indicatorCleanup`)?.()},syncSsr({context:e}){e.set(`ssr`,!1)},syncIndicatorRect({context:e,scope:t,refs:n}){if(n.get(`indicatorCleanup`)?.(),!de(t))return;let r=e.get(`value`),i=me(t,r);if(r==null||!i){e.set(`indicatorRect`,null);return}let a=()=>{e.set(`indicatorRect`,he(i))};a();let o=ne.observe(i,a);n.set(`indicatorCleanup`,o)},dispatchChangeEvent({context:e,scope:t}){j(t).forEach(t=>{let n=t.value===e.get(`value`);n!==t.checked&&ie(t,{checked:n})})}}}}),F=e(t(),1),I=te(),[L,R]=i({name:`RadioGroupItemContext`,hookName:`useRadioGroupItemContext`,providerName:`<RadioGroupItemProvider />`}),[z,B]=i({name:`RadioGroupContext`,hookName:`useRadioGroupContext`,providerName:`<RadioGroupProvider />`}),_e=e=>e.children(B()),V=(0,F.forwardRef)((e,t)=>{let n=p(B().getIndicatorProps(),e);return(0,I.jsx)(v.div,{...n,ref:t})});V.displayName=`RadioGroupIndicator`;var[ve,H]=i({name:`RadioGroupItemPropsContext`,hookName:`useRadioGroupItemPropsContext`,providerName:`<RadioGroupItemPropsProvider />`}),ye=S(),U=(0,F.forwardRef)((e,t)=>{let[n,r]=ye(e,[`value`,`disabled`,`invalid`]),i=B(),a=p(i.getItemProps(n),r);return(0,I.jsx)(L,{value:i.getItemState(n),children:(0,I.jsx)(ve,{value:n,children:(0,I.jsx)(v.label,{...a,ref:t})})})});U.displayName=`RadioGroupItem`;var be=e=>e.children(R()),W=(0,F.forwardRef)((e,t)=>{let n=B(),r=H(),i=p(n.getItemControlProps(r),e);return(0,I.jsx)(v.div,{...i,ref:t})});W.displayName=`RadioGroupItemControl`;var G=(0,F.forwardRef)((e,t)=>{let n=B(),r=H(),i=p(n.getItemHiddenInputProps(r),e);return(0,I.jsx)(v.input,{...i,ref:t})});G.displayName=`RadioGroupItemHiddenInput`;var K=(0,F.forwardRef)((e,t)=>{let n=B(),r=H(),i=p(n.getItemTextProps(r),e);return(0,I.jsx)(v.span,{...i,ref:t})});K.displayName=`RadioGroupItemText`;var q=(0,F.forwardRef)((e,t)=>{let n=p(B().getLabelProps(),e);return(0,I.jsx)(v.span,{...n,ref:t})});q.displayName=`RadioGroupLabel`;var xe=e=>{let t=ce(),r=(0,F.useId)(),{getRootNode:i}=n(),{dir:a}=s();return M(ee(P,{id:r,ids:{label:t?.ids?.legend},dir:a,disabled:t?.disabled,invalid:t?.invalid,getRootNode:i,...e}),u)},Se=S(),J=(0,F.forwardRef)((e,t)=>{let[n,r]=Se(e,[`defaultValue`,`disabled`,`form`,`id`,`ids`,`invalid`,`name`,`onValueChange`,`orientation`,`readOnly`,`required`,`value`]),i=xe(n),a=p(i.getRootProps(),r);return(0,I.jsx)(z,{value:i,children:(0,I.jsx)(v.div,{...a,ref:t})})});J.displayName=`RadioGroupRoot`;var Ce=S(),Y=(0,F.forwardRef)((e,t)=>{let[{value:n},r]=Ce(e,[`value`]),i=p(n.getRootProps(),r);return(0,I.jsx)(z,{value:n,children:(0,I.jsx)(v.div,{...i,ref:t})})});Y.displayName=`RadioGroupRootProvider`;var X=r({Context:()=>_e,Indicator:()=>V,Item:()=>U,ItemContext:()=>be,ItemControl:()=>W,ItemHiddenInput:()=>G,ItemText:()=>K,Label:()=>q,Root:()=>J,RootProvider:()=>Y}),Z=(0,F.forwardRef)(function(e,t){let n=d({key:`radiomark`,recipe:e.recipe}),[r,i]=n.splitVariantProps(e),{checked:a,disabled:o,unstyled:s,children:c,...l}=i,u=s?_:n(r),p={ref:t,"data-checked":h(a),"data-disabled":h(o),...l,css:[u,e.css]};return(0,I.jsx)(f.span,{...p,children:a&&(0,I.jsx)(`span`,{className:`dot`})})});Z.displayName=`Radiomark`;var{withProvider:Q,withContext:$,useStyles:we,PropsProvider:Te}=l({key:`radioGroup`});Q(X.RootProvider,`root`,{forwardAsChild:!0});var Ee=Q(X.Root,`root`,{forwardAsChild:!0});$(X.Label,`label`,{forwardAsChild:!0});var De=$(X.Item,`item`,{forwardAsChild:!0}),Oe=$(X.ItemText,`itemText`,{forwardAsChild:!0});$(X.ItemControl,`itemControl`,{forwardAsChild:!0});var ke=(0,F.forwardRef)(function(e,t){let n=we();return(0,I.jsx)(X.ItemContext,{children:r=>(0,I.jsx)(X.ItemControl,{asChild:!0,children:(0,I.jsx)(Z,{ref:t,unstyled:!0,...e,checked:r.checked,disabled:r.disabled,css:[n.itemControl,e.css]})})})});X.Context,X.ItemContext;var Ae=X.ItemHiddenInput;export{Ee as a,R as c,Oe as i,P as l,Ae as n,Z as o,ke as r,X as s,De as t,M as u};
|
|
2
|
-
//# sourceMappingURL=radio-group-CWz2nJi3.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{An as e,En as t,Pn as n}from"./index-CPtTUYLD.js";import{t as r}from"./loadModelCatalog-DyXUQbVY.js";var i=900*1e3,a=t({CODEX_ACCESS_TOKEN:e().min(1),CODEX_REFRESH_TOKEN:e().min(1),CODEX_ID_TOKEN:e(),CODEX_ACCOUNT_ID:e(),CODEX_PLAN:e(),CODEX_EMAIL:e(),CODEX_TOKENS_SAVED_AT:e()}),o=[{key:`langy.chat`,role:`LANGY`,displayName:`Langy`,description:`The model Langy chats and works with.`},{key:`prompt.create_default`,role:`DEFAULT`,displayName:`New prompt model`,description:`Model written into a freshly created prompt.`},{key:`evaluator.create_default`,role:`DEFAULT`,displayName:`New evaluator model`,description:`Model written into a freshly created LLM-as-a-judge evaluator.`},{key:`scenarios.user_simulator`,role:`DEFAULT`,displayName:`Scenario user simulator`,description:`Model that role-plays the user in scenario simulations.`},{key:`scenarios.judge`,role:`DEFAULT`,displayName:`Scenario judge`,description:`Model that judges whether a scenario met its success criteria.`},{key:`workflows.create_default`,role:`DEFAULT`,displayName:`New workflow model`,description:`Starts new workflows with a ready-to-use model.`},{key:`traces.ai_search`,role:`FAST`,displayName:`AI search`,description:`Natural-language search over your traces.`},{key:`workflows.commit_message`,role:`FAST`,displayName:`Workflow commit messages`,description:`Auto-generates a commit message when you save a workflow change.`},{key:`studio.autocomplete`,role:`FAST`,displayName:`Code editor autocomplete`,description:`Inline completion in the prompt and workflow editors.`},{key:`scenarios.generator`,role:`FAST`,displayName:`Scenario generator`,description:`Generates synthetic agent scenarios from a goal.`},{key:`datasets.generator`,role:`FAST`,displayName:`Dataset generator`,description:`Generates synthetic dataset rows from a description.`},{key:`translate.text`,role:`FAST`,displayName:`Inline translation`,description:`Translates user-supplied text into English.`},{key:`analytics.topic_clustering_llm`,role:`FAST`,displayName:`Topic clustering`,description:`Names the clusters surfaced in Analytics → Topics.`},{key:`langy.conversation_title`,role:`FAST`,displayName:`Langy chat titles`,description:`Names each Langy conversation from its messages. Point this at a cheap model.`},{key:`analytics.topic_clustering_embeddings`,role:`EMBEDDINGS`,displayName:`Topic clustering`,description:`Vectors used to group similar traces in Analytics → Topics.`}];function s(e){let t=new Set;for(let n of e){if(t.has(n.key))throw Error(`Duplicate feature registry key: "${n.key}". Feature keys must be unique.`);t.add(n.key)}}s(o);var c=e=>o.filter(t=>t.role===e),l=`langy.chat`,u=[l,...c(`FAST`).map(e=>e.key)];function d(e){return u.includes(e)}var f=`openai_codex`;function p(e){return e.startsWith(`${f}/`)}var m=`openai_codex/gpt-5.6-terra`;function h({modelId:e,featureKey:t}){return p(e)?d(t):!0}function g(e,t){return p(e)?t===`LANGY`||t===`FAST`:!0}var _=e=>r.models[e],v=(e,t)=>Object.entries(r.models).filter(([n,r])=>r.provider===e&&r.mode===t).map(([e,t])=>({value:t.id.split(`/`).slice(1).join(`/`),label:t.id.split(`/`).slice(1).join(`/`)})),y={custom:{name:`Custom (OpenAI-compatible)`,type:`llm`,apiKey:`CUSTOM_API_KEY`,endpointKey:`CUSTOM_BASE_URL`,keysSchema:t({CUSTOM_API_KEY:e().nullable().optional(),CUSTOM_BASE_URL:e().nullable().optional()}),optionalKeys:[`CUSTOM_API_KEY`],enabledSince:new Date(`2023-01-01`),blurb:`Use this option for LiteLLM proxy, self-hosted vLLM or any other model providers that supports the /chat/completions endpoint.`},openai_codex:{name:`Codex (OpenAI account)`,type:`llm`,apiKey:`CODEX_ACCESS_TOKEN`,endpointKey:void 0,keysSchema:a,authFlow:`oauth-device`,restrictedToFeatureKeys:u,enabledSince:new Date(`2026-07-20`),blurb:`Sign in with your OpenAI account and Langy runs on your ChatGPT plan. Serves the coding-assistant surfaces only.`},openai:{name:`OpenAI`,type:`llm`,apiKey:`OPENAI_API_KEY`,endpointKey:`OPENAI_BASE_URL`,keysSchema:t({OPENAI_API_KEY:e().nullable().optional(),OPENAI_BASE_URL:e().nullable().optional()}).superRefine((e,t)=>{(!e.OPENAI_API_KEY||e.OPENAI_API_KEY.trim()===``)&&(!e.OPENAI_BASE_URL||e.OPENAI_BASE_URL.trim()===``)&&t.addIssue({code:n.custom,message:`Add an API key, or a base URL if your endpoint does not need one.`})}),optionalKeys:[`OPENAI_BASE_URL`],enabledSince:new Date(`2023-01-01`)},anthropic:{name:`Anthropic`,type:`llm`,apiKey:`ANTHROPIC_API_KEY`,endpointKey:`ANTHROPIC_BASE_URL`,keysSchema:t({ANTHROPIC_API_KEY:e().nullable().optional(),ANTHROPIC_BASE_URL:e().nullable().optional()}).superRefine((e,t)=>{(!e.ANTHROPIC_API_KEY||e.ANTHROPIC_API_KEY.trim()===``)&&(!e.ANTHROPIC_BASE_URL||e.ANTHROPIC_BASE_URL.trim()===``)&&t.addIssue({code:n.custom,message:`Add an API key, or a base URL if your endpoint does not need one.`})}),optionalKeys:[`ANTHROPIC_BASE_URL`],enabledSince:new Date(`2023-01-01`),parameterConstraints:{temperature:{min:0,max:1}}},gemini:{name:`Gemini`,type:`llm`,apiKey:`GEMINI_API_KEY`,endpointKey:void 0,keysSchema:t({GEMINI_API_KEY:e().min(1)}),enabledSince:new Date(`2023-01-01`)},google_agent_platform:{name:`Google Agent Platform`,type:`llm`,apiKey:`GOOGLE_AGENT_PLATFORM_API_KEY`,endpointKey:void 0,keysSchema:t({GOOGLE_AGENT_PLATFORM_API_KEY:e().min(1),GOOGLE_AGENT_PLATFORM_PROJECT:e().min(1),GOOGLE_AGENT_PLATFORM_LOCATION:e().min(1)}),enabledSince:new Date(`2026-07-29`)},elevenlabs:{name:`ElevenLabs`,type:`llm`,apiKey:`ELEVENLABS_API_KEY`,endpointKey:void 0,keysSchema:t({ELEVENLABS_API_KEY:e().min(1)}),enabledSince:new Date(`2026-07-25`),blurb:`Voice models for lifelike text to speech and accurate transcription.`},azure:{name:`Azure OpenAI`,type:`llm`,apiKey:`AZURE_OPENAI_API_KEY`,endpointKey:`AZURE_OPENAI_ENDPOINT`,keysSchema:t({AZURE_OPENAI_API_KEY:e().nullable().optional(),AZURE_OPENAI_ENDPOINT:e().nullable().optional(),AZURE_OPENAI_API_VERSION:e().nullable().optional(),AZURE_API_GATEWAY_BASE_URL:e().nullable().optional(),AZURE_API_GATEWAY_VERSION:e().nullable().optional()}).passthrough(),optionalKeys:[`AZURE_OPENAI_API_VERSION`,`AZURE_API_GATEWAY_VERSION`],enabledSince:new Date(`2023-01-01`)},bedrock:{name:`Bedrock`,type:`llm`,apiKey:`AWS_ACCESS_KEY_ID`,endpointKey:void 0,keysSchema:t({AWS_ACCESS_KEY_ID:e().nullable().optional(),AWS_SECRET_ACCESS_KEY:e().nullable().optional(),AWS_REGION_NAME:e().nullable().optional()}),optionalKeys:[],enabledSince:new Date(`2023-01-01`)},vertex_ai:{name:`Vertex AI`,type:`llm`,apiKey:`GOOGLE_APPLICATION_CREDENTIALS`,endpointKey:void 0,keysSchema:t({GOOGLE_APPLICATION_CREDENTIALS:e().min(1).refine(C),VERTEXAI_PROJECT:e().min(1),VERTEXAI_LOCATION:e().min(1)}),enabledSince:new Date(`2023-01-01`)},deepseek:{name:`DeepSeek`,type:`llm`,apiKey:`DEEPSEEK_API_KEY`,endpointKey:void 0,keysSchema:t({DEEPSEEK_API_KEY:e().min(1)}),enabledSince:new Date(`2023-01-01`)},xai:{name:`xAI`,type:`llm`,apiKey:`XAI_API_KEY`,endpointKey:void 0,keysSchema:t({XAI_API_KEY:e().min(1)}),enabledSince:new Date(`2024-11-01`)},cerebras:{name:`Cerebras`,type:`llm`,apiKey:`CEREBRAS_API_KEY`,endpointKey:void 0,keysSchema:t({CEREBRAS_API_KEY:e().min(1)}),enabledSince:new Date(`2024-06-01`)},groq:{name:`Groq`,type:`llm`,apiKey:`GROQ_API_KEY`,endpointKey:void 0,keysSchema:t({GROQ_API_KEY:e().min(1)}),enabledSince:new Date(`2023-01-01`)},voyage:{name:`Voyage AI`,type:`llm`,apiKey:`VOYAGE_API_KEY`,endpointKey:void 0,keysSchema:t({VOYAGE_API_KEY:e().min(1)}),enabledSince:new Date(`2026-05-18`)},azure_safety:{name:`Azure Safety`,type:`safety`,apiKey:`AZURE_CONTENT_SAFETY_KEY`,endpointKey:`AZURE_CONTENT_SAFETY_ENDPOINT`,keysSchema:t({AZURE_CONTENT_SAFETY_ENDPOINT:e().url(),AZURE_CONTENT_SAFETY_KEY:e().min(1)}),enabledSince:new Date(`2026-04-10`),blurb:`Azure Content Safety for content moderation, prompt injection, and jailbreak detection. Your subscription is billed directly by Microsoft.`}},b=[`free`,`thinking`,`extended`,`beta`];function x(e){let t=e.lastIndexOf(`:`);if(t===-1)return!1;let n=e.substring(t+1);return/^\d+$/.test(n)?!1:b.includes(n.toLowerCase())}var S=Object.fromEntries(Object.entries(r.models).filter(([e])=>!x(e)).map(([e,t])=>[e,{mode:t.mode}]));function C(e){try{return JSON.parse(e),!0}catch{return!1}}export{m as a,g as c,y as i,h as l,_ as n,l as o,v as r,p as s,S as t,i as u};
|
|
2
|
-
//# sourceMappingURL=registry-B64xvGV5.js.map
|