@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,133 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./graphlib-Bg9XziCe.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-7ugfKe9P.js";import{O as r,T as i,a,b as o,c as s,it as c,s as l,x as u,z as d}from"./chunk-WYO6CB5R-DrXopwXN.js";import{t as f}from"./channel-D3H3pkY4.js";import{f as p}from"./src-BC8fyS2p.js";import{A as m,C as h,D as g,E as _,G as v,M as y,N as b,O as x,P as S,S as C,T as w,Y as T,_ as E,b as D,d as O,f as k,g as A,h as j,j as ee,k as te,m as ne,p as re,v as ie,w as ae,x as oe,y as se}from"./isArrayLikeObject-DK5GhsCu.js";import{a as ce,g as M,l as le,v as ue}from"./chunk-ICXQ74PX-CBGBbB0s.js";import"./chunk-HOUHSVGY-KCI5VyfN.js";import{n as N}from"./chunk-Q4XR5HBZ-Ckl7D0pA.js";import{t as de}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{n as fe,t as P}from"./chunk-7BUUIJ7U-Bb538aSH.js";import{n as pe,t as me}from"./chunk-OGEWGWER-tXhe91qF.js";function he(e){return Array.isArray(e)}function ge(e){if(S(e))return e;let t=b(e);if(!_e(e))return{};if(he(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ue(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?be(r,e):ve(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return ve(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return xe(n,e),ve(n,e),ye(n,e),n}function _e(e){switch(b(e)){case O:case re:case k:case j:case ne:case A:case E:case ie:case oe:case se:case D:case C:case h:case ae:case w:case _:case g:case x:case ee:case y:case te:case m:return!0;default:return!1}}function ve(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function ye(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function be(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function xe(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var Se=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(h,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},e(d,[2,27]),e(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},e(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var ee=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);ee=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
-
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(ee,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:t(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:t(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:t(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return t(v,`Parser`),v.prototype=_,_.Parser=v,new v})();Se.parser=Se;var Ce=Se,F=new Map,we=[],Te=new Map,Ee=`color`,De=`fill`,Oe=`bgFill`,ke=`,`,I=new Map,Ae=``,je=t(e=>l.sanitizeText(e,u()),`sanitizeText`),Me=t(function(e,t=``){let n=I.get(e);n||(n={id:e,styles:[],textStyles:[]},I.set(e,n)),t?.split(ke).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Ee).exec(e)){let e=t.replace(De,Oe).replace(Ee,De);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),Ne=t(function(e,t=``){let n=F.get(e);t!=null&&(n.styles=t.split(ke))},`addStyle2Node`),Pe=t(function(e,t){e.split(`,`).forEach(function(e){let n=F.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},F.set(t,n)}n.classes||=[],n.classes.push(t)})},`setCssClass`),Fe=t((e,t)=>{let r=e.flat(),i=[],a=r.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of r){if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&n.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&=je(e.label),e.type===`classDef`){Me(e.id,e.css);continue}if(e.type===`applyClass`){Pe(e.id,e?.styleClass??``);continue}if(e.type===`applyStyles`){e?.stylesStr&&Ne(e.id,e?.stylesStr);continue}if(e.type===`column-setting`)t.columns=e.columns??-1;else if(e.type===`edge`){let t=(Te.get(e.id)??0)+1;Te.set(e.id,t),e.id=t+`-`+e.id,we.push(e)}else{e.label||(e.type===`composite`?e.label=``:e.label=e.id);let t=F.get(e.id);if(t===void 0?F.set(e.id,e):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&Fe(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n<t;n++){let t=ge(e);t.id=t.id+`-`+n,F.set(t.id,t),i.push(t)}}else t===void 0&&i.push(e)}}t.children=i},`populateBlockDatabase`),Ie=[],L={id:`root`,type:`composite`,children:[],columns:-1},Le=t(()=>{n.debug(`Clear called`),a(),L={id:`root`,type:`composite`,children:[],columns:-1},F=new Map([[`root`,L]]),Ie=[],I=new Map,we=[],Te=new Map,Ae=``},`clear`);function Re(e){switch(n.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return n.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}t(Re,`typeStr2Type`);function ze(e){switch(n.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}t(ze,`edgeTypeStr2Type`);function Be(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}t(Be,`edgeStrToEdgeData`);function Ve(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}t(Ve,`edgeStrToEdgeStartData`);function He(e){return e.includes(`==`)?`thick`:`normal`}t(He,`edgeStrToThickness`);function Ue(e){return e.includes(`.-`)?`dotted`:`solid`}t(Ue,`edgeStrToPattern`);var We=0,Ge={getConfig:t(()=>o().block,`getConfig`),typeStr2Type:Re,edgeTypeStr2Type:ze,edgeStrToEdgeData:Be,edgeStrToEdgeStartData:Ve,edgeStrToThickness:He,edgeStrToPattern:Ue,getLogger:t(()=>n,`getLogger`),getBlocksFlat:t(()=>[...F.values()],`getBlocksFlat`),getBlocks:t(()=>Ie||[],`getBlocks`),getEdges:t(()=>we,`getEdges`),setHierarchy:t(e=>{L.children=e,Fe(e,L),Ie=L.children},`setHierarchy`),getBlock:t(e=>F.get(e),`getBlock`),setBlock:t(e=>{F.set(e.id,e)},`setBlock`),getColumns:t(e=>{let t=F.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:t(function(){return I},`getClasses`),clear:Le,generateId:t(()=>(We++,`id-`+Math.random().toString(36).substr(2,12)+`-`+We),`generateId`),setDiagramId:t(e=>{Ae=e},`setDiagramId`),getDiagramId:t(()=>Ae,`getDiagramId`)},R=t((e,t)=>{let n=f;return c(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),Ke=t(e=>`.label {
|
|
7
|
-
font-family: ${e.fontFamily};
|
|
8
|
-
color: ${e.nodeTextColor||e.textColor};
|
|
9
|
-
}
|
|
10
|
-
.cluster-label text {
|
|
11
|
-
fill: ${e.titleColor};
|
|
12
|
-
}
|
|
13
|
-
.cluster-label span,p {
|
|
14
|
-
color: ${e.titleColor};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.label text,span,p {
|
|
20
|
-
fill: ${e.nodeTextColor||e.textColor};
|
|
21
|
-
color: ${e.nodeTextColor||e.textColor};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.node rect,
|
|
25
|
-
.node circle,
|
|
26
|
-
.node ellipse,
|
|
27
|
-
.node polygon,
|
|
28
|
-
.node path {
|
|
29
|
-
fill: ${e.mainBkg};
|
|
30
|
-
stroke: ${e.nodeBorder};
|
|
31
|
-
stroke-width: 1px;
|
|
32
|
-
}
|
|
33
|
-
.flowchart-label text {
|
|
34
|
-
text-anchor: middle;
|
|
35
|
-
}
|
|
36
|
-
// .flowchart-label .text-outer-tspan {
|
|
37
|
-
// text-anchor: middle;
|
|
38
|
-
// }
|
|
39
|
-
// .flowchart-label .text-inner-tspan {
|
|
40
|
-
// text-anchor: start;
|
|
41
|
-
// }
|
|
42
|
-
|
|
43
|
-
.node .label {
|
|
44
|
-
text-align: center;
|
|
45
|
-
}
|
|
46
|
-
.node.clickable {
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.arrowheadPath {
|
|
51
|
-
fill: ${e.arrowheadColor};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.edgePath .path {
|
|
55
|
-
stroke: ${e.lineColor};
|
|
56
|
-
stroke-width: 2.0px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.flowchart-link {
|
|
60
|
-
stroke: ${e.lineColor};
|
|
61
|
-
fill: none;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.edgeLabel {
|
|
65
|
-
background-color: ${e.edgeLabelBackground};
|
|
66
|
-
/*
|
|
67
|
-
* This is for backward compatibility with existing code that didn't
|
|
68
|
-
* add a \`<p>\` around edge labels.
|
|
69
|
-
*
|
|
70
|
-
* TODO: We should probably remove this in a future release.
|
|
71
|
-
*/
|
|
72
|
-
p {
|
|
73
|
-
margin: 0;
|
|
74
|
-
padding: 0;
|
|
75
|
-
display: inline;
|
|
76
|
-
}
|
|
77
|
-
rect {
|
|
78
|
-
opacity: 0.5;
|
|
79
|
-
background-color: ${e.edgeLabelBackground};
|
|
80
|
-
fill: ${e.edgeLabelBackground};
|
|
81
|
-
}
|
|
82
|
-
text-align: center;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/* For html labels only */
|
|
86
|
-
.labelBkg {
|
|
87
|
-
background-color: ${e.edgeLabelBackground};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.node .cluster {
|
|
91
|
-
// fill: ${R(e.mainBkg,.5)};
|
|
92
|
-
fill: ${R(e.clusterBkg,.5)};
|
|
93
|
-
stroke: ${R(e.clusterBorder,.2)};
|
|
94
|
-
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
95
|
-
stroke-width: 1px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.cluster text {
|
|
99
|
-
fill: ${e.titleColor};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.cluster span,p {
|
|
103
|
-
color: ${e.titleColor};
|
|
104
|
-
}
|
|
105
|
-
/* .cluster div {
|
|
106
|
-
color: ${e.titleColor};
|
|
107
|
-
} */
|
|
108
|
-
|
|
109
|
-
div.mermaidTooltip {
|
|
110
|
-
position: absolute;
|
|
111
|
-
text-align: center;
|
|
112
|
-
max-width: 200px;
|
|
113
|
-
padding: 2px;
|
|
114
|
-
font-family: ${e.fontFamily};
|
|
115
|
-
font-size: 12px;
|
|
116
|
-
background: ${e.tertiaryColor};
|
|
117
|
-
border: 1px solid ${e.border2};
|
|
118
|
-
border-radius: 2px;
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
z-index: 100;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.flowchartTitleText {
|
|
124
|
-
text-anchor: middle;
|
|
125
|
-
font-size: 18px;
|
|
126
|
-
fill: ${e.textColor};
|
|
127
|
-
}
|
|
128
|
-
${de()}
|
|
129
|
-
`,`getStyles`),qe=t((e,t,n,r)=>{t.forEach(t=>{Je[t](e,n,r)})},`insertMarkers`),Je={extension:t((e,t,r)=>{n.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`)},`extension`),composition:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6)},`lollipop`),point:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,6).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`point`),circle:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`circle`),cross:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`)},`cross`),barb:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`)},Ye=qe;function z(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}t(z,`calculateBlockPosition`);var Xe=t(e=>{let t=0,r=0;for(let i of e.children){let{width:e,height:a,x:o,y:s}=i.size??{width:0,height:0,x:0,y:0};if(n.debug(`getMaxChildSize abc95 child:`,i.id,`width:`,e,`height:`,a,`x:`,o,`y:`,s,i.type),i.type===`space`)continue;let c=e/(i.widthInColumns??1);c>t&&(t=c),a>r&&(r=a)}return{width:t,height:r}},`getMaxChildSize`);function B(e,t,r=0,i=0,a=8){n.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,r),e?.size?.width||(e.size={width:r,height:i,x:0,y:0});let o=0,s=0;if(e.children?.length>0){for(let n of e.children)B(n,t,0,0,a);let c=Xe(e);o=c.width,s=c.height,n.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,o,s);for(let t of e.children)t.size&&(n.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${o} ${s} ${JSON.stringify(t.size)}`),t.size.width=o*(t.widthInColumns??1)+a*((t.widthInColumns??1)-1),t.size.height=s,t.size.x=0,t.size.y=0,n.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${o} maxHeight:${s}`));for(let n of e.children)B(n,t,o,s,a);let l=e.columns??-1,u=0;for(let t of e.children)u+=t.widthInColumns??1;let d=e.children.length;l>0&&l<u&&(d=l);let f=Math.ceil(u/d),p=d*(o+a)+a,m=f*(s+a)+a;if(p<r){n.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${r} siblingHeight ${i} width ${p}`),p=r,m=i;let t=(r-d*a-a)/d,c=(i-f*a-a)/f;n.debug(`Size indata abc88`,e.id,`childWidth`,t,`maxWidth`,o),n.debug(`Size indata abc88`,e.id,`childHeight`,c,`maxHeight`,s),n.debug(`Size indata abc88 xSize`,d,`padding`,a);for(let n of e.children)n.size&&(n.size.width=t,n.size.height=c,n.size.x=0,n.size.y=0)}if(n.debug(`abc95 (finale calc) ${e.id} xSize ${d} ySize ${f} columns ${l}${e.children.length} width=${Math.max(p,e.size?.width||0)}`),p<(e?.size?.width||0)){p=e?.size?.width||0;let t=l>0?Math.min(e.children.length,l):e.children.length;if(t>0){let r=(p-t*a-a)/t;n.debug(`abc95 (growing to fit) width`,e.id,p,e.size?.width,r);for(let t of e.children)t.size&&(t.size.width=r)}}e.size={width:p,height:m,x:0,y:0}}n.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}t(B,`setBlockSizes`);function V(e,t,r=8){n.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(n.debug(`layoutBlocks columns abc95`,e.id,`=>`,i,e),e.children&&e.children.length>0){let a=e?.children[0]?.size?.width??0,o=e.children.length*a+(e.children.length-1)*r;n.debug(`widthOfChildren 88`,o,`posX`);let s=new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=z(i,t),r=s.get(e)??0;n.size.height>r&&s.set(e,n.size.height);let a=n?.widthInColumns??1;i>0&&(a=Math.min(a,i-t%i)),t+=a}}let c=new Map;{let e=0,t=[...s.keys()].sort((e,t)=>e-t);for(let n of t)c.set(n,e),e+=(s.get(n)??0)+r}let l=0;n.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,d=0;for(let a of e.children){let o=e;if(!a.size)continue;let{width:f,height:p}=a.size,{px:m,py:h}=z(i,l);if(h!=d&&(d=h,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,n.debug(`New row in layout for block`,e.id,` and child `,a.id,d)),n.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`),o.size){let e=f/2;a.size.x=u+r+e,n.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${e} padding=${r} width=${f} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(a?.widthInColumns??1)/2}`),u=a.size.x+e;let t=c.get(h)??0,i=s.get(h)??p;a.size.y=o.size.y-o.size.height/2+t+i/2+r,n.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f*(a?.widthInColumns??1)/2}`)}a.children&&V(a,t,r);let g=a?.widthInColumns??1;i>0&&(g=Math.min(g,i-l%i)),l+=g,n.debug(`abc88 columnsPos`,a,l)}}n.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}t(V,`layoutBlocks`);function H(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2<t&&(t=a-s/2),o-c/2<n&&(n=o-c/2),a+s/2>r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=H(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}t(H,`findBounds`);function Ze(e){let t=e.getBlock(`root`);if(!t)return;let r=u()?.block?.padding??8;B(t,e,0,0,r),V(t,e,r),n.debug(`getBlocks`,JSON.stringify(t,null,2));let{minX:i,minY:a,maxX:o,maxY:s}=H(t),c=s-a;return{x:i,y:a,width:o-i,height:c}}t(Ze,`layout`);var U=t(async(e,t,n,r=!1,a=!1)=>{let o=t||``;typeof o==`object`&&(o=o[0]);let s=u(),c=i(s);return await N(e,o,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:a,width:1/0},s)},`createLabel`),Qe=t((e,t,n,r,i)=>{t.arrowTypeStart&&et(e,`start`,t.arrowTypeStart,n,r,i),t.arrowTypeEnd&&et(e,`end`,t.arrowTypeEnd,n,r,i)},`addEdgeMarkers`),$e={arrow_cross:`cross`,arrow_point:`point`,arrow_barb:`barb`,arrow_circle:`circle`,aggregation:`aggregation`,extension:`extension`,composition:`composition`,dependency:`dependency`,lollipop:`lollipop`},et=t((e,t,r,i,a,o)=>{let s=$e[r];if(!s){n.warn(`Unknown arrow type: ${r}`);return}let c=t===`start`?`Start`:`End`;e.attr(`marker-${t}`,`url(${i}#${a}_${o}-${s}${c})`)},`addEdgeMarker`),tt={},W={},nt=t(async(e,t)=>{let n=u(),r=i(n),a=e.insert(`g`).attr(`class`,`edgeLabel`),o=a.insert(`g`).attr(`class`,`label`),s=t.labelType===`markdown`,c=await N(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:s,isNode:!1,markdown:s,width:s?void 0:1/0},n);o.node().appendChild(c);let l=c.getBBox(),d=l;if(r){let e=c.children[0],t=p(c);l=e.getBoundingClientRect(),d=l,t.attr(`width`,l.width),t.attr(`height`,l.height)}else{let e=p(c).select(`text`).node();e&&typeof e.getBBox==`function`&&(d=e.getBBox())}o.attr(`transform`,P(d,r)),tt[t.id]=a,t.width=l.width,t.height=l.height;let f;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await U(i,t.startLabelLeft,t.labelStyle);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=p(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,P(o,r)),W[t.id]||(W[t.id]={}),W[t.id].startLeft=n,G(f,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await U(i,t.startLabelRight,t.labelStyle);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=p(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,P(o,r)),W[t.id]||(W[t.id]={}),W[t.id].startRight=n,G(f,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await U(n,t.endLabelLeft,t.labelStyle);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=p(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,P(o,r)),W[t.id]||(W[t.id]={}),W[t.id].endLeft=n,G(f,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await U(n,t.endLabelRight,t.labelStyle);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=p(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,P(o,r)),W[t.id]||(W[t.id]={}),W[t.id].endRight=n,G(f,t.endLabelRight)}return c},`insertEdgeLabel`);function G(e,t){i(u())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}t(G,`setTerminalWidth`);var rt=t((e,t)=>{n.debug(`Moving label abc88 `,e.id,e.label,tt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:i}=pe(u());if(e.label){let a=tt[e.id],o=e.x,s=e.y;if(r){let i=M.calcLabelPosition(r);n.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),t.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(e.startLabelLeft){let t=W[e.id].startLeft,n=e.x,i=e.y;if(r){let t=M.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=W[e.id].startRight,n=e.x,i=e.y;if(r){let t=M.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=W[e.id].endLeft,n=e.x,i=e.y;if(r){let t=M.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=W[e.id].endRight,n=e.x,i=e.y;if(r){let t=M.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),it=t((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),at=t((e,t,r)=>{n.debug(`intersection calc abc89:
|
|
130
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
131
|
-
insidePoint : ${JSON.stringify(r)}
|
|
132
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.x<t.x?s-o:s+o,l=e.height/2,u=Math.abs(t.y-r.y),d=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*s>Math.abs(i-t.x)*l){let e=r.y<t.y?t.y-l-a:a-l-t.y;c=d*e/u;let i={x:r.x<t.x?r.x+c:r.x-d+c,y:r.y<t.y?r.y+u-e:r.y-u+e};return c===0&&(i.x=t.x,i.y=t.y),d===0&&(i.x=t.x),u===0&&(i.y=t.y),n.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${c}`,i),i}else{c=r.x<t.x?t.x-s-i:i-s-t.x;let e=u*c/d,a=r.x<t.x?r.x+d-c:r.x-d+c,o=r.y<t.y?r.y+e:r.y-e;return n.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`,{_x:a,_y:o}),c===0&&(a=t.x,o=t.y),d===0&&(a=t.x),u===0&&(o=t.y),{x:a,y:o}}},`intersection`),ot=t((e,t)=>{n.debug(`abc88 cutPathAtIntersect`,e,t);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(!it(t,e)&&!a){let n=at(t,i,e),o=!1;r.forEach(e=>{o||=e.x===n.x&&e.y===n.y}),r.some(e=>e.x===n.x&&e.y===n.y)||r.push(n),a=!0}else i=e,a||r.push(e)}),r},`cutPathAtIntersect`),st=t(function(e,t,i,a,o,s,c){let l=i.points;n.debug(`abc88 InsertEdge: edge=`,i,`e=`,t);let d=!1,f=s.node(t.v);var p=s.node(t.w);p?.intersect&&f?.intersect&&(l=l.slice(1,i.points.length-1),l.unshift(f.intersect(l[0])),l.push(p.intersect(l[l.length-1]))),i.toCluster&&(n.debug(`to cluster abc88`,a[i.toCluster]),l=ot(i.points,a[i.toCluster].node),d=!0),i.fromCluster&&(n.debug(`from cluster abc88`,a[i.fromCluster]),l=ot(l.reverse(),a[i.fromCluster].node).reverse(),d=!0);let m=l.filter(e=>!Number.isNaN(e.y)),h=v;i.curve&&(o===`graph`||o===`flowchart`)&&(h=i.curve);let{x:g,y:_}=fe(i),y=T().x(g).y(_).curve(h),b;switch(i.thickness){case`normal`:b=`edge-thickness-normal`;break;case`thick`:b=`edge-thickness-thick`;break;case`invisible`:b=`edge-thickness-thick`;break;default:b=``}switch(i.pattern){case`solid`:b+=` edge-pattern-solid`;break;case`dotted`:b+=` edge-pattern-dotted`;break;case`dashed`:b+=` edge-pattern-dashed`;break}let x=e.append(`path`).attr(`d`,y(m)).attr(`id`,i.id).attr(`class`,` `+b+(i.classes?` `+i.classes:``)).attr(`style`,i.style),S=``;(u().flowchart.arrowMarkerAbsolute||u().state.arrowMarkerAbsolute)&&(S=r(!0)),Qe(x,i,S,c,o);let C={};return d&&(C.updatedPath=l),C.originalPath=i.points,C},`insertEdge`),ct=t(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),lt=t((e,t,n,r)=>{let i=ct(e),a=t.height+2*n.padding,o=a/2,s=r??t.width+2*o+n.padding,c=n.padding/2;return i.has(`right`)&&i.has(`left`)&&i.has(`up`)&&i.has(`down`)?[{x:0,y:0},{x:o,y:0},{x:s/2,y:2*c},{x:s-o,y:0},{x:s,y:0},{x:s,y:-a/3},{x:s+2*c,y:-a/2},{x:s,y:-2*a/3},{x:s,y:-a},{x:s-o,y:-a},{x:s/2,y:-a-2*c},{x:o,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*c,y:-a/2},{x:0,y:-a/3}]:i.has(`right`)&&i.has(`left`)&&i.has(`up`)?[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`right`)&&i.has(`left`)&&i.has(`down`)?[{x:0,y:0},{x:o,y:-a},{x:s-o,y:-a},{x:s,y:0}]:i.has(`right`)&&i.has(`up`)&&i.has(`down`)?[{x:0,y:0},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a}]:i.has(`left`)&&i.has(`up`)&&i.has(`down`)?[{x:s,y:0},{x:0,y:-o},{x:0,y:-a+o},{x:s,y:-a}]:i.has(`right`)&&i.has(`left`)?[{x:o,y:0},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`up`)&&i.has(`down`)?[{x:s/2,y:0},{x:0,y:-c},{x:o,y:-c},{x:o,y:-a+c},{x:0,y:-a+c},{x:s/2,y:-a},{x:s,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c},{x:s,y:-c}]:i.has(`right`)&&i.has(`up`)?[{x:0,y:0},{x:s,y:-o},{x:0,y:-a}]:i.has(`right`)&&i.has(`down`)?[{x:0,y:0},{x:s,y:0},{x:0,y:-a}]:i.has(`left`)&&i.has(`up`)?[{x:s,y:0},{x:0,y:-o},{x:s,y:-a}]:i.has(`left`)&&i.has(`down`)?[{x:s,y:0},{x:0,y:0},{x:s,y:-a}]:i.has(`right`)?[{x:o,y:-c},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a+c}]:i.has(`left`)?[{x:o,y:0},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`up`)?[{x:o,y:-c},{x:o,y:-a+c},{x:0,y:-a+c},{x:s/2,y:-a},{x:s,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c}]:i.has(`down`)?[{x:s/2,y:0},{x:0,y:-c},{x:o,y:-c},{x:o,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c},{x:s,y:-c}]:[{x:0,y:0}]},`getArrowPoints`);function ut(e,t){return e.intersect(t)}t(ut,`intersectNode`);var dt=ut;function ft(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}t(ft,`intersectEllipse`);var pt=ft;function mt(e,t,n){return pt(e,t,t,n)}t(mt,`intersectCircle`);var ht=mt;function gt(e,t,n,r){var i=t.y-e.y,a,o=e.x-t.x,s,c=t.x*e.y-e.x*t.y,l,u,d,f=i*n.x+o*n.y+c,p=i*r.x+o*r.y+c,m,h,g,_,v;if(!(f!==0&&p!==0&&_t(f,p))&&(a=r.y-n.y,s=n.x-r.x,l=r.x*n.y-n.x*r.y,u=a*e.x+s*e.y+l,d=a*t.x+s*t.y+l,!(u!==0&&d!==0&&_t(u,d))&&(m=i*s-a*o,m!==0)))return h=Math.abs(m/2),g=o*l-s*c,_=g<0?(g-h)/m:(g+h)/m,g=a*c-i*l,v=g<0?(g-h)/m:(g+h)/m,{x:_,y:v}}t(gt,`intersectLine`);function _t(e,t){return e*t>0}t(_t,`sameSign`);var vt=gt,yt=bt;function bt(e,t,n){var r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));for(var c=r-e.width/2-o,l=i-e.height/2-s,u=0;u<t.length;u++){var d=t[u],f=t[u<t.length-1?u+1:0],p=vt(e,n,{x:c+d.x,y:l+d.y},{x:c+f.x,y:l+f.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(e,t){var r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}t(bt,`intersectPolygon`);var K={node:dt,circle:ht,ellipse:pt,polygon:yt,rect:t((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`)},q=t(async(e,t,n,r)=>{let a=u(),o,s=t.useHtmlLabels||i(a);o=n||`node default`;let c=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),l=c.insert(`g`).attr(`class`,`label`).attr(`style`,t.labelStyle),f;f=t.labelText===void 0?``:typeof t.labelText==`string`?t.labelText:t.labelText[0];let m;m=t.labelType===`markdown`?N(l,d(ce(f),a),{useHtmlLabels:s,width:t.width||a.flowchart.wrappingWidth,classes:`markdown-node-label`},a):await U(l,d(ce(f),a),t.labelStyle,!1,r);let h=m.getBBox(),g=t.padding/2;if(i(a)){let e=m.children[0],t=p(m);await me(e,f),h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}return s?l.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):l.attr(`transform`,`translate(0, `+-h.height/2+`)`),t.centerLabel&&l.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:h,halfPadding:g,label:l}},`labelHelper`),J=t((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`);function Y(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}t(Y,`insertPolygonShape`);var xt=t(async(e,t)=>{t.useHtmlLabels||i(u())||(t.centerLabel=!0);let{shapeSvg:r,bbox:a,halfPadding:o}=await q(e,t,`node `+t.classes,!0);n.info(`Classes = `,t.classes);let s=r.insert(`rect`,`:first-child`);return s.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,-a.width/2-o).attr(`y`,-a.height/2-o).attr(`width`,a.width+t.padding).attr(`height`,a.height+t.padding),J(t,s),t.intersect=function(e){return K.rect(t,e)},r},`note`),St=t(e=>e?` `+e:``,`formatClass`),X=t((e,t)=>`${t||`node default`}${St(e.classes)} ${St(e.class)}`,`getClassesFromNode`),Ct=t(async(e,t)=>{let{shapeSvg:r,bbox:i}=await q(e,t,X(t,void 0),!0),a=i.width+t.padding+(i.height+t.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];n.info(`Question main (Circle)`);let s=Y(r,a,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return n.warn(`Intersect called`),K.polygon(t,o,e)},r},`question`),wt=t((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id);return n.insert(`polygon`,`:first-child`).attr(`points`,[{x:0,y:28/2},{x:28/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}].map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`state-start`).attr(`r`,7).attr(`width`,28).attr(`height`,28),t.width=28,t.height=28,t.intersect=function(e){return K.circle(t,14,e)},n},`choice`),Tt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=t.positioned?t.height:r.height+t.padding,a=i/4,o=t.positioned?t.width:r.width+2*a+t.padding,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],c=Y(n,o,i,s);return c.attr(`style`,t.style),J(t,c),t.intersect=function(e){return K.polygon(t,s,e)},n},`hexagon`),Et=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,void 0,!0),i=r.height+2*t.padding,a=i/2,o=r.width+2*a+t.padding,s=t.positioned&&(t.widthInColumns??1)>1&&t.width>o?t.width:o,c=lt(t.directions,r,t,s),l=Y(n,s,i,c);return l.attr(`style`,t.style),J(t,l),t.intersect=function(e){return K.polygon(t,c,e)},n},`block_arrow`),Dt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Y(n,i,a,o).attr(`style`,t.style),t.width=i+a,t.height=a,t.intersect=function(e){return K.polygon(t,o,e)},n},`rect_left_inv_arrow`),Ot=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`lean_right`),kt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`lean_left`),At=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`trapezoid`),jt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`inv_trapezoid`),Mt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`rect_right_inv_arrow`),Nt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=i/2,o=a/(2.5+i/50),s=r.height+o+t.padding,c=`M 0,`+o+` a `+a+`,`+o+` 0,0,0 `+i+` 0 a `+a+`,`+o+` 0,0,0 `+-i+` 0 l 0,`+s+` a `+a+`,`+o+` 0,0,0 `+i+` 0 l 0,`+-s;return J(t,n.attr(`label-offset-y`,o).insert(`path`,`:first-child`).attr(`style`,t.style).attr(`d`,c).attr(`transform`,`translate(`+-i/2+`,`+-(s/2+o)+`)`)),t.intersect=function(e){let n=K.rect(t,e),r=n.x-t.x;if(a!=0&&(Math.abs(r)<t.width/2||Math.abs(r)==t.width/2&&Math.abs(n.y-t.y)>t.height/2-o)){let i=o*o*(1-r*r/(a*a));i!=0&&(i=Math.sqrt(i)),i=o-i,e.y-t.y>0&&(i=-i),n.y+=i}return n},n},`cylinder`),Pt=t(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(e,t,`node `+t.classes+` `+t.class,!0),o=r.insert(`rect`,`:first-child`),s=t.positioned?t.width:i.width+t.padding,c=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-a,u=t.positioned?-c/2:-i.height/2-a;if(o.attr(`class`,`basic label-container`).attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(Z(o,t.props.borders,s,c),e.delete(`borders`)),e.forEach(e=>{n.warn(`Unknown node property ${e}`)})}return J(t,o),t.intersect=function(e){return K.rect(t,e)},r},`rect`),Ft=t(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(e,t,`node `+t.classes,!0),o=r.insert(`rect`,`:first-child`),s=t.positioned?t.width:i.width+t.padding,c=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-a,u=t.positioned?-c/2:-i.height/2-a;if(o.attr(`class`,`basic cluster composite label-container`).attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(Z(o,t.props.borders,s,c),e.delete(`borders`)),e.forEach(e=>{n.warn(`Unknown node property ${e}`)})}return J(t,o),t.intersect=function(e){return K.rect(t,e)},r},`composite`),It=t(async(e,t)=>{let{shapeSvg:r}=await q(e,t,`label`,!0);n.trace(`Classes = `,t.class);let i=r.insert(`rect`,`:first-child`);if(i.attr(`width`,0).attr(`height`,0),r.attr(`class`,`label edgeLabel`),t.props){let e=new Set(Object.keys(t.props));t.props.borders&&(Z(i,t.props.borders,0,0),e.delete(`borders`)),e.forEach(e=>{n.warn(`Unknown node property ${e}`)})}return J(t,i),t.intersect=function(e){return K.rect(t,e)},r},`labelRect`);function Z(e,r,i,a){let o=[],s=t(e=>{o.push(e,0)},`addBorder`),c=t(e=>{o.push(0,e)},`skipBorder`);r.includes(`t`)?(n.debug(`add top border`),s(i)):c(i),r.includes(`r`)?(n.debug(`add right border`),s(a)):c(a),r.includes(`b`)?(n.debug(`add bottom border`),s(i)):c(i),r.includes(`l`)?(n.debug(`add left border`),s(a)):c(a),e.attr(`stroke-dasharray`,o.join(` `))}t(Z,`applyNodePropertyBorders`);var Lt=t(async(e,t)=>{let r;r=t.classes?`node `+t.classes:`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`rect`,`:first-child`),s=a.insert(`line`),c=a.insert(`g`).attr(`class`,`label`),l=t.labelText.flat?t.labelText.flat():t.labelText,d=``;d=typeof l==`object`?l[0]:l,n.info(`Label text abc79`,d,l,typeof l==`object`);let f=await U(c,d,t.labelStyle,!0,!0),m={width:0,height:0};if(i(u())){let e=f.children[0],t=p(f);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}n.info(`Text 2`,l);let h=l.slice(1,l.length),g=f.getBBox(),_=await U(c,h.join?h.join(`<br/>`):h,t.labelStyle,!0,!0);if(i(u())){let e=_.children[0],t=p(_);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}let v=t.padding/2;return p(_).attr(`transform`,`translate( `+(m.width>g.width?0:(g.width-m.width)/2)+`, `+(g.height+v+5)+`)`),p(f).attr(`transform`,`translate( `+(m.width<g.width?0:-(g.width-m.width)/2)+`, 0)`),m=c.node().getBBox(),c.attr(`transform`,`translate(`+-m.width/2+`, `+(-m.height/2-v+3)+`)`),o.attr(`class`,`outer title-state`).attr(`x`,-m.width/2-v).attr(`y`,-m.height/2-v).attr(`width`,m.width+t.padding).attr(`height`,m.height+t.padding),s.attr(`class`,`divider`).attr(`x1`,-m.width/2-v).attr(`x2`,m.width/2+v).attr(`y1`,-m.height/2-v+g.height+v).attr(`y2`,-m.height/2-v+g.height+v),J(t,o),t.intersect=function(e){return K.rect(t,e)},a},`rectWithTitle`),Rt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.height+t.padding,a=r.width+i/4+t.padding;return J(t,n.insert(`rect`,`:first-child`).attr(`style`,t.style).attr(`rx`,i/2).attr(`ry`,i/2).attr(`x`,-a/2).attr(`y`,-i/2).attr(`width`,a).attr(`height`,i)),t.intersect=function(e){return K.rect(t,e)},n},`stadium`),zt=t(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(e,t,X(t,void 0),!0),o=r.insert(`circle`,`:first-child`);return o.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,i.width/2+a).attr(`width`,i.width+t.padding).attr(`height`,i.height+t.padding),n.info(`Circle main`),J(t,o),t.intersect=function(e){return n.info(`Circle intersect`,t,i.width/2+a,e),K.circle(t,i.width/2+a,e)},r},`circle`),Bt=t(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(e,t,X(t,void 0),!0),o=r.insert(`g`,`:first-child`),s=o.insert(`circle`),c=o.insert(`circle`);return o.attr(`class`,t.class),s.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,i.width/2+a+5).attr(`width`,i.width+t.padding+10).attr(`height`,i.height+t.padding+10),c.attr(`style`,t.style).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`r`,i.width/2+a).attr(`width`,i.width+t.padding).attr(`height`,i.height+t.padding),n.info(`DoubleCircle main`),J(t,s),t.intersect=function(e){return n.info(`DoubleCircle intersect`,t,i.width/2+a+5,e),K.circle(t,i.width/2+a+5,e)},r},`doublecircle`),Vt=t(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`subroutine`),Ht=t((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`);return r.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),J(t,r),t.intersect=function(e){return K.circle(t,7,e)},n},`start`),Ut=t((e,t,n)=>{let r=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),i=70,a=10;return n===`LR`&&(i=10,a=70),J(t,r.append(`rect`).attr(`x`,-1*i/2).attr(`y`,-1*a/2).attr(`width`,i).attr(`height`,a).attr(`class`,`fork-join`)),t.height+=t.padding/2,t.width+=t.padding/2,t.intersect=function(e){return K.rect(t,e)},r},`forkJoin`),Wt={rhombus:Ct,composite:Ft,question:Ct,rect:Pt,labelRect:It,rectWithTitle:Lt,choice:wt,circle:zt,doublecircle:Bt,stadium:Rt,hexagon:Tt,block_arrow:Et,rect_left_inv_arrow:Dt,lean_right:Ot,lean_left:kt,trapezoid:At,inv_trapezoid:jt,rect_right_inv_arrow:Mt,cylinder:Nt,start:Ht,end:t((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`),i=n.insert(`circle`,`:first-child`);return i.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),r.attr(`class`,`state-end`).attr(`r`,5).attr(`width`,10).attr(`height`,10),J(t,i),t.intersect=function(e){return K.circle(t,7,e)},n},`end`),note:xt,subroutine:Vt,fork:Ut,join:Ut,class_box:t(async(e,t)=>{let n=t.padding/2,r;r=t.classes?`node `+t.classes:`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`rect`,`:first-child`),s=a.insert(`line`),c=a.insert(`line`),l=0,d=4,f=a.insert(`g`).attr(`class`,`label`),m=0,h=t.classData.annotations?.[0],g=await U(f,t.classData.annotations[0]?`«`+t.classData.annotations[0]+`»`:``,t.labelStyle,!0,!0),_=g.getBBox();if(i(u())){let e=g.children[0],t=p(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}t.classData.annotations[0]&&(d+=_.height+4,l+=_.width);let v=t.classData.label;t.classData.type!==void 0&&t.classData.type!==``&&(i(u())?v+=`<`+t.classData.type+`>`:v+=`<`+t.classData.type+`>`);let y=await U(f,v,t.labelStyle,!0,!0);p(y).attr(`class`,`classTitle`);let b=y.getBBox();if(i(u())){let e=y.children[0],t=p(y);b=e.getBoundingClientRect(),t.attr(`width`,b.width),t.attr(`height`,b.height)}d+=b.height+4,b.width>l&&(l=b.width);let x=[];t.classData.members.forEach(async e=>{let n=e.getDisplayDetails(),r=n.displayText;i(u())&&(r=r.replace(/</g,`<`).replace(/>/g,`>`));let a=await U(f,r,n.cssStyle?n.cssStyle:t.labelStyle,!0,!0),o=a.getBBox();if(i(u())){let e=a.children[0],t=p(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}o.width>l&&(l=o.width),d+=o.height+4,x.push(a)}),d+=8;let S=[];if(t.classData.methods.forEach(async e=>{let n=e.getDisplayDetails(),r=n.displayText;i(u())&&(r=r.replace(/</g,`<`).replace(/>/g,`>`));let a=await U(f,r,n.cssStyle?n.cssStyle:t.labelStyle,!0,!0),o=a.getBBox();if(i(u())){let e=a.children[0],t=p(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}o.width>l&&(l=o.width),d+=o.height+4,S.push(a)}),d+=8,h){let e=(l-_.width)/2;p(g).attr(`transform`,`translate( `+(-1*l/2+e)+`, `+-1*d/2+`)`),m=_.height+4}let C=(l-b.width)/2;return p(y).attr(`transform`,`translate( `+(-1*l/2+C)+`, `+(-1*d/2+m)+`)`),m+=b.height+4,s.attr(`class`,`divider`).attr(`x1`,-l/2-n).attr(`x2`,l/2+n).attr(`y1`,-d/2-n+8+m).attr(`y2`,-d/2-n+8+m),m+=8,x.forEach(e=>{p(e).attr(`transform`,`translate( `+-l/2+`, `+(-1*d/2+m+8/2)+`)`);let t=e?.getBBox();m+=(t?.height??0)+4}),m+=8,c.attr(`class`,`divider`).attr(`x1`,-l/2-n).attr(`x2`,l/2+n).attr(`y1`,-d/2-n+8+m).attr(`y2`,-d/2-n+8+m),m+=8,S.forEach(e=>{p(e).attr(`transform`,`translate( `+-l/2+`, `+(-1*d/2+m)+`)`);let t=e?.getBBox();m+=(t?.height??0)+4}),o.attr(`style`,t.style).attr(`class`,`outer title-state`).attr(`x`,-l/2-n).attr(`y`,-(d/2)-n).attr(`width`,l+t.padding).attr(`height`,d+t.padding),J(t,o),t.intersect=function(e){return K.rect(t,e)},a},`class_box`)},Q={},Gt=t(async(e,t,n)=>{let r,i;if(t.link){let a;u().securityLevel===`sandbox`?a=`_top`:t.linkTarget&&(a=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,a),i=await Wt[t.shape](r,t,n)}else i=await Wt[t.shape](e,t,n),r=i;return t.tooltip&&i.attr(`title`,t.tooltip),t.class&&i.attr(`class`,`node default `+t.class),Q[t.id]=r,t.haveCallback&&Q[t.id].attr(`class`,Q[t.id].attr(`class`)+` clickable`),r},`insertNode`),Kt=t(e=>{let t=Q[e.id];n.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);function qt(e,t,n=!1){let r=e,i=`default`;(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(` `)),i+=` flowchart-label`;let a=0,s=``,c;switch(r.type){case`round`:a=5,s=`rect`;break;case`composite`:a=0,s=`composite`,c=0;break;case`square`:s=`rect`;break;case`diamond`:s=`question`;break;case`hexagon`:s=`hexagon`;break;case`block_arrow`:s=`block_arrow`;break;case`odd`:s=`rect_left_inv_arrow`;break;case`lean_right`:s=`lean_right`;break;case`lean_left`:s=`lean_left`;break;case`trapezoid`:s=`trapezoid`;break;case`inv_trapezoid`:s=`inv_trapezoid`;break;case`rect_left_inv_arrow`:s=`rect_left_inv_arrow`;break;case`circle`:s=`circle`;break;case`ellipse`:s=`ellipse`;break;case`stadium`:s=`stadium`;break;case`subroutine`:s=`subroutine`;break;case`cylinder`:s=`cylinder`;break;case`group`:s=`rect`;break;case`doublecircle`:s=`doublecircle`;break;default:s=`rect`}let l=le(r?.styles??[]),u=r.label,d=r.size??{width:0,height:0,x:0,y:0},f=t.getDiagramId();return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:i,style:l.style,id:r.id,domId:f?`${f}-${r.id}`:r.id,directions:r.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:n,intersect:void 0,type:r.type,padding:c??o()?.block?.padding??0,widthInColumns:r.widthInColumns??1}}t(qt,`getNodeFromBlock`);async function Jt(e,t,n){let r=qt(t,n,!1);if(r.type===`group`)return;let i=await Gt(e,r,{config:o()}),a=i.node().getBBox(),s=n.getBlock(r.id);s.size={width:a.width,height:a.height,x:0,y:0,node:i},n.setBlock(s),i.remove()}t(Jt,`calculateBlockSize`);async function Yt(e,t,n){let r=qt(t,n,!0);n.getBlock(r.id).type!==`space`&&(await Gt(e,r,{config:o()}),t.intersect=r?.intersect,Kt(r))}t(Yt,`insertBlockPositioned`);async function $(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await $(e,i.children,n,r)}t($,`performOperations`);async function Xt(e,t,n){await $(e,t,n,Jt)}t(Xt,`calculateBlockSizes`);async function Zt(e,t,n){await $(e,t,n,Yt)}t(Zt,`insertBlocks`);async function Qt(t,n,r,i,a){let o=new e({multigraph:!0,compound:!0});o.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of r)e.size&&o.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let e of n)if(e.start&&e.end){let n=i.getBlock(e.start),r=i.getBlock(e.end);if(n?.size&&r?.size){let i=n.size,s=r.size,c=[{x:i.x,y:i.y},{x:i.x+(s.x-i.x)/2,y:i.y+(s.y-i.y)/2},{x:s.x,y:s.y}],l=a?`${a}-${e.id}`:e.id,u=`${e.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${e.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;st(t,{v:e.start,w:e.end,name:l},{...e,id:l,arrowTypeEnd:e.arrowTypeEnd,arrowTypeStart:e.arrowTypeStart,points:c,classes:u},void 0,`block`,o,a),e.label&&(await nt(t,{...e,label:e.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:e.arrowTypeEnd,arrowTypeStart:e.arrowTypeStart,points:c,classes:u}),rt({...e,x:c[1].x,y:c[1].y},{originalPath:c}))}}}t(Qt,`insertEdges`);var $t={parser:Ce,db:Ge,renderer:{draw:t(async function(e,t,r,i){let{securityLevel:a,block:c}=o(),l=i.db;l.setDiagramId(t);let u;a===`sandbox`&&(u=p(`#i`+t));let d=p(a===`sandbox`?u.nodes()[0].contentDocument.body:`body`),f=a===`sandbox`?d.select(`[id="${t}"]`):p(`[id="${t}"]`);Ye(f,[`point`,`circle`,`cross`],i.type,t);let m=l.getBlocks(),h=l.getBlocksFlat(),g=l.getEdges(),_=f.insert(`g`).attr(`class`,`block`);await Xt(_,m,l);let v=Ze(l);if(await Zt(_,m,l),await Qt(_,g,h,l,t),v){let e=v,t=Math.max(1,Math.round(.125*(e.width/e.height))),r=e.height+t+10,i=e.width+10,{useMaxWidth:a}=c;s(f,r,i,!!a),n.debug(`Here Bounds`,v,e),f.attr(`viewBox`,`${e.x-5} ${e.y-5} ${e.width+10} ${e.height+10}`)}},`draw`),getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`)},styles:Ke};export{$t as diagram};
|
|
133
|
-
//# sourceMappingURL=blockDiagram-677ZJIJ3-CQSMftlX.js.map
|
|
@@ -1,3 +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{An as l}from"./ProjectAvatar-DtI9dT1f.js";import{t as u}from"./badge-Cpc3eA-C.js";import{t as d}from"./tooltip-gjZ4s2dt.js";import{c as f,n as p}from"./toaster-BsYkODqs.js";import{$ as ee,L as m,Q as h,X as g,Y as _,Z as v,et as y,q as b,r as x}from"./Markdown-C9extmbX.js";import{a as S,r as C,t as w}from"./field-BadoNaN5.js";import{Jt as T,Kt as te,L as E,qt as ne}from"./DashboardLayout-BhHe0vIT.js";import{a as D,i as O,n as k,r as A,t as j}from"./alert-CPsXih3K.js";import{r as M,t as N}from"./card-By_Mbslh.js";import{n as P}from"./personalProject-DMRX2-SI.js";import{a as re,i as ie,n as ae,r as oe,t as se}from"./empty-state-T8EYr5NF.js";import{t as F}from"./errors-e711UMq7.js";import{r as I,t as L}from"./native-select-DL2k8x0o.js";import{t as R}from"./spacer-C38e7o6r.js";import{Y as z,Z as B,tt as ce}from"./immer-CFru3D02.js";import{t as V}from"./wrap-DlWOPhPw.js";import{n as H}from"./api-l6Cnm0vQ.js";import{t as U}from"./AiGatewayLayout-BFUOyL-l.js";import{t as le}from"./archive-CIpRF4hE.js";import{t as W}from"./boxes-BujxgyKh.js";import{t as G}from"./user-D8KRLURm.js";import{r as ue}from"./next-router-CWLrMXvP.js";import{D as de,Mr as K,Qn as fe,Un as q,Vt as pe,_r as me,nr as he,t as ge,ur as J}from"./index-CPtTUYLD.js";import{t as Y}from"./WithPermissionGuard-Cr6Aljmy.js";import{t as X}from"./FieldInfoTooltip-BlO6fteF.js";import{t as Z}from"./formatBudgetUsd-BYb25IkY.js";import{t as _e}from"./gatewayErrorCopy-m051Zq8m.js";import{t as ve}from"./BudgetEditDrawer-DhNs7V2e.js";import{t as ye}from"./GatewayErrorPanel-Cai5PzLy.js";var Q=e(t()),$=o(),be=[{kind:`ORGANIZATION`,label:`Organization`,icon:(0,$.jsx)(me,{size:14,"aria-hidden":!0})},{kind:`GROUP`,label:`Group`,icon:(0,$.jsx)(W,{size:14,"aria-hidden":!0})},{kind:`TEAM`,label:`Team`,icon:(0,$.jsx)(q,{size:14,"aria-hidden":!0})},{kind:`PROJECT`,label:`Project`,icon:(0,$.jsx)(J,{size:14,"aria-hidden":!0})},{kind:`PRINCIPAL`,label:`Member`,icon:(0,$.jsx)(G,{size:14,"aria-hidden":!0})},{kind:`VIRTUAL_KEY`,label:`Virtual key`,icon:(0,$.jsx)(z,{size:14,"aria-hidden":!0})}];function xe({open:e,onOpenChange:t,onCreated:n}){let{project:r,team:o,organization:l}=pe(),[u,d]=(0,Q.useState)(``),[f,ee]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(`PROJECT`),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(`MONTH`),[T,te]=(0,Q.useState)(``),[E,ne]=(0,Q.useState)(`BLOCK`),[D,O]=(0,Q.useState)(null),k=l?.id??``,A=H.organization.getAllOrganizationMembers.useQuery({organizationId:k},{enabled:!!k&&e&&m===`PRINCIPAL`,refetchOnWindowFocus:!1}),j=H.gatewayBudgets.groupTargets.useQuery({organizationId:k},{enabled:!!k&&e&&m===`GROUP`,refetchOnWindowFocus:!1,retry:!1}),M=H.virtualKeys.list.useQuery({organizationId:k},{enabled:!!k&&e&&m===`VIRTUAL_KEY`,refetchOnWindowFocus:!1}),N=H.modelProvider.listAllForOrganizationForFrontend.useQuery({organizationId:k},{enabled:!!k&&e,refetchOnWindowFocus:!1}),re=(0,Q.useMemo)(()=>l?.teams?.map(e=>({id:e.id,name:e.name}))??[],[l?.teams]),ie=(0,Q.useMemo)(()=>l?.teams?.flatMap(e=>e.projects.map(t=>({id:t.id,name:`${t.name} · ${e.name}`})))??[],[l?.teams]),ae=(0,Q.useMemo)(()=>(M.data??[]).filter(e=>e.status===`active`),[M.data]),oe=(0,Q.useMemo)(()=>(N.data?.providers??[]).filter(e=>e.id).map(e=>({id:e.id,name:e.name??e.provider})),[N.data]),se=H.useContext(),F=H.gatewayBudgets.create.useMutation({onSuccess:async()=>{await Promise.all([l?se.gatewayBudgets.list.invalidate({organizationId:l.id}):Promise.resolve(),r?se.gatewayBudgets.listForProject.invalidate({projectId:r.id}):Promise.resolve()])}}),z=()=>{d(``),ee(``),h(`PROJECT`),_(``),y(``),x(`MONTH`),te(``),ne(`BLOCK`),O(null)},B=()=>{F.isPending||(z(),t(!1))},U=e=>{h(e),O(null),_(e===`TEAM`?o?.id??``:e===`PROJECT`?r?.id??``:``)},le=m===`ORGANIZATION`?null:m===`GROUP`?(j.data??[]).map(e=>({id:e.id,name:e.memberCount===1?`${e.name} (1 member)`:`${e.name} (${e.memberCount} members)`})):m===`TEAM`?re:m===`PROJECT`?ie:m===`PRINCIPAL`?(A.data??[]).map(e=>({id:e.id,name:e.name??e.email??e.id})):ae.map(e=>({id:e.id,name:e.name})),W=m===`GROUP`&&j.isLoading||m===`PRINCIPAL`&&A.isLoading||m===`VIRTUAL_KEY`&&M.isLoading;return(0,$.jsx)(P.Root,{open:e,onOpenChange:()=>B(),placement:`end`,size:`md`,children:(0,$.jsxs)(P.Content,{bg:`bg`,children:[(0,$.jsxs)(P.Header,{children:[(0,$.jsx)(P.Title,{children:`New budget`}),(0,$.jsx)(P.CloseTrigger,{})]}),(0,$.jsx)(P.Body,{children:(0,$.jsxs)(c,{align:`stretch`,gap:4,children:[(0,$.jsxs)(S,{required:!0,children:[(0,$.jsxs)(C,{children:[`Name`,(0,$.jsx)(X,{description:`Human-readable identifier shown in the list and audit log. Typical patterns: 'org monthly cap', 'acme-eng daily', 'prod-vk-burst'.`,docHref:`/ai-gateway/budgets#creating-a-budget`})]}),(0,$.jsx)(K,{value:u,onChange:e=>d(e.target.value),placeholder:`e.g. Engineering monthly $1k cap`,autoFocus:!0})]}),(0,$.jsxs)(S,{children:[(0,$.jsx)(C,{children:`Description`}),(0,$.jsx)(ce,{value:f,onChange:e=>ee(e.target.value),placeholder:`Optional. Who owns this? What's the policy?`})]}),(0,$.jsxs)(S,{required:!0,children:[(0,$.jsxs)(C,{children:[`Applies to`,(0,$.jsx)(X,{description:`What the budget covers. Budgets stack: a request is checked against every budget that applies to it (organization + group + team + project + member + virtual key), and any one in breach blocks or warns per its on-breach action. A group budget gives each member their own allowance rather than one shared pot.`,docHref:`/ai-gateway/budgets#scopes`,testId:`budget-applies-to-info`})]}),(0,$.jsx)(V,{gap:2,role:`group`,"aria-label":`Budget target kind`,children:be.map(e=>{let t=m===e.kind;return(0,$.jsx)(i,{type:`button`,size:`xs`,variant:t?`solid`:`outline`,"aria-pressed":t,onClick:()=>U(e.kind),"data-testid":`budget-kind-${e.kind.toLowerCase()}`,children:(0,$.jsxs)(a,{gap:1,children:[e.icon,(0,$.jsx)(s,{children:e.label})]})},e.kind)})}),m===`ORGANIZATION`?(0,$.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,marginTop:1,children:[`All AI spend in `,l?.name??`the organization`,`.`]}):(0,$.jsx)(I,{size:`sm`,marginTop:1,disabled:W,children:(0,$.jsxs)(L,{value:g,"aria-label":`Budget target`,"data-testid":`budget-target`,onChange:e=>_(e.target.value),children:[(0,$.jsx)(`option`,{value:``,children:W?`Loading…`:`Pick a ${be.find(e=>e.kind===m)?.label.toLowerCase()??`target`}`}),(le??[]).map(e=>(0,$.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),m===`GROUP`&&(0,$.jsx)(s,{fontSize:`xs`,color:`fg.muted`,marginTop:1,children:`Each member of the group gets this limit individually.`}),m===`GROUP`&&j.isError&&(0,$.jsx)(s,{fontSize:`xs`,color:`red.600`,marginTop:1,children:`Groups could not be loaded.`})]}),(0,$.jsxs)(S,{children:[(0,$.jsxs)(C,{children:[`Provider`,(0,$.jsx)(X,{description:`Count and constrain spend on one provider only, e.g. 'OpenAI $200/month for this team'. With a provider set, only requests dispatched to that provider debit this budget, and on breach only that provider is withheld; others keep serving.`,docHref:`/ai-gateway/budgets#provider-filter`,testId:`budget-provider-info`})]}),(0,$.jsx)(I,{size:`sm`,children:(0,$.jsxs)(L,{value:v,"aria-label":`Provider filter`,"data-testid":`budget-provider`,onChange:e=>y(e.target.value),children:[(0,$.jsx)(`option`,{value:``,children:`All providers`}),oe.map(e=>(0,$.jsxs)(`option`,{value:e.id,children:[e.name,` only`]},e.id))]})})]}),D&&(0,$.jsx)(S,{invalid:!0,children:(0,$.jsx)(w,{"data-testid":`budget-submit-error`,children:D})}),(0,$.jsxs)(a,{gap:4,align:`flex-start`,children:[(0,$.jsxs)(S,{required:!0,flex:1,children:[(0,$.jsxs)(C,{children:[`Window`,(0,$.jsx)(X,{description:`Time window the limit applies to. Minute / hour / day / week / month reset on a rolling schedule in UTC. 'total' never resets, which suits burn-down budgets on a fixed-fund project.`,docHref:`/ai-gateway/budgets#windows`})]}),(0,$.jsx)(I,{size:`sm`,children:(0,$.jsxs)(L,{value:b,onChange:e=>x(e.target.value??`MONTH`),children:[(0,$.jsx)(`option`,{value:`MINUTE`,children:`Per minute`}),(0,$.jsx)(`option`,{value:`HOUR`,children:`Per hour`}),(0,$.jsx)(`option`,{value:`DAY`,children:`Per day`}),(0,$.jsx)(`option`,{value:`WEEK`,children:`Per week`}),(0,$.jsx)(`option`,{value:`MONTH`,children:`Per calendar month`}),(0,$.jsx)(`option`,{value:`TOTAL`,children:`Total (no reset)`})]})})]}),(0,$.jsxs)(S,{required:!0,flex:1,children:[(0,$.jsxs)(C,{children:[`Limit (USD)`,(0,$.jsx)(X,{description:`Spend ceiling per window in USD. Tracked against provider-computed token costs (summed post-response). Near-limit requests (≥90% of cap) trigger a live reconciliation on the gateway with a 200ms fail-open.`,docHref:`/ai-gateway/budgets#creating-a-budget`})]}),(0,$.jsx)(K,{value:T,onChange:e=>te(e.target.value),placeholder:`1000.00`,inputMode:`decimal`})]})]}),(0,$.jsxs)(S,{required:!0,children:[(0,$.jsxs)(C,{children:[`On breach`,(0,$.jsx)(X,{description:`BLOCK: reject new requests with 402 budget_exceeded. WARN: trace annotation only, no user-facing error, which suits soft budgets where ops monitors spend without enforcing a hard cap.`,docHref:`/ai-gateway/budgets#on_breach`})]}),(0,$.jsx)(I,{size:`sm`,children:(0,$.jsxs)(L,{value:E,onChange:e=>ne(e.target.value??`BLOCK`),children:[(0,$.jsx)(`option`,{value:`BLOCK`,children:`Block: reject requests at limit`}),(0,$.jsx)(`option`,{value:`WARN`,children:`Warn: tag responses, keep serving`})]})})]})]})}),(0,$.jsx)(P.Footer,{children:(0,$.jsxs)(a,{width:`full`,children:[(0,$.jsx)(R,{}),(0,$.jsx)(i,{variant:`ghost`,onClick:B,disabled:F.isPending,children:`Cancel`}),(0,$.jsx)(i,{colorPalette:`orange`,onClick:async()=>{if(!l)return;if(!u||!T){p.create({title:`Name and limit are required`,type:`error`});return}let e=Number.parseFloat(T);if(!Number.isFinite(e)||e<=0){p.create({title:`Limit must be a positive number`,type:`error`});return}if(m!==`ORGANIZATION`&&!g){O(`Pick what this budget applies to.`);return}O(null);try{let e=m===`ORGANIZATION`?{kind:`ORGANIZATION`,organizationId:l.id}:m===`GROUP`?{kind:`GROUP`,groupId:g}:m===`TEAM`?{kind:`TEAM`,teamId:g}:m===`PROJECT`?{kind:`PROJECT`,projectId:g}:m===`PRINCIPAL`?{kind:`PRINCIPAL`,principalUserId:g}:{kind:`VIRTUAL_KEY`,virtualKeyId:g};await F.mutateAsync({organizationId:l.id,name:u,description:f||void 0,scope:e,window:b,limitUsd:T,onBreach:E,providerKey:v||null}),n(),z(),t(!1)}catch(e){O(_e(e,`Failed to create budget`))}},loading:F.isPending,disabled:!u||!T,children:`Create budget`})]})})]})})}function Se(e){let t=H.gatewayBudgets.list.useQuery({organizationId:e??``},{enabled:!!e});return{rows:t.data?.budgets??[],spendAvailable:t.data?.spendAvailable??!0,isLoading:t.isLoading,isError:t.isError,error:t.error,refetch:t.refetch}}function Ce(){let{organization:e,project:t,hasPermission:o}=pe(),p=o(`gatewayBudgets:create`),S=o(`gatewayBudgets:update`),C=o(`gatewayBudgets:delete`),w=ue(),{rows:P,spendAvailable:I,isLoading:L,isError:z,error:ce,refetch:V}=Se(e?.id),W=H.useContext(),G=H.gatewayBudgets.archive.useMutation({onSuccess:async()=>{e?.id&&await W.gatewayBudgets.list.invalidate({organizationId:e.id})}}),[K,q]=(0,Q.useState)(!1),[me,J]=(0,Q.useState)(null),[Y,X]=(0,Q.useState)(null);return(0,$.jsxs)(U,{children:[(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(E.Header,{children:[(0,$.jsx)(E.Heading,{children:`Budgets`}),(0,$.jsx)(R,{}),p&&(0,$.jsxs)(i,{colorPalette:`orange`,size:`sm`,onClick:()=>q(!0),children:[(0,$.jsx)(fe,{size:14}),` New budget`]})]}),(0,$.jsx)(r,{padding:6,width:`full`,maxWidth:`1600px`,marginX:`auto`,children:L?(0,$.jsx)(n,{}):z?(0,$.jsx)(ye,{title:`Failed to load budgets`,error:ce,onRetry:()=>V()}):P.length===0?(0,$.jsx)(ie,{children:(0,$.jsxs)(se,{children:[(0,$.jsx)(oe,{children:(0,$.jsx)(B,{size:32})}),(0,$.jsx)(re,{children:`No budgets yet`}),(0,$.jsx)(ae,{children:`Budgets enforce a spend ceiling on any dimension: organization, group, team, project, member, or virtual key; each optionally limited to a single provider. Create one to start governing cost.`}),p&&(0,$.jsxs)(i,{colorPalette:`orange`,onClick:()=>q(!0),mt:2,children:[(0,$.jsx)(fe,{size:14}),` New budget`]})]})}):(0,$.jsxs)(c,{align:`stretch`,gap:4,children:[!I&&(0,$.jsxs)(O,{status:`warning`,"data-testid":`budget-spend-unavailable`,children:[(0,$.jsx)(A,{}),(0,$.jsxs)(j,{children:[(0,$.jsx)(D,{children:`Spend figures are unavailable`}),(0,$.jsx)(k,{children:`Spend cannot be totalled right now, so these budgets are not stopping or warning about anything.`})]})]}),(0,$.jsx)(M,{width:`full`,overflow:`hidden`,children:(0,$.jsx)(N,{paddingY:0,paddingX:0,children:(0,$.jsxs)(ee,{variant:`line`,size:`md`,width:`full`,children:[(0,$.jsx)(h,{children:(0,$.jsxs)(y,{children:[(0,$.jsx)(v,{children:`Name`}),(0,$.jsx)(v,{children:`Scope`}),(0,$.jsx)(v,{children:`Window`}),(0,$.jsx)(v,{children:`Spent / Limit`}),(0,$.jsx)(v,{children:(0,$.jsx)(d,{content:(0,$.jsxs)(s,{fontSize:`xs`,children:[`WARN: emits 402-equivalent warning header + audit event, request proceeds.`,`
|
|
2
|
-
`,`BLOCK: the gateway returns HTTP 402 and refuses to dispatch once the limit is crossed.`]}),children:(0,$.jsx)(s,{as:`span`,children:`On breach`})})}),(0,$.jsx)(v,{children:`Resets`}),(0,$.jsx)(v,{})]})}),(0,$.jsx)(_,{children:P.map(e=>{let n=Number.parseFloat(e.spentUsd),r=Number.parseFloat(e.limitUsd),o=r>0?Math.min(100,n/r*100):0;return(0,$.jsxs)(y,{cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:()=>void w.push(`/settings/gateway/budgets/${e.id}`),children:[(0,$.jsx)(g,{children:(0,$.jsxs)(c,{align:`start`,gap:0,children:[(0,$.jsx)(ge,{href:`/settings/gateway/budgets/${e.id}`,children:(0,$.jsx)(s,{fontWeight:`medium`,children:e.name})}),e.description&&(0,$.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:e.description})]})}),(0,$.jsx)(g,{children:(0,$.jsxs)(c,{align:`start`,gap:1,children:[(0,$.jsx)(we,{scopeType:e.scopeType,scopeTarget:e.scopeTarget??null,projectSlug:t?.slug??null,providerLabel:e.providerLabel??null}),e.unreachableByAnyKey&&(0,$.jsx)(d,{content:`Traffic is attributed to the project a key is scoped to. No active key is scoped so that its traffic reaches this budget, so it will stay at zero and never stop a request.`,children:(0,$.jsxs)(u,{colorPalette:`orange`,variant:`subtle`,fontSize:`2xs`,"data-testid":`budget-unreachable-badge`,children:[(0,$.jsx)(f,{size:10}),` No key sends traffic here`]})})]})}),(0,$.jsx)(g,{children:(0,$.jsx)(u,{variant:`subtle`,colorPalette:`gray`,children:e.window.toLowerCase()})}),(0,$.jsx)(g,{minWidth:`220px`,children:e.spendAvailable?e.scopeType===`GROUP`?(0,$.jsxs)(c,{align:`stretch`,gap:.5,"data-testid":`budget-group-spend`,children:[(0,$.jsxs)(a,{fontSize:`xs`,gap:1,children:[(0,$.jsx)(s,{fontWeight:`medium`,children:Z(n)}),(0,$.jsx)(s,{color:`fg.muted`,children:`group total`})]}),(0,$.jsxs)(s,{fontSize:`2xs`,color:`fg.muted`,children:[Z(r),` per member`,typeof e.scopeTarget?.memberCount==`number`?` · ${e.scopeTarget.memberCount} ${e.scopeTarget.memberCount===1?`member`:`members`}`:``]})]}):(0,$.jsxs)(c,{align:`stretch`,gap:1,children:[(0,$.jsxs)(a,{fontSize:`xs`,children:[(0,$.jsx)(s,{fontWeight:`medium`,children:Z(n)}),(0,$.jsxs)(s,{color:`fg.muted`,children:[`/ `,Z(r)]}),(0,$.jsx)(R,{}),(0,$.jsxs)(u,{variant:`outline`,colorPalette:o>=100?`red`:o>=80?`orange`:`green`,fontSize:`2xs`,children:[o.toFixed(0),`%`]})]}),(0,$.jsx)(ne,{value:o,size:`xs`,colorPalette:o>=100?`red`:o>=80?`orange`:`green`,children:(0,$.jsx)(T,{children:(0,$.jsx)(te,{})})})]}):(0,$.jsxs)(a,{fontSize:`xs`,children:[(0,$.jsx)(s,{color:`fg.muted`,children:`Unavailable`}),(0,$.jsxs)(s,{color:`fg.muted`,children:[`/ `,Z(r)]})]})}),(0,$.jsx)(g,{children:(0,$.jsx)(u,{colorPalette:e.onBreach===`BLOCK`?`red`:`yellow`,children:e.onBreach.toLowerCase()})}),(0,$.jsx)(g,{children:e.window===`TOTAL`?(0,$.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`never`}):(0,$.jsx)(d,{content:new Date(e.resetsAt).toLocaleString(),children:(0,$.jsx)(s,{fontSize:`xs`,children:de(new Date(e.resetsAt).getTime())})})}),(0,$.jsx)(g,{onClick:e=>e.stopPropagation(),cursor:`default`,children:(0,$.jsxs)(m.Root,{children:[(0,$.jsx)(m.Trigger,{asChild:!0,children:(0,$.jsx)(i,{variant:`ghost`,size:`xs`,"aria-label":`Actions`,children:(0,$.jsx)(l,{size:14})})}),(0,$.jsxs)(m.Content,{children:[(0,$.jsxs)(m.Item,{value:`details`,onClick:()=>void w.push(`/settings/gateway/budgets/${e.id}`),children:[(0,$.jsx)(b,{size:14}),` Details`]}),S&&(0,$.jsxs)(m.Item,{value:`edit`,onClick:()=>J(e),children:[(0,$.jsx)(he,{size:14}),` Edit`]}),C&&(0,$.jsxs)(m.Item,{value:`archive`,onClick:()=>X(e),children:[(0,$.jsx)(le,{size:14}),` Archive`]})]})]})})]},e.id)})})]})})})]})})]}),e?.id&&(0,$.jsx)(xe,{open:K,onOpenChange:q,onCreated:()=>{V()}}),(0,$.jsx)(ve,{budget:me,onOpenChange:e=>{e||J(null)},onSaved:()=>{J(null),V()}}),(0,$.jsx)(x,{open:!!Y,onOpenChange:e=>{e||X(null)},title:`Archive ${Y?.name??`budget`}?`,message:`Debits against this budget stop counting. The historical ledger is preserved but new requests route as if the budget didn't exist.`,confirmLabel:`Archive`,tone:`warning`,loading:G.isPending,onConfirm:async()=>{if(!(!Y||!e))try{await G.mutateAsync({organizationId:e.id,id:Y.id}),X(null)}catch(e){F({error:e,fallbackTitle:`Couldn't archive the budget`})}}})]})}function we({scopeType:e,scopeTarget:t,projectSlug:n,providerLabel:r}){let i=e===`GROUP`?`group`:e.toLowerCase().replace(`_`,` `),o=t?.kind===`VIRTUAL_KEY`?`/settings/gateway/virtual-keys/${t.id}`:null;return(0,$.jsxs)(c,{align:`start`,gap:.5,children:[(0,$.jsxs)(a,{gap:1,children:[(0,$.jsx)(u,{colorPalette:`gray`,children:i}),e===`GROUP`&&(0,$.jsx)(d,{content:`Each member of the group gets this limit individually.`,children:(0,$.jsx)(u,{colorPalette:`cyan`,variant:`subtle`,"data-testid":`budget-per-member-badge`,children:`per member`})}),r&&(0,$.jsx)(d,{content:`Only spend dispatched to this provider counts toward this budget.`,children:(0,$.jsxs)(u,{colorPalette:`blue`,variant:`subtle`,"data-testid":`budget-provider-badge`,children:[r,` only`]})})]}),t&&(0,$.jsxs)(a,{gap:1,children:[o?(0,$.jsx)(ge,{href:o,color:`orange.600`,fontSize:`xs`,children:t.name}):(0,$.jsx)(s,{fontSize:`xs`,fontWeight:`medium`,children:t.name}),t.secondary&&(0,$.jsxs)(s,{fontSize:`2xs`,color:`fg.muted`,children:[`(`,t.secondary,`)`]})]})]})}var Te=Y(`gatewayBudgets:view`,{layoutComponent:U})(Ce);export{Te as default};
|
|
3
|
-
//# sourceMappingURL=budgets-D0yk2zkk.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{n as o,t as s}from"./v-stack-hkuSkmCA.js";import{Nn as c}from"./ProjectAvatar-DtI9dT1f.js";import{t as l}from"./badge-Cpc3eA-C.js";import{n as u,o as d}from"./toaster-BsYkODqs.js";import{$ as f,Q as p,X as m,Y as h,Z as g,et as _}from"./Markdown-C9extmbX.js";import{n as v}from"./personalProject-DMRX2-SI.js";import{n as y}from"./api-l6Cnm0vQ.js";import{t as b}from"./download-pwM6M3AV.js";import{r as x}from"./next-router-CWLrMXvP.js";import{n as S}from"./index.module-CJLn6vye.js";import{n as C,o as w,r as T,t as E}from"./_shell-BGaZUKLi.js";var D=e(t()),O=a(),k=25,A={summary:`Summary`,full_session:`Full session`};function j(){let e=x(),[t,n]=(0,D.useState)(``),[r]=S(t,300),[i,a]=(0,D.useState)(1),o=typeof e.query.report==`string`?e.query.report:null,s=y.bugReports.getAll.useQuery({page:i-1,pageSize:k,search:r.trim()||void 0});(0,D.useEffect)(()=>{a(1)},[r]);let c=t=>{let n={...e.query};t?n.report=t:delete n.report,e.replace({query:n},void 0,{shallow:!0})};return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(C,{title:`Bug Reports`,searchValue:t,onSearchChange:n,searchPlaceholder:`Search title, summary, agent, contact, project`,isLoading:s.isLoading,isFetching:s.isFetching,error:s.error,pagination:{page:i,perPage:k,total:s.data?.total??0,onPageChange:a},children:(0,O.jsx)(M,{reports:s.data?.reports,onOpen:c})}),(0,O.jsx)(N,{reportId:o,onClose:()=>c(null)})]})}function M({reports:e,onOpen:t}){return(0,O.jsxs)(f,{size:`sm`,variant:`line`,children:[(0,O.jsx)(p,{children:(0,O.jsxs)(_,{children:[(0,O.jsx)(g,{children:`Received`}),(0,O.jsx)(g,{children:`Title`}),(0,O.jsx)(g,{children:`Kind`}),(0,O.jsx)(g,{children:`Agent`}),(0,O.jsx)(g,{children:`Source`}),(0,O.jsx)(g,{children:`Project`}),(0,O.jsx)(g,{children:`Contact`})]})}),(0,O.jsxs)(h,{children:[e?.length===0&&(0,O.jsx)(_,{children:(0,O.jsx)(m,{colSpan:7,children:(0,O.jsx)(o,{color:`fg.muted`,paddingY:6,textAlign:`center`,children:"No reports yet. They arrive here when a customer's coding agent runs `langwatch report`."})})}),e?.map(e=>(0,O.jsxs)(_,{cursor:`pointer`,_hover:{backgroundColor:`bg.muted`},onClick:()=>t(e.id),children:[(0,O.jsx)(m,{whiteSpace:`nowrap`,children:w(e.createdAt)}),(0,O.jsx)(m,{maxWidth:`320px`,children:(0,O.jsx)(r,{variant:`plain`,size:`sm`,paddingX:0,height:`auto`,fontWeight:`medium`,maxWidth:`full`,onClick:n=>{n.stopPropagation(),t(e.id)},children:(0,O.jsx)(o,{truncate:!0,children:e.title})})}),(0,O.jsx)(m,{children:(0,O.jsx)(l,{colorPalette:e.kind===`full_session`?`purple`:`gray`,children:A[e.kind]??e.kind})}),(0,O.jsx)(m,{children:e.agent??(0,O.jsx)(T,{})}),(0,O.jsx)(m,{children:e.source}),(0,O.jsx)(m,{children:e.linkedProjectId??(0,O.jsx)(T,{})}),(0,O.jsx)(m,{children:e.contactEmail??(0,O.jsx)(T,{})})]},e.id))]})]})}function N({reportId:e,onClose:t}){let a=y.bugReports.getById.useQuery({id:e??``},{enabled:!!e,retry:!1});return(0,O.jsx)(v.Root,{open:!!e,onOpenChange:({open:e})=>{e||t()},size:`xl`,children:(0,O.jsxs)(v.Content,{children:[(0,O.jsx)(v.Header,{children:(0,O.jsx)(v.Title,{children:a.data?.title??`Bug report`})}),(0,O.jsx)(v.CloseTrigger,{}),(0,O.jsxs)(v.Body,{children:[a.error&&(0,O.jsx)(o,{color:`red.500`,fontSize:`sm`,children:a.error.message}),a.data&&(0,O.jsxs)(s,{align:`stretch`,gap:6,children:[(0,O.jsxs)(c,{columns:2,gap:3,children:[(0,O.jsx)(P,{label:`Received`,children:w(a.data.createdAt)}),(0,O.jsx)(P,{label:`Kind`,children:A[a.data.kind]??a.data.kind}),(0,O.jsx)(P,{label:`Source`,children:a.data.source}),(0,O.jsx)(P,{label:`Agent`,children:a.data.agent??`unknown`}),(0,O.jsx)(P,{label:`CLI version`,children:a.data.cliVersion??`unknown`}),(0,O.jsx)(P,{label:`Project`,children:a.data.linkedProjectId??`not linked`}),(0,O.jsx)(P,{label:`Contact`,children:a.data.contactEmail??`none`}),(0,O.jsx)(P,{label:`Transcript`,children:a.data.sessionData?a.data.sessionTruncated?`attached, truncated`:`attached`:`none`})]}),a.data.summary&&(0,O.jsxs)(n,{children:[(0,O.jsx)(o,{fontWeight:`semibold`,marginBottom:2,children:`Summary`}),(0,O.jsx)(n,{backgroundColor:`bg.muted`,borderRadius:`md`,padding:3,fontSize:`sm`,whiteSpace:`pre-wrap`,fontFamily:`mono`,children:a.data.summary})]}),a.data.sessionData&&(0,O.jsxs)(n,{children:[(0,O.jsxs)(i,{marginBottom:2,children:[(0,O.jsx)(o,{fontWeight:`semibold`,children:`Session transcript`}),(0,O.jsxs)(r,{size:`xs`,variant:`outline`,onClick:async()=>{a.data?.sessionData&&(await navigator.clipboard.writeText(a.data.sessionData),u.create({title:`Transcript copied`,type:`success`}))},children:[(0,O.jsx)(d,{size:12}),` Copy`]}),(0,O.jsxs)(r,{size:`xs`,variant:`outline`,onClick:()=>{if(!a.data?.sessionData)return;let e=new Blob([a.data.sessionData],{type:`application/jsonl`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`agent-report-${a.data.id}.jsonl`,n.click(),URL.revokeObjectURL(t)},children:[(0,O.jsx)(b,{size:12}),` Download .jsonl`]})]}),(0,O.jsx)(n,{backgroundColor:`bg.muted`,borderRadius:`md`,padding:3,fontSize:`xs`,fontFamily:`mono`,whiteSpace:`pre-wrap`,wordBreak:`break-all`,maxHeight:`480px`,overflowY:`auto`,children:a.data.sessionData})]})]})]})]})})}function P({label:e,children:t}){return(0,O.jsxs)(n,{children:[(0,O.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:e}),(0,O.jsx)(o,{fontSize:`sm`,children:t})]})}function F(){return(0,O.jsx)(E,{children:(0,O.jsx)(j,{})})}export{F as default};
|
|
2
|
-
//# sourceMappingURL=bug-reports-D48JQaYJ.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{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 ee,Z as g,et as _,r as v}from"./Markdown-C9extmbX.js";import{a as y,n as b,r as x,t as S}from"./field-BadoNaN5.js";import{a as C,n as w,t as T}from"./switch-mtnuJtgJ.js";import{L as E}from"./DashboardLayout-BhHe0vIT.js";import{r as D,t as te}from"./card-By_Mbslh.js";import{n as O}from"./personalProject-DMRX2-SI.js";import{a as ne,i as re,n as k,r as A,t as j}from"./empty-state-T8EYr5NF.js";import{t as M}from"./errors-e711UMq7.js";import{r as N,t as P}from"./native-select-DL2k8x0o.js";import{t as F}from"./spacer-C38e7o6r.js";import{tt as I}from"./immer-CFru3D02.js";import{n as L}from"./api-l6Cnm0vQ.js";import{t as R}from"./AiGatewayLayout-BFUOyL-l.js";import{t as z}from"./archive-CIpRF4hE.js";import{Bn as B,Mr as V,Qn as H,Vt as U,nr as W}from"./index-CPtTUYLD.js";import{t as G}from"./WithPermissionGuard-Cr6Aljmy.js";import{t as K}from"./FieldInfoTooltip-BlO6fteF.js";import{t as q}from"./GatewayErrorPanel-Cai5PzLy.js";var J=e(t()),Y=o();function X(){return{name:``,description:``,priority:100,enabled:!0,matchVkId:``,matchVkPrefix:``,matchVkTagsCsv:``,matchPrincipalId:``,matchModel:``,matchMetadataKey:``,matchMetadataValue:``,actionMode:`respect`,actionTtlSeconds:``,actionSalt:``}}function Z(e){if(!e.name.trim())return{field:`name`,message:`Name is required`};if(e.priority<0||e.priority>1e3)return{field:`priority`,message:`Priority must be between 0 and 1000`};if(e.actionMode===`force`&&e.actionTtlSeconds.trim()){let t=Number(e.actionTtlSeconds);if(!Number.isFinite(t)||t<0||t>86400)return{field:`actionTtlSeconds`,message:`TTL must be a number between 0 and 86400 seconds`}}return!e.matchMetadataKey.trim()==!e.matchMetadataValue.trim()?!e.matchVkId&&!e.matchVkPrefix&&!e.matchVkTagsCsv.trim()&&!e.matchPrincipalId&&!e.matchModel&&!e.matchMetadataKey?{field:null,message:`At least one matcher is required (rules matching 'every request' must be explicit — not supported in v1)`}:null:{field:null,message:`Request metadata needs both a key and a value`}}function Q(e){let t={};e.matchVkId.trim()&&(t.vk_id=e.matchVkId.trim()),e.matchVkPrefix.trim()&&(t.vk_prefix=e.matchVkPrefix.trim()),e.matchVkTagsCsv.trim()&&(t.vk_tags=e.matchVkTagsCsv.split(`,`).map(e=>e.trim()).filter(Boolean)),e.matchPrincipalId.trim()&&(t.principal_id=e.matchPrincipalId.trim()),e.matchModel.trim()&&(t.model=e.matchModel.trim()),e.matchMetadataKey.trim()&&e.matchMetadataValue.trim()&&(t.request_metadata={[e.matchMetadataKey.trim()]:e.matchMetadataValue.trim()});let n={mode:e.actionMode};return e.actionMode===`force`&&e.actionTtlSeconds.trim()&&(n.ttl=Number(e.actionTtlSeconds)),e.actionSalt.trim()&&(n.salt=e.actionSalt.trim()),{name:e.name.trim(),description:e.description.trim()||null,priority:e.priority,enabled:e.enabled,matchers:t,action:n}}function ie(e){let t=e.matchers??{},n=e.action??{},r=t.request_metadata&&typeof t.request_metadata==`object`?t.request_metadata:{},i=Object.keys(r)[0]??``;return{name:e.name,description:e.description??``,priority:e.priority,enabled:e.enabled,matchVkId:typeof t.vk_id==`string`?t.vk_id:``,matchVkPrefix:typeof t.vk_prefix==`string`?t.vk_prefix:``,matchVkTagsCsv:Array.isArray(t.vk_tags)?t.vk_tags.join(`,`):``,matchPrincipalId:typeof t.principal_id==`string`?t.principal_id:``,matchModel:typeof t.model==`string`?t.model:``,matchMetadataKey:i,matchMetadataValue:i?r[i]??``:``,actionMode:n.mode===`force`||n.mode===`disable`||n.mode===`respect`?n.mode:`respect`,actionTtlSeconds:typeof n.ttl==`number`?String(n.ttl):``,actionSalt:typeof n.salt==`string`?n.salt:``}}function $({state:e,onChange:t,complaint:n}){let i=(n,r)=>t({...e,[n]:r}),o=e=>n?.field===e?n.message:null;return(0,Y.jsxs)(c,{align:`stretch`,gap:4,children:[(0,Y.jsxs)(y,{required:!0,invalid:!!o(`name`),children:[(0,Y.jsxs)(x,{children:[`Name`,(0,Y.jsx)(K,{description:`Shown in /gateway/cache-rules list + audit log. Must be unique within the org.`,docHref:`/ai-gateway/cache-control#cache-rules`})]}),(0,Y.jsx)(V,{value:e.name,onChange:e=>i(`name`,e.target.value),placeholder:`e.g. force-cache-on-enterprise`,maxLength:128}),o(`name`)&&(0,Y.jsx)(S,{children:o(`name`)})]}),(0,Y.jsxs)(y,{children:[(0,Y.jsx)(x,{children:`Description`}),(0,Y.jsx)(I,{value:e.description,onChange:e=>i(`description`,e.target.value),placeholder:`Optional. Shown in the list and audit log.`,maxLength:512})]}),(0,Y.jsxs)(a,{align:`start`,gap:4,children:[(0,Y.jsxs)(y,{invalid:!!o(`priority`),children:[(0,Y.jsxs)(x,{children:[`Priority`,(0,Y.jsx)(K,{description:`Higher number wins first. Rules are evaluated priority DESC, first-match-wins. Ties break by createdAt ascending.`,docHref:`/ai-gateway/cache-control#cache-rules`})]}),(0,Y.jsx)(V,{type:`number`,min:0,max:1e3,value:e.priority,onChange:e=>i(`priority`,Number(e.target.value)||0)}),o(`priority`)?(0,Y.jsx)(S,{children:o(`priority`)}):(0,Y.jsx)(b,{children:`Evaluated highest-first. Conflicting rules: higher number wins.`})]}),(0,Y.jsxs)(y,{children:[(0,Y.jsx)(x,{children:`Enabled`}),(0,Y.jsxs)(C,{checked:e.enabled,onCheckedChange:e=>i(`enabled`,e.checked),colorPalette:`orange`,children:[(0,Y.jsx)(w,{}),(0,Y.jsx)(T,{})]}),(0,Y.jsx)(b,{children:`Disabled rules stay in the list but never match.`})]})]}),(0,Y.jsxs)(r,{borderWidth:`1px`,borderColor:`border.subtle`,borderRadius:`md`,padding:4,children:[(0,Y.jsxs)(a,{mb:3,children:[(0,Y.jsx)(s,{fontSize:`sm`,fontWeight:`semibold`,children:`Match when`}),(0,Y.jsx)(u,{colorPalette:`gray`,fontSize:`2xs`,children:`AND across non-empty fields`})]}),(0,Y.jsxs)(c,{align:`stretch`,gap:3,children:[(0,Y.jsxs)(y,{children:[(0,Y.jsxs)(x,{children:[`Virtual key id (exact)`,(0,Y.jsx)(K,{description:`Exact match against the VK's display prefix (e.g. vk-lw-01HZX9K3M...).`,docHref:`/ai-gateway/cache-control#matchers`})]}),(0,Y.jsx)(V,{value:e.matchVkId,onChange:e=>i(`matchVkId`,e.target.value),placeholder:`vk_01HZX9K3M...`})]}),(0,Y.jsxs)(y,{children:[(0,Y.jsxs)(x,{children:[`Virtual key display prefix (starts-with)`,(0,Y.jsx)(K,{description:`strings.HasPrefix against the VK's display prefix. Useful for bulk-matching by env/team convention (e.g. 'vk-lw-' to match every eval-suite VK).`,docHref:`/ai-gateway/cache-control#matchers`})]}),(0,Y.jsx)(V,{value:e.matchVkPrefix,onChange:e=>i(`matchVkPrefix`,e.target.value),placeholder:`vk-lw-`})]}),(0,Y.jsxs)(y,{children:[(0,Y.jsxs)(x,{children:[`Virtual key tags (comma-separated)`,(0,Y.jsx)(K,{description:`AND-subset: VK must carry EVERY listed tag. Tag a VK in its edit drawer under 'Tags' (config.metadata.tags).`,docHref:`/ai-gateway/cache-control#matchers`})]}),(0,Y.jsx)(V,{value:e.matchVkTagsCsv,onChange:e=>i(`matchVkTagsCsv`,e.target.value),placeholder:`tier=enterprise, team=ml`}),(0,Y.jsx)(b,{children:`VK must carry ALL listed tags.`})]}),(0,Y.jsxs)(y,{children:[(0,Y.jsx)(x,{children:`Principal (user id)`}),(0,Y.jsx)(V,{value:e.matchPrincipalId,onChange:e=>i(`matchPrincipalId`,e.target.value),placeholder:`user_01HZX...`})]}),(0,Y.jsxs)(y,{children:[(0,Y.jsxs)(x,{children:[`Model`,(0,Y.jsx)(K,{description:`Exact match OR trailing-'*' glob against the resolved upstream model (e.g. 'claude-haiku-*'). No regex in v1. Fires on both /v1/messages + /v1/chat/completions.`,docHref:`/ai-gateway/cache-control#matchers`})]}),(0,Y.jsx)(V,{value:e.matchModel,onChange:e=>i(`matchModel`,e.target.value),placeholder:`e.g. gpt-5-mini or claude-3-5-sonnet-latest`})]}),(0,Y.jsxs)(a,{align:`start`,gap:2,children:[(0,Y.jsxs)(y,{children:[(0,Y.jsx)(x,{children:`Request metadata key`}),(0,Y.jsx)(V,{value:e.matchMetadataKey,onChange:e=>i(`matchMetadataKey`,e.target.value),placeholder:`X-Customer-Tier`})]}),(0,Y.jsxs)(y,{children:[(0,Y.jsx)(x,{children:`Value`}),(0,Y.jsx)(V,{value:e.matchMetadataValue,onChange:e=>i(`matchMetadataValue`,e.target.value),placeholder:`enterprise`})]})]})]})]}),(0,Y.jsxs)(r,{borderWidth:`1px`,borderColor:`border.subtle`,borderRadius:`md`,padding:4,children:[(0,Y.jsx)(s,{fontSize:`sm`,fontWeight:`semibold`,mb:3,children:`Then do`}),(0,Y.jsxs)(c,{align:`stretch`,gap:3,children:[(0,Y.jsxs)(y,{children:[(0,Y.jsxs)(x,{children:[`Cache control mode`,(0,Y.jsx)(K,{description:`respect = passthrough. disable = strip provider cache markers (always-fresh). force = inject cache_control: ephemeral on Anthropic (no-op on OpenAI automatic, WARN+passthrough on Gemini v1).`,docHref:`/ai-gateway/cache-control#actions`})]}),(0,Y.jsx)(N,{size:`sm`,children:(0,Y.jsxs)(P,{value:e.actionMode,onChange:e=>i(`actionMode`,e.target.value),children:[(0,Y.jsx)(`option`,{value:`respect`,children:`respect — passthrough`}),(0,Y.jsx)(`option`,{value:`force`,children:`force — cache where supported`}),(0,Y.jsx)(`option`,{value:`disable`,children:`disable — strip cache hints`})]})}),(0,Y.jsx)(b,{children:`Force injects cache_control: ephemeral on Anthropic (system[-1] + messages[-1].content[-1], no-double-inject if already present). OpenAI/Azure caching is automatic — force is a wire no-op but still attributes + bumps the rule-hit counter. Gemini force WARNs + passes through today (v1.1 will wire /cachedContents).`})]}),e.actionMode===`force`&&(0,Y.jsxs)(y,{invalid:!!o(`actionTtlSeconds`),children:[(0,Y.jsxs)(x,{children:[`TTL (seconds, optional)`,(0,Y.jsx)(K,{description:`Clamped to [0, 86400]. Only meaningful on force. Anthropic supports TTL; OpenAI/Gemini treat as best-effort hint.`,docHref:`/ai-gateway/cache-control#actions`})]}),(0,Y.jsx)(V,{type:`number`,min:0,max:86400,value:e.actionTtlSeconds,onChange:e=>i(`actionTtlSeconds`,e.target.value),placeholder:`300`}),o(`actionTtlSeconds`)?(0,Y.jsx)(S,{children:o(`actionTtlSeconds`)}):(0,Y.jsx)(b,{children:`Clamped to [0, 86400]. Providers without explicit TTL support treat this as a best-effort hint.`})]}),(0,Y.jsxs)(y,{children:[(0,Y.jsxs)(x,{children:[`Cache salt (optional)`,(0,Y.jsx)(K,{description:`Cache-bust tag — changing it forces regeneration on next hit. Max 64 chars. Useful after a prompt template change: update the salt to invalidate all cached responses tied to the old template.`,docHref:`/ai-gateway/cache-control#actions`})]}),(0,Y.jsx)(V,{value:e.actionSalt,onChange:e=>i(`actionSalt`,e.target.value),placeholder:`e.g. 2026Q1-rerun — forces cache regeneration when changed`,maxLength:64})]})]})]})]})}function ae({open:e,onOpenChange:t,onCreated:n}){let{organization:r}=U(),o=L.useContext(),s=L.gatewayCacheRules.create.useMutation({onSuccess:async()=>{r?.id&&await o.gatewayCacheRules.list.invalidate({organizationId:r.id})}}),[c,l]=(0,J.useState)(X()),[u,f]=(0,J.useState)(null),p=()=>{s.isPending||(l(X()),f(null),t(!1))};return(0,Y.jsx)(O.Root,{open:e,onOpenChange:()=>p(),placement:`end`,size:`md`,children:(0,Y.jsxs)(O.Content,{bg:`bg`,children:[(0,Y.jsxs)(O.Header,{children:[(0,Y.jsx)(O.Title,{children:`New cache rule`}),(0,Y.jsx)(O.CloseTrigger,{})]}),(0,Y.jsx)(O.Body,{children:(0,Y.jsx)($,{state:c,onChange:e=>{l(e),f(null)},complaint:u})}),(0,Y.jsx)(O.Footer,{children:(0,Y.jsxs)(a,{width:`full`,children:[(0,Y.jsx)(F,{}),(0,Y.jsx)(i,{variant:`ghost`,onClick:p,disabled:s.isPending,children:`Cancel`}),(0,Y.jsx)(i,{colorPalette:`orange`,onClick:async()=>{if(!r)return;let e=Z(c);if(f(e?.field?e:null),e){e.field||d.create({title:e.message,type:`error`});return}try{await s.mutateAsync({organizationId:r.id,...Q(c)}),l(X()),f(null),t(!1),n?.()}catch(e){M({error:e,fallbackTitle:`Couldn't create the cache rule`})}},loading:s.isPending,disabled:!c.name.trim(),children:`Create rule`})]})})]})})}function oe({rule:e,onOpenChange:t,onSaved:n}){let{organization:r}=U(),o=L.useContext(),s=L.gatewayCacheRules.update.useMutation({onSuccess:async()=>{r?.id&&await o.gatewayCacheRules.list.invalidate({organizationId:r.id})}}),[c,l]=(0,J.useState)(X()),[u,f]=(0,J.useState)(null);(0,J.useEffect)(()=>{e&&(f(null),l(ie({name:e.name,description:e.description,priority:e.priority,enabled:e.enabled,matchers:e.matchers,action:e.action})))},[e]);let p=()=>{s.isPending||t(!1)};return(0,Y.jsx)(O.Root,{open:!!e,onOpenChange:()=>p(),placement:`end`,size:`md`,children:(0,Y.jsxs)(O.Content,{bg:`bg`,children:[(0,Y.jsxs)(O.Header,{children:[(0,Y.jsx)(O.Title,{children:`Edit cache rule`}),(0,Y.jsx)(O.CloseTrigger,{})]}),(0,Y.jsx)(O.Body,{children:(0,Y.jsx)($,{state:c,onChange:e=>{l(e),f(null)},complaint:u})}),(0,Y.jsx)(O.Footer,{children:(0,Y.jsxs)(a,{width:`full`,children:[(0,Y.jsx)(F,{}),(0,Y.jsx)(i,{variant:`ghost`,onClick:p,disabled:s.isPending,children:`Cancel`}),(0,Y.jsx)(i,{colorPalette:`orange`,onClick:async()=>{if(!r||!e)return;let i=Z(c);if(f(i?.field?i:null),i){i.field||d.create({title:i.message,type:`error`});return}try{await s.mutateAsync({organizationId:r.id,id:e.id,...Q(c)}),t(!1),n?.()}catch(e){M({error:e,fallbackTitle:`Couldn't save the cache rule`})}},loading:s.isPending,disabled:!c.name.trim(),children:`Save changes`})]})})]})})}function se(){let{organization:e,hasPermission:t}=U(),a=t(`gatewayCacheRules:create`),o=t(`gatewayCacheRules:update`),d=t(`gatewayCacheRules:delete`),y=L.gatewayCacheRules.list.useQuery({organizationId:e?.id??``},{enabled:!!e?.id}),b=L.useContext(),x=L.gatewayCacheRules.archive.useMutation({onSuccess:async()=>{e?.id&&await b.gatewayCacheRules.list.invalidate({organizationId:e.id})}}),S=L.gatewayCacheRules.update.useMutation({onSuccess:async()=>{e?.id&&await b.gatewayCacheRules.list.invalidate({organizationId:e.id})}}),[O,N]=(0,J.useState)(!1),[P,I]=(0,J.useState)(null),[V,G]=(0,J.useState)(null),K=async()=>{if(!(!V||!e))try{await x.mutateAsync({organizationId:e.id,id:V.id}),G(null)}catch(e){M({error:e,fallbackTitle:`Couldn't archive the cache rule`})}},X=async t=>{if(e)try{await S.mutateAsync({organizationId:e.id,id:t.id,enabled:!t.enabled})}catch(e){M({error:e,fallbackTitle:`Couldn't toggle the cache rule`})}},Z=y.data??[];return(0,Y.jsxs)(R,{children:[(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(E.Header,{children:[(0,Y.jsx)(E.Heading,{children:`Cache Rules`}),(0,Y.jsx)(F,{}),a&&(0,Y.jsxs)(i,{colorPalette:`orange`,size:`sm`,onClick:()=>N(!0),children:[(0,Y.jsx)(H,{size:14}),` New rule`]})]}),(0,Y.jsxs)(r,{padding:6,width:`full`,maxWidth:`1600px`,marginX:`auto`,children:[(0,Y.jsxs)(s,{fontSize:`sm`,color:`fg.muted`,mb:4,children:[`Rules are evaluated first-match-wins by priority (highest first). A per-request `,(0,Y.jsx)(`code`,{children:`X-LangWatch-Cache`}),` header always wins over matching rules, and a matched rule always wins over the per-virtual-key default. Changes propagate to the gateway within 30 s via the /changes long-poll.`]}),y.isLoading?(0,Y.jsx)(n,{}):y.isError?(0,Y.jsx)(q,{title:`Failed to load cache rules`,error:y.error,onRetry:()=>y.refetch()}):Z.length===0?(0,Y.jsx)(re,{children:(0,Y.jsxs)(j,{children:[(0,Y.jsx)(A,{children:(0,Y.jsx)(B,{size:32})}),(0,Y.jsx)(ne,{children:`No cache rules yet`}),(0,Y.jsx)(k,{children:`Cache rules let operators force, disable, or override cache behaviour across virtual keys, models, principals, or custom request metadata — no client code changes required.`}),a&&(0,Y.jsxs)(i,{colorPalette:`orange`,onClick:()=>N(!0),mt:2,children:[(0,Y.jsx)(H,{size:14}),` New rule`]})]})}):(0,Y.jsx)(D,{width:`full`,overflow:`hidden`,children:(0,Y.jsx)(te,{paddingY:0,paddingX:0,children:(0,Y.jsxs)(f,{variant:`line`,size:`md`,width:`full`,children:[(0,Y.jsx)(m,{children:(0,Y.jsxs)(_,{children:[(0,Y.jsx)(g,{width:`60px`,children:`Priority`}),(0,Y.jsx)(g,{children:`Name`}),(0,Y.jsx)(g,{children:`Match`}),(0,Y.jsx)(g,{children:`Action`}),(0,Y.jsx)(g,{children:`Enabled`}),(0,Y.jsx)(g,{})]})}),(0,Y.jsx)(ee,{children:Z.map(e=>(0,Y.jsxs)(_,{children:[(0,Y.jsx)(h,{children:(0,Y.jsx)(u,{colorPalette:`gray`,children:e.priority})}),(0,Y.jsx)(h,{children:(0,Y.jsxs)(c,{align:`start`,gap:0,children:[(0,Y.jsx)(s,{fontWeight:`medium`,children:e.name}),e.description&&(0,Y.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:e.description})]})}),(0,Y.jsx)(h,{children:(0,Y.jsx)(ce,{matchers:e.matchers})}),(0,Y.jsx)(h,{children:(0,Y.jsx)(le,{action:e.action,modeEnum:e.modeEnum})}),(0,Y.jsx)(h,{children:(0,Y.jsxs)(C,{checked:e.enabled,onCheckedChange:()=>void X(e),disabled:!o,size:`sm`,colorPalette:`orange`,children:[(0,Y.jsx)(w,{}),(0,Y.jsx)(T,{})]})}),(0,Y.jsx)(h,{children:(o||d)&&(0,Y.jsxs)(p.Root,{children:[(0,Y.jsx)(p.Trigger,{asChild:!0,children:(0,Y.jsx)(i,{variant:`ghost`,size:`xs`,"aria-label":`Actions`,children:(0,Y.jsx)(l,{size:14})})}),(0,Y.jsxs)(p.Content,{children:[o&&(0,Y.jsxs)(p.Item,{value:`edit`,onClick:()=>I(e),children:[(0,Y.jsx)(W,{size:14}),` Edit`]}),d&&(0,Y.jsxs)(p.Item,{value:`archive`,onClick:()=>G(e),children:[(0,Y.jsx)(z,{size:14}),` Archive`]})]})]})})]},e.id))})]})})})]})]}),(0,Y.jsx)(ae,{open:O,onOpenChange:N,onCreated:()=>{y.refetch()}}),(0,Y.jsx)(oe,{rule:P,onOpenChange:e=>{e||I(null)},onSaved:()=>{I(null),y.refetch()}}),(0,Y.jsx)(v,{open:!!V,onOpenChange:e=>{e||G(null)},title:`Archive ${V?.name??`rule`}?`,message:`The rule stops applying to new requests. Historical traces stay attributed to their rule id; the rule itself remains visible in the audit log.`,confirmLabel:`Archive`,tone:`warning`,loading:x.isPending,onConfirm:K})]})}function ce({matchers:e}){if(!e||typeof e!=`object`)return(0,Y.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`any request`});let t=e,n=[];if(typeof t.vk_id==`string`&&n.push(`vk=${t.vk_id}`),typeof t.vk_prefix==`string`&&n.push(`vk~${t.vk_prefix}*`),Array.isArray(t.vk_tags)&&t.vk_tags.length>0&&n.push(`tags:[${t.vk_tags.join(`,`)}]`),typeof t.principal_id==`string`&&n.push(`user=${t.principal_id}`),typeof t.model==`string`&&n.push(`model=${t.model}`),t.request_metadata&&typeof t.request_metadata==`object`&&!Array.isArray(t.request_metadata)){let e=Object.keys(t.request_metadata);e.length>0&&n.push(`meta:${e.join(`,`)}`)}return n.length===0?(0,Y.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`any request`}):(0,Y.jsx)(a,{gap:1,flexWrap:`wrap`,children:n.map(e=>(0,Y.jsx)(u,{colorPalette:`gray`,fontSize:`2xs`,variant:`subtle`,children:e},e))})}function le({action:e,modeEnum:t}){let n=e??{};return(0,Y.jsxs)(a,{gap:1,children:[(0,Y.jsx)(u,{colorPalette:t===`FORCE`?`orange`:t===`DISABLE`?`red`:`green`,children:t.toLowerCase()}),typeof n.ttl==`number`&&(0,Y.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,children:[`ttl `,n.ttl,`s`]}),typeof n.salt==`string`&&n.salt.length>0&&(0,Y.jsx)(s,{fontSize:`xs`,color:`fg.muted`,children:`salted`})]})}var ue=G(`gatewayCacheRules:view`,{layoutComponent:R})(se);export{ue as default};
|
|
2
|
-
//# sourceMappingURL=cache-rules-BLbEe56I.js.map
|