@langwatch/server 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/feature-map.json +1279 -0
- package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-C2BpUHmD.js +2 -0
- package/langwatch/dist/client/assets/AddDatasetRecordDrawer-MGG9OkL5.js +6 -0
- package/langwatch/dist/client/assets/AddOrEditAnnotationScore-DT7Wwgex.js +2 -0
- package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-B_bvSihT.js +2 -0
- package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-DTTe34qt.js +3 -0
- package/langwatch/dist/client/assets/AddParticipants-Cu80BF8F.js +2 -0
- package/langwatch/dist/client/assets/AgentHistoryDrawer-Dv3a7Uw1.js +2 -0
- package/langwatch/dist/client/assets/AgentHttpEditorDrawer-BsTydMou.js +5 -0
- package/langwatch/dist/client/assets/AgentListDrawer-CkuGaFHx.js +2 -0
- package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-K0PUyG8U.js +2 -0
- package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CMHvyQPV.js +2 -0
- package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-B18KFX98.js +2 -0
- package/langwatch/dist/client/assets/AiGatewayLayout-DL7at8rW.js +2 -0
- package/langwatch/dist/client/assets/AnnotationsTable-CrX2ZAvY.js +2 -0
- package/langwatch/dist/client/assets/AreaChart-BYqCBYVe.js +2 -0
- package/langwatch/dist/client/assets/AutomationDrawer-gr9nl_bx.js +112 -0
- package/langwatch/dist/client/assets/BatchEvaluationSummary-DJGlsFFE.js +2 -0
- package/langwatch/dist/client/assets/BudgetEditDrawer-DA_Za9Jh.js +2 -0
- package/langwatch/dist/client/assets/CartesianChart-BvVgDMpj.js +54 -0
- package/langwatch/dist/client/assets/CascadeArchiveDialog-CRcsYqD3.js +2 -0
- package/langwatch/dist/client/assets/ChartCard-C-6jgIhJ.js +2 -0
- package/langwatch/dist/client/assets/ChartTooltip-DDBarZKG.js +4 -0
- package/langwatch/dist/client/assets/ChatWindow-DgNy40Dm.js +5 -0
- package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-N8k4omh5.js +9 -0
- package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-B-0KIS0U.js +2 -0
- package/langwatch/dist/client/assets/ColorfulBlockIcons-DntRdsrM.js +6 -0
- package/langwatch/dist/client/assets/ColumnTypeIcon-DHpZtj81.js +2 -0
- package/langwatch/dist/client/assets/ConfirmDialog-Bv_GbZtR.js +2 -0
- package/langwatch/dist/client/assets/ContactSalesBlock-BKfDeTTe.js +2 -0
- package/langwatch/dist/client/assets/Conversation-BLw2XAh1.js +2 -0
- package/langwatch/dist/client/assets/CopyInput-D4OHtSik.js +2 -0
- package/langwatch/dist/client/assets/CopyableInputWithPrefix-CqmK9rdo.js +2 -0
- package/langwatch/dist/client/assets/CreateProjectDrawer-z3akmVmk.js +2 -0
- package/langwatch/dist/client/assets/CreateTeamDrawer-Cq0VeHPU.js +2 -0
- package/langwatch/dist/client/assets/CustomGraph-D1JcOEDG.js +2 -0
- package/langwatch/dist/client/assets/DashboardLayout-cHFbN-Gk.js +6 -0
- package/langwatch/dist/client/assets/DashboardNameDrawer-Gox6uoUt.js +2 -0
- package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-jE8I0jR2.js +2 -0
- package/langwatch/dist/client/assets/DatasetEditorTable-DKIy0xQj.js +2 -0
- package/langwatch/dist/client/assets/DatasetPickerList-DxrvRALJ.js +2 -0
- package/langwatch/dist/client/assets/DatasetPreviewTable-BtNFthdy.js +2 -0
- package/langwatch/dist/client/assets/DatasetSelector-DnwaHRnP.js +2 -0
- package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-CdUN3LnJ.js +2 -0
- package/langwatch/dist/client/assets/DeleteConfirmationDialog-DuCAmpDY.js +2 -0
- package/langwatch/dist/client/assets/DocsLinks-CIoxiusp.js +2 -0
- package/langwatch/dist/client/assets/DynamicZodForm-g1UNpH1b.js +2 -0
- package/langwatch/dist/client/assets/EditAutomationFilterDrawer-BTKzOnMx.js +3 -0
- package/langwatch/dist/client/assets/EditModelProviderDrawer-CRJeagvH.js +4 -0
- package/langwatch/dist/client/assets/EditProjectDrawer-B6CJf6nC.js +2 -0
- package/langwatch/dist/client/assets/EmojiPickerModal-DT_Uj7SU.js +3 -0
- package/langwatch/dist/client/assets/EnterpriseLockedSurface-BjKgoqAx.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-BnIwWX8t.js +107 -0
- package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-BMpitetN.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorEditorDrawer-8SJeJRen.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorEditorShared-BJefmSxm.js +43 -0
- package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-D9r7pDt9.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorListDrawer-J_BFDGv3.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorMappingsSection-DZFvYqNu.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorSelection-DLWkQLtb.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorSelectionBox-CPndz_g-.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-B1g5DjJ7.js +2 -0
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-KKfZF0P-.js +2 -0
- package/langwatch/dist/client/assets/ExecutionState-Dh8lIhIP.js +2 -0
- package/langwatch/dist/client/assets/ExternalImage-As_YKOAz.js +34 -0
- package/langwatch/dist/client/assets/FeatureFlagsDrawer-ClPIMzIj.js +2 -0
- package/langwatch/dist/client/assets/FieldInfoTooltip-s2rM7SM0.js +2 -0
- package/langwatch/dist/client/assets/FieldsFilters-DePzLbr2.js +2 -0
- package/langwatch/dist/client/assets/FilterDisplay-ClLW19sO.js +2 -0
- package/langwatch/dist/client/assets/FilterSidebar-_ppaUjTr.js +2 -0
- package/langwatch/dist/client/assets/FormatMoney-CGjDIju_.js +2 -0
- package/langwatch/dist/client/assets/FoundryDrawer-DGKNXqmH.js +2 -0
- package/langwatch/dist/client/assets/FullLogo-itaa7fj-.js +2 -0
- package/langwatch/dist/client/assets/GovernanceLayout-DO9JArUM.js +2 -0
- package/langwatch/dist/client/assets/GraphsLayout-CjPYn5X3.js +2 -0
- package/langwatch/dist/client/assets/GroupBindingInputRow-zL2daQIU.js +2 -0
- package/langwatch/dist/client/assets/GuardrailsDrawer-Cf49144Z.js +91 -0
- package/langwatch/dist/client/assets/History-Cyg2gtXB.js +17 -0
- package/langwatch/dist/client/assets/HorizontalFormControl-COLSSPyK.js +2 -0
- package/langwatch/dist/client/assets/HoverableBigText-BLoq2yxD.js +2 -0
- package/langwatch/dist/client/assets/InstallCliCard-DvH3ygIs.js +2 -0
- package/langwatch/dist/client/assets/IntegratePaneShell-DmBxXblY.js +8 -0
- package/langwatch/dist/client/assets/InviteMemberDrawer-BPyf9yg9.js +2 -0
- package/langwatch/dist/client/assets/LLMModelCostDrawer-Ddduogw2.js +2 -0
- package/langwatch/dist/client/assets/LangyContextTarget-C6xwYVGg.js +2 -0
- package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-BYKcrVD_.js +2 -0
- package/langwatch/dist/client/assets/Legend-DoNXU8yt.js +6 -0
- package/langwatch/dist/client/assets/Line-DVmhil3S.js +2 -0
- package/langwatch/dist/client/assets/LineChart-JT5Tcp_D.js +2 -0
- package/langwatch/dist/client/assets/ListTable-sDgRCJ9e.js +2 -0
- package/langwatch/dist/client/assets/LoadingScreen-XWYCoKBN.js +2 -0
- package/langwatch/dist/client/assets/Markdown-CjWZDaeK.js +3 -0
- package/langwatch/dist/client/assets/MenuLink-CCPiKN-n.js +2 -0
- package/langwatch/dist/client/assets/MessageCard-CbSQoH1U.js +2 -0
- package/langwatch/dist/client/assets/MetadataTag-B1XwJcdK.js +5 -0
- package/langwatch/dist/client/assets/ModelProviderCustomModelInput-DKgydORR.js +2 -0
- package/langwatch/dist/client/assets/ModelProviderScreen-CoHgPhxe.js +2 -0
- package/langwatch/dist/client/assets/ModelSelector-dbR6V8hR.js +2 -0
- package/langwatch/dist/client/assets/MyLayout-BCFIoFGU.js +2 -0
- package/langwatch/dist/client/assets/NavigationFooter-BV-y1Ccf.js +2 -0
- package/langwatch/dist/client/assets/NewWorkflowForm-DgYkTq45.js +2 -0
- package/langwatch/dist/client/assets/NoDataInfoBlock-CqSD7i-D.js +2 -0
- package/langwatch/dist/client/assets/OnboardingContainer-jXD3w576.js +2 -0
- package/langwatch/dist/client/assets/OnlineEvaluationDrawer-3RfgPXAt.js +2 -0
- package/langwatch/dist/client/assets/OpsPageShell-BOi49ML9.js +2 -0
- package/langwatch/dist/client/assets/OttlEditor-7MOJI6SZ.js +3 -0
- package/langwatch/dist/client/assets/OverflownText-DITOBs56.js +2 -0
- package/langwatch/dist/client/assets/ProjectAvatar-BOH7ULC-.js +2 -0
- package/langwatch/dist/client/assets/ProjectLangyLayout-D6uI0rgc.js +82 -0
- package/langwatch/dist/client/assets/PromptEditorDrawer-CawpMwv2.js +2 -0
- package/langwatch/dist/client/assets/PromptListDrawer-mJuEu6sl.js +2 -0
- package/langwatch/dist/client/assets/PropertySectionTitle-DM-QD_X7.js +37 -0
- package/langwatch/dist/client/assets/ProviderModelSelector-bu_UnJgn.js +2 -0
- package/langwatch/dist/client/assets/ProviderScopeChips-DAith1M3.js +2 -0
- package/langwatch/dist/client/assets/PushToCopiesDialog-ZhJKOmpB.js +2 -0
- package/langwatch/dist/client/assets/RandomColorAvatar-D4Pjdi5E.js +2 -0
- package/langwatch/dist/client/assets/ReferenceDot-BNL3mb_4.js +2 -0
- package/langwatch/dist/client/assets/RenderInputOutput-B6SIoJEE.js +261 -0
- package/langwatch/dist/client/assets/ScenarioFormDrawer-BreFWAEL.js +2 -0
- package/langwatch/dist/client/assets/ScenarioInputMappingSection-BO7xuz3Q.js +2 -0
- package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-B7tqZUtg.js +3 -0
- package/langwatch/dist/client/assets/ScopeChipPicker-DW0UYA9z.js +2 -0
- package/langwatch/dist/client/assets/SearchInput-Q-TBf_3C.js +2 -0
- package/langwatch/dist/client/assets/SectionNavigationLayout-DELi2l8C.js +2 -0
- package/langwatch/dist/client/assets/SelectDatasetDrawer-z00GrHUJ.js +2 -0
- package/langwatch/dist/client/assets/SelectionActionBar-CmpsxKus.js +2 -0
- package/langwatch/dist/client/assets/SeriesFilterDrawer-DBl29Nft.js +2 -0
- package/langwatch/dist/client/assets/SettingsLayout-TFI-annu.js +2 -0
- package/langwatch/dist/client/assets/SetupWithAgentButton-ChiBWonD.js +4 -0
- package/langwatch/dist/client/assets/ShikiCommandBox-CvJJv-UK.js +5 -0
- package/langwatch/dist/client/assets/SpanDetails-Bf9G4Q7r.js +3 -0
- package/langwatch/dist/client/assets/SubscriptionPage-DojUae0-.js +2 -0
- package/langwatch/dist/client/assets/SuiteFormDrawer-BkSwohnS.js +2 -0
- package/langwatch/dist/client/assets/TabButton-IdHwwJvZ.js +3 -0
- package/langwatch/dist/client/assets/TableCell-BOc9hDdP.js +2 -0
- package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-BkACL4B0.js +2 -0
- package/langwatch/dist/client/assets/TeamForm-CoGCbaXE.js +2 -0
- package/langwatch/dist/client/assets/TeamUserRoleField-DaCIsPr0.js +2 -0
- package/langwatch/dist/client/assets/TraceDetails-D_HPr1ii.js +9 -0
- package/langwatch/dist/client/assets/TraceDetailsDrawer-CFMdgFO6.js +2 -0
- package/langwatch/dist/client/assets/TraceIdPeek-DmsxeUlT.js +2 -0
- package/langwatch/dist/client/assets/TracesMapping-qL9_JqHU.js +2 -0
- package/langwatch/dist/client/assets/UpgradeModal-DaVSEBO2.js +92 -0
- package/langwatch/dist/client/assets/UpgradeModalContent-DUimbawj.js +2 -0
- package/langwatch/dist/client/assets/UploadCSVDrawer-2fH0dmmN.js +3 -0
- package/langwatch/dist/client/assets/VariablesSection-BOZytTct.js +2 -0
- package/langwatch/dist/client/assets/VersionBadge-BNwXa8K1.js +2 -0
- package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-BvCK6x4i.js +1161 -0
- package/langwatch/dist/client/assets/ViewAutomationDrawer-CBoDRCfF.js +2 -0
- package/langwatch/dist/client/assets/VirtualKeySecretReveal-z9OhRCRq.js +54 -0
- package/langwatch/dist/client/assets/WelcomeLayout-veH9XP9n.js +2 -0
- package/langwatch/dist/client/assets/WithFeatureFlagGuard-D09SSCsN.js +2 -0
- package/langwatch/dist/client/assets/WithPermissionGuard-BBKTBlhW.js +2 -0
- package/langwatch/dist/client/assets/WorkflowCard-CUUg0Jb9.js +2 -0
- package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-DQPMmz5y.js +2 -0
- package/langwatch/dist/client/assets/_...path_-Dl2wM_Co.js +2 -0
- package/langwatch/dist/client/assets/_Uint8Array-CVdXk-9j.js +2 -0
- package/langwatch/dist/client/assets/__...path__-dvuiwbR8.js +22 -0
- package/langwatch/dist/client/assets/_baseAssignValue-D1riHssy.js +2 -0
- package/langwatch/dist/client/assets/_baseClone-Btuu3kUN.js +2 -0
- package/langwatch/dist/client/assets/_baseEach-D42E_cYN.js +2 -0
- package/langwatch/dist/client/assets/_baseFor-DjY96g6R.js +2 -0
- package/langwatch/dist/client/assets/_experiment_-C41VDj2_.js +2 -0
- package/langwatch/dist/client/assets/_id_-6sd4MNOz.js +2 -0
- package/langwatch/dist/client/assets/_id_-7yHuXZsv.js +2 -0
- package/langwatch/dist/client/assets/_id_-BiJsS6cZ.js +2 -0
- package/langwatch/dist/client/assets/_id_-BxNfkyzv.js +2 -0
- package/langwatch/dist/client/assets/_id_-DjvwAa9I.js +2 -0
- package/langwatch/dist/client/assets/_id_-Dv1Ha5td.js +2 -0
- package/langwatch/dist/client/assets/_id_-qIAmzXj9.js +2 -0
- package/langwatch/dist/client/assets/_project_-WrF4swO9.js +8 -0
- package/langwatch/dist/client/assets/_runId_-uzKEhtNe.js +7 -0
- package/langwatch/dist/client/assets/_shell-CBKyngpn.js +2 -0
- package/langwatch/dist/client/assets/_slug_-B7rGjVou.js +17 -0
- package/langwatch/dist/client/assets/_slug_-BM065qSQ.js +2 -0
- package/langwatch/dist/client/assets/_slug_-DTN4hRRD.js +2 -0
- package/langwatch/dist/client/assets/_team_-DFCS7cLC.js +2 -0
- package/langwatch/dist/client/assets/_workflow_-Dm-v5D1q.js +25 -0
- package/langwatch/dist/client/assets/_workflow_-Od6Ld1fG.js +3 -0
- package/langwatch/dist/client/assets/accept-DfhUN0Qn.js +2 -0
- package/langwatch/dist/client/assets/activity-ikjk_AlK.js +1 -0
- package/langwatch/dist/client/assets/agents-BbtJ377u.js +2 -0
- package/langwatch/dist/client/assets/alerts-ikjk_AlK.js +1 -0
- package/langwatch/dist/client/assets/all-Ba9m0fkb.js +2 -0
- package/langwatch/dist/client/assets/analytics-BfdI38ZC.js +2 -0
- package/langwatch/dist/client/assets/annotation-scores-BY75kcBF.js +2 -0
- package/langwatch/dist/client/assets/annotations-DIwdkHHY.js +2 -0
- package/langwatch/dist/client/assets/anomaly-rules-BmEX38RD.js +2 -0
- package/langwatch/dist/client/assets/api-keys-BPifPObL.js +4 -0
- package/langwatch/dist/client/assets/asaplangy-BjnuNv4L.js +5 -0
- package/langwatch/dist/client/assets/audit-log-2z_Ec4XU.js +2 -0
- package/langwatch/dist/client/assets/auth-BJm09Odd.js +2 -0
- package/langwatch/dist/client/assets/authentication-D4a-VSlX.js +2 -0
- package/langwatch/dist/client/assets/authorize-BBjJ2zjw.js +2 -0
- package/langwatch/dist/client/assets/authorize-CHqAf3Jd.js +2 -0
- package/langwatch/dist/client/assets/automations-Bds5nLI_.js +2 -0
- package/langwatch/dist/client/assets/automations-ikjk_AlK.js +1 -0
- package/langwatch/dist/client/assets/billing-plans-K7xawVCS.js +2 -0
- package/langwatch/dist/client/assets/blank-DsMQ71pJ.js +2 -0
- package/langwatch/dist/client/assets/blobs-Dc7nKnmO.js +2 -0
- package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3-57B2W0rq.js +133 -0
- package/langwatch/dist/client/assets/budgets-dKK-wYyg.js +3 -0
- package/langwatch/dist/client/assets/bug-reports-BxCDdVoL.js +2 -0
- package/langwatch/dist/client/assets/cache-rules-Ds14kJAt.js +2 -0
- package/langwatch/dist/client/assets/choose-X7Hyqyyu.js +2 -0
- package/langwatch/dist/client/assets/chunk-EX3LRPZG-DF3ACR9i.js +232 -0
- package/langwatch/dist/client/assets/chunk-FWX5IMBZ-CIlmcu0O.js +3 -0
- package/langwatch/dist/client/assets/chunk-PUDLZKDR-Dj_zAVVr.js +157 -0
- package/langwatch/dist/client/assets/chunk-RYQCIY6F-CjWAFgxP.js +2 -0
- package/langwatch/dist/client/assets/chunk-V7JOEXUC-BgVcuIhi.js +207 -0
- package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-Cw7PXCaC.js +2 -0
- package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-Cw7PXCaC.js +2 -0
- package/langwatch/dist/client/assets/codeAgentConfig-B0NzDmlQ.js +7 -0
- package/langwatch/dist/client/assets/codingDefaultSync-ebaLPfnN.js +2 -0
- package/langwatch/dist/client/assets/configure-CrbOTC5S.js +4 -0
- package/langwatch/dist/client/assets/custom-D8Emd7w-.js +12 -0
- package/langwatch/dist/client/assets/custom_evaluator-BtYta_Dj.js +31 -0
- package/langwatch/dist/client/assets/dagre-ClO7SEns.js +2 -0
- package/langwatch/dist/client/assets/dagre-VKFMJZFB-evqDS8UW.js +5 -0
- package/langwatch/dist/client/assets/data-privacy-GCArtTFq.js +2 -0
- package/langwatch/dist/client/assets/data-retention-BtLi9M98.js +2 -0
- package/langwatch/dist/client/assets/datasets-DeNG9KNJ.js +2 -0
- package/langwatch/dist/client/assets/debounce-r-8TPIqh.js +2 -0
- package/langwatch/dist/client/assets/defaultModelState-ByR0bEhZ.js +2 -0
- package/langwatch/dist/client/assets/dejaview-BF8VqQGI.js +2 -0
- package/langwatch/dist/client/assets/departments-D2L92_Qa.js +2 -0
- package/langwatch/dist/client/assets/devices-C8e0So_K.js +2 -0
- package/langwatch/dist/client/assets/dist-B1XMO10X.js +6 -0
- package/langwatch/dist/client/assets/drawerFromUrl-BZIwwDLm.js +2 -0
- package/langwatch/dist/client/assets/edit-pIB-bQM_.js +62 -0
- package/langwatch/dist/client/assets/email-suppressions-Bq0lhfwG.js +2 -0
- package/langwatch/dist/client/assets/erDiagram-Q63AITRT-BqEHcyA0.js +86 -0
- package/langwatch/dist/client/assets/error-2TTx9xpE.js +2 -0
- package/langwatch/dist/client/assets/evaluations-0Nc6rWP8.js +2 -0
- package/langwatch/dist/client/assets/evaluations-DHmE-YCm.js +2 -0
- package/langwatch/dist/client/assets/evaluators-DKbY-ajr.js +146 -0
- package/langwatch/dist/client/assets/evaluators-v4CDfsOE.js +2 -0
- package/langwatch/dist/client/assets/experiments-BRN0rGL9.js +1 -0
- package/langwatch/dist/client/assets/external-link-CtHzR85H.js +2 -0
- package/langwatch/dist/client/assets/feature-flags-BDyiuat4.js +2 -0
- package/langwatch/dist/client/assets/fetchSSE-GcVBzE9n.js +3 -0
- package/langwatch/dist/client/assets/fieldset-CIGh0Uxg.js +2 -0
- package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-BOl-6oqO.js +1 -0
- package/langwatch/dist/client/assets/forgot-password-DjvudMXW.js +2 -0
- package/langwatch/dist/client/assets/formatMoney-ByqR-Rrd.js +2 -0
- package/langwatch/dist/client/assets/foundry-Co_CpgKb.js +477 -0
- package/langwatch/dist/client/assets/gateway-B0y3Tz7G.js +2 -0
- package/langwatch/dist/client/assets/getEvaluator-pJF3ehUx.js +2 -0
- package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-Bbj-WQTj.js +2 -0
- package/langwatch/dist/client/assets/governance-BtuwwuRw.js +2 -0
- package/langwatch/dist/client/assets/graphlib-CwcejmA1.js +2 -0
- package/langwatch/dist/client/assets/groups-DTVa4dcS.js +2 -0
- package/langwatch/dist/client/assets/guardrails-BnCJsF0m.js +2 -0
- package/langwatch/dist/client/assets/http-BIG04f8c.js +7 -0
- package/langwatch/dist/client/assets/identifierUtils-B1LGnOD5.js +2 -0
- package/langwatch/dist/client/assets/immer-BdlOHsfO.js +14 -0
- package/langwatch/dist/client/assets/index-DtiounXP.js +68 -0
- package/langwatch/dist/client/assets/ingestion-source-detail-hmCupOG1.js +19 -0
- package/langwatch/dist/client/assets/ingestion-sources-sv7eDiMD.js +12 -0
- package/langwatch/dist/client/assets/integrations-CM7dYrOG.js +2 -0
- package/langwatch/dist/client/assets/isArrayLikeObject-6lUBvOUd.js +2 -0
- package/langwatch/dist/client/assets/isSymbol-n0ARt1yC.js +2 -0
- package/langwatch/dist/client/assets/langyHomeSuggestions-Oyh_vavj.js +2 -0
- package/langwatch/dist/client/assets/latestAliases-D_86OOcA.js +2 -0
- package/langwatch/dist/client/assets/license-CYtxniam.js +2 -0
- package/langwatch/dist/client/assets/loadModelCatalog-31-xT4W4.js +2 -0
- package/langwatch/dist/client/assets/map-BCpZm9Sc.js +2 -0
- package/langwatch/dist/client/assets/mappingValidation-DPNnGAuO.js +2 -0
- package/langwatch/dist/client/assets/me-1nxAV6zO.js +2 -0
- package/langwatch/dist/client/assets/me-wWuZrajs.js +7 -0
- package/langwatch/dist/client/assets/members-Bau-5CPK.js +2 -0
- package/langwatch/dist/client/assets/mermaid.core-oQEgcWXd.js +12 -0
- package/langwatch/dist/client/assets/messages-kTp5NaSm.js +2 -0
- package/langwatch/dist/client/assets/metrics-Cpovzjg4.js +2 -0
- package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-OcYZSGuC.js +97 -0
- package/langwatch/dist/client/assets/model-costs-DiRpmy-H.js +2 -0
- package/langwatch/dist/client/assets/model-providers-DRq5Q7er.js +2 -0
- package/langwatch/dist/client/assets/modelProviderHelpers-STUAbD02.js +2 -0
- package/langwatch/dist/client/assets/my-queue-veenWZWf.js +2 -0
- package/langwatch/dist/client/assets/normalizeComparison-CDNTbMdZ.js +2 -0
- package/langwatch/dist/client/assets/not-found-Nu1odKyD.js +2 -0
- package/langwatch/dist/client/assets/now-BQGidI_5.js +2 -0
- package/langwatch/dist/client/assets/onboarding-BWJ038z8.js +2 -0
- package/langwatch/dist/client/assets/online-evaluations-k-WwH1ML.js +2 -0
- package/langwatch/dist/client/assets/ops-D9am3MEi.js +2 -0
- package/langwatch/dist/client/assets/organizations-CMTT_97U.js +2 -0
- package/langwatch/dist/client/assets/pages-D5p_o0LC.js +2 -0
- package/langwatch/dist/client/assets/persistence-jLMreGhL.js +2 -0
- package/langwatch/dist/client/assets/plans-v8LBcXa9.js +2 -0
- package/langwatch/dist/client/assets/product-CAja-R4_.js +2 -0
- package/langwatch/dist/client/assets/project-DbS0dYGR.js +2 -0
- package/langwatch/dist/client/assets/projections-B4mXJEvc.js +2 -0
- package/langwatch/dist/client/assets/projects-DnYaZW6w.js +2 -0
- package/langwatch/dist/client/assets/promptHandle-CQ_zUeRB.js +2 -0
- package/langwatch/dist/client/assets/prompts-BAxWZhm5.js +8 -0
- package/langwatch/dist/client/assets/radio-group-y_PtCP6q.js +2 -0
- package/langwatch/dist/client/assets/registry-KCPOxhx0.js +2 -0
- package/langwatch/dist/client/assets/reports-B_Y4pHYs.js +2 -0
- package/langwatch/dist/client/assets/request-bU99z82H.js +2 -0
- package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-BYId9zaF.js +85 -0
- package/langwatch/dist/client/assets/reset-password-zMr6-23y.js +2 -0
- package/langwatch/dist/client/assets/role-bindings-BvPzAUj1.js +2 -0
- package/langwatch/dist/client/assets/roles-CjwqOKoo.js +2 -0
- package/langwatch/dist/client/assets/routing-policies-C7yjQJuY.js +5 -0
- package/langwatch/dist/client/assets/scenarios-CdrzuCtM.js +2 -0
- package/langwatch/dist/client/assets/scheduler-CfXVwiOa.js +2 -0
- package/langwatch/dist/client/assets/schedules-ikjk_AlK.js +1 -0
- package/langwatch/dist/client/assets/scim-CGJ8MwNu.js +2 -0
- package/langwatch/dist/client/assets/secrets-DZef0jTb.js +2 -0
- package/langwatch/dist/client/assets/segment-group-EW0AyNd-.js +2 -0
- package/langwatch/dist/client/assets/segmented-control-SS4Yq_Ti.js +2 -0
- package/langwatch/dist/client/assets/select-C5JAM7Gf.js +2 -0
- package/langwatch/dist/client/assets/send-TZcuPW9Z.js +2 -0
- package/langwatch/dist/client/assets/sequenceView-vubFe0e7.js +5 -0
- package/langwatch/dist/client/assets/seriesOptions-0YtTiTzZ.js +1011 -0
- package/langwatch/dist/client/assets/settings-CfAtn_PH.js +2 -0
- package/langwatch/dist/client/assets/setup-In6OXn3a.js +2 -0
- package/langwatch/dist/client/assets/shikiAdapter-lZp3oxvk.js +3 -0
- package/langwatch/dist/client/assets/signin-CMU_rlgk.js +2 -0
- package/langwatch/dist/client/assets/signup-CYKtIfrB.js +2 -0
- package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CKO-9021.js +2 -0
- package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-BnXuBsJr.js +2 -0
- package/langwatch/dist/client/assets/subscription-CBiotOK9.js +3 -0
- package/langwatch/dist/client/assets/subscriptions-D55paZaw.js +2 -0
- package/langwatch/dist/client/assets/suggestionUI-KPD1is36.js +106 -0
- package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-B0ptAIsf.js +3 -0
- package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-DzqdWH4x.js +9 -0
- package/langwatch/dist/client/assets/switch-BOt3Np6s.js +2 -0
- package/langwatch/dist/client/assets/switch-BnyTlP1L.js +2 -0
- package/langwatch/dist/client/assets/tabs-D8PJtlU3.js +2 -0
- package/langwatch/dist/client/assets/teams-CE3UCC84.js +2 -0
- package/langwatch/dist/client/assets/teams-CxmVu0zp.js +2 -0
- package/langwatch/dist/client/assets/tool-catalog-DTTKCxyF.js +7 -0
- package/langwatch/dist/client/assets/toolIcons-n2K5OHKw.js +2 -0
- package/langwatch/dist/client/assets/tooltip-CYWvZEOf.js +2 -0
- package/langwatch/dist/client/assets/topic-clustering-C37AbBFy.js +2 -0
- package/langwatch/dist/client/assets/topics-rviNSdYR.js +2 -0
- package/langwatch/dist/client/assets/traceExecutor-DQlsNg6N.js +55 -0
- package/langwatch/dist/client/assets/traces-DnlS2lMP.js +289 -0
- package/langwatch/dist/client/assets/tracesMapping-DJvqZsfB.js +3 -0
- package/langwatch/dist/client/assets/tracking-6s9dX1_R.js +2 -0
- package/langwatch/dist/client/assets/types-BeNupKna.js +2 -0
- package/langwatch/dist/client/assets/types-ChBnYRcc.js +2 -0
- package/langwatch/dist/client/assets/types-DXVP3BA7.js +2 -0
- package/langwatch/dist/client/assets/types-atzk7phf.js +2 -0
- package/langwatch/dist/client/assets/unsubscribe-uUCCImkQ.js +2 -0
- package/langwatch/dist/client/assets/usage-DBjFOkD3.js +2 -0
- package/langwatch/dist/client/assets/usage-De8DbhVE.js +2 -0
- package/langwatch/dist/client/assets/use-breakpoint-BdbDgj6J.js +2 -0
- package/langwatch/dist/client/assets/use-generic-onboarding-flow-CQjNkSYf.js +2 -0
- package/langwatch/dist/client/assets/useActivePlan-DZotDN7k.js +2 -0
- package/langwatch/dist/client/assets/useAllPromptsForProject-yZtsv1kJ.js +2 -0
- package/langwatch/dist/client/assets/useAnnotationQueues-BJ8Vb6SZ.js +2 -0
- package/langwatch/dist/client/assets/useAvailableEvaluators-C6cl3TSs.js +2 -0
- package/langwatch/dist/client/assets/useCyclingVerb-CMPh6fkl.js +2 -0
- package/langwatch/dist/client/assets/useDepartmentColumn-C4l1_4BR.js +2 -0
- package/langwatch/dist/client/assets/useEvaluationsV3Store-CMnxA8pt.js +2 -0
- package/langwatch/dist/client/assets/useExportTraces-DzTqFSlc.js +2 -0
- package/langwatch/dist/client/assets/useFeatureFlag-CKFU9lsX.js +2 -0
- package/langwatch/dist/client/assets/useInviteActions-CNRL7usw.js +2 -0
- package/langwatch/dist/client/assets/useLicenseEnforcement-BIiCopDI.js +2 -0
- package/langwatch/dist/client/assets/useLiteMemberGuard-ChV0lUs4.js +43 -0
- package/langwatch/dist/client/assets/usePersonalContext-D-HsFKQo.js +2 -0
- package/langwatch/dist/client/assets/useProjectSpanNames-BKMm-yLN.js +2 -0
- package/langwatch/dist/client/assets/useProjectsForCopy-BPGjhWUl.js +2 -0
- package/langwatch/dist/client/assets/useRunViaApiTabs-BGv2kygX.js +50 -0
- package/langwatch/dist/client/assets/useSavedViews-DH6Poufh.js +2 -0
- package/langwatch/dist/client/assets/useShowLangy-DvcJ7z1U.js +2 -0
- package/langwatch/dist/client/assets/useSimulationUpdateListener-CcqEq03v.js +2 -0
- package/langwatch/dist/client/assets/useTargetName-CByKsdU-.js +2 -0
- package/langwatch/dist/client/assets/useTargetNameMap-C8kjUxhY.js +2 -0
- package/langwatch/dist/client/assets/useTraceDetailsDrawer-BgcNOady.js +2 -0
- package/langwatch/dist/client/assets/useTraceUpdateListener-D5UNLNbd.js +2 -0
- package/langwatch/dist/client/assets/useUrlScopeFilter-D0HZ-mkj.js +2 -0
- package/langwatch/dist/client/assets/useWorkflowStore-CVvg8K0Q.js +8 -0
- package/langwatch/dist/client/assets/users-802bPAIG.js +2 -0
- package/langwatch/dist/client/assets/users-CWkRn-Tl.js +2 -0
- package/langwatch/dist/client/assets/users-DhJ0ZUHi.js +2 -0
- package/langwatch/dist/client/assets/v3-D65ySaeM.js +2 -0
- package/langwatch/dist/client/assets/variables-BpyyIkKh.js +396 -0
- package/langwatch/dist/client/assets/viewStore-Bq2Jqc8R.js +2 -0
- package/langwatch/dist/client/assets/virtual-keys-Cbeg9TQU.js +2 -0
- package/langwatch/dist/client/assets/welcome-Bh4D-qW7.js +16 -0
- package/langwatch/dist/client/assets/wizard-spBSxei8.js +2 -0
- package/langwatch/dist/client/assets/workbench-Bid7wYk7.js +2 -0
- package/langwatch/dist/client/assets/workflows-1TodsGOO.js +3 -0
- package/langwatch/dist/client/assets/wrap-noqflF_F.js +2 -0
- package/langwatch/dist/client/index.html +1 -1
- package/langwatch/package.json +1 -1
- package/langwatch/packages/api/README.md +283 -0
- package/langwatch/packages/api/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/api/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/api/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/api/package.json +39 -0
- package/langwatch/packages/api/src/__tests__/builder.unit.test.ts +1135 -0
- package/langwatch/packages/api/src/__tests__/errorLogging.integration.test.ts +130 -0
- package/langwatch/packages/api/src/__tests__/errors.unit.test.ts +331 -0
- package/langwatch/packages/api/src/__tests__/sse.unit.test.ts +247 -0
- package/langwatch/packages/api/src/__tests__/versioning.unit.test.ts +379 -0
- package/langwatch/packages/api/src/builder.ts +163 -0
- package/langwatch/packages/api/src/errors.ts +255 -0
- package/langwatch/packages/api/src/index.ts +41 -0
- package/langwatch/packages/api/src/middleware.ts +227 -0
- package/langwatch/packages/api/src/pipeline.ts +254 -0
- package/langwatch/packages/api/src/response.ts +38 -0
- package/langwatch/packages/api/src/route-mounting.ts +140 -0
- package/langwatch/packages/api/src/sse.ts +179 -0
- package/langwatch/packages/api/src/types.ts +217 -0
- package/langwatch/packages/api/src/version-builder.ts +131 -0
- package/langwatch/packages/api/src/versioning.ts +221 -0
- package/langwatch/packages/api/tsconfig.json +16 -0
- package/langwatch/packages/api/vitest.config.ts +8 -0
- package/langwatch/packages/automations/README.md +17 -0
- package/langwatch/packages/automations/node_modules/.bin/liquid +21 -0
- package/langwatch/packages/automations/node_modules/.bin/liquidjs +21 -0
- package/langwatch/packages/automations/node_modules/.bin/marked +21 -0
- package/langwatch/packages/automations/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/automations/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/automations/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/automations/package.json +43 -0
- package/langwatch/packages/automations/src/cadences.ts +50 -0
- package/langwatch/packages/automations/src/enums.ts +24 -0
- package/langwatch/packages/automations/src/index.ts +26 -0
- package/langwatch/packages/automations/src/providers/__tests__/webhook.unit.test.ts +147 -0
- package/langwatch/packages/automations/src/providers/annotationQueue.ts +26 -0
- package/langwatch/packages/automations/src/providers/dataset.ts +43 -0
- package/langwatch/packages/automations/src/providers/email.ts +36 -0
- package/langwatch/packages/automations/src/providers/slack.ts +96 -0
- package/langwatch/packages/automations/src/providers/types.ts +84 -0
- package/langwatch/packages/automations/src/providers/webhook.ts +137 -0
- package/langwatch/packages/automations/src/templating/__tests__/alertDefaultsRender.unit.test.ts +133 -0
- package/langwatch/packages/automations/src/templating/__tests__/blockKitAllowlist.unit.test.ts +723 -0
- package/langwatch/packages/automations/src/templating/__tests__/engine.unit.test.ts +106 -0
- package/langwatch/packages/automations/src/templating/__tests__/exampleContext.unit.test.ts +39 -0
- package/langwatch/packages/automations/src/templating/__tests__/fixtures.ts +42 -0
- package/langwatch/packages/automations/src/templating/__tests__/graphAlertTemplateContext.unit.test.ts +260 -0
- package/langwatch/packages/automations/src/templating/__tests__/markdown.unit.test.ts +71 -0
- package/langwatch/packages/automations/src/templating/__tests__/renderEmail.unit.test.ts +183 -0
- package/langwatch/packages/automations/src/templating/__tests__/renderSlack.unit.test.ts +233 -0
- package/langwatch/packages/automations/src/templating/__tests__/renderWebhookBody.unit.test.ts +145 -0
- package/langwatch/packages/automations/src/templating/__tests__/reportDefaultsRender.unit.test.ts +148 -0
- package/langwatch/packages/automations/src/templating/__tests__/templateContext.unit.test.ts +137 -0
- package/langwatch/packages/automations/src/templating/__tests__/validate.unit.test.ts +28 -0
- package/langwatch/packages/automations/src/templating/banner.ts +29 -0
- package/langwatch/packages/automations/src/templating/blockKitAllowlist.ts +662 -0
- package/langwatch/packages/automations/src/templating/defaults.ts +400 -0
- package/langwatch/packages/automations/src/templating/emailLayout.ts +59 -0
- package/langwatch/packages/automations/src/templating/engine.ts +255 -0
- package/langwatch/packages/automations/src/templating/exampleContext.ts +171 -0
- package/langwatch/packages/automations/src/templating/markdown.ts +61 -0
- package/langwatch/packages/automations/src/templating/renderEmail.ts +112 -0
- package/langwatch/packages/automations/src/templating/renderSlack.ts +184 -0
- package/langwatch/packages/automations/src/templating/renderWebhookBody.ts +105 -0
- package/langwatch/packages/automations/src/templating/renderWithFallback.ts +54 -0
- package/langwatch/packages/automations/src/templating/templateContext.ts +812 -0
- package/langwatch/packages/automations/src/templating/validate.ts +24 -0
- package/langwatch/packages/automations/tsconfig.json +18 -0
- package/langwatch/packages/automations/vitest.config.ts +8 -0
- package/langwatch/packages/observability/README.md +86 -0
- package/langwatch/packages/observability/node_modules/.bin/esbuild +18 -0
- package/langwatch/packages/observability/node_modules/.bin/pino +21 -0
- package/langwatch/packages/observability/node_modules/.bin/pino-pretty +21 -0
- package/langwatch/packages/observability/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/observability/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/observability/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/observability/package.json +44 -0
- package/langwatch/packages/observability/src/__tests__/browserSafety.unit.test.ts +14 -0
- package/langwatch/packages/observability/src/__tests__/context.unit.test.ts +228 -0
- package/langwatch/packages/observability/src/__tests__/logger.unit.test.ts +227 -0
- package/langwatch/packages/observability/src/__tests__/requestLogging.unit.test.ts +252 -0
- package/langwatch/packages/observability/src/__tests__/runtimeSafety.unit.test.ts +96 -0
- package/langwatch/packages/observability/src/__tests__/traceContext.unit.test.ts +108 -0
- package/langwatch/packages/observability/src/constants.ts +46 -0
- package/langwatch/packages/observability/src/context/core.ts +124 -0
- package/langwatch/packages/observability/src/context/index.ts +19 -0
- package/langwatch/packages/observability/src/context/logging.ts +24 -0
- package/langwatch/packages/observability/src/index.ts +32 -0
- package/langwatch/packages/observability/src/logger.ts +280 -0
- package/langwatch/packages/observability/src/request/requestLogging.ts +131 -0
- package/langwatch/packages/observability/src/trace/traceContext.ts +56 -0
- package/langwatch/packages/observability/tsconfig.json +16 -0
- package/langwatch/packages/observability/vitest.config.ts +8 -0
- package/langwatch/packages/react-rum/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/react-rum/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/react-rum/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/react-rum/package.json +43 -0
- package/langwatch/packages/react-rum/src/browserTracing.ts +130 -0
- package/langwatch/packages/react-rum/src/constants.ts +67 -0
- package/langwatch/packages/react-rum/src/index.ts +34 -0
- package/langwatch/packages/react-rum/src/navigation.test.ts +188 -0
- package/langwatch/packages/react-rum/src/navigation.ts +189 -0
- package/langwatch/packages/react-rum/src/navigationContextManager.ts +71 -0
- package/langwatch/packages/react-rum/src/sampling.test.ts +182 -0
- package/langwatch/packages/react-rum/src/sampling.ts +124 -0
- package/langwatch/packages/react-rum/src/session.test.ts +85 -0
- package/langwatch/packages/react-rum/src/session.ts +62 -0
- package/langwatch/packages/react-rum/src/sessionSpanProcessor.ts +34 -0
- package/langwatch/packages/react-rum/tsconfig.json +18 -0
- package/langwatch/packages/react-rum/vitest.config.ts +8 -0
- package/langwatch/packages/redaction/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/redaction/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/redaction/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/redaction/package.json +29 -0
- package/langwatch/packages/redaction/src/__tests__/secrets.unit.test.ts +226 -0
- package/langwatch/packages/redaction/src/__tests__/sessionReport.unit.test.ts +239 -0
- package/langwatch/packages/redaction/src/index.ts +29 -0
- package/langwatch/packages/redaction/src/markers.ts +101 -0
- package/langwatch/packages/redaction/src/secrets.ts +286 -0
- package/langwatch/packages/redaction/src/sessionReport.ts +356 -0
- package/langwatch/packages/redaction/tsconfig.json +18 -0
- package/langwatch/packages/ssrf/node_modules/.bin/tsc +21 -0
- package/langwatch/packages/ssrf/node_modules/.bin/tsserver +21 -0
- package/langwatch/packages/ssrf/node_modules/.bin/vitest +21 -0
- package/langwatch/packages/ssrf/package.json +29 -0
- package/langwatch/packages/ssrf/src/index.test.ts +72 -0
- package/langwatch/packages/ssrf/src/index.ts +320 -0
- package/langwatch/packages/ssrf/tsconfig.json +18 -0
- package/langwatch/packages/ssrf/vitest.config.ts +8 -0
- package/langwatch/scripts/__tests__/bug-report-discovery.unit.test.ts +37 -0
- package/langwatch/scripts/build-mcp-server.sh +15 -0
- package/langwatch/scripts/generate-langy-skills.ts +10 -0
- package/langwatch/scripts/update-matrix-provider-keys.ts +1 -1
- package/langwatch/src/components/EditModelProviderDrawer.tsx +7 -1
- package/langwatch/src/components/settings/ModelProviderCredentialsSection.tsx +13 -21
- package/langwatch/src/components/settings/ModelProviderForm.tsx +32 -3
- package/langwatch/src/components/settings/__tests__/ModelProviderForm.credential-preservation.integration.test.tsx +277 -0
- package/langwatch/src/components/settings/__tests__/ModelProviderForm.credential-requiredness.integration.test.tsx +260 -0
- package/langwatch/src/components/settings/__tests__/modelProviderDrawerHarness.tsx +152 -0
- package/langwatch/src/features/onboarding/components/sections/model-provider/ModelProviderSetup.tsx +7 -3
- package/langwatch/src/hooks/__tests__/useProviderFormSubmit.integration.test.tsx +7 -1
- package/langwatch/src/hooks/useModelProviderApiKeyValidation.ts +25 -4
- package/langwatch/src/hooks/useModelProviderFields.ts +45 -37
- package/langwatch/src/hooks/useModelProviderForm.ts +2 -0
- package/langwatch/src/hooks/useProviderFormSubmit.ts +27 -19
- package/langwatch/src/hooks/useRequiredCredentialKeys.ts +38 -0
- package/langwatch/src/pages/settings/__tests__/model-providers.no-project.integration.test.tsx +508 -0
- package/langwatch/src/pages/settings/model-providers.tsx +19 -97
- package/langwatch/src/server/api/routers/__tests__/prepareEnvKeys.unit.test.ts +56 -0
- package/langwatch/src/server/api/routers/modelProviders.ts +146 -15
- package/langwatch/src/server/api/routers/modelProviders.utils.ts +1 -10
- package/langwatch/src/server/app-layer/traces/__tests__/audio-model-cost.unit.test.ts +133 -0
- package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/_constants.ts +6 -0
- package/langwatch/src/server/app-layer/traces/model-cost-matching.ts +17 -1
- package/langwatch/src/server/app-layer/traces/repositories/__tests__/span-storage.clickhouse.repository.unit.test.ts +6 -0
- package/langwatch/src/server/app-layer/traces/repositories/span-storage.clickhouse.repository.ts +6 -0
- package/langwatch/src/server/gateway/__tests__/config.materialiser.integration.test.ts +132 -3
- package/langwatch/src/server/gateway/config.materialiser.ts +11 -9
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.credentialPreservation.integration.test.ts +206 -0
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.deleteScope.integration.test.ts +0 -4
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.noProject.integration.test.ts +748 -0
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.repository.integration.test.ts +3 -3
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.repository.unit.test.ts +7 -8
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.service.extraHeaders.unit.test.ts +0 -5
- package/langwatch/src/server/modelProviders/__tests__/modelProvider.service.unit.test.ts +5 -1
- package/langwatch/src/server/modelProviders/__tests__/registry.unit.test.ts +31 -0
- package/langwatch/src/server/modelProviders/llmModelCost.tsx +20 -2
- package/langwatch/src/server/modelProviders/llmModels.json +736 -209
- package/langwatch/src/server/modelProviders/llmModels.overlay.json +149 -2
- package/langwatch/src/server/modelProviders/llmModels.types.ts +9 -2
- package/langwatch/src/server/modelProviders/modelProvider.repository.ts +10 -12
- package/langwatch/src/server/modelProviders/modelProvider.service.ts +142 -34
- package/langwatch/src/server/modelProviders/registry.ts +45 -15
- package/langwatch/src/server/tracer/collector/cost.ts +15 -2
- package/langwatch/src/utils/__tests__/modelProviderCredentialRules.unit.test.ts +259 -0
- package/langwatch/src/utils/__tests__/modelProviderHelpers.unit.test.ts +12 -0
- package/langwatch/src/utils/modelProviderHelpers.ts +207 -16
- package/package.json +5 -1
- package/packages/handled-error/node_modules/.bin/tsc +21 -0
- package/packages/handled-error/node_modules/.bin/tsserver +21 -0
- package/packages/handled-error/node_modules/.bin/vitest +21 -0
- package/packages/handled-error/package.json +31 -0
- package/packages/handled-error/src/handled-error.test.ts +305 -0
- package/packages/handled-error/src/handled-error.ts +431 -0
- package/packages/handled-error/src/index.ts +16 -0
- package/packages/handled-error/tsconfig.json +22 -0
- package/packages/langy/node_modules/.bin/tsc +21 -0
- package/packages/langy/node_modules/.bin/tsserver +21 -0
- package/packages/langy/node_modules/.bin/vitest +21 -0
- package/packages/langy/package.json +40 -0
- package/packages/langy/src/cards/cliJson.ts +95 -0
- package/packages/langy/src/cards/cliJson.unit.test.ts +80 -0
- package/packages/langy/src/cards/created-resource.unit.test.ts +137 -0
- package/packages/langy/src/cards/derived-safe.ts +265 -0
- package/packages/langy/src/cards/derived-safe.unit.test.ts +283 -0
- package/packages/langy/src/cards/digest.ts +247 -0
- package/packages/langy/src/cards/digest.unit.test.ts +230 -0
- package/packages/langy/src/cards/handled-error.ts +697 -0
- package/packages/langy/src/cards/handled-error.unit.test.ts +795 -0
- package/packages/langy/src/cards/index.ts +51 -0
- package/packages/langy/src/cards/primitives.ts +113 -0
- package/packages/langy/src/cards/promotion.unit.test.ts +253 -0
- package/packages/langy/src/cards/registry.ts +450 -0
- package/packages/langy/src/cards/registry.unit.test.ts +141 -0
- package/packages/langy/src/cards/schemas.ts +561 -0
- package/packages/langy/src/cards/tool-result.ts +151 -0
- package/packages/langy/src/cards/tool-result.unit.test.ts +37 -0
- package/packages/langy/src/constants.ts +253 -0
- package/packages/langy/src/event-sourcing/contracts/cursor.ts +46 -0
- package/packages/langy/src/event-sourcing/contracts/cursor.unit.test.ts +66 -0
- package/packages/langy/src/event-sourcing/contracts/events.ts +345 -0
- package/packages/langy/src/event-sourcing/contracts/turnWire.ts +81 -0
- package/packages/langy/src/event-sourcing/folds/conversationFold.ts +413 -0
- package/packages/langy/src/event-sourcing/folds/messageMap.ts +71 -0
- package/packages/langy/src/event-sourcing/folds/turnFold.ts +372 -0
- package/packages/langy/src/event-sourcing/folds/turnFold.unit.test.ts +217 -0
- package/packages/langy/src/event-sourcing/turnPhase.ts +124 -0
- package/packages/langy/src/event-sourcing/turnPhase.unit.test.ts +110 -0
- package/packages/langy/src/event-sourcing/turnProjection.ts +120 -0
- package/packages/langy/src/event-sourcing/turnProjection.unit.test.ts +207 -0
- package/packages/langy/src/index.ts +16 -0
- package/packages/langy/src/inline-channel/choices.ts +136 -0
- package/packages/langy/src/inline-channel/choices.unit.test.ts +213 -0
- package/packages/langy/src/inline-channel/fence.ts +125 -0
- package/packages/langy/src/inline-channel/fence.unit.test.ts +112 -0
- package/packages/langy/src/inline-channel/parts.ts +85 -0
- package/packages/langy/src/inline-channel/parts.unit.test.ts +100 -0
- package/packages/langy/src/inline-channel/preview.ts +68 -0
- package/packages/langy/src/inline-channel/preview.unit.test.ts +116 -0
- package/packages/langy/src/inline-channel/salvage.ts +260 -0
- package/packages/langy/src/inline-channel/salvage.unit.test.ts +135 -0
- package/packages/langy/src/json.ts +47 -0
- package/packages/langy/tsconfig.json +22 -0
- package/packages/server/dist/cli.cjs +11045 -10616
- package/python-sdk/src/langwatch/openai.py +107 -28
- package/skills/.env.example +1 -0
- package/skills/.release-please-shim +1 -0
- package/skills/CHANGELOG.md +158 -0
- package/skills/README.md +99 -0
- package/skills/_compiled/README.md +43 -0
- package/skills/_compiled/generate.sh +31 -0
- package/skills/_compiled/native/agent-best-practices/SKILL.md +91 -0
- package/skills/_compiled/native/agent-improve/SKILL.md +133 -0
- package/skills/_compiled/native/agent-performance/SKILL.md +125 -0
- package/skills/_compiled/native/datasets/SKILL.md +437 -0
- package/skills/_compiled/native/debug-instrumentation/SKILL.md +104 -0
- package/skills/_compiled/native/debug-with-langwatch/SKILL.md +109 -0
- package/skills/_compiled/native/eval-triage/SKILL.md +87 -0
- package/skills/_compiled/native/evaluate-multimodal/SKILL.md +121 -0
- package/skills/_compiled/native/evaluations/SKILL.md +58 -0
- package/skills/_compiled/native/experiments/SKILL.md +191 -0
- package/skills/_compiled/native/generate-rag-dataset/SKILL.md +123 -0
- package/skills/_compiled/native/github/SKILL.md +107 -0
- package/skills/_compiled/native/level-up/SKILL.md +149 -0
- package/skills/_compiled/native/online-evaluations/SKILL.md +179 -0
- package/skills/_compiled/native/prompts/SKILL.md +187 -0
- package/skills/_compiled/native/scenarios/SKILL.md +924 -0
- package/skills/_compiled/native/setup-lw/SKILL.md +82 -0
- package/skills/_compiled/native/test-cli-usability/SKILL.md +109 -0
- package/skills/_compiled/native/test-compliance/SKILL.md +160 -0
- package/skills/_compiled/native/tracing/SKILL.md +115 -0
- package/skills/_compiler/compile.ts +181 -0
- package/skills/_compiler/native.ts +74 -0
- package/skills/_lib/feature-skills.ts +66 -0
- package/skills/_lib/frontmatter.ts +21 -0
- package/skills/_lib/mdx-inline.ts +148 -0
- package/skills/_publish/sync.ts +73 -0
- package/skills/_shared/api-key-setup.mdx +1 -0
- package/skills/_shared/cli-install.mdx +1 -0
- package/skills/_shared/cli-setup.mdx +15 -0
- package/skills/_shared/consultant-mode.mdx +9 -0
- package/skills/_shared/plan-limits.mdx +8 -0
- package/skills/_shared/projects-and-api-keys.mdx +13 -0
- package/skills/_tests/README.md +47 -0
- package/skills/_tests/agent-best-practices.scenario.test.ts +79 -0
- package/skills/_tests/agent-improve.scenario.test.ts +90 -0
- package/skills/_tests/agent-performance.scenario.test.ts +110 -0
- package/skills/_tests/claude-code-adapter.test.ts +70 -0
- package/skills/_tests/cli-auth.scenario.test.ts +171 -0
- package/skills/_tests/cli-comprehensive.scenario.test.ts +171 -0
- package/skills/_tests/cli-crud.scenario.test.ts +245 -0
- package/skills/_tests/cli-gateway-coding-agents.scenario.test.ts +597 -0
- package/skills/_tests/cli-gateway.scenario.test.ts +254 -0
- package/skills/_tests/cli-projects-api-keys.scenario.test.ts +182 -0
- package/skills/_tests/cli-suites.scenario.test.ts +234 -0
- package/skills/_tests/datasets.scenario.test.ts +586 -0
- package/skills/_tests/docs-skills-pages.test.ts +206 -0
- package/skills/_tests/evaluation-skill-boundaries.test.ts +84 -0
- package/skills/_tests/experiments-faithfulness.scenario.test.ts +80 -0
- package/skills/_tests/experiments-python-langgraph.scenario.test.ts +80 -0
- package/skills/_tests/experiments-python-openai.scenario.test.ts +110 -0
- package/skills/_tests/experiments-rag.scenario.test.ts +88 -0
- package/skills/_tests/experiments-typescript-vercel.scenario.test.ts +80 -0
- package/skills/_tests/fixtures/cli-prompts/python-with-prompts/main.py +24 -0
- package/skills/_tests/fixtures/python-agno/main.py +14 -0
- package/skills/_tests/fixtures/python-google-adk/main.py +28 -0
- package/skills/_tests/fixtures/python-health-agent/main.py +32 -0
- package/skills/_tests/fixtures/python-langgraph/main.py +35 -0
- package/skills/_tests/fixtures/python-openai/main.py +36 -0
- package/skills/_tests/fixtures/python-rag-agent/main.py +53 -0
- package/skills/_tests/fixtures/typescript-mastra/index.ts +11 -0
- package/skills/_tests/fixtures/typescript-vercel/index.ts +16 -0
- package/skills/_tests/fixtures/typescript-voice/index.ts +18 -0
- package/skills/_tests/helpers/claude-code-adapter.ts +387 -0
- package/skills/_tests/helpers/experiments-scenario.ts +197 -0
- package/skills/_tests/helpers/judge-model.ts +12 -0
- package/skills/_tests/level-up.scenario.test.ts +236 -0
- package/skills/_tests/native-skills.test.ts +191 -0
- package/skills/_tests/online-evaluations.scenario.test.ts +257 -0
- package/skills/_tests/prompts-cli.scenario.test.ts +330 -0
- package/skills/_tests/prompts.scenario.test.ts +434 -0
- package/skills/_tests/publish-sync.test.ts +119 -0
- package/skills/_tests/recipes.scenario.test.ts +343 -0
- package/skills/_tests/scenarios.scenario.test.ts +884 -0
- package/skills/_tests/tracing.scenario.test.ts +472 -0
- package/skills/_tests/voice-factories.test.ts +60 -0
- package/skills/agent-improve/SKILL.mdx +100 -0
- package/skills/agent-performance/SKILL.mdx +102 -0
- package/skills/datasets/SKILL.mdx +416 -0
- package/skills/evaluations/SKILL.mdx +57 -0
- package/skills/experiments/SKILL.mdx +155 -0
- package/skills/github/SKILL.mdx +107 -0
- package/skills/initial-prompt.md +66 -0
- package/skills/level-up/SKILL.mdx +112 -0
- package/skills/online-evaluations/SKILL.mdx +150 -0
- package/skills/package.json +53 -0
- package/skills/pnpm-lock.yaml +4862 -0
- package/skills/pnpm-workspace.yaml +2 -0
- package/skills/prompts/SKILL.mdx +151 -0
- package/skills/recipes/README.md +30 -0
- package/skills/recipes/agent-best-practices/SKILL.mdx +84 -0
- package/skills/recipes/debug-instrumentation/SKILL.mdx +88 -0
- package/skills/recipes/debug-with-langwatch/SKILL.mdx +97 -0
- package/skills/recipes/eval-triage/SKILL.mdx +75 -0
- package/skills/recipes/evaluate-multimodal/SKILL.mdx +110 -0
- package/skills/recipes/generate-rag-dataset/SKILL.mdx +105 -0
- package/skills/recipes/setup-lw/SKILL.mdx +71 -0
- package/skills/recipes/test-cli-usability/SKILL.mdx +106 -0
- package/skills/recipes/test-compliance/SKILL.mdx +149 -0
- package/skills/scenarios/SKILL.mdx +874 -0
- package/skills/tracing/SKILL.mdx +88 -0
- package/skills/tsconfig.json +15 -0
- package/skills/version.txt +1 -0
- package/skills/vitest.config.ts +7 -0
- package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-BQSucfOX.js +0 -2
- package/langwatch/dist/client/assets/AddDatasetRecordDrawer-DAsTHYTP.js +0 -6
- package/langwatch/dist/client/assets/AddOrEditAnnotationScore-B5Ck48cm.js +0 -2
- package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-C8HFvayF.js +0 -2
- package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-BRzya-3u.js +0 -3
- package/langwatch/dist/client/assets/AddParticipants-DGPUGXt7.js +0 -2
- package/langwatch/dist/client/assets/AgentHistoryDrawer-D13d_z7X.js +0 -2
- package/langwatch/dist/client/assets/AgentHttpEditorDrawer-CuT-fXSu.js +0 -5
- package/langwatch/dist/client/assets/AgentListDrawer-CWtvhmue.js +0 -2
- package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-BRHSlvwQ.js +0 -2
- package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CylJD3xL.js +0 -2
- package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-CaoZTrdq.js +0 -2
- package/langwatch/dist/client/assets/AiGatewayLayout-B5Q-EfZV.js +0 -2
- package/langwatch/dist/client/assets/AnnotationsTable-DoO83AX9.js +0 -2
- package/langwatch/dist/client/assets/AreaChart-CXmFZ9PN.js +0 -2
- package/langwatch/dist/client/assets/AutomationDrawer-Bv4nX8y6.js +0 -112
- package/langwatch/dist/client/assets/BatchEvaluationSummary-uqdSLrh7.js +0 -2
- package/langwatch/dist/client/assets/BudgetEditDrawer-CGUdeHXR.js +0 -2
- package/langwatch/dist/client/assets/CartesianChart-D35vYym3.js +0 -54
- package/langwatch/dist/client/assets/CascadeArchiveDialog-DSo9Fwed.js +0 -2
- package/langwatch/dist/client/assets/ChartCard-DgQ4fTGc.js +0 -2
- package/langwatch/dist/client/assets/ChartTooltip-Cf8ESsQ9.js +0 -4
- package/langwatch/dist/client/assets/ChatWindow-DplHBlw_.js +0 -5
- package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-CPxNogVm.js +0 -9
- package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-BdUx3xAP.js +0 -2
- package/langwatch/dist/client/assets/ColorfulBlockIcons-CUrsa--K.js +0 -6
- package/langwatch/dist/client/assets/ColumnTypeIcon-DNzTCt_2.js +0 -2
- package/langwatch/dist/client/assets/ConfirmDialog-DTpkLGhm.js +0 -2
- package/langwatch/dist/client/assets/ContactSalesBlock-BaXLliHv.js +0 -2
- package/langwatch/dist/client/assets/Conversation-DZIYz2Vp.js +0 -2
- package/langwatch/dist/client/assets/CopyInput-Csb1U32e.js +0 -2
- package/langwatch/dist/client/assets/CopyableInputWithPrefix-C3PRtdkW.js +0 -2
- package/langwatch/dist/client/assets/CreateProjectDrawer-32NvkFfD.js +0 -2
- package/langwatch/dist/client/assets/CreateTeamDrawer-DtGf5dkO.js +0 -2
- package/langwatch/dist/client/assets/CustomGraph-C3a1gzo6.js +0 -2
- package/langwatch/dist/client/assets/DashboardLayout-RHGL-98_.js +0 -6
- package/langwatch/dist/client/assets/DashboardNameDrawer-DD8bwnCt.js +0 -2
- package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-DiY-VkTs.js +0 -2
- package/langwatch/dist/client/assets/DatasetEditorTable-CwI345qA.js +0 -2
- package/langwatch/dist/client/assets/DatasetPickerList-CpHDt0t8.js +0 -2
- package/langwatch/dist/client/assets/DatasetPreviewTable-v8OUUAB3.js +0 -2
- package/langwatch/dist/client/assets/DatasetSelector-isPOzukH.js +0 -2
- package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-BI7NSI6A.js +0 -2
- package/langwatch/dist/client/assets/DeleteConfirmationDialog-7K0S0Qdq.js +0 -2
- package/langwatch/dist/client/assets/DocsLinks-NNRxMwQU.js +0 -2
- package/langwatch/dist/client/assets/DynamicZodForm-3XwhQhOl.js +0 -2
- package/langwatch/dist/client/assets/EditAutomationFilterDrawer-MYW_WiO2.js +0 -3
- package/langwatch/dist/client/assets/EditModelProviderDrawer-Isp2BSHG.js +0 -4
- package/langwatch/dist/client/assets/EditProjectDrawer-Dj2lYKdO.js +0 -2
- package/langwatch/dist/client/assets/EmojiPickerModal-DdZxZuTV.js +0 -3
- package/langwatch/dist/client/assets/EnterpriseLockedSurface-CxLn8Im_.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-DIFGzOw4.js +0 -107
- package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-Cm114u5E.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorEditorDrawer-aCxccvFM.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorEditorShared-DiLlkD4v.js +0 -43
- package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-Bv3sLSRP.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorListDrawer-eUbPJehC.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorMappingsSection-DvSTsuT8.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorSelection-Bi_Ud8sy.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorSelectionBox-v8iA4p4D.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-DlwvjPGU.js +0 -2
- package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-ul5Ud4lG.js +0 -2
- package/langwatch/dist/client/assets/ExecutionState-DKBVAVTm.js +0 -2
- package/langwatch/dist/client/assets/ExternalImage-DbtOSrKl.js +0 -34
- package/langwatch/dist/client/assets/FeatureFlagsDrawer-YiildcJp.js +0 -2
- package/langwatch/dist/client/assets/FieldInfoTooltip-CXhYVsTQ.js +0 -2
- package/langwatch/dist/client/assets/FieldsFilters-CrGJyKXz.js +0 -2
- package/langwatch/dist/client/assets/FilterDisplay-BT6B5ZoZ.js +0 -2
- package/langwatch/dist/client/assets/FilterSidebar-0UgGuTeu.js +0 -2
- package/langwatch/dist/client/assets/FormatMoney-CEzwUDkl.js +0 -2
- package/langwatch/dist/client/assets/FoundryDrawer-BIy5SFvr.js +0 -2
- package/langwatch/dist/client/assets/FullLogo-EwD3nY0N.js +0 -2
- package/langwatch/dist/client/assets/GovernanceLayout-COAapH9g.js +0 -2
- package/langwatch/dist/client/assets/GraphsLayout-ygWQTw_g.js +0 -2
- package/langwatch/dist/client/assets/GroupBindingInputRow-DF_WY6iQ.js +0 -2
- package/langwatch/dist/client/assets/GuardrailsDrawer-BIq6RhSh.js +0 -91
- package/langwatch/dist/client/assets/History-V1jF0Epn.js +0 -17
- package/langwatch/dist/client/assets/HorizontalFormControl-CLz9xuFM.js +0 -2
- package/langwatch/dist/client/assets/HoverableBigText-CxXucdYS.js +0 -2
- package/langwatch/dist/client/assets/InstallCliCard-SGRlvABl.js +0 -2
- package/langwatch/dist/client/assets/IntegratePaneShell--xX7Q_FZ.js +0 -8
- package/langwatch/dist/client/assets/InviteMemberDrawer-BgkE2My_.js +0 -2
- package/langwatch/dist/client/assets/LLMModelCostDrawer-Be2PXHIC.js +0 -2
- package/langwatch/dist/client/assets/LangyContextTarget-DUSindiC.js +0 -2
- package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-C1PAs5gE.js +0 -2
- package/langwatch/dist/client/assets/Legend-UkJ5OBun.js +0 -6
- package/langwatch/dist/client/assets/Line-Bq29STZQ.js +0 -2
- package/langwatch/dist/client/assets/LineChart-DjFD6yv4.js +0 -2
- package/langwatch/dist/client/assets/ListTable-CSs4ttpJ.js +0 -2
- package/langwatch/dist/client/assets/LoadingScreen-D0JSh0Q2.js +0 -2
- package/langwatch/dist/client/assets/Markdown-Dm0jXfOR.js +0 -3
- package/langwatch/dist/client/assets/MenuLink-CCRiOtxz.js +0 -2
- package/langwatch/dist/client/assets/MessageCard-DqgrJCJ6.js +0 -2
- package/langwatch/dist/client/assets/MetadataTag-W5I0CKzN.js +0 -5
- package/langwatch/dist/client/assets/ModelProviderCustomModelInput-XgGjvYky.js +0 -2
- package/langwatch/dist/client/assets/ModelProviderScreen-BtASYmAL.js +0 -2
- package/langwatch/dist/client/assets/ModelSelector-BBb1wHS_.js +0 -2
- package/langwatch/dist/client/assets/MyLayout-DX7ntheK.js +0 -2
- package/langwatch/dist/client/assets/NavigationFooter-CJaT-F50.js +0 -2
- package/langwatch/dist/client/assets/NewWorkflowForm-BrvVQJNY.js +0 -2
- package/langwatch/dist/client/assets/NoDataInfoBlock-B3c1WwDO.js +0 -2
- package/langwatch/dist/client/assets/OnboardingContainer-DRrQV_9c.js +0 -2
- package/langwatch/dist/client/assets/OnlineEvaluationDrawer-DHbPXgEV.js +0 -2
- package/langwatch/dist/client/assets/OpsPageShell-BamkwuvB.js +0 -2
- package/langwatch/dist/client/assets/OttlEditor-BhsdMVM9.js +0 -3
- package/langwatch/dist/client/assets/OverflownText-DhbWrtC6.js +0 -2
- package/langwatch/dist/client/assets/ProjectAvatar--gOpUll9.js +0 -2
- package/langwatch/dist/client/assets/ProjectLangyLayout-C7WNak1h.js +0 -82
- package/langwatch/dist/client/assets/PromptEditorDrawer-k_dFbREL.js +0 -2
- package/langwatch/dist/client/assets/PromptListDrawer-B-C4Cl6I.js +0 -2
- package/langwatch/dist/client/assets/PropertySectionTitle-CK67qoQ9.js +0 -37
- package/langwatch/dist/client/assets/ProviderModelSelector-Cm89XYO8.js +0 -2
- package/langwatch/dist/client/assets/ProviderScopeChips-S0Ctqbwg.js +0 -2
- package/langwatch/dist/client/assets/PushToCopiesDialog-C3eBpZ9F.js +0 -2
- package/langwatch/dist/client/assets/RandomColorAvatar-CTya_4BQ.js +0 -2
- package/langwatch/dist/client/assets/ReferenceDot-St9tkyoA.js +0 -2
- package/langwatch/dist/client/assets/RenderInputOutput-DOVNZVJ2.js +0 -261
- package/langwatch/dist/client/assets/ScenarioFormDrawer-9224CX_d.js +0 -2
- package/langwatch/dist/client/assets/ScenarioInputMappingSection-Sqtj3HwL.js +0 -2
- package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-fzMzXl1A.js +0 -3
- package/langwatch/dist/client/assets/ScopeChipPicker-B6r27G3S.js +0 -2
- package/langwatch/dist/client/assets/SearchInput-C_AroTij.js +0 -2
- package/langwatch/dist/client/assets/SectionNavigationLayout-DNvKM1pq.js +0 -2
- package/langwatch/dist/client/assets/SelectDatasetDrawer-CeZvw0Rl.js +0 -2
- package/langwatch/dist/client/assets/SelectionActionBar-5j-e3Y3p.js +0 -2
- package/langwatch/dist/client/assets/SeriesFilterDrawer-C2Io5BkG.js +0 -2
- package/langwatch/dist/client/assets/SettingsLayout-CYtjUobV.js +0 -2
- package/langwatch/dist/client/assets/SetupWithAgentButton-BKWI-UTU.js +0 -4
- package/langwatch/dist/client/assets/ShikiCommandBox-D_TBnZxW.js +0 -5
- package/langwatch/dist/client/assets/SpanDetails-xl9OjARI.js +0 -3
- package/langwatch/dist/client/assets/SubscriptionPage-85dxt08g.js +0 -2
- package/langwatch/dist/client/assets/SuiteFormDrawer-BYdeRl8R.js +0 -2
- package/langwatch/dist/client/assets/TabButton-BY-_E4cy.js +0 -3
- package/langwatch/dist/client/assets/TableCell-B6fYjFy7.js +0 -2
- package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-CTaJP17t.js +0 -2
- package/langwatch/dist/client/assets/TeamForm-DQIdGXFE.js +0 -2
- package/langwatch/dist/client/assets/TeamUserRoleField-UXHlsd5l.js +0 -2
- package/langwatch/dist/client/assets/TraceDetails-Bm1Ufstq.js +0 -9
- package/langwatch/dist/client/assets/TraceDetailsDrawer-BlZH_mba.js +0 -2
- package/langwatch/dist/client/assets/TraceIdPeek-By6CFB9R.js +0 -2
- package/langwatch/dist/client/assets/TracesMapping-QHyuw6AD.js +0 -2
- package/langwatch/dist/client/assets/UpgradeModal-BmLw5ONS.js +0 -92
- package/langwatch/dist/client/assets/UpgradeModalContent-C_lXaZaj.js +0 -2
- package/langwatch/dist/client/assets/UploadCSVDrawer-BKntPqbk.js +0 -3
- package/langwatch/dist/client/assets/VariablesSection-DnkttoMe.js +0 -2
- package/langwatch/dist/client/assets/VersionBadge-8Mh0h6z8.js +0 -2
- package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-fQIOpGM1.js +0 -1161
- package/langwatch/dist/client/assets/ViewAutomationDrawer-CPoifrwV.js +0 -2
- package/langwatch/dist/client/assets/VirtualKeySecretReveal-CKCq8oBA.js +0 -54
- package/langwatch/dist/client/assets/WelcomeLayout-B_rw1HA0.js +0 -2
- package/langwatch/dist/client/assets/WithFeatureFlagGuard-DwfApI3b.js +0 -2
- package/langwatch/dist/client/assets/WithPermissionGuard-BP1dFkpM.js +0 -2
- package/langwatch/dist/client/assets/WorkflowCard-B_SYXPpi.js +0 -2
- package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-D_fcHR54.js +0 -2
- package/langwatch/dist/client/assets/_...path_-Ipy6q2Lm.js +0 -2
- package/langwatch/dist/client/assets/_Uint8Array-B8b3z1r6.js +0 -2
- package/langwatch/dist/client/assets/__...path__-3xWAWxQ-.js +0 -22
- package/langwatch/dist/client/assets/_baseAssignValue-D7YNnh37.js +0 -2
- package/langwatch/dist/client/assets/_baseClone-o3pPcmbM.js +0 -2
- package/langwatch/dist/client/assets/_baseEach-CJ0DbEY4.js +0 -2
- package/langwatch/dist/client/assets/_baseFor-C04Mk-th.js +0 -2
- package/langwatch/dist/client/assets/_experiment_-DYMW8ia6.js +0 -2
- package/langwatch/dist/client/assets/_id_-B8SzykYR.js +0 -2
- package/langwatch/dist/client/assets/_id_-BT8l3_4N.js +0 -2
- package/langwatch/dist/client/assets/_id_-BTgcDKRo.js +0 -2
- package/langwatch/dist/client/assets/_id_-BrxUqiAK.js +0 -2
- package/langwatch/dist/client/assets/_id_-Cke69ccV.js +0 -2
- package/langwatch/dist/client/assets/_id_-CxtJm9qq.js +0 -2
- package/langwatch/dist/client/assets/_id_-DGNS0pL2.js +0 -2
- package/langwatch/dist/client/assets/_project_-CPYgRSe0.js +0 -8
- package/langwatch/dist/client/assets/_runId_-CnJnzVCf.js +0 -7
- package/langwatch/dist/client/assets/_shell-JRkk6wPs.js +0 -2
- package/langwatch/dist/client/assets/_slug_-D3cx1Thv.js +0 -17
- package/langwatch/dist/client/assets/_slug_-Dx0M4BvX.js +0 -2
- package/langwatch/dist/client/assets/_slug_-cRMpdOOA.js +0 -2
- package/langwatch/dist/client/assets/_team_-BW8SVrk-.js +0 -2
- package/langwatch/dist/client/assets/_workflow_-C35QPIPs.js +0 -25
- package/langwatch/dist/client/assets/_workflow_-DowL6naf.js +0 -3
- package/langwatch/dist/client/assets/accept-D3cDvj0y.js +0 -2
- package/langwatch/dist/client/assets/activity-CrGqZpWa.js +0 -1
- package/langwatch/dist/client/assets/agents-BNeoLDoj.js +0 -2
- package/langwatch/dist/client/assets/alerts-CrGqZpWa.js +0 -1
- package/langwatch/dist/client/assets/all-BHRNPEIX.js +0 -2
- package/langwatch/dist/client/assets/analytics-CZuaBlXL.js +0 -2
- package/langwatch/dist/client/assets/annotation-scores-CeAaT6zF.js +0 -2
- package/langwatch/dist/client/assets/annotations-CpkTmTvn.js +0 -2
- package/langwatch/dist/client/assets/anomaly-rules-BOLIh6OR.js +0 -2
- package/langwatch/dist/client/assets/api-keys-mK1aqQaM.js +0 -4
- package/langwatch/dist/client/assets/asaplangy-D_DeMaDk.js +0 -5
- package/langwatch/dist/client/assets/audit-log-CL6iYEbl.js +0 -2
- package/langwatch/dist/client/assets/auth-DWhhuKxO.js +0 -2
- package/langwatch/dist/client/assets/authentication-CvPvvVW6.js +0 -2
- package/langwatch/dist/client/assets/authorize-C1bDXq-Z.js +0 -2
- package/langwatch/dist/client/assets/authorize-xZkU_nXs.js +0 -2
- package/langwatch/dist/client/assets/automations-ChfL33YS.js +0 -2
- package/langwatch/dist/client/assets/automations-CrGqZpWa.js +0 -1
- package/langwatch/dist/client/assets/billing-plans-CXxmUM3Y.js +0 -2
- package/langwatch/dist/client/assets/blank-DFMnaDEJ.js +0 -2
- package/langwatch/dist/client/assets/blobs-D-pozzQX.js +0 -2
- package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3--iqoZYgE.js +0 -133
- package/langwatch/dist/client/assets/budgets-BAJ1tdYz.js +0 -3
- package/langwatch/dist/client/assets/bug-reports-DOqvPuTB.js +0 -2
- package/langwatch/dist/client/assets/cache-rules-DbITxirX.js +0 -2
- package/langwatch/dist/client/assets/choose-BSGQGAYS.js +0 -2
- package/langwatch/dist/client/assets/chunk-EX3LRPZG-B7fiWf8z.js +0 -232
- package/langwatch/dist/client/assets/chunk-FWX5IMBZ-CiS2XotT.js +0 -3
- package/langwatch/dist/client/assets/chunk-PUDLZKDR-_aske-8B.js +0 -157
- package/langwatch/dist/client/assets/chunk-RYQCIY6F-Bzb9D1UT.js +0 -2
- package/langwatch/dist/client/assets/chunk-V7JOEXUC-BNxgutMB.js +0 -207
- package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-GwNDfT24.js +0 -2
- package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-GwNDfT24.js +0 -2
- package/langwatch/dist/client/assets/codeAgentConfig-DWx3pMLC.js +0 -7
- package/langwatch/dist/client/assets/codingDefaultSync-C9Lev3y1.js +0 -2
- package/langwatch/dist/client/assets/configure-Coe_YM3c.js +0 -4
- package/langwatch/dist/client/assets/custom-Dpn85JW8.js +0 -12
- package/langwatch/dist/client/assets/custom_evaluator-DGAwXo2Z.js +0 -31
- package/langwatch/dist/client/assets/dagre-D7MBpcKV.js +0 -2
- package/langwatch/dist/client/assets/dagre-VKFMJZFB-COHUH3Np.js +0 -5
- package/langwatch/dist/client/assets/data-privacy-CtKFJ8SN.js +0 -2
- package/langwatch/dist/client/assets/data-retention-e5nryGvV.js +0 -2
- package/langwatch/dist/client/assets/datasets-JEoBpoYL.js +0 -2
- package/langwatch/dist/client/assets/debounce-KKoMEqvq.js +0 -2
- package/langwatch/dist/client/assets/defaultModelState-C4_m_XBI.js +0 -2
- package/langwatch/dist/client/assets/dejaview-BV4oU0up.js +0 -2
- package/langwatch/dist/client/assets/departments-BjNbKZtW.js +0 -2
- package/langwatch/dist/client/assets/devices-CaLokczo.js +0 -2
- package/langwatch/dist/client/assets/dist-BToT9Gni.js +0 -6
- package/langwatch/dist/client/assets/drawerFromUrl-Cpd3NvN0.js +0 -2
- package/langwatch/dist/client/assets/edit-BW6g7_XC.js +0 -62
- package/langwatch/dist/client/assets/email-suppressions-DYhLkUjt.js +0 -2
- package/langwatch/dist/client/assets/erDiagram-Q63AITRT-CBcweIHJ.js +0 -86
- package/langwatch/dist/client/assets/error-CmmaHju0.js +0 -2
- package/langwatch/dist/client/assets/evaluations-BX71jpba.js +0 -2
- package/langwatch/dist/client/assets/evaluations-C82dwzqH.js +0 -2
- package/langwatch/dist/client/assets/evaluators-CKOs_qOx.js +0 -146
- package/langwatch/dist/client/assets/evaluators-Cnp4esT5.js +0 -2
- package/langwatch/dist/client/assets/experiments-CzhcDWnc.js +0 -1
- package/langwatch/dist/client/assets/external-link-BzETHrAG.js +0 -2
- package/langwatch/dist/client/assets/feature-flags-Cl5NHQrK.js +0 -2
- package/langwatch/dist/client/assets/fetchSSE-DWKCnoHV.js +0 -3
- package/langwatch/dist/client/assets/fieldset-CE_IDQSv.js +0 -2
- package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-B2EV4X5b.js +0 -1
- package/langwatch/dist/client/assets/forgot-password-Bdtjps2K.js +0 -2
- package/langwatch/dist/client/assets/formatMoney-CI_YqDED.js +0 -2
- package/langwatch/dist/client/assets/foundry-DdJynGEa.js +0 -477
- package/langwatch/dist/client/assets/gateway-BvjtD98W.js +0 -2
- package/langwatch/dist/client/assets/getEvaluator-OH0w_5fd.js +0 -2
- package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-BB5SvhT3.js +0 -2
- package/langwatch/dist/client/assets/governance-DUSWlZID.js +0 -2
- package/langwatch/dist/client/assets/graphlib-Dn160vFe.js +0 -2
- package/langwatch/dist/client/assets/groups--YQRJnbz.js +0 -2
- package/langwatch/dist/client/assets/guardrails-_Jb3oZg3.js +0 -2
- package/langwatch/dist/client/assets/http-7YWbWWla.js +0 -7
- package/langwatch/dist/client/assets/identifierUtils-BuQJ50Jl.js +0 -2
- package/langwatch/dist/client/assets/immer-tl_oI9yy.js +0 -14
- package/langwatch/dist/client/assets/index-CUhcyBp3.js +0 -68
- package/langwatch/dist/client/assets/ingestion-source-detail-E-alCDhM.js +0 -19
- package/langwatch/dist/client/assets/ingestion-sources-APi2TUL6.js +0 -12
- package/langwatch/dist/client/assets/integrations-osNA42lv.js +0 -2
- package/langwatch/dist/client/assets/isArrayLikeObject-CJZEoMj_.js +0 -2
- package/langwatch/dist/client/assets/isSymbol-IFJb2-6T.js +0 -2
- package/langwatch/dist/client/assets/langyHomeSuggestions-B0_Fr3Q2.js +0 -2
- package/langwatch/dist/client/assets/latestAliases-BG98QtLZ.js +0 -2
- package/langwatch/dist/client/assets/license-Dbjlsvq9.js +0 -2
- package/langwatch/dist/client/assets/loadModelCatalog-CtqlQvVB.js +0 -2
- package/langwatch/dist/client/assets/map-DH6XyRvi.js +0 -2
- package/langwatch/dist/client/assets/mappingValidation-oCsaOwz3.js +0 -2
- package/langwatch/dist/client/assets/me-Bqm1rCwb.js +0 -2
- package/langwatch/dist/client/assets/me-BxYTDdYk.js +0 -7
- package/langwatch/dist/client/assets/members-C-RYfdOt.js +0 -2
- package/langwatch/dist/client/assets/mermaid.core-CIOVe75m.js +0 -12
- package/langwatch/dist/client/assets/messages-DSB9EzQc.js +0 -2
- package/langwatch/dist/client/assets/metrics-C_DWHPhN.js +0 -2
- package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-D9FhjenJ.js +0 -97
- package/langwatch/dist/client/assets/model-costs-DHTDEPq7.js +0 -2
- package/langwatch/dist/client/assets/model-providers-B5lYdYGB.js +0 -2
- package/langwatch/dist/client/assets/modelProviderHelpers-DDoNJl7J.js +0 -2
- package/langwatch/dist/client/assets/my-queue-DBUdNObC.js +0 -2
- package/langwatch/dist/client/assets/normalizeComparison-CCZ-bOPv.js +0 -2
- package/langwatch/dist/client/assets/not-found-1cA6pijP.js +0 -2
- package/langwatch/dist/client/assets/now-Sx_cFlpx.js +0 -2
- package/langwatch/dist/client/assets/onboarding-Brb1FAS4.js +0 -2
- package/langwatch/dist/client/assets/online-evaluations-Di78dvHe.js +0 -2
- package/langwatch/dist/client/assets/ops-BDrWqQb1.js +0 -2
- package/langwatch/dist/client/assets/organizations-I7_fQcGq.js +0 -2
- package/langwatch/dist/client/assets/pages-BowufdCe.js +0 -2
- package/langwatch/dist/client/assets/persistence-ChzYQRy2.js +0 -2
- package/langwatch/dist/client/assets/plans-DUiB6dWS.js +0 -2
- package/langwatch/dist/client/assets/product-CLC45PiC.js +0 -2
- package/langwatch/dist/client/assets/project-CO0U6_JZ.js +0 -2
- package/langwatch/dist/client/assets/projections-yljzVGg_.js +0 -2
- package/langwatch/dist/client/assets/projects-DbpxS5ex.js +0 -2
- package/langwatch/dist/client/assets/promptHandle-BwdZsauS.js +0 -2
- package/langwatch/dist/client/assets/prompts-DUxsvuSh.js +0 -8
- package/langwatch/dist/client/assets/radio-group-DJFHT54R.js +0 -2
- package/langwatch/dist/client/assets/registry-C3oFDiqP.js +0 -2
- package/langwatch/dist/client/assets/reports-BQKkyGFY.js +0 -2
- package/langwatch/dist/client/assets/request-CmAXw9Uw.js +0 -2
- package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-D1dMWBTG.js +0 -85
- package/langwatch/dist/client/assets/reset-password-CTK4_mwV.js +0 -2
- package/langwatch/dist/client/assets/role-bindings-C6ZsuMgm.js +0 -2
- package/langwatch/dist/client/assets/roles-BCVxn7jA.js +0 -2
- package/langwatch/dist/client/assets/routing-policies-CRBbtcKU.js +0 -5
- package/langwatch/dist/client/assets/scenarios-t3nGDwOk.js +0 -2
- package/langwatch/dist/client/assets/scheduler-BLbmBCjU.js +0 -2
- package/langwatch/dist/client/assets/schedules-CrGqZpWa.js +0 -1
- package/langwatch/dist/client/assets/scim-Db5_4cCw.js +0 -2
- package/langwatch/dist/client/assets/secrets-w56NYZDd.js +0 -2
- package/langwatch/dist/client/assets/segment-group-BZ45xnHN.js +0 -2
- package/langwatch/dist/client/assets/segmented-control-DD0HLoke.js +0 -2
- package/langwatch/dist/client/assets/select-BVcV39WT.js +0 -2
- package/langwatch/dist/client/assets/send-C4QAmSdY.js +0 -2
- package/langwatch/dist/client/assets/sequenceView-BjWvujkI.js +0 -5
- package/langwatch/dist/client/assets/seriesOptions-BYBEdexs.js +0 -1011
- package/langwatch/dist/client/assets/settings-BLUJDHk_.js +0 -2
- package/langwatch/dist/client/assets/setup-DZUDYG7y.js +0 -2
- package/langwatch/dist/client/assets/shikiAdapter-S_u9TjIh.js +0 -3
- package/langwatch/dist/client/assets/signin-DIBdy2xA.js +0 -2
- package/langwatch/dist/client/assets/signup-CNRmYZe8.js +0 -2
- package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CvKHJ3lm.js +0 -2
- package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-DAiJnxt-.js +0 -2
- package/langwatch/dist/client/assets/subscription-DCXG9i3Z.js +0 -3
- package/langwatch/dist/client/assets/subscriptions-vembyNSC.js +0 -2
- package/langwatch/dist/client/assets/suggestionUI-CKer7JjV.js +0 -106
- package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-BSx4-zBB.js +0 -3
- package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-CiuP6lw7.js +0 -9
- package/langwatch/dist/client/assets/switch-COTwlCOb.js +0 -2
- package/langwatch/dist/client/assets/switch-vUOdjiD1.js +0 -2
- package/langwatch/dist/client/assets/tabs-DdHsJkYS.js +0 -2
- package/langwatch/dist/client/assets/teams-CNWyUErs.js +0 -2
- package/langwatch/dist/client/assets/teams-DfkeiBlG.js +0 -2
- package/langwatch/dist/client/assets/tool-catalog-Fz2CTXGX.js +0 -7
- package/langwatch/dist/client/assets/toolIcons-8yYANIzS.js +0 -2
- package/langwatch/dist/client/assets/tooltip-Croc0I6e.js +0 -2
- package/langwatch/dist/client/assets/topic-clustering-BUhCtd-n.js +0 -2
- package/langwatch/dist/client/assets/topics-DTHKQBbG.js +0 -2
- package/langwatch/dist/client/assets/traceExecutor-apa7WEzU.js +0 -55
- package/langwatch/dist/client/assets/traces-DHbPO8-r.js +0 -289
- package/langwatch/dist/client/assets/tracesMapping-AU2q390i.js +0 -3
- package/langwatch/dist/client/assets/tracking-2cJI_Hu7.js +0 -2
- package/langwatch/dist/client/assets/types-CQ-IJ_jx.js +0 -2
- package/langwatch/dist/client/assets/types-DV4H6wK9.js +0 -2
- package/langwatch/dist/client/assets/types-PSz4yYPE.js +0 -2
- package/langwatch/dist/client/assets/types-Qc1U0Lzq.js +0 -2
- package/langwatch/dist/client/assets/unsubscribe-B7-aB2wW.js +0 -2
- package/langwatch/dist/client/assets/usage-B56MHHfN.js +0 -2
- package/langwatch/dist/client/assets/usage-BrFpMBrn.js +0 -2
- package/langwatch/dist/client/assets/use-breakpoint-BTtibx4n.js +0 -2
- package/langwatch/dist/client/assets/use-generic-onboarding-flow-eiutgTpm.js +0 -2
- package/langwatch/dist/client/assets/useActivePlan-DZDUm8JK.js +0 -2
- package/langwatch/dist/client/assets/useAllPromptsForProject-BY-Cnuhg.js +0 -2
- package/langwatch/dist/client/assets/useAnnotationQueues-BWrpwDYN.js +0 -2
- package/langwatch/dist/client/assets/useAvailableEvaluators-D7TbKINw.js +0 -2
- package/langwatch/dist/client/assets/useCyclingVerb-Bp3m8dQc.js +0 -2
- package/langwatch/dist/client/assets/useDepartmentColumn-DTsM9Nhy.js +0 -2
- package/langwatch/dist/client/assets/useEvaluationsV3Store-KPEU27UA.js +0 -2
- package/langwatch/dist/client/assets/useExportTraces-DK-tRqPq.js +0 -2
- package/langwatch/dist/client/assets/useFeatureFlag-D9ikgDaE.js +0 -2
- package/langwatch/dist/client/assets/useInviteActions-DyYvQrlw.js +0 -2
- package/langwatch/dist/client/assets/useLicenseEnforcement-DRk7-NQ0.js +0 -2
- package/langwatch/dist/client/assets/useLiteMemberGuard-klZnweA7.js +0 -43
- package/langwatch/dist/client/assets/usePersonalContext-CrhmQYta.js +0 -2
- package/langwatch/dist/client/assets/useProjectSpanNames-w6NW0Ct5.js +0 -2
- package/langwatch/dist/client/assets/useProjectsForCopy-DxbxCEv5.js +0 -2
- package/langwatch/dist/client/assets/useRunViaApiTabs-WzgJSfv2.js +0 -50
- package/langwatch/dist/client/assets/useSavedViews-CNmeuzC3.js +0 -2
- package/langwatch/dist/client/assets/useShowLangy-BvJ39ifH.js +0 -2
- package/langwatch/dist/client/assets/useSimulationUpdateListener-Bu7hXXtv.js +0 -2
- package/langwatch/dist/client/assets/useTargetName-VjbhYyp5.js +0 -2
- package/langwatch/dist/client/assets/useTargetNameMap-CB8rbgsw.js +0 -2
- package/langwatch/dist/client/assets/useTraceDetailsDrawer-BQRQYAwh.js +0 -2
- package/langwatch/dist/client/assets/useTraceUpdateListener-DvzIDKvr.js +0 -2
- package/langwatch/dist/client/assets/useUrlScopeFilter-u6ryUPSP.js +0 -2
- package/langwatch/dist/client/assets/useWorkflowStore-PvyqdAIQ.js +0 -8
- package/langwatch/dist/client/assets/users-B6_uecCc.js +0 -2
- package/langwatch/dist/client/assets/users-BKSIVGOV.js +0 -2
- package/langwatch/dist/client/assets/users-Cvlw527b.js +0 -2
- package/langwatch/dist/client/assets/v3-D_vxEDZB.js +0 -2
- package/langwatch/dist/client/assets/variables-fv0lgY95.js +0 -396
- package/langwatch/dist/client/assets/viewStore-149qmWlN.js +0 -2
- package/langwatch/dist/client/assets/virtual-keys-BrPMP91L.js +0 -2
- package/langwatch/dist/client/assets/welcome-CvpidJSe.js +0 -16
- package/langwatch/dist/client/assets/wizard-D3LrFT3o.js +0 -2
- package/langwatch/dist/client/assets/workbench-YhI9hb4n.js +0 -2
- package/langwatch/dist/client/assets/workflows-D66JEP8o.js +0 -3
- package/langwatch/dist/client/assets/wrap-C4rzJqks.js +0 -2
- package/langwatch/src/pages/settings/__tests__/model-providers.first-project.integration.test.tsx +0 -426
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./skeleton-YwQIu7Tp.js";import{t as o}from"./text-A3qvcMyN.js";import{cn as s,ir as c}from"./useLiteMemberGuard-klZnweA7.js";import{n as l}from"./info-CtYT35g4.js";import{t as u}from"./tooltip-Croc0I6e.js";import{t as d}from"./h-stack-CMPhqSp5.js";import{L as f,a as p,i as m,n as h}from"./seriesOptions-BYBEdexs.js";import{t as g}from"./spacer-CbmCSsJg.js";import{t as _}from"./v-stack-ClAMS101.js";import{n as v}from"./api-BK6L1im2.js";import{t as y}from"./calendar-52syEei0.js";import{t as b}from"./FilterDisplay-BT6B5ZoZ.js";import{t as x}from"./trending-up-CH4aNR9y.js";import{En as S,Rt as C,V as w,ct as T,ni as E,ut as D,w as O}from"./index-CUhcyBp3.js";var k=S(),A=e(t()),j=r();function M(e,t){let n=D(t,e);if(n<1)return`${Math.max(T(t,e),1)}s`;if(n<60)return`${n}m`;let r=Math.floor(n/60),i=n%60;return i>0?`${r}h ${i}m`:`${r}h`}function N(e){try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)?t:null}catch{return null}}function P({automationId:e}){let{project:t}=C(),{openDrawer:r,closeDrawer:i}=w(),S=v.automation.getTriggerById.useQuery({triggerId:e,projectId:t?.id??``},{enabled:!!t?.id}),T=v.automation.getRecentFires.useQuery({triggerId:e,projectId:t?.id??``,limit:20},{enabled:!!t?.id}),D=v.automation.getWebhookDeliveries.useQuery({triggerId:e,projectId:t?.id??``,limit:50},{enabled:!!t?.id&&S.data?.action===`SEND_WEBHOOK`}),O=S.data,A=!!O?.customGraphId,M=O?.action===`SEND_WEBHOOK`,P=O?.triggerKind===k.TriggerKind.REPORT,I=O?.actionParams??{},L=v.graphs.getById.useQuery({projectId:t?.id??``,id:O?.customGraphId??``},{enabled:!!t?.id&&!!O?.customGraphId,retry:!1}),z=v.dataset.getAll.useQuery({projectId:t?.id??``},{enabled:!!t?.id&&O?.action===`ADD_TO_DATASET`}),B=I.datasetId?z.data?.find(e=>e.id===I.datasetId)?.name??null:null;return(0,j.jsx)(s.Root,{open:!0,placement:`end`,size:`md`,onOpenChange:({open:e})=>{e||i()},children:(0,j.jsxs)(s.Content,{bg:`bg`,children:[(0,j.jsxs)(s.Header,{children:[(0,j.jsx)(s.CloseTrigger,{}),(0,j.jsxs)(_,{align:`start`,gap:1,children:[S.isLoading?(0,j.jsx)(a,{height:`24px`,width:`200px`}):(0,j.jsx)(E,{size:`md`,children:O?.name??(A?`Alert`:P?`Schedule`:`Automation`)}),A?(0,j.jsxs)(l,{colorPalette:`purple`,gap:1,children:[(0,j.jsx)(x,{size:12}),`Alert`]}):P?(0,j.jsxs)(l,{colorPalette:`purple`,gap:1,children:[(0,j.jsx)(y,{size:12}),`Schedule`]}):O?(0,j.jsx)(l,{colorPalette:`gray`,children:`Automation`}):null]})]}),(0,j.jsx)(s.Body,{children:(0,j.jsxs)(_,{align:`stretch`,gap:6,children:[(0,j.jsxs)(_,{align:`start`,gap:1,children:[(0,j.jsx)(o,{textStyle:`xs`,color:`fg.muted`,fontWeight:`medium`,children:`Type`}),(0,j.jsx)(o,{textStyle:`sm`,children:O?f[O.action]?.shared.label??O.action:null})]}),(0,j.jsxs)(_,{align:`start`,gap:1,children:[(0,j.jsx)(o,{textStyle:`xs`,color:`fg.muted`,fontWeight:`medium`,children:`Destination`}),(()=>{if(!O)return null;switch(O.action){case`SEND_SLACK_MESSAGE`:return I.slackWebhook?(0,j.jsx)(u,{content:I.slackWebhook,children:(0,j.jsx)(o,{textStyle:`sm`,lineClamp:1,width:`fit-content`,cursor:`help`,children:`Slack webhook`})}):(0,j.jsx)(o,{textStyle:`sm`,children:`Slack webhook`});case`SEND_EMAIL`:return I.members?.length?(0,j.jsx)(o,{textStyle:`sm`,wordBreak:`break-all`,children:I.members.join(`, `)}):null;case`SEND_WEBHOOK`:{let e=`Webhook`;try{e=I.url?new URL(I.url).hostname:e}catch{}return(0,j.jsxs)(o,{textStyle:`sm`,wordBreak:`break-all`,children:[I.method??`POST`,` `,e]})}case`ADD_TO_DATASET`:return B?(0,j.jsx)(o,{textStyle:`sm`,children:B}):null;case`ADD_TO_ANNOTATION_QUEUE`:return I.annotators?.length?(0,j.jsx)(o,{textStyle:`sm`,wordBreak:`break-all`,children:I.annotators.map(e=>e.name).join(`, `)}):null;default:return null}})()??(0,j.jsx)(o,{textStyle:`sm`,children:`None`})]}),(0,j.jsxs)(_,{align:`start`,gap:1,width:`full`,children:[(0,j.jsx)(o,{textStyle:`xs`,color:`fg.muted`,fontWeight:`medium`,children:`Conditions`}),(()=>{if(!O)return null;if(A){let e=I.operator?m[I.operator]:null,t=I.timePeriod?p[I.timePeriod]:null;return(0,j.jsxs)(o,{textStyle:`sm`,children:[I.seriesName?h(L.data?.graph,I.seriesName)??I.seriesName:`Metric`,e?` ${e}`:``,I.threshold===void 0?``:` ${I.threshold}`,t?` over ${t}`:``]})}if(O.filterQuery)return(0,j.jsx)(c,{size:`sm`,variant:`surface`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:O.filterQuery});if(O.filters&&typeof O.filters==`string`){let e=N(O.filters);if(e&&Object.keys(e).length>0)return(0,j.jsx)(b,{filters:O.filters,hasBorder:!0})}return(0,j.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`No conditions`})})()]}),(0,j.jsxs)(_,{align:`start`,gap:2,width:`full`,children:[(0,j.jsx)(o,{textStyle:`xs`,color:`fg.muted`,fontWeight:`medium`,children:`Recent fires`}),T.isLoading?(0,j.jsx)(a,{height:`60px`,width:`full`}):(T.data??[]).length===0?(0,j.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:A?`This alert has not fired yet.`:`This automation has not fired yet.`}):(0,j.jsx)(F,{fires:T.data??[],isGraphAlert:A})]}),M?(0,j.jsxs)(_,{align:`start`,gap:2,width:`full`,children:[(0,j.jsx)(o,{textStyle:`xs`,color:`fg.muted`,fontWeight:`medium`,children:`Recent deliveries`}),D.isLoading?(0,j.jsx)(a,{height:`60px`,width:`full`}):(D.data??[]).length===0?(0,j.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`No delivery attempts recorded yet.`}):(0,j.jsx)(R,{deliveries:D.data??[]})]}):null]})}),(0,j.jsx)(s.Footer,{children:(0,j.jsxs)(d,{width:`full`,children:[(0,j.jsx)(g,{}),(0,j.jsx)(n,{colorPalette:`orange`,onClick:()=>r(`automation`,{automationId:e}),children:`Edit`})]})})]})})}function F({fires:e,isGraphAlert:t}){return(0,j.jsx)(_,{align:`stretch`,gap:0,width:`full`,borderWidth:`1px`,borderColor:`border`,borderRadius:`md`,overflow:`hidden`,children:(t?e.map(e=>{let t=new Date(e.createdAt),n=!e.resolvedAt;return{key:e.id,dot:n?`red.solid`:`green.solid`,label:n?`Firing`:`Resolved`,detail:n?`still firing`:`${O(t.getTime())} · lasted ${M(t,new Date(e.resolvedAt))}`,detailColor:n?`red.fg`:`fg.muted`}}):I(e).map(e=>({key:e.key,dot:`green.solid`,label:e.count===1?`Fired once`:`Fired ${e.count} times`,detail:e.label,detailColor:`fg.muted`}))).map(e=>(0,j.jsxs)(d,{gap:2.5,paddingX:3,paddingY:2,borderBottomWidth:`1px`,borderColor:`border`,_last:{borderBottomWidth:0},children:[(0,j.jsx)(i,{boxSize:2,borderRadius:`full`,flexShrink:0,bg:e.dot}),(0,j.jsx)(o,{textStyle:`sm`,flex:`1`,minWidth:`0`,children:e.label}),(0,j.jsx)(o,{textStyle:`xs`,color:e.detailColor,flexShrink:0,whiteSpace:`nowrap`,children:e.detail})]},e.key))})}function I(e){let t=[];for(let n of e){let e=O(new Date(n.createdAt).getTime())??``,r=t[t.length-1];r&&r.label===e?r.count++:t.push({key:n.id,label:e,count:1})}return t}var L={success:`green.solid`,retryable:`yellow.solid`,terminal:`red.solid`,pending:`gray.solid`};function R({deliveries:e}){let t=[],n=new Map;for(let r of e){let e=n.get(r.dispatchId);e||(e=[],n.set(r.dispatchId,e),t.push({dispatchId:r.dispatchId,attempts:e})),e.push(r)}for(let e of t)e.attempts.reverse();return(0,j.jsx)(_,{align:`stretch`,gap:2,width:`full`,children:t.map(e=>(0,j.jsx)(_,{align:`stretch`,gap:0,width:`full`,borderWidth:`1px`,borderColor:`border`,borderRadius:`md`,overflow:`hidden`,children:e.attempts.map((t,n)=>(0,j.jsx)(B,{attempt:t,index:n,total:e.attempts.length},t.id))},e.dispatchId))})}function z(e){if(e!==null){if(e===429)return`The endpoint asked us to slow down. Delivery backs off and retries.`;if(e===408||e>=500)return`The endpoint had a server error. Delivery retries automatically.`;if(e>=400)return`The endpoint rejected the request. Check its authentication and the payload it expects.`}}function B({attempt:e,index:t,total:n}){let[r,a]=(0,A.useState)(!1),s=e.responseStatus==null?e.error??`No response`:`HTTP ${e.responseStatus}`,l=e.outcome===`success`?void 0:z(e.responseStatus),u=!!(e.error??l??e.response);return(0,j.jsxs)(i,{borderBottomWidth:`1px`,borderColor:`border`,_last:{borderBottomWidth:0},children:[(0,j.jsxs)(d,{as:`button`,gap:2.5,paddingX:3,paddingY:2,width:`full`,textAlign:`left`,cursor:u?`pointer`:`default`,onClick:()=>u&&a(e=>!e),children:[(0,j.jsx)(i,{boxSize:2,borderRadius:`full`,flexShrink:0,bg:L[e.outcome]}),(0,j.jsxs)(o,{textStyle:`sm`,flex:`1`,minWidth:`0`,children:[n>1?`Attempt ${t+1} · `:``,s]}),(0,j.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,flexShrink:0,whiteSpace:`nowrap`,children:[e.latencyMs==null?``:`${e.latencyMs}ms · `,O(new Date(e.firedAt).getTime())]})]}),r&&u?(0,j.jsxs)(_,{align:`stretch`,gap:2,paddingX:3,paddingBottom:3,children:[e.error?(0,j.jsx)(c,{fontSize:`xs`,width:`full`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:e.error}):null,e.response?.body?(0,j.jsx)(c,{fontSize:`xs`,width:`full`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:e.response.body}):null,e.response?.headers?(0,j.jsx)(_,{align:`stretch`,gap:.5,children:Object.entries(e.response.headers).map(([e,t])=>(0,j.jsxs)(c,{fontSize:`xs`,width:`full`,whiteSpace:`pre-wrap`,children:[e,`: `,t]},e))}):null,l?(0,j.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:l}):null]}):null]})}export{P as ViewAutomationDrawer};
|
|
2
|
-
//# sourceMappingURL=ViewAutomationDrawer-CPoifrwV.js.map
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shiki-CS25xJLQ.js","assets/rolldown-runtime-DAXXjFlN.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{S as i}from"./shiki-CS25xJLQ.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{t as o}from"./box-Ck5lef6C.js";import{t as s}from"./skeleton-YwQIu7Tp.js";import{t as c}from"./text-A3qvcMyN.js";import{_ as l,d as u,f as d,h as f,l as p,m,p as h,u as ee,v as te}from"./shikiAdapter-S_u9TjIh.js";import{cn as g,ir as _}from"./useLiteMemberGuard-klZnweA7.js";import{n as v}from"./toaster-CRP22oRW.js";import{D as y,K as b,nt as x,q as S}from"./ExternalImage-DbtOSrKl.js";import{n as C,t as w}from"./external-link-BzETHrAG.js";import{a as T,i as E,n as D,r as O,t as k}from"./alert-C5hocQt_.js";import{t as A}from"./icon-button-Ce2kwA7j.js";import{a as j,n as M,r as N}from"./field-Dz4Xmo3X.js";import{t as P}from"./h-stack-CMPhqSp5.js";import{r as ne,t as re}from"./native-select-Bj4m9rSh.js";import{t as ie}from"./spacer-CbmCSsJg.js";import{a as F,o as I,r as L,s as ae,t as R}from"./tabs-DdHsJkYS.js";import{it as oe,s as z}from"./immer-tl_oI9yy.js";import{t as B}from"./v-stack-ClAMS101.js";import{t as V}from"./ScopeChipPicker-B6r27G3S.js";import{t as H}from"./eye-off-DqjXgeXB.js";import{n as U}from"./api-BK6L1im2.js";import{t as W}from"./usePublicEnv-CATGNgPr.js";import{Ar as G,Or as se,Rt as ce,Yn as le,_n as K,gn as q,in as J,jr as ue,jt as de,t as fe,un as pe,xn as Y,yt as X}from"./index-CUhcyBp3.js";import{i as me}from"./stringCasing-Cx6SsTTf.js";import{t as he}from"./input-group-D5-60Bl4.js";import{t as ge}from"./SmallLabel-BUZxxHop.js";import{t as Z}from"./FieldInfoTooltip-CXhYVsTQ.js";import{t as _e}from"./ProviderScopeChips-S0Ctqbwg.js";import"./constants-c0j3xvrs.js";import{i as ve,n as ye}from"./ModelSelector-BBb1wHS_.js";import{n as be}from"./registry-B66lBYCc.js";var Q=e(t()),$=a();function xe(e,t,n,r){let i=be.find(t=>t.backendModelProviderKey===e),a=n[0]??r?.[0]?.modelId,o=i?.defaultModel??a;return o?`${e}/${o}`:t.toLowerCase()}function Se(e,t){let n=new Map;for(let t of e)t.teamId&&n.set(t.id,t.teamId);return{organizationId:t,teamOfProject:n}}function Ce(e){return e.enabled===!0&&!e.disabledAt}function we(e,t,n){if(e.length===0||t.length===0)return[];let r=(e,t)=>{if(e.scopeType===`ORGANIZATION`)return e.scopeId===n.organizationId;if(e.scopeType===`TEAM`){if(t.scopeType===`ORGANIZATION`)return!1;if(t.scopeType===`TEAM`)return e.scopeId===t.scopeId;let r=n.teamOfProject.get(t.scopeId);return e.scopeId===r}return e.scopeType===`PROJECT`?t.scopeType===`PROJECT`&&e.scopeId===t.scopeId:!1},i={ORGANIZATION:0,TEAM:1,PROJECT:2},a=new Map;for(let n of t){if(!n.id||!Ce(n))continue;let t;for(let a of n.scopes)e.some(e=>r(a,e))&&(!t||i[a.scopeType]<i[t.scopeType])&&(t=a);if(!t)continue;let o=n.models??[],s=n.customModels?.length??0,c=n.name??n.provider;a.set(n.id,{id:n.id,provider:n.provider,label:c,modelCount:o.length+s,definedAt:t,defaultModel:xe(n.provider,c,o,n.customModels)})}return Array.from(a.values()).sort((e,t)=>e.label.localeCompare(t.label))}function Te(e){let{scopes:t,providers:n,availableProjects:r,organizationId:i}=e;return we(t,n,Se(r,i))[0]?.defaultModel}function Ee(e,t){switch(e.scopeType){case`ORGANIZATION`:return t.organizationName;case`TEAM`:return t.teamNames.get(e.scopeId);case`PROJECT`:return t.projectNames.get(e.scopeId)}}function De(e,t){let n=e.map(e=>Ee(e,t)??e.scopeId);return n.length<=1?n[0]??``:`${n.slice(0,-1).join(`, `)} and ${n[n.length-1]}`}function Oe({scopes:e,organizationId:t,organizationName:r,availableTeams:i,availableProjects:a,isLoading:s,providers:l,selectedModel:u,onSelectProviderModel:d}){let f=(0,Q.useMemo)(()=>Se(a,t),[a,t]),p=(0,Q.useMemo)(()=>({organizationName:r,teamNames:new Map(i.map(e=>[e.id,e.name])),projectNames:new Map(a.map(e=>{let t=e.name.split(` · `)[0]??e.name;return[e.id,t]}))}),[i,a,r]),m=(0,Q.useMemo)(()=>we(e,l,f),[e,l,f]);if(e.length===0)return(0,$.jsx)(c,{fontSize:`xs`,color:`fg.muted`,children:`Pick a scope above to preview the routable models.`});if(s)return(0,$.jsxs)(P,{gap:2,children:[(0,$.jsx)(n,{size:`xs`}),(0,$.jsx)(c,{fontSize:`xs`,color:`fg.muted`,children:`Resolving eligible model providers…`})]});if(m.length===0)return(0,$.jsxs)(B,{align:`stretch`,gap:2,borderWidth:`1px`,borderColor:`orange.200`,borderRadius:`md`,background:`orange.50`,padding:3,children:[(0,$.jsx)(c,{fontSize:`sm`,fontWeight:`medium`,children:`No model providers visible at this scope.`}),(0,$.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`Ask an admin to add one at`,` `,(0,$.jsx)(c,{as:`span`,fontFamily:`mono`,children:`/settings/model-providers`}),`. The key cannot route requests until at least one provider is in scope.`]})]});let h=!!d;return(0,$.jsx)(B,{align:`stretch`,gap:1,children:m.map(e=>{let t=e.provider in z?z[e.provider]:null,n=u===e.defaultModel;return(0,$.jsxs)(P,{borderWidth:`1px`,borderColor:n?`blue.400`:`border.subtle`,borderRadius:`md`,paddingX:2,paddingY:1.5,gap:2,cursor:h?`pointer`:`default`,background:n?`blue.50`:void 0,_hover:h?{background:n?`blue.50`:`bg.subtle`}:void 0,onClick:h?()=>d?.(e.defaultModel):void 0,title:h?`Use ${e.defaultModel} in the snippet above`:void 0,children:[(0,$.jsx)(o,{width:`16px`,height:`16px`,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,css:{"& > svg":{width:`100%`,height:`100%`}},children:t}),(0,$.jsx)(c,{fontSize:`sm`,fontWeight:`medium`,children:e.label}),e.modelCount>0&&(0,$.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`· `,e.modelCount,` `,e.modelCount===1?`model`:`models`]}),h&&(0,$.jsx)(c,{fontSize:`2xs`,color:`fg.muted`,fontFamily:`mono`,children:e.defaultModel}),(0,$.jsx)(o,{flex:1}),(0,$.jsx)(_e,{size:`xs`,scopes:[{scopeType:e.definedAt.scopeType,scopeId:e.definedAt.scopeId,name:Ee(e.definedAt,p)}]})]},e.id)})})}function ke({scopes:e,organizationId:t,organizationName:n,availableTeams:r,availableProjects:i,isLoading:a,providers:o}){let s=(0,Q.useMemo)(()=>Se(i,t),[i,t]),l=(0,Q.useMemo)(()=>({organizationName:n,teamNames:new Map(r.map(e=>[e.id,e.name])),projectNames:new Map(i.map(e=>{let t=e.name.split(` · `)[0]??e.name;return[e.id,t]}))}),[r,i,n]),u=(0,Q.useMemo)(()=>we(e,o,s),[e,o,s]);if(e.length===0||a||u.length===0)return null;let d=De(e,l),f=u.reduce((e,t)=>e+t.modelCount,0);return(0,$.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`This key works in `,d,` and can route to`,` `,u.length===1?`1 provider`:`${u.length} providers`,f>0?` (${f} ${f===1?`model`:`models`})`:``,`.`]})}function Ae({scopes:e}){return(0,$.jsx)(fe,{href:(0,Q.useMemo)(()=>{if(e.length===0)return`/settings/model-providers`;let t=new URLSearchParams;for(let n of e)t.append(`scope`,`${n.scopeType}:${n.scopeId}`);return`/settings/model-providers?${t.toString()}`},[e]),target:`_blank`,rel:`noopener noreferrer`,color:`blue.600`,fontSize:`xs`,children:(0,$.jsxs)(P,{gap:1,alignItems:`center`,children:[(0,$.jsx)(c,{as:`span`,children:`Configure`}),(0,$.jsx)(w,{size:11})]})})}var je=pe([`respect`,`force`,`disable`]),Me=pe([`5xx`,`timeout`,`rate_limit_exceeded`,`network_error`,`circuit_breaker`]),Ne=K({direction:pe([`pre`,`post`,`stream_chunk`]),guardrailIds:J(Y()).default([])});function Pe(e){let t=new Set;for(let n of e){if(typeof n!=`string`)continue;let e=[...n.trim()].slice(0,128).join(``).trim();if(e!==``&&(t.add(e),t.size===32))break}return[...t]}K({modelsAllowed:J(Y()).nullable().default(null),cache:K({mode:je.default(`respect`),ttlS:q().int().nonnegative().default(3600)}).default({mode:`respect`,ttlS:3600}),fallback:K({on:J(Me).default([`5xx`,`timeout`,`rate_limit_exceeded`]),timeoutMs:q().int().positive().default(3e4),maxAttempts:q().int().positive().default(3)}).default({on:[`5xx`,`timeout`,`rate_limit_exceeded`],timeoutMs:3e4,maxAttempts:3}),guardrailAttachments:J(Ne).default([]),rateLimits:K({rpm:q().int().nullable().default(null),tpm:q().int().nullable().default(null),rpd:q().int().nullable().default(null)}).default({rpm:null,tpm:null,rpd:null}),metadata:K({label:Y().optional(),tags:J(Y()).default([]).transform(Pe)}).default({tags:[]})});var Fe=`Group this key's traffic by team, app, or environment. Every trace this key sends carries its tags as labels, so anyone with access to the project can see them and filter on them. A cache rule that lists tags applies to any key carrying all of them. Saving keeps the first 32 tags, trims each to 128 characters, and drops blanks and repeats.`,Ie=32*258;function Le(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}function Re(e){let t=Le(e),n=new Set(t).size>32,r=t.some(e=>[...e].length>128),i=[];return n&&i.push(`Only the first 32 tags will be saved.`),r&&i.push(`Tags longer than 128 characters will be shortened.`),i.length>0?i.join(` `):null}function ze({scopes:e,onScopesChange:t,isExisting:n,organizationId:r,organizationName:i,teamId:a,teamName:o,projectId:s,projectName:l,availableTeams:u,availableProjects:d,currentOrganizationId:f,currentTeamId:p,currentProjectId:m}){return n?(0,$.jsxs)(B,{align:`start`,width:`full`,gap:2,children:[(0,$.jsx)(ge,{children:`Scope`}),(0,$.jsx)(_e,{scopes:e}),(0,$.jsx)(c,{fontSize:`xs`,color:`gray.500`,children:`Scope is fixed after create. To change it, delete and recreate at the new scope.`})]}):(0,$.jsxs)(B,{align:`start`,width:`full`,gap:1.5,children:[(0,$.jsx)(ge,{children:`Scope`}),(0,$.jsx)(V,{value:e,onChange:t,organizationId:r,organizationName:i,teamId:a,teamName:o,projectId:s,projectName:l,availableTeams:u,availableProjects:d,label:``,showSummary:!1,currentOrganizationId:f,currentTeamId:p,currentProjectId:m})]})}function Be({value:e,onChange:t,mode:n=`chat`}){let{groupedByProvider:r,isLoading:i,isEmpty:a}=ve(ye,``,n),[l,u]=(0,Q.useState)(``),d=(0,Q.useMemo)(()=>new Set(e),[e]),f=e=>{let n=new Set(d);n.has(e)?n.delete(e):n.add(e),t([...n])},p=(0,Q.useMemo)(()=>{let e=l.toLowerCase();return r.map(t=>({...t,models:t.models.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))})).filter(e=>e.models.length>0)},[r,l]);return i?(0,$.jsx)(s,{height:`180px`,borderRadius:`md`}):a?(0,$.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`No models available — configure a model provider first.`}):(0,$.jsxs)(B,{align:`stretch`,gap:2,children:[(0,$.jsx)(he,{startElement:(0,$.jsx)(le,{size:14}),children:(0,$.jsx)(G,{size:`sm`,placeholder:`Search models`,type:`search`,value:l,onChange:e=>u(e.target.value)})}),(0,$.jsx)(o,{maxHeight:`240px`,overflowY:`auto`,borderWidth:`1px`,borderColor:`border`,borderRadius:`md`,padding:2,children:p.length===0?(0,$.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,padding:1,children:[`No models match “`,l,`”.`]}):p.map(e=>(0,$.jsxs)(o,{mb:2,children:[(0,$.jsx)(c,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,mb:1,paddingX:1,children:me(e.provider)}),(0,$.jsx)(B,{align:`stretch`,gap:1,children:e.models.map(e=>(0,$.jsx)(y,{size:`sm`,checked:d.has(e.value),onCheckedChange:()=>f(e.value),children:(0,$.jsxs)(P,{gap:2,children:[e.icon&&(0,$.jsx)(o,{width:`16px`,minWidth:`16px`,children:e.icon}),(0,$.jsx)(c,{fontSize:`13px`,fontFamily:`mono`,children:e.label})]})},e.value))})]},e.provider))})]})}function Ve({organizationId:e,vk:t,onOpenChange:n,onSaved:i}){let{organization:a,team:s,project:l}=ce(),[u,d]=(0,Q.useState)(``),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(``),[ee,te]=(0,Q.useState)(`respect`),[y,b]=(0,Q.useState)(3600),[S,C]=(0,Q.useState)(``),[w,T]=(0,Q.useState)(``),[E,D]=(0,Q.useState)(``),[O,k]=(0,Q.useState)(``),[A,F]=(0,Q.useState)([]);(0,Q.useEffect)(()=>{t&&(d(t.name),p(t.description??``),h(t.routingPolicyId??``),te(t.config.cache?.mode??`respect`),b(t.config.cache?.ttlS??3600),k((t.config.metadata?.tags??[]).join(`, `)),C(t.config.rateLimits?.rpm?.toString()??``),T(t.config.rateLimits?.tpm?.toString()??``),D(t.config.rateLimits?.rpd?.toString()??``),F(t.config.modelsAllowed??[]))},[t]);let I=(0,Q.useMemo)(()=>a?.teams?.map(e=>({id:e.id,name:e.name}))??[],[a?.teams]),L=(0,Q.useMemo)(()=>a?.teams?.flatMap(e=>e.projects.map(t=>({id:t.id,name:`${t.name} · ${e.name}`,teamId:e.id})))??[],[a?.teams]),ae=U.useContext(),R=U.routingPolicy.list.useQuery({organizationId:e},{enabled:!!t&&!!e}),z=U.modelProvider.listAllForOrganizationForFrontend.useQuery({organizationId:e},{enabled:!!t&&!!e}),V=U.virtualKeys.update.useMutation({onSuccess:async()=>{await ae.virtualKeys.list.invalidate({organizationId:e})}}),H=Re(O),W=()=>{V.isPending||n(!1)};return(0,$.jsx)(g.Root,{open:!!t,onOpenChange:()=>W(),placement:`end`,size:`md`,children:(0,$.jsxs)(g.Content,{bg:`bg`,children:[(0,$.jsxs)(g.Header,{children:[(0,$.jsx)(g.Title,{children:`Edit virtual key`}),(0,$.jsx)(g.CloseTrigger,{})]}),(0,$.jsx)(g.Body,{children:(0,$.jsxs)(B,{align:`stretch`,gap:5,children:[(0,$.jsxs)(j,{required:!0,children:[(0,$.jsxs)(N,{children:[`Name`,(0,$.jsx)(Z,{description:`Human-readable identifier shown in the list and audit log. Must be unique within the organization. Rename is non-breaking — the VK id + secret remain the same.`,docHref:`/ai-gateway/virtual-keys#creating-a-vk`})]}),(0,$.jsx)(G,{value:u,onChange:e=>d(e.target.value),maxLength:128})]}),(0,$.jsxs)(j,{children:[(0,$.jsx)(N,{children:`Description`}),(0,$.jsx)(oe,{value:f,onChange:e=>p(e.target.value)})]}),(0,$.jsxs)(j,{children:[(0,$.jsxs)(N,{children:[`Tags`,(0,$.jsx)(Z,{description:Fe,docHref:`/ai-gateway/cache-control#cache-rules`,testId:`vk-tags-info`})]}),(0,$.jsx)(G,{value:O,onChange:e=>k(e.target.value),placeholder:`e.g. tier=enterprise, team=ml`,maxLength:Ie}),H&&(0,$.jsx)(M,{color:`orange.600`,children:H})]}),(0,$.jsx)(x,{}),t&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ze,{scopes:t.scopes,onScopesChange:()=>void 0,isExisting:!0,organizationId:e,organizationName:a?.name,teamId:s?.id,teamName:s?.name,projectId:l?.id,projectName:l?.name,availableTeams:I,availableProjects:L}),(0,$.jsx)(ke,{scopes:t.scopes,organizationId:e,organizationName:a?.name,availableTeams:I,availableProjects:L,isLoading:z.isLoading,providers:z.data?.providers??[]})]}),(0,$.jsxs)(o,{children:[(0,$.jsxs)(P,{mb:1.5,alignItems:`center`,gap:2,children:[(0,$.jsx)(Ae,{scopes:t?.scopes??[]}),(0,$.jsx)(c,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,children:`Eligible model providers`})]}),(0,$.jsx)(Oe,{scopes:t?.scopes??[],organizationId:e,organizationName:a?.name,availableTeams:I,availableProjects:L,isLoading:z.isLoading,providers:z.data?.providers??[]})]}),(0,$.jsxs)(j,{children:[(0,$.jsxs)(N,{children:[`Models `,u?`“${u}” `:``,`can use`,(0,$.jsx)(Z,{description:`Restrict this virtual key to specific models. Leave everything unchecked to allow every model the eligible providers can serve. For the Langy assistant this is exactly the set its sidebar model picker offers.`,docHref:`/ai-gateway/virtual-keys`})]}),(0,$.jsx)(Be,{value:A,onChange:F,mode:`chat`}),(0,$.jsx)(M,{children:A.length===0?`All eligible models allowed. Check models to restrict.`:`${A.length} model${A.length===1?``:`s`} selected.`})]}),((R.data??[]).length>0||m)&&(0,$.jsxs)(j,{children:[(0,$.jsxs)(N,{children:[`Routing policy`,(0,$.jsx)(Z,{description:`Force this VK to use a specific ordered set of ModelProviders instead of the scope-cascade fallback. Change is non-breaking — clients keep working with the new policy on the next /config refresh.`,docHref:`/ai-gateway/routing-policies`})]}),(0,$.jsx)(ne,{size:`sm`,children:(0,$.jsxs)(re,{value:m,onChange:e=>h(e.target.value),children:[(0,$.jsx)(`option`,{value:``,children:`Default cascade (all eligible providers)`}),(R.data??[]).map(e=>(0,$.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,$.jsx)(M,{children:`Default cascade uses all eligible providers in fallback priority. Picking a policy constrains routing to its ordered provider list.`})]}),(0,$.jsx)(x,{}),(0,$.jsxs)(P,{children:[(0,$.jsx)(c,{fontSize:`sm`,fontWeight:`semibold`,children:`Cache control`}),(0,$.jsx)(Z,{description:`Per-VK default cache mode. Per-request X-LangWatch-Cache header + matching cache rules override. See the doc for the 3-layer precedence model and per-provider semantics.`,docHref:`/ai-gateway/cache-control`})]}),(0,$.jsx)(c,{fontSize:`xs`,color:`fg.muted`,children:`Provider-agnostic: Anthropic uses explicit cache_control markers, OpenAI/Azure cache prompts automatically, Gemini supports cachedContent references. Mode here applies to every provider this VK routes to; the X-LangWatch-Cache request header lets callers override per-request.`}),(0,$.jsxs)(P,{gap:4,align:`flex-start`,children:[(0,$.jsxs)(j,{flex:1,children:[(0,$.jsx)(N,{children:`Mode`}),(0,$.jsx)(ne,{size:`sm`,children:(0,$.jsxs)(re,{value:ee,onChange:e=>te(e.target.value??`respect`),children:[(0,$.jsx)(`option`,{value:`respect`,children:`Respect — pass provider cache directives through unchanged`}),(0,$.jsx)(`option`,{value:`disable`,children:`Disable — strip cache directives before dispatch`}),(0,$.jsx)(`option`,{value:`force`,children:`Force — inject cache_control on Anthropic (OpenAI auto, Gemini WARN)`})]})})]}),(0,$.jsxs)(j,{flex:1,children:[(0,$.jsx)(N,{children:`TTL (seconds)`}),(0,$.jsx)(G,{value:y.toString(),onChange:e=>b(Math.max(0,Number.parseInt(e.target.value,10)||0)),inputMode:`numeric`})]})]}),(0,$.jsx)(x,{}),(0,$.jsxs)(P,{children:[(0,$.jsx)(c,{fontSize:`sm`,fontWeight:`semibold`,children:`Rate limits (blank = unlimited)`}),(0,$.jsx)(Z,{description:`Per-VK rpm/rpd on the gateway hot path. Independent of per-binding rate limits — whichever trips first blocks. TPM is v1.1 (requires token estimation + Redis cluster counters).`,docHref:`/ai-gateway/rate-limits`})]}),(0,$.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,children:[`Enforced per-VK in-memory on every gateway replica. On breach the gateway returns HTTP 429 with`,` `,(0,$.jsx)(_,{fontSize:`xs`,children:`Retry-After`}),` and`,` `,(0,$.jsx)(_,{fontSize:`xs`,children:`X-LangWatch-RateLimit-Dimension`}),`. Changes propagate to all replicas within ~60s.`]}),(0,$.jsxs)(P,{gap:4,align:`flex-start`,children:[(0,$.jsxs)(j,{flex:1,children:[(0,$.jsx)(N,{children:`rpm`}),(0,$.jsx)(G,{value:S,onChange:e=>C(e.target.value),placeholder:`unlimited`,inputMode:`numeric`}),(0,$.jsx)(M,{children:`Requests / minute`})]}),(0,$.jsxs)(j,{flex:1,children:[(0,$.jsx)(N,{children:`tpm`}),(0,$.jsx)(G,{value:w,onChange:e=>T(e.target.value),placeholder:`deferred`,inputMode:`numeric`,disabled:!0}),(0,$.jsx)(M,{children:`Tokens / minute — requires pre-request token estimation; ships with Redis-coordinated cluster counters (v1.1).`})]}),(0,$.jsxs)(j,{flex:1,children:[(0,$.jsx)(N,{children:`rpd`}),(0,$.jsx)(G,{value:E,onChange:e=>D(e.target.value),placeholder:`unlimited`,inputMode:`numeric`}),(0,$.jsx)(M,{children:`Requests / day`})]})]})]})}),(0,$.jsx)(g.Footer,{children:(0,$.jsxs)(P,{width:`full`,children:[(0,$.jsx)(ie,{}),(0,$.jsx)(r,{variant:`ghost`,onClick:W,disabled:V.isPending,children:`Cancel`}),(0,$.jsx)(r,{colorPalette:`orange`,onClick:async()=>{if(t){if(!u){v.create({title:`Name is required`,type:`error`});return}try{await V.mutateAsync({organizationId:e,id:t.id,name:u,description:f||null,routingPolicyId:m||null,config:{modelsAllowed:A.length>0?A:null,cache:{mode:ee,ttlS:y},rateLimits:{rpm:S?Number.parseInt(S,10):null,tpm:w?Number.parseInt(w,10):null,rpd:E?Number.parseInt(E,10):null},metadata:{tags:Le(O)}}}),i(),n(!1)}catch(e){v.create({title:e instanceof Error?e.message:`Failed to update virtual key`,type:`error`})}}},loading:V.isPending,disabled:!u,children:`Save changes`})]})})]})})}var He=`https://gateway.langwatch.ai/v1`;function Ue(e,t){return e||(t?`${t.replace(/\/+$/,``)}/v1`:He)}function We({secret:e,gatewayBaseUrl:t,title:n=`Usage example`,model:r=`gpt-5-mini`}){let{colorMode:a}=de(),o=W(),s=e??`$LANGWATCH_VK_SECRET`,g=Ue(t,o.data?.GATEWAY_BASE_URL),_=!e,v=(0,Q.useMemo)(()=>{let e=`The full secret is shown only once during create or rotate. If you do not have it saved, rotate to mint a fresh one.`,t=_?`# ${e}\n# Set LANGWATCH_VK_SECRET in your shell, or paste the secret in place of $LANGWATCH_VK_SECRET below.\n\n`:``,n=_?`// ${e}\n// Set LANGWATCH_VK_SECRET in your shell, or paste the secret in place of $LANGWATCH_VK_SECRET below.\n\n`:``,i=_?3:0,a=_?3:0,o=_?3:0,c=_?3:0,l=`${t}from openai import OpenAI
|
|
3
|
-
|
|
4
|
-
client = OpenAI(
|
|
5
|
-
base_url="${g}",
|
|
6
|
-
api_key="${s}",
|
|
7
|
-
)
|
|
8
|
-
|
|
9
|
-
response = client.chat.completions.create(
|
|
10
|
-
model="${r}",
|
|
11
|
-
messages=[{"role": "user", "content": "Hello"}],
|
|
12
|
-
)
|
|
13
|
-
print(response.choices[0].message.content)`,u=`${n}import OpenAI from "openai";
|
|
14
|
-
|
|
15
|
-
const client = new OpenAI({
|
|
16
|
-
baseURL: "${g}",
|
|
17
|
-
apiKey: "${s}",
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const response = await client.chat.completions.create({
|
|
21
|
-
model: "${r}",
|
|
22
|
-
messages: [{ role: "user", content: "Hello" }],
|
|
23
|
-
});
|
|
24
|
-
console.log(response.choices[0].message.content);`,d=`${n}package main
|
|
25
|
-
|
|
26
|
-
import (
|
|
27
|
-
\t"context"
|
|
28
|
-
\t"fmt"
|
|
29
|
-
|
|
30
|
-
\topenai "github.com/openai/openai-go"
|
|
31
|
-
\t"github.com/openai/openai-go/option"
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
func main() {
|
|
35
|
-
\tclient := openai.NewClient(
|
|
36
|
-
\t\toption.WithBaseURL("${g}"),
|
|
37
|
-
\t\toption.WithAPIKey("${s}"),
|
|
38
|
-
\t)
|
|
39
|
-
|
|
40
|
-
\tresponse, _ := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{
|
|
41
|
-
\t\tModel: "${r}",
|
|
42
|
-
\t\tMessages: []openai.ChatCompletionMessageParamUnion{
|
|
43
|
-
\t\t\topenai.UserMessage("Hello"),
|
|
44
|
-
\t\t},
|
|
45
|
-
\t})
|
|
46
|
-
\tfmt.Println(response.Choices[0].Message.Content)
|
|
47
|
-
}`,f=`${t}curl ${g}/chat/completions \\
|
|
48
|
-
-H "Authorization: Bearer ${s}" \\
|
|
49
|
-
-H "Content-Type: application/json" \\
|
|
50
|
-
-d '{
|
|
51
|
-
"model": "${r}",
|
|
52
|
-
"messages": [{"role": "user", "content": "Hello"}]
|
|
53
|
-
}'`;return[{key:`python`,title:`Python`,code:l,language:`python`,highlightLines:[4+i,5+i]},{key:`typescript`,title:`TypeScript`,code:u,language:`typescript`,highlightLines:[4+a,5+a]},{key:`go`,title:`Go`,code:d,language:`go`,highlightLines:[13+o,14+o]},{key:`bash`,title:`cURL`,code:f,language:`bash`,highlightLines:[1+c,2+c]}]},[g,s,_,r]),y=ae({defaultValue:`python`}),b=v.find(e=>e.key===y.value)??v[0],x=v.filter(e=>e.key!==y.value),S=(0,Q.useMemo)(()=>te({async load(){let{createHighlighter:e}=await i(async()=>{let{createHighlighter:e}=await import(`./shiki-CS25xJLQ.js`).then(e=>e.o);return{createHighlighter:e}},__vite__mapDeps([0,1]));return e({langs:[`typescript`,`python`,`go`,`bash`],themes:[`github-dark`,`github-light`]})},theme:a===`dark`?`github-dark`:`github-light`}),[a]);return(0,$.jsxs)(B,{align:`stretch`,gap:2,children:[(0,$.jsx)(c,{fontWeight:`medium`,children:n}),(0,$.jsxs)(c,{textStyle:`xs`,color:`fg.muted`,children:[`Works with any OpenAI-compatible SDK or coding assistant (Claude Code, Codex, Cursor, Aider).`,` `,(0,$.jsx)(se,{href:`https://langwatch.ai/docs/ai-gateway/quickstart`,color:`orange.600`,target:`_blank`,rel:`noreferrer`,children:`Read more →`})]}),(0,$.jsx)(F,{value:y,size:`sm`,variant:`line`,children:(0,$.jsx)(l,{value:S,children:(0,$.jsx)(ue,{children:()=>(0,$.jsxs)(f,{code:b.code,language:b.language,size:`sm`,meta:{highlightLines:b.highlightLines,colorScheme:a},transition:`all 0.3s ease`,bg:`bg.panel/60`,borderRadius:`xl`,border:`1px solid`,borderColor:`border`,backdropFilter:`blur(20px) saturate(1.3)`,boxShadow:`0 2px 16px rgba(0,0,0,0.04)`,overflow:`hidden`,children:[(0,$.jsxs)(m,{borderBottomWidth:`1px`,borderColor:`border`,children:[(0,$.jsx)(L,{w:`full`,border:`0`,ms:`-1`,children:v.map(e=>(0,$.jsx)(I,{colorPalette:`teal`,value:e.key,textStyle:`xs`,"data-testid":`vk-usage-tab-${e.key}`,children:e.title},e.key))}),(0,$.jsx)(h,{asChild:!0,children:(0,$.jsx)(A,{variant:`ghost`,size:`2xs`,mr:`-4px`,children:(0,$.jsx)(d,{})})})]}),(0,$.jsxs)(u,{transition:`background-color 0.3s ease, color 0.3s ease`,css:{"& pre, & code":{transition:`background-color 0.3s ease, color 0.3s ease`}},overflow:`scroll`,children:[x.map(e=>(0,$.jsx)(R,{value:e.key},e.key)),(0,$.jsx)(R,{pt:`1`,value:b.key,children:(0,$.jsx)(p,{children:(0,$.jsx)(ee,{})})})]})]})})})})]})}function Ge({open:e,onClose:t,keyName:n,secret:i,model:a,kind:s=`create`}){let[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(!1);return(0,$.jsx)(X.Root,{open:e,onOpenChange:()=>{},role:`alertdialog`,closeOnInteractOutside:!1,closeOnEscape:!1,children:(0,$.jsxs)(X.Content,{bg:`bg`,maxWidth:`560px`,children:[(0,$.jsx)(X.Header,{children:(0,$.jsx)(X.Title,{children:s===`rotate`?`Save your rotated secret`:`Save your virtual key secret`})}),(0,$.jsx)(X.Body,{children:(0,$.jsxs)(B,{align:`stretch`,gap:4,children:[(0,$.jsxs)(E,{status:`warning`,children:[(0,$.jsx)(O,{}),(0,$.jsxs)(k,{children:[(0,$.jsx)(T,{children:`You will only see this secret once.`}),(0,$.jsx)(D,{children:`LangWatch stores only a hash. Copy and save the raw secret in your password manager or secret store before closing.`})]})]}),s===`rotate`&&(0,$.jsxs)(E,{status:`info`,children:[(0,$.jsx)(O,{}),(0,$.jsxs)(k,{children:[(0,$.jsx)(T,{children:`24-hour grace window active.`}),(0,$.jsx)(D,{children:`The previous secret keeps working for 24 hours so clients can roll over gradually. After that it hard-fails with a 401 even though this key stays active.`})]})]}),(0,$.jsxs)(B,{align:`start`,gap:1,children:[(0,$.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`Virtual key name`}),(0,$.jsx)(c,{fontWeight:`medium`,children:n})]}),(0,$.jsxs)(B,{align:`stretch`,gap:2,children:[(0,$.jsx)(c,{fontSize:`sm`,color:`fg.muted`,children:`Secret`}),(0,$.jsxs)(P,{border:`1px solid`,borderColor:`border.subtle`,borderRadius:`md`,padding:2,gap:2,children:[(0,$.jsx)(o,{flex:1,overflowX:`auto`,children:(0,$.jsx)(_,{fontSize:`sm`,bg:`transparent`,paddingX:0,whiteSpace:`nowrap`,children:l?i:Ke(i)})}),(0,$.jsx)(A,{"aria-label":l?`Hide secret`:`Reveal secret`,variant:`ghost`,size:`sm`,onClick:()=>u(e=>!e),children:l?(0,$.jsx)(H,{size:14}):(0,$.jsx)(b,{size:14})}),(0,$.jsx)(A,{"aria-label":`Copy secret`,variant:`ghost`,size:`sm`,onClick:async()=>{await navigator.clipboard.writeText(i),f(!0),window.setTimeout(()=>f(!1),1500)},children:d?(0,$.jsx)(C,{size:14}):(0,$.jsx)(S,{size:14})})]})]}),(0,$.jsx)(x,{}),(0,$.jsx)(We,{secret:i,model:a})]})}),(0,$.jsx)(X.Footer,{children:(0,$.jsxs)(P,{width:`full`,gap:4,children:[(0,$.jsxs)(P,{children:[(0,$.jsx)(`input`,{type:`checkbox`,id:`vk-secret-confirm`,checked:p,onChange:e=>m(e.target.checked)}),(0,$.jsx)(`label`,{htmlFor:`vk-secret-confirm`,children:(0,$.jsx)(c,{fontSize:`sm`,children:`I've saved the secret in a safe place.`})})]}),(0,$.jsx)(o,{flex:1}),(0,$.jsx)(r,{colorPalette:`orange`,onClick:()=>{u(!1),f(!1),m(!1),t()},disabled:!p,children:`Close`})]})})]})})}function Ke(e){return e.length<=14?`••••`:`${e.slice(0,14)}${`•`.repeat(Math.max(0,e.length-14))}`}export{Ie as a,Re as c,ke as d,Te as f,ze as i,Ae as l,We as n,Fe as o,Ve as r,Le as s,Ge as t,Oe as u};
|
|
54
|
-
//# sourceMappingURL=VirtualKeySecretReveal-CKCq8oBA.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{n as o}from"./toaster-CRP22oRW.js";import{nt as s}from"./ExternalImage-DbtOSrKl.js";import{a as c,i as l,r as u}from"./alert-C5hocQt_.js";import{t as d}from"./container-CAygaZzW.js";import{t as f}from"./v-stack-ClAMS101.js";import{n as p}from"./api-BK6L1im2.js";import{t as m}from"./usePublicEnv-CATGNgPr.js";import{An as h,Y as g,x as _}from"./lu-DlSq9Be4.js";import{Or as v,Rt as y,ni as b,t as x}from"./index-CUhcyBp3.js";import{n as S,t as C}from"./tracking-2cJI_Hu7.js";import{t as w}from"./CopyableInputWithPrefix-C3PRtdkW.js";var T=e(t()),E=r(),D=()=>{let{project:e}=y(),t=p.integrationsChecks.getCheckStatus.useQuery({projectId:e?.id??``},{enabled:!!e,refetchOnWindowFocus:!0,refetchOnMount:!1,staleTime:1/0});return(0,T.useEffect)(()=>{t.data?.firstMessage&&S(`integration_checks_first_message`,{project_id:e?.id}),t.data?.integrated&&S(`integration_checks_first_integration`,{project_id:e?.id}),t.data?.workflows&&S(`integration_checks_first_workflow`,{project_id:e?.id}),t.data?.onlineEvaluations&&S(`integration_checks_first_evaluation`,{project_id:e?.id}),t.data?.triggers&&S(`integration_checks_first_alert`,{project_id:e?.id}),t.data?.datasets&&S(`integration_checks_first_dataset`,{project_id:e?.id}),t.data?.customGraphs&&S(`integration_checks_first_custom_dashboard`,{project_id:e?.id})},[t.data?.customGraphs,t.data?.datasets,t.data?.onlineEvaluations,t.data?.firstMessage,t.data?.integrated,t.data?.triggers,t.data?.workflows,e?.id]),t};function O(e){return h({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z`},child:[]}]})(e)}function k(e){return h({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M0 32v448h448V32H0zm243.8 349.4c0 43.6-25.6 63.5-62.9 63.5-33.7 0-53.2-17.4-63.2-38.5l34.3-20.7c6.6 11.7 12.6 21.6 27.1 21.6 13.8 0 22.6-5.4 22.6-26.5V237.7h42.1v143.7zm99.6 63.5c-39.1 0-64.4-18.6-76.7-43l34.3-19.8c9 14.7 20.8 25.6 41.5 25.6 17.4 0 28.6-8.7 28.6-20.8 0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5 0-31.6 24.1-55.6 61.6-55.6 26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18-12.3 0-20.1 7.8-20.1 18 0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2 0 37.8-29.8 58.6-69.7 58.6z`},child:[]}]})(e)}function A(e){return h({tag:`svg`,attr:{viewBox:`0 0 640 512`},child:[{tag:`path`,attr:{d:`M400.1 194.8C389.2 197.6 380.2 199.1 371 202.4C363.7 204.3 356.3 206.3 347.8 208.5L347.2 208.6C343 209.8 342.6 209.9 338.7 205.4C334 200.1 330.6 196.7 324.1 193.5C304.4 183.9 285.4 186.7 267.7 198.2C246.5 211.9 235.6 232.2 235.9 257.4C236.2 282.4 253.3 302.9 277.1 306.3C299.1 309.1 316.9 301.7 330.9 285.8C333 283.2 334.9 280.5 337 277.5V277.5L337 277.5C337.8 276.5 338.5 275.4 339.3 274.2H279.2C272.7 274.2 271.1 270.2 273.3 264.9C277.3 255.2 284.8 239 289.2 230.9C290.1 229.1 292.3 225.1 296.1 225.1H397.2C401.7 211.7 409 198.2 418.8 185.4C441.5 155.5 468.1 139.9 506 133.4C537.8 127.8 567.7 130.9 594.9 149.3C619.5 166.1 634.7 188.9 638.8 218.8C644.1 260.9 631.9 295.1 602.1 324.4C582.4 345.3 557.2 358.4 528.2 364.3C522.6 365.3 517.1 365.8 511.7 366.3C508.8 366.5 506 366.8 503.2 367.1C474.9 366.5 449 358.4 427.2 339.7C411.9 326.4 401.3 310.1 396.1 291.2C392.4 298.5 388.1 305.6 382.1 312.3C360.5 341.9 331.2 360.3 294.2 365.2C263.6 369.3 235.3 363.4 210.3 344.7C187.3 327.2 174.2 304.2 170.8 275.5C166.7 241.5 176.7 210.1 197.2 184.2C219.4 155.2 248.7 136.8 284.5 130.3C313.8 124.1 341.8 128.4 367.1 145.6C383.6 156.5 395.4 171.4 403.2 189.5C405.1 192.3 403.8 193.9 400.1 194.8zM48.3 200.4C47.05 200.4 46.74 199.8 47.36 198.8L53.91 190.4C54.53 189.5 56.09 188.9 57.34 188.9H168.6C169.8 188.9 170.1 189.8 169.5 190.7L164.2 198.8C163.6 199.8 162 200.7 161.1 200.7L48.3 200.4zM1.246 229.1C0 229.1-.3116 228.4 .3116 227.5L6.855 219.1C7.479 218.2 9.037 217.5 10.28 217.5H152.4C153.6 217.5 154.2 218.5 153.9 219.4L151.4 226.9C151.1 228.1 149.9 228.8 148.6 228.8L1.246 229.1zM75.72 255.9C75.1 256.8 75.41 257.7 76.65 257.7L144.6 258C145.5 258 146.8 257.1 146.8 255.9L147.4 248.4C147.4 247.1 146.8 246.2 145.5 246.2H83.2C81.95 246.2 80.71 247.1 80.08 248.1L75.72 255.9zM577.2 237.9C577 235.3 576.9 233.1 576.5 230.9C570.9 200.1 542.5 182.6 512.9 189.5C483.9 196 465.2 214.4 458.4 243.7C452.8 268 464.6 292.6 487 302.6C504.2 310.1 521.3 309.2 537.8 300.7C562.4 287.1 575.8 268 577.4 241.2C577.3 240 577.3 238.9 577.2 237.9z`},child:[]}]})(e)}function j(e){return h({tag:`svg`,attr:{viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5zm2.5-.5h1.5V15H10v-4.5h1.5V9H7zm5.5 0H14V15h1.5v-4.5H17V9h-4.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5m0 2.5h-2v-1h2z`},child:[]},{tag:`path`,attr:{fill:`none`,d:`M24 24H0V0h24z`},child:[]}]})(e)}var M=[{icon:(0,E.jsx)(O,{size:16,color:`#4584b6`}),label:`Get started using our Python SDK`,href:`https://docs.langwatch.ai/integration/python/guide`,event:`integration_guide_click`,language:`python`,bg:`blue.50`},{icon:(0,E.jsx)(k,{size:16,color:`#2563eb`}),label:`Follow the TypeScript guide`,href:`https://docs.langwatch.ai/integration/typescript/guide`,event:`integration_guide_click`,language:`typescript`,bg:`cyan.50`},{icon:(0,E.jsx)(A,{size:16,color:`#00ADD8`}),label:`Get going with our Golang SDK`,href:`https://github.com/langwatch/langwatch/tree/main/sdk-go`,event:`integration_guide_click`,language:`golang`,bg:`gray.100`},{icon:(0,E.jsx)(j,{size:16,color:`grey.500`}),label:`Integrate directly with the LangWatch API`,href:`https://docs.langwatch.ai/integration/rest-api`,event:`integration_guide_click`,language:`rest`,bg:`gray.100`}],N=({guide:e,onClick:t})=>(0,E.jsxs)(v,{as:`a`,href:e.href,target:`_blank`,rel:`noopener noreferrer`,display:`flex`,alignItems:`center`,gap:3,px:3,py:2,borderRadius:`md`,borderWidth:1,borderColor:`border`,_hover:{textDecoration:`none`,bg:`bg.muted`,borderColor:`border.emphasized`},transition:`all 0.2s`,onClick:t,"aria-label":e.label+` (opens in a new tab)`,children:[e.icon,(0,E.jsx)(a,{flex:1,textAlign:`left`,children:e.label}),(0,E.jsx)(i,{as:`span`,color:`fg.subtle`,ml:1,display:`flex`,alignItems:`center`,children:(0,E.jsx)(g,{size:16})})]}),P=()=>{let{project:e}=y();return(0,E.jsx)(f,{gap:2,fontSize:`sm`,align:`stretch`,width:`full`,children:M.map(t=>(0,E.jsx)(N,{guide:t,onClick:()=>C(t.event,{language:t.language,project_id:e?.id})},t.href))})},F=()=>{let{project:e}=y(),t=m(),r=!!D().data?.firstMessage,d=e?.apiKey??``,p=t.data?.BASE_HOST??``;async function h({withBashPrefix:t}){C(`api_key_copy`,{project_id:e?.id});try{await navigator.clipboard.writeText(t?`LANGWATCH_API_KEY=${d}`:d),o.create({title:`Copied`,description:`API key copied to clipboard`,type:`success`,meta:{closable:!0}})}catch{o.create({title:`Copy failed`,description:`Couldn't copy the API key. Please try again.`,type:`error`,meta:{closable:!0}})}}async function v({withBashPrefix:t}){C(`endpoint_copy`,{project_id:e?.id});try{await navigator.clipboard.writeText(t?`LANGWATCH_ENDPOINT=${p}`:p),o.create({title:`Copied`,description:`Endpoint copied to clipboard`,type:`success`,meta:{closable:!0}})}catch{o.create({title:`Copy failed`,description:`Couldn't copy the endpoint. Please try again.`,type:`error`,meta:{closable:!0}})}}return(0,E.jsxs)(f,{minH:`80px`,boxShadow:`sm`,borderRadius:`xl`,bg:`bg`,p:4,gap:2,align:`stretch`,children:[(0,E.jsxs)(i,{mb:1,children:[(0,E.jsx)(b,{size:`md`,textAlign:`left`,children:`Connect to LangWatch`}),(0,E.jsx)(a,{fontSize:`xs`,color:`fg.muted`,textAlign:`left`,children:`Follow the instructions on our docs to setup your project with LangWatch!`})]}),(0,E.jsxs)(f,{align:`start`,gap:1,fontSize:`sm`,w:`full`,mb:1,children:[(0,E.jsxs)(f,{align:`start`,children:[(0,E.jsx)(a,{fontSize:`sm`,color:`fg`,fontWeight:`medium`,children:`API key`}),(0,E.jsx)(a,{fontSize:`xs`,color:`fg.muted`,fontWeight:`normal`,mt:-1,children:`Keep it secret, keep it safe. Don't let this key fall into prying eyes.`})]}),(0,E.jsx)(w,{prefix:`LANGWATCH_API_KEY=`,value:d,ariaLabel:`API key`,showVisibilityToggle:!0,onCopy:h})]}),p&&p!==`https://app.langwatch.ai`&&(0,E.jsxs)(f,{align:`start`,gap:1,fontSize:`sm`,w:`full`,mb:1,children:[(0,E.jsxs)(f,{align:`start`,children:[(0,E.jsx)(a,{fontSize:`sm`,color:`fg`,fontWeight:`medium`,children:`Endpoint`}),(0,E.jsx)(a,{fontSize:`xs`,color:`fg.muted`,fontWeight:`normal`,mt:-1,children:`This is the endpoint you should configure in your SDK to send data to LangWatch.`})]}),(0,E.jsx)(w,{prefix:`LANGWATCH_ENDPOINT=`,value:p,ariaLabel:`Endpoint`,onCopy:v})]}),(0,E.jsx)(i,{mt:1,children:r?(0,E.jsxs)(l,{size:`sm`,borderStartWidth:`3px`,borderStartColor:`green.500`,colorPalette:`green`,title:`Integration configured`,children:[(0,E.jsx)(u,{children:(0,E.jsx)(_,{size:16})}),(0,E.jsx)(c,{children:`Integration configured — traces are being received`})]}):(0,E.jsxs)(l,{size:`sm`,borderStartWidth:`3px`,borderStartColor:`orange.400`,colorPalette:`orange`,title:`Waiting for first trace...`,children:[(0,E.jsx)(u,{children:(0,E.jsx)(n,{size:`sm`})}),(0,E.jsx)(c,{children:`Waiting for first trace...`})]})}),(0,E.jsx)(s,{marginY:4}),(0,E.jsx)(P,{}),r?(0,E.jsxs)(l,{colorPalette:`orange`,borderRadius:`md`,children:[(0,E.jsx)(u,{}),(0,E.jsxs)(c,{children:[`Ready to go deeper? Set up`,(0,E.jsxs)(x,{href:`https://docs.langwatch.ai/evaluations`,isExternal:!0,ml:1,textDecoration:`underline`,textDecorationStyle:`dashed`,children:[`Evaluations`,(0,E.jsx)(g,{})]}),` `,`to automatically score your LLM outputs.`]})]}):(0,E.jsxs)(l,{colorPalette:`orange`,borderRadius:`md`,children:[(0,E.jsx)(u,{}),(0,E.jsxs)(c,{children:[`Pick a guide above, or check our`,(0,E.jsxs)(x,{href:`https://docs.langwatch.ai/integration`,isExternal:!0,ml:1,textDecoration:`underline`,textDecorationStyle:`dashed`,children:[`step-by-step integration docs`,(0,E.jsx)(g,{})]}),` `,`to start sending traces.`]})]})]})},I=()=>(0,E.jsx)(i,{minH:`100vh`,py:6,px:2,w:`full`,children:(0,E.jsx)(d,{maxW:`container.md`,w:`full`,mx:`auto`,children:(0,E.jsx)(f,{gap:{base:4,md:6},align:`start`,children:(0,E.jsx)(f,{gap:6,w:`full`,pt:16,children:(0,E.jsx)(F,{})})})})});export{I as t};
|
|
2
|
-
//# sourceMappingURL=WelcomeLayout-B_rw1HA0.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-CFwixLRt.js";import{I as t}from"./DashboardLayout-RHGL-98_.js";import{Rt as n}from"./index-CUhcyBp3.js";import{n as r}from"./useFeatureFlag-D9ikgDaE.js";import{t as i}from"./LoadingScreen-D0JSh0Q2.js";var a=e();function o(e,o){return function(s){let{bypassOnboardingRedirect:c=!1}=o??{},l=o=>{let{organization:l,isLoading:u}=n(c?{redirectToOnboarding:!1,redirectToProjectOnboarding:!1}:void 0),d=l?.id??``,{enabled:f,isLoading:p}=r(e,{organizationId:d,enabled:!!d});return u||d&&p?(0,a.jsx)(i,{}):f?(0,a.jsx)(s,{...o}):(0,a.jsx)(t,{})};return l.displayName=`withFeatureFlagGuard(${s.displayName??s.name??`Component`})`,l}}export{o as t};
|
|
2
|
-
//# sourceMappingURL=WithFeatureFlagGuard-DwfApI3b.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-CFwixLRt.js";import{t}from"./box-Ck5lef6C.js";import{t as n}from"./text-A3qvcMyN.js";import{bn as r}from"./useLiteMemberGuard-klZnweA7.js";import{a as i,i as a,n as o,r as s,t as c}from"./alert-C5hocQt_.js";import{Rt as l}from"./index-CUhcyBp3.js";var u=e();function d({message:e,alertProps:l={},permission:d}){let f=`You don't have permission to view this content. Required permission: ${d}. Ask your team administrator to request access.`,p=e??f;return(0,u.jsx)(t,{padding:4,children:(0,u.jsxs)(a,{status:`warning`,...l,children:[(0,u.jsx)(s,{children:(0,u.jsx)(r,{size:16})}),(0,u.jsxs)(c,{children:[(0,u.jsx)(i,{children:`Access Restricted`}),(0,u.jsx)(o,{children:(0,u.jsx)(n,{children:p})})]})]})})}function f(e,t){return function(n){let{fallbackComponent:r=d,layoutComponent:i,customMessage:a,bypassOnboardingRedirect:o=!1}=t??{},s=t=>{let{hasAnyPermission:s,isLoading:c}=l(o?{redirectToOnboarding:!1,redirectToProjectOnboarding:!1}:void 0);if(c)return(0,u.jsx)(n,{...t});if(!s(e)){let t=(0,u.jsx)(r,{permission:e,message:a});return i?(0,u.jsx)(i,{children:t}):t}return(0,u.jsx)(n,{...t})};return s.displayName=`withPermissionGuard(${n.displayName??n.name??`Component`})`,s}}export{d as n,f as t};
|
|
2
|
-
//# sourceMappingURL=WithPermissionGuard-BP1dFkpM.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{t as r}from"./text-A3qvcMyN.js";import{t as i}from"./tooltip-Croc0I6e.js";import{n as a}from"./toaster-CRP22oRW.js";import{D as o,I as s}from"./ExternalImage-DbtOSrKl.js";import{t as c}from"./h-stack-CMPhqSp5.js";import{t as l}from"./spacer-CbmCSsJg.js";import{t as u}from"./v-stack-ClAMS101.js";import{n as d,u as f}from"./api-BK6L1im2.js";import{t as p}from"./arrow-up-BUkai5Np.js";import{r as m}from"./ColorfulBlockIcons-CUrsa--K.js";import{t as h}from"./copy-MuDrLrYT.js";import{t as g}from"./more-vertical-_6MEkDJl.js";import{t as _}from"./refresh-cw-CFMVkCi4.js";import{t as v}from"./trash-2-C6lvbTqs.js";import{Rt as y,w as b}from"./index-CUhcyBp3.js";import{t as x}from"./CascadeArchiveDialog-DSo9Fwed.js";import{n as S,t as C}from"./useProjectsForCopy-DxbxCEv5.js";import{t as w}from"./PushToCopiesDialog-C3eBpZ9F.js";var T=e(t()),E=n(),D=({open:e,onClose:t,workflowId:n,workflowName:r})=>{let{project:i}=y(),a=d.useContext(),s=d.workflow.copy.useMutation(),c=C(`workflows:create`),[l,u]=(0,T.useState)(!1);return i?(0,E.jsx)(S,{open:e,onClose:t,onSuccess:()=>void a.workflow.getAll.invalidate(),title:`Replicate Workflow`,entityLabel:`Workflow`,sourceName:r,sourceId:n,sourceProjectId:i.id,projects:c,onCopy:async({projectId:e,sourceProjectId:t,copyDatasets:r})=>{await s.mutateAsync({workflowId:n,projectId:e,sourceProjectId:t,copyDatasets:!!r})},isLoading:s.isLoading,extraContent:(0,E.jsx)(o,{checked:l,onCheckedChange:e=>u(!!e.checked),children:`Replicate associated dataset`}),getExtraCopyParams:()=>({copyDatasets:l})}):null},O=({open:e,onClose:t,workflowId:n,workflowName:r})=>{let{project:i}=y(),a=d.workflow.pushToCopies.useMutation(),o=d.useContext(),[s,c]=(0,T.useState)(new Set),{data:l,isLoading:u,error:f}=d.workflow.getCopies.useQuery({projectId:i?.id??``,workflowId:n},{enabled:e&&!!i?.id&&!!n}),[p,m]=(0,T.useState)([]);return(0,T.useEffect)(()=>{l&&(m(l),c(new Set(l.map(e=>e.id))))},[l]),(0,E.jsx)(w,{open:e,onClose:t,entityLabel:`Workflow`,sourceName:r,copies:p,isLoading:u,error:f?{message:f.message}:null,selectedCopyIds:s,onToggleCopy:e=>{let t=new Set(s);t.has(e)?t.delete(e):t.add(e),c(t)},onPush:async()=>{if(!i)throw Error(`No project available for push`);let e=await a.mutateAsync({workflowId:n,projectId:i.id,copyIds:Array.from(s)});return await o.workflow.getAll.invalidate(),e},pushLoading:a.isLoading,bodyIntro:`Select which replicas to push the latest version to:`,emptyMessage:(0,E.jsx)(E.Fragment,{children:`No replicas found. This may be because you don't have workflows:update permission on the replica projects, or the replicas have been archived.`}),onSuccess:()=>c(new Set)})};function k(e){return(0,E.jsx)(u,{align:`start`,padding:4,gap:2,borderRadius:`xl`,background:`bg.panel`,boxShadow:`md`,height:`142px`,cursor:`pointer`,role:`button`,transition:`all 0.2s ease-in-out`,border:`1px solid`,borderColor:`border.muted`,_hover:{boxShadow:`xl`,textDecoration:`none`},...e,children:e.children})}function A({name:e,icon:t,updatedAt:n,action:i,...a}){return(0,E.jsxs)(k,{paddingX:0,...a,children:[(0,E.jsxs)(c,{gap:4,paddingX:4,paddingBottom:2,width:`full`,children:[(0,E.jsx)(m,{icon:t,size:`lg`}),(0,E.jsx)(l,{}),i]}),(0,E.jsx)(l,{}),(0,E.jsx)(r,{paddingX:4,color:`fg`,fontSize:`sm`,fontWeight:500,children:e}),n&&(0,E.jsx)(r,{paddingX:4,color:`fg.subtle`,fontSize:`12px`,children:b(typeof n==`number`?n:n.getTime())})]})}function j({workflowId:e,query:t,name:n,icon:o,description:u,children:S,...C}){let{project:w}=y(),A=d.workflow.archive.useMutation(),j=d.workflow.cascadeArchive.useMutation(),M=d.workflow.syncFromSource.useMutation(),[N,P]=(0,T.useState)(!1),[F,I]=(0,T.useState)(!1),[L,R]=(0,T.useState)(!1),z=d.workflow.getRelatedEntities.useQuery({workflowId:e??``,projectId:w?.id??``},{enabled:N&&!!e&&!!w?.id}),B=e?t?.data?.find(t=>t.id===e):void 0,V=!!B?.copiedFromWorkflowId,H=(B?._count?.copiedWorkflows??0)>0,U=B?.copiedFrom?`${B.copiedFrom.project.team.organization.name} / ${B.copiedFrom.project.team.name} / ${B.copiedFrom.project.name}`:void 0,W=(0,T.useCallback)(()=>{!e||!w||M.mutate({workflowId:e,projectId:w.id},{onSuccess:()=>{t?.refetch(),a.create({title:`Workflow updated`,description:`Workflow "${n}" has been updated from source.`,type:`success`,meta:{closable:!0}})},onError:e=>{f(e)||a.create({title:`Error updating workflow`,description:e.message||`Please try again later.`,type:`error`,meta:{closable:!0}})}})},[M,e,w,t,n]),G=(0,T.useCallback)(()=>{R(!0)},[]),K=(0,T.useCallback)(()=>{!e||!w||((z.data?.evaluators.length??0)>0||(z.data?.agents.length??0)>0?j.mutate({workflowId:e,projectId:w.id},{onSuccess:e=>{P(!1),t?.refetch();let r=[];e.archivedEvaluatorsCount>0&&r.push(`${e.archivedEvaluatorsCount} evaluator${e.archivedEvaluatorsCount>1?`s`:``}`),e.archivedAgentsCount>0&&r.push(`${e.archivedAgentsCount} agent${e.archivedAgentsCount>1?`s`:``}`),e.deletedMonitorsCount>0&&r.push(`${e.deletedMonitorsCount} online evaluation${e.deletedMonitorsCount>1?`s`:``}`),a.create({title:`Workflow "${n}" deleted`,description:r.length>0?`Also deleted: ${r.join(`, `)}`:void 0,type:`success`,meta:{closable:!0}})},onError:()=>{a.create({title:`Error deleting workflow`,description:`Please try again later.`,type:`error`})}}):A.mutate({workflowId:e,projectId:w.id},{onSuccess:()=>{P(!1),t?.refetch(),a.create({title:`Workflow "${n}" deleted`,type:`success`,meta:{closable:!0}})},onError:()=>{a.create({title:`Error deleting workflow`,description:`Please try again later.`,type:`error`})}}))},[A,j,n,w,t,z.data,e]);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(k,{paddingX:0,...C,children:[(0,E.jsxs)(c,{gap:4,paddingX:4,paddingBottom:2,width:`full`,children:[(0,E.jsx)(m,{icon:o,size:`lg`}),u&&(0,E.jsx)(r,{color:`fg`,fontSize:`sm`,fontWeight:500,children:n}),(0,E.jsx)(l,{}),e&&(0,E.jsxs)(s.Root,{children:[(0,E.jsx)(s.Trigger,{className:`js-inner-menu`,children:(0,E.jsx)(g,{size:16})}),(0,E.jsxs)(s.Content,{className:`js-inner-menu`,children:[V&&(0,E.jsx)(i,{content:U?`Copied from: ${U}`:void 0,disabled:!U,positioning:{placement:`right`},showArrow:!0,children:(0,E.jsxs)(s.Item,{value:`sync`,onClick:()=>W(),children:[(0,E.jsx)(_,{size:16}),` Update from source`]})}),H&&(0,E.jsxs)(s.Item,{value:`push`,onClick:()=>G(),children:[(0,E.jsx)(p,{size:16}),` Push to replicas`]}),(0,E.jsxs)(s.Item,{value:`copy`,onClick:()=>I(!0),children:[(0,E.jsx)(h,{size:16}),` Replicate to another project`]}),(0,E.jsxs)(s.Item,{value:`delete`,color:`red.500`,onClick:()=>P(!0),children:[(0,E.jsx)(v,{size:16}),` Delete`]})]})]})]}),S,!u&&(0,E.jsx)(l,{}),(0,E.jsx)(r,{paddingX:4,color:`fg`,fontSize:`sm`,fontWeight:u?void 0:500,children:u??n}),(0,E.jsx)(r,{paddingX:4,color:`fg.subtle`,fontSize:`12px`,children:b(B?.updatedAt?.getTime()??0)})]}),(0,E.jsx)(x,{open:N,onClose:()=>P(!1),onConfirm:K,isLoading:j.isPending||A.isPending,isLoadingRelated:z.isLoading,entityType:`workflow`,entityName:n,relatedEntities:{evaluators:z.data?.evaluators,agents:z.data?.agents,monitors:z.data?.monitors}}),e&&(0,E.jsx)(D,{open:F,onClose:()=>I(!1),workflowId:e,workflowName:n}),e&&(0,E.jsx)(O,{open:L,onClose:()=>R(!1),workflowId:e,workflowName:n})]})}export{A as n,j as t};
|
|
2
|
-
//# sourceMappingURL=WorkflowCard-B_SYXPpi.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{cn as o,lr as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./toaster-CRP22oRW.js";import{a as l,r as u,t as d}from"./field-Dz4Xmo3X.js";import{t as f}from"./h-stack-CMPhqSp5.js";import{it as ee}from"./immer-tl_oI9yy.js";import{t as p}from"./v-stack-ClAMS101.js";import{r as m}from"./next-router-Bn5Y8Iek.js";import{n as h,u as g}from"./api-BK6L1im2.js";import{n as te}from"./lu-DlSq9Be4.js";import{Ar as _,I as v,N as y,Rt as b,V as x,ni as S}from"./index-CUhcyBp3.js";import{s as C}from"./index.esm-C0ipNBTK.js";import{t as w}from"./tracking-2cJI_Hu7.js";import{t as T}from"./useLicenseEnforcement-DRk7-NQ0.js";import{t as ne}from"./useCompoundLicenseCheck-BqNF-zzC.js";import{t as E}from"./EmojiPickerModal-DdZxZuTV.js";import{n as D}from"./NewWorkflowForm-BrvVQJNY.js";import{t as O}from"./custom_evaluator-DGAwXo2Z.js";var k=e(t()),A=r();function j(e){let{project:t}=b(),{closeDrawer:r,canGoBack:j,goBack:M}=x(),N=y(),P=h.useContext(),F=m(),I=s(),L=e.onClose??r,R=v(`workflowSelectorForEvaluator`),z=e.onSave??R?.onSave??N.onSave,B=e.open!==!1&&e.open!==void 0,V=T(`evaluators`),H=T(`workflows`),[U]=(0,k.useState)(D()),{register:W,handleSubmit:G,watch:K,setValue:q,formState:{errors:J}}=C({defaultValues:{name:e.evaluatorName??``,icon:U,description:``}}),Y=K(`icon`),X=K(`name`),Z=h.workflow.create.useMutation(),Q=h.evaluators.create.useMutation({onSuccess:e=>{P.evaluators.getAll.invalidate({projectId:t?.id??``}),z?.({id:e.id,name:e.name,workflowId:e.workflowId??``})},onError:e=>{g(e)||c.create({title:`Error creating evaluator`,description:e.message,type:`error`})}}),$=Z.isPending||Q.isPending,re=(0,k.useCallback)(async e=>{if(t)try{let n={...O,name:e.name,description:e.description,icon:e.icon??U},r=await Z.mutateAsync({projectId:t.id,dsl:n,commitMessage:`Workflow creation for evaluator`,publish:!0});w(`workflow_create`,{project_id:t.id}),await Q.mutateAsync({projectId:t.id,name:e.name.trim(),type:`workflow`,config:{},workflowId:r.workflow.id}),L(),F.push(`/${t.slug}/studio/${r.workflow.id}`)}catch(e){if(g(e))return;console.error(`Error creating workflow evaluator:`,e),c.create({title:`Error`,description:`Failed to create workflow evaluator`,type:`error`})}},[t,U,Z,Q,L,F]),ie=X?.trim().length>0;return(0,A.jsx)(A.Fragment,{children:(0,A.jsx)(o.Root,{open:B,onOpenChange:({open:e})=>!e&&L(),size:`md`,modal:!1,children:(0,A.jsxs)(o.Content,{bg:`bg`,children:[(0,A.jsx)(o.CloseTrigger,{}),(0,A.jsx)(o.Header,{children:(0,A.jsxs)(f,{gap:2,children:[j&&(0,A.jsx)(n,{variant:`ghost`,size:`sm`,onClick:M,padding:1,minWidth:`auto`,"data-testid":`back-button`,children:(0,A.jsx)(te,{size:20})}),(0,A.jsx)(S,{children:`Create Workflow Evaluator`})]})}),(0,A.jsx)(o.Body,{display:`flex`,flexDirection:`column`,overflow:`hidden`,padding:0,children:(0,A.jsxs)(p,{gap:4,align:`stretch`,flex:1,overflow:`hidden`,children:[(0,A.jsx)(a,{color:`fg.muted`,fontSize:`sm`,paddingX:6,paddingTop:4,children:`Create a new workflow to use as a custom evaluator. You'll be taken to the workflow editor to configure the evaluation logic.`}),(0,A.jsx)(i,{paddingX:6,children:(0,A.jsxs)(p,{gap:4,align:`stretch`,children:[(0,A.jsxs)(l,{invalid:!!J.name,children:[(0,A.jsx)(E,{open:I.open,onClose:I.onClose,onChange:e=>{q(`icon`,e),I.onClose()}}),(0,A.jsx)(u,{children:`Name and Icon`}),(0,A.jsxs)(f,{children:[(0,A.jsx)(n,{variant:`outline`,onClick:I.onOpen,fontSize:`18px`,children:Y}),(0,A.jsx)(_,{...W(`name`,{required:`Name is required`}),placeholder:`Enter evaluator name`,"data-testid":`evaluator-name-input`})]}),(0,A.jsx)(d,{children:J.name?.message})]}),(0,A.jsxs)(l,{invalid:!!J.description,children:[(0,A.jsx)(u,{children:`Description (optional)`}),(0,A.jsx)(ee,{...W(`description`),placeholder:`What does this evaluator check?`}),(0,A.jsx)(d,{children:J.description?.message})]})]})})]})}),(0,A.jsx)(o.Footer,{borderTopWidth:`1px`,borderColor:`border`,children:(0,A.jsxs)(f,{gap:3,children:[(0,A.jsx)(n,{variant:`outline`,onClick:L,children:`Cancel`}),(0,A.jsx)(n,{colorPalette:`green`,onClick:()=>{ne([H,V],()=>void G(re)())},disabled:!ie||$,loading:$,"data-testid":`save-evaluator-button`,children:`Create & Open Editor`})]})})]})})})}export{j as WorkflowSelectorForEvaluatorDrawer};
|
|
2
|
-
//# sourceMappingURL=WorkflowSelectorForEvaluatorDrawer-D_fcHR54.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{r}from"./next-router-Bn5Y8Iek.js";import{Rt as i}from"./index-CUhcyBp3.js";import{t as a}from"./LoadingScreen-D0JSh0Q2.js";var o=e(t()),s=n();function c(){let{project:e}=i(),t=r(),{path:n}=t.query;return(0,o.useEffect)(()=>{let r=setTimeout(()=>{t.push(`/`)},5e3);return e&&Array.isArray(n)&&(clearTimeout(r),t.push(`/${e.slug}/${n.join(`/`)}`)),()=>clearTimeout(r)},[n,e,t]),(0,s.jsx)(a,{})}export{c as default};
|
|
2
|
-
//# sourceMappingURL=_...path_-Ipy6q2Lm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,r,s as i}from"./fetchSSE-DWKCnoHV.js";var a=Array.isArray,o=`[object AsyncFunction]`,s=`[object Function]`,c=`[object GeneratorFunction]`,l=`[object Proxy]`;function u(t){if(!r(t))return!1;var n=e(t);return n==s||n==c||n==o||n==l}var d=i[`__core-js_shared__`],f=function(){var e=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function ee(e){return!!f&&f in e}var te=Function.prototype.toString;function p(e){if(e!=null){try{return te.call(e)}catch{}try{return e+``}catch{}}return``}var ne=/[\\^$.*+?()[\]{}|]/g,re=/^\[object .+?Constructor\]$/,ie=Function.prototype,ae=Object.prototype,oe=ie.toString,se=ae.hasOwnProperty,ce=RegExp(`^`+oe.call(se).replace(ne,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function le(e){return!r(e)||ee(e)?!1:(u(e)?ce:re).test(p(e))}function ue(e,t){return e?.[t]}function m(e,t){var n=ue(e,t);return le(n)?n:void 0}var h=m(i,`WeakMap`),de=function(){try{var e=m(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),fe=9007199254740991,pe=/^(?:0|[1-9]\d*)$/;function me(e,t){var n=typeof e;return t??=fe,!!t&&(n==`number`||n!=`symbol`&&pe.test(e))&&e>-1&&e%1==0&&e<t}function g(e,t){return e===t||e!==e&&t!==t}var he=9007199254740991;function _(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=he}function v(e){return e!=null&&_(e.length)&&!u(e)}var ge=Object.prototype;function _e(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ge)}function ve(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ye=`[object Arguments]`;function y(t){return n(t)&&e(t)==ye}var b=Object.prototype,be=b.hasOwnProperty,xe=b.propertyIsEnumerable,x=y(function(){return arguments}())?y:function(e){return n(e)&&be.call(e,`callee`)&&!xe.call(e,`callee`)};function Se(){return!1}var S=typeof exports==`object`&&exports&&!exports.nodeType&&exports,C=S&&typeof module==`object`&&module&&!module.nodeType&&module,w=C&&C.exports===S?i.Buffer:void 0,T=(w?w.isBuffer:void 0)||Se,Ce=`[object Arguments]`,we=`[object Array]`,Te=`[object Boolean]`,Ee=`[object Date]`,De=`[object Error]`,Oe=`[object Function]`,ke=`[object Map]`,Ae=`[object Number]`,je=`[object Object]`,Me=`[object RegExp]`,Ne=`[object Set]`,Pe=`[object String]`,Fe=`[object WeakMap]`,Ie=`[object ArrayBuffer]`,Le=`[object DataView]`,Re=`[object Float32Array]`,ze=`[object Float64Array]`,Be=`[object Int8Array]`,Ve=`[object Int16Array]`,He=`[object Int32Array]`,Ue=`[object Uint8Array]`,We=`[object Uint8ClampedArray]`,Ge=`[object Uint16Array]`,Ke=`[object Uint32Array]`,E={};E[Re]=E[ze]=E[Be]=E[Ve]=E[He]=E[Ue]=E[We]=E[Ge]=E[Ke]=!0,E[Ce]=E[we]=E[Ie]=E[Te]=E[Le]=E[Ee]=E[De]=E[Oe]=E[ke]=E[Ae]=E[je]=E[Me]=E[Ne]=E[Pe]=E[Fe]=!1;function qe(t){return n(t)&&_(t.length)&&!!E[e(t)]}function D(e){return function(t){return e(t)}}var O=typeof exports==`object`&&exports&&!exports.nodeType&&exports,k=O&&typeof module==`object`&&module&&!module.nodeType&&module,A=k&&k.exports===O&&t.process,j=function(){try{return k&&k.require&&k.require(`util`).types||A&&A.binding&&A.binding(`util`)}catch{}}(),M=j&&j.isTypedArray,N=M?D(M):qe,Je=Object.prototype.hasOwnProperty;function P(e,t){var n=a(e),r=!n&&x(e),i=!n&&!r&&T(e),o=!n&&!r&&!i&&N(e),s=n||r||i||o,c=s?ve(e.length,String):[],l=c.length;for(var u in e)(t||Je.call(e,u))&&!(s&&(u==`length`||i&&(u==`offset`||u==`parent`)||o&&(u==`buffer`||u==`byteLength`||u==`byteOffset`)||me(u,l)))&&c.push(u);return c}function F(e,t){return function(n){return e(t(n))}}var Ye=F(Object.keys,Object),Xe=Object.prototype.hasOwnProperty;function I(e){if(!_e(e))return Ye(e);var t=[];for(var n in Object(e))Xe.call(e,n)&&n!=`constructor`&&t.push(n);return t}function L(e){return v(e)?P(e):I(e)}var R=m(Object,`create`);function Ze(){this.__data__=R?R(null):{},this.size=0}function Qe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var $e=`__lodash_hash_undefined__`,et=Object.prototype.hasOwnProperty;function tt(e){var t=this.__data__;if(R){var n=t[e];return n===$e?void 0:n}return et.call(t,e)?t[e]:void 0}var nt=Object.prototype.hasOwnProperty;function rt(e){var t=this.__data__;return R?t[e]!==void 0:nt.call(t,e)}var it=`__lodash_hash_undefined__`;function at(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=R&&t===void 0?it:t,this}function z(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}z.prototype.clear=Ze,z.prototype.delete=Qe,z.prototype.get=tt,z.prototype.has=rt,z.prototype.set=at;function ot(){this.__data__=[],this.size=0}function B(e,t){for(var n=e.length;n--;)if(g(e[n][0],t))return n;return-1}var st=Array.prototype.splice;function ct(e){var t=this.__data__,n=B(t,e);return n<0?!1:(n==t.length-1?t.pop():st.call(t,n,1),--this.size,!0)}function lt(e){var t=this.__data__,n=B(t,e);return n<0?void 0:t[n][1]}function ut(e){return B(this.__data__,e)>-1}function dt(e,t){var n=this.__data__,r=B(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function V(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}V.prototype.clear=ot,V.prototype.delete=ct,V.prototype.get=lt,V.prototype.has=ut,V.prototype.set=dt;var H=m(i,`Map`);function ft(){this.size=0,this.__data__={hash:new z,map:new(H||V),string:new z}}function pt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function U(e,t){var n=e.__data__;return pt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function mt(e){var t=U(this,e).delete(e);return this.size-=+!!t,t}function ht(e){return U(this,e).get(e)}function gt(e){return U(this,e).has(e)}function _t(e,t){var n=U(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function W(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}W.prototype.clear=ft,W.prototype.delete=mt,W.prototype.get=ht,W.prototype.has=gt,W.prototype.set=_t;function G(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vt(){this.__data__=new V,this.size=0}function yt(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function bt(e){return this.__data__.get(e)}function xt(e){return this.__data__.has(e)}var St=200;function Ct(e,t){var n=this.__data__;if(n instanceof V){var r=n.__data__;if(!H||r.length<St-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new W(r)}return n.set(e,t),this.size=n.size,this}function K(e){var t=this.__data__=new V(e);this.size=t.size}K.prototype.clear=vt,K.prototype.delete=yt,K.prototype.get=bt,K.prototype.has=xt,K.prototype.set=Ct;function q(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function J(){return[]}var wt=Object.prototype.propertyIsEnumerable,Tt=Object.getOwnPropertySymbols,Et=Tt?function(e){return e==null?[]:(e=Object(e),q(Tt(e),function(t){return wt.call(e,t)}))}:J;function Dt(e,t,n){var r=t(e);return a(e)?r:G(r,n(e))}function Ot(e){return Dt(e,L,Et)}var Y=m(i,`DataView`),X=m(i,`Promise`),Z=m(i,`Set`),kt=`[object Map]`,At=`[object Object]`,jt=`[object Promise]`,Mt=`[object Set]`,Nt=`[object WeakMap]`,Q=`[object DataView]`,Pt=p(Y),Ft=p(H),It=p(X),Lt=p(Z),Rt=p(h),$=e;(Y&&$(new Y(new ArrayBuffer(1)))!=Q||H&&$(new H)!=kt||X&&$(X.resolve())!=jt||Z&&$(new Z)!=Mt||h&&$(new h)!=Nt)&&($=function(t){var n=e(t),r=n==At?t.constructor:void 0,i=r?p(r):``;if(i)switch(i){case Pt:return Q;case Ft:return kt;case It:return jt;case Lt:return Mt;case Rt:return Nt}return n});var zt=$,Bt=i.Uint8Array;export{_ as C,u as D,de as E,a as O,v as S,me as T,j as _,Dt as a,x as b,q as c,W as d,L as f,N as g,P as h,Ot as i,K as l,F as m,zt as n,Et as o,I as p,Z as r,J as s,Bt as t,G as u,D as v,g as w,_e as x,T as y};
|
|
2
|
-
//# sourceMappingURL=_Uint8Array-B8b3z1r6.js.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./skeleton-YwQIu7Tp.js";import{t as s}from"./text-A3qvcMyN.js";import{An as c,D as l,O as u,Tn as d,j as f,k as p}from"./useLiteMemberGuard-klZnweA7.js";import{t as m}from"./tooltip-Croc0I6e.js";import{n as h}from"./toaster-CRP22oRW.js";import{N as g,nt as _}from"./ExternalImage-DbtOSrKl.js";import{n as v,r as y}from"./external-link-BzETHrAG.js";import{t as b}from"./icon-CkSWK_vf.js";import{r as x}from"./UpgradeModal-BmLw5ONS.js";import{r as S,t as ee}from"./card-54_vstoB.js";import{t as C}from"./icon-button-Ce2kwA7j.js";import{a as w,i as T,n as E,r as D,t as O}from"./empty-state-Al7XUd1I.js";import{t as k}from"./h-stack-CMPhqSp5.js";import{n as A,r as j,t as M}from"./native-select-Bj4m9rSh.js";import{t as N}from"./spacer-CbmCSsJg.js";import{E as te,L as P,nt as F,rt as I}from"./immer-tl_oI9yy.js";import{t as L}from"./v-stack-ClAMS101.js";import{t as R}from"./createLucideIcon-WbxVGt4j.js";import{t as ne}from"./chart-column-B5Q7GFT7.js";import{t as re}from"./circle-check-big-4_LKo4PU.js";import{t as z}from"./layers-YjhzBQNM.js";import{t as B}from"./panel-left-open-DWvREgaU.js";import{t as ie}from"./DashboardLayout-RHGL-98_.js";import{n as V}from"./close-button-RGOW3hmk.js";import{t as ae}from"./ban-CguPt3pc.js";import{t as oe}from"./layout-grid-BLwxswDr.js";import{t as se}from"./panel-right-open-vGAoUJjk.js";import{t as ce}from"./refresh-cw-BNkF8mW1.js";import{t as le}from"./repeat-DZv-EQSw.js";import{t as ue}from"./square-DFxtV7lB.js";import{t as H}from"./target-CFpQan4C.js";import{r as de}from"./next-router-Bn5Y8Iek.js";import{n as U}from"./api-BK6L1im2.js";import{n as W}from"./src-RcSZrN9Q.js";import{t as G}from"./settings-dbj7pgqW.js";import{C as fe,L as pe,On as K,i as me,kn as he,kt as ge}from"./lu-DlSq9Be4.js";import{$n as _e,In as ve,Mr as ye,Qn as be,Rt as q,T as xe,V as Se,Vn as Ce,at as we,dr as Te,ir as Ee,mr as De,nr as Oe,pr as ke,yt as J}from"./index-CUhcyBp3.js";import{a as Ae,o as je}from"./useSavedViews-CNmeuzC3.js";import{t as Me}from"./WithPermissionGuard-BP1dFkpM.js";import{t as Ne}from"./dist-CtqZVBlK.js";import{a as Pe,c as Fe,d as Ie,f as Le,g as Re,h as ze,i as Be,l as Ve,m as He,n as Ue,o as We,p as Ge,r as Ke,s as qe,t as Je,u as Ye}from"./useSimulationUpdateListener-Bu7hXXtv.js";import{a as Y,i as Xe,n as Ze,t as Qe}from"./MetricStatsTooltip-Bcj5Xgjp.js";import{t as $e}from"./useTargetNameMap-CB8rbgsw.js";import{t as et}from"./types-Qc1U0Lzq.js";import{t as tt}from"./SearchInput-C_AroTij.js";import{t as nt}from"./LangyContextTarget-DUSindiC.js";import{t as rt}from"./SetupWithAgentButton-BKWI-UTU.js";import{n as it,r as at,t as ot}from"./PassRateIndicator-BR-3K00K.js";var st=R(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),ct=R(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),lt=R(`repeat-2`,[[`path`,{d:`m2 9 3-3 3 3`,key:`1ltn5i`}],[`path`,{d:`M13 18H7a2 2 0 0 1-2-2V6`,key:`1r6tfw`}],[`path`,{d:`m22 15-3 3-3-3`,key:`4rnwn2`}],[`path`,{d:`M11 6h6a2 2 0 0 1 2 2v10`,key:`2f72bc`}]]),X=e(t()),Z=i();function ut({scrollRef:e,fadeAfterPx:t=100}={}){let[n,r]=(0,X.useState)(+!e),i=(0,X.useRef)(null);return(0,X.useEffect)(()=>{if(!e)return;let n,a=!1,o=()=>{let s=e.current;if(!s){n=requestAnimationFrame(o);return}a=!0;let c=()=>{r(Math.min(s.scrollTop/t,1))};c(),s.addEventListener(`scroll`,c,{passive:!0}),i.current=()=>s.removeEventListener(`scroll`,c)};return n=requestAnimationFrame(o),()=>{a||cancelAnimationFrame(n),i.current?.(),i.current=null}},[e,t]),(0,Z.jsxs)(a,{width:`full`,flexShrink:0,position:`relative`,opacity:n,transition:`opacity 0.15s ease-out`,children:[(0,Z.jsx)(a,{width:`full`,height:`1px`,bg:`border.muted`}),(0,Z.jsx)(a,{width:`full`,height:`4px`,background:`linear-gradient(to bottom, var(--chakra-colors-border-muted), transparent)`,opacity:.4,position:`absolute`,zIndex:1})]})}var dt={pass:`
|
|
2
|
-
radial-gradient(ellipse at 0% 100%, rgba(134, 239, 172, 0.55) 0%, transparent 50%),
|
|
3
|
-
radial-gradient(ellipse at 100% 50%, rgba(72, 187, 120, 0.5) 0%, transparent 45%),
|
|
4
|
-
radial-gradient(ellipse at 70% 0%, rgba(56, 161, 105, 0.55) 0%, transparent 50%),
|
|
5
|
-
linear-gradient(160deg, rgba(56, 161, 105, 0.58) 0%, rgba(104, 211, 145, 0.52) 100%)
|
|
6
|
-
`,cancelled:`
|
|
7
|
-
radial-gradient(ellipse at 0% 100%, rgba(226, 232, 240, 0.55) 0%, transparent 50%),
|
|
8
|
-
radial-gradient(ellipse at 100% 50%, rgba(160, 174, 192, 0.5) 0%, transparent 45%),
|
|
9
|
-
radial-gradient(ellipse at 70% 0%, rgba(113, 128, 150, 0.55) 0%, transparent 50%),
|
|
10
|
-
linear-gradient(160deg, rgba(113, 128, 150, 0.58) 0%, rgba(160, 174, 192, 0.52) 100%)
|
|
11
|
-
`,fail:`
|
|
12
|
-
radial-gradient(ellipse at 0% 100%, rgba(254, 178, 178, 0.55) 0%, transparent 50%),
|
|
13
|
-
radial-gradient(ellipse at 100% 50%, rgba(245, 101, 101, 0.5) 0%, transparent 45%),
|
|
14
|
-
radial-gradient(ellipse at 70% 0%, rgba(229, 62, 62, 0.55) 0%, transparent 50%),
|
|
15
|
-
linear-gradient(160deg, rgba(229, 62, 62, 0.58) 0%, rgba(252, 129, 129, 0.52) 100%)
|
|
16
|
-
`,stalled:`
|
|
17
|
-
radial-gradient(ellipse at 0% 100%, rgba(251, 211, 141, 0.55) 0%, transparent 50%),
|
|
18
|
-
radial-gradient(ellipse at 100% 50%, rgba(236, 201, 75, 0.5) 0%, transparent 45%),
|
|
19
|
-
radial-gradient(ellipse at 70% 0%, rgba(214, 158, 46, 0.55) 0%, transparent 50%),
|
|
20
|
-
linear-gradient(160deg, rgba(214, 158, 46, 0.58) 0%, rgba(236, 201, 75, 0.52) 100%)
|
|
21
|
-
`},ft={[p.SUCCESS]:`pass`,[p.FAILED]:`fail`,[p.ERROR]:`fail`,[p.CANCELLED]:`cancelled`,[p.STALLED]:`stalled`,[p.IN_PROGRESS]:`cancelled`,[p.PENDING]:`cancelled`,[p.QUEUED]:`cancelled`,[p.RUNNING]:`cancelled`},pt={[p.SUCCESS]:`green.solid/20`,[p.FAILED]:`red.solid/30`,[p.ERROR]:`red.solid/30`,[p.CANCELLED]:`gray.solid/15`,[p.STALLED]:`yellow.solid/30`,[p.IN_PROGRESS]:`gray.solid/15`,[p.PENDING]:`gray.solid/15`,[p.QUEUED]:`gray.solid/15`,[p.RUNNING]:`gray.solid/15`};function mt(e){return{isComplete:l[e].isComplete,lightModeGradient:dt[ft[e]],scrim:pt[e]}}function ht({status:e}){let{isComplete:t,lightModeGradient:n,scrim:r}=mt(e);return t?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(a,{"aria-hidden":!0,"data-testid":`simulation-status-overlay-light`,position:`absolute`,inset:0,background:n,display:{base:`block`,_dark:`none`},zIndex:1,pointerEvents:`none`}),(0,Z.jsx)(a,{"aria-hidden":!0,"data-testid":`simulation-status-overlay-dark`,position:`absolute`,bottom:0,left:0,right:0,height:`65%`,bgGradient:`to-t`,gradientFrom:r,gradientTo:`transparent`,display:{base:`none`,_dark:`block`},zIndex:1,pointerEvents:`none`})]}):null}function gt({title:e,isComplete:t}){return(0,Z.jsx)(a,{py:2,px:3,w:`100%`,position:`relative`,zIndex:2,children:(0,Z.jsx)(s,{fontSize:`xs`,fontWeight:`semibold`,color:t?`white`:`fg`,lineClamp:2,children:e})})}function _t(){return(0,Z.jsxs)(L,{p:4,gap:4,align:`stretch`,height:`100%`,css:{"@keyframes shimmer":{"0%":{opacity:.4},"50%":{opacity:.7},"100%":{opacity:.4}}},children:[(0,Z.jsx)(k,{justify:`flex-end`,children:(0,Z.jsx)(a,{bg:`bg.muted`,borderRadius:`lg`,h:`32px`,w:`65%`,css:{animation:`shimmer 1.5s ease-in-out infinite`}})}),(0,Z.jsxs)(L,{align:`flex-start`,gap:2,children:[(0,Z.jsx)(a,{bg:`bg.muted`,borderRadius:`lg`,h:`14px`,w:`90%`,css:{animation:`shimmer 1.5s ease-in-out 0.15s infinite`}}),(0,Z.jsx)(a,{bg:`bg.muted`,borderRadius:`lg`,h:`14px`,w:`75%`,css:{animation:`shimmer 1.5s ease-in-out 0.3s infinite`}}),(0,Z.jsx)(a,{bg:`bg.muted`,borderRadius:`lg`,h:`14px`,w:`60%`,css:{animation:`shimmer 1.5s ease-in-out 0.45s infinite`}})]}),(0,Z.jsx)(k,{justify:`flex-end`,children:(0,Z.jsx)(a,{bg:`bg.muted`,borderRadius:`lg`,h:`28px`,w:`50%`,css:{animation:`shimmer 1.5s ease-in-out 0.6s infinite`}})}),(0,Z.jsxs)(L,{align:`flex-start`,gap:2,children:[(0,Z.jsx)(a,{bg:`bg.muted`,borderRadius:`lg`,h:`14px`,w:`85%`,css:{animation:`shimmer 1.5s ease-in-out 0.75s infinite`}}),(0,Z.jsx)(a,{bg:`bg.muted`,borderRadius:`lg`,h:`14px`,w:`70%`,css:{animation:`shimmer 1.5s ease-in-out 0.9s infinite`}})]})]})}function vt({description:e}){return(0,Z.jsxs)(L,{height:`100%`,justify:`center`,align:`center`,gap:4,p:4,css:{"@keyframes ripple":{"0%":{transform:`scale(0.8)`,opacity:.4},"50%":{transform:`scale(1)`,opacity:.15},"100%":{transform:`scale(0.8)`,opacity:.4}}},children:[(0,Z.jsx)(a,{position:`relative`,w:`64px`,h:`64px`,children:[0,1,2].map(e=>(0,Z.jsx)(a,{position:`absolute`,inset:`${e*8}px`,borderRadius:`full`,border:`1px solid`,borderColor:`fg.muted`,css:{animation:`ripple 2.4s ease-in-out ${e*.4}s infinite`}},e))}),e&&(0,Z.jsx)(s,{fontSize:`xs`,color:`fg.muted`,textAlign:`center`,lineClamp:2,maxW:`90%`,children:e})]})}function yt({children:e}){return(0,Z.jsx)(ee,{p:0,height:`100%`,overflow:`hidden`,position:`relative`,w:`100%`,children:(0,Z.jsx)(a,{height:`100%`,width:`100%`,position:`relative`,children:e})})}function bt({status:e}){let t=l[e],r=u[e],i=e===p.RUNNING||e===p.IN_PROGRESS,o=e===p.PENDING||e===p.QUEUED;return(0,Z.jsx)(a,{position:`absolute`,bottom:3,left:`50%`,transform:`translateX(-50%)`,zIndex:10,pointerEvents:`none`,children:(0,Z.jsxs)(k,{gap:1.5,px:3,py:1,borderRadius:`full`,bg:`${t.colorPalette}.subtle/85`,boxShadow:`xs`,borderWidth:`1px`,borderColor:`${t.colorPalette}.muted/50`,color:`${t.colorPalette}.fg`,children:[i||o?(0,Z.jsx)(n,{size:`xs`,color:`currentColor`}):(0,Z.jsx)(r,{size:12,color:`currentColor`}),(0,Z.jsx)(s,{fontSize:`xs`,fontWeight:`semibold`,textTransform:`capitalize`,lineHeight:`1`,children:t.label})]})})}function xt({title:e,description:t,status:n,isActive:r,isLoading:i,isAwaitingMessages:o,children:s}){let c=n?l[n].isComplete:!1,u=c&&!r;return(0,Z.jsxs)(S,{height:`100%`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`xl`,position:`relative`,bg:`bg.panel`,boxShadow:`sm`,transition:`border-color 0.15s ease, box-shadow 0.15s ease`,_hover:{borderColor:`border.emphasized`,boxShadow:`md`},css:{overflow:`hidden !important`,contain:`content`,"&:hover .simulation-card-content":{opacity:1},"& .simulation-chat-scroll":{scrollbarWidth:`none`},"&:hover .simulation-chat-scroll":{scrollbarWidth:`thin`},"& .simulation-chat-scroll::-webkit-scrollbar":{display:`none`},"&:hover .simulation-chat-scroll::-webkit-scrollbar":{display:`block`,width:`6px`}},children:[(0,Z.jsxs)(L,{height:`100%`,gap:0,children:[!i&&(0,Z.jsx)(gt,{title:e,isComplete:c}),(0,Z.jsx)(a,{className:`simulation-card-content`,opacity:u?.8:1,transition:`opacity 0.3s ease`,height:`100%`,width:`100%`,overflow:`hidden`,paddingBottom:n?`40px`:void 0,children:i?(0,Z.jsx)(_t,{}):o?(0,Z.jsx)(vt,{description:t}):(0,Z.jsx)(yt,{children:s})})]}),c&&n&&(0,Z.jsx)(ht,{status:n}),n&&(0,Z.jsx)(bt,{status:n})]})}function St(e){if(typeof e==`string`){try{let t=JSON.parse(e);if(Array.isArray(t))return Ct(t)}catch{}return e}return Array.isArray(e)?Ct(e):``}function Ct(e){return e.filter(e=>typeof e==`object`&&!!e&&e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(` `)}function wt({isUser:e,children:t}){return(0,Z.jsx)(a,{bg:e?`blue.subtle`:`bg.muted`,color:`fg`,borderRadius:`lg`,borderTopRightRadius:e?`sm`:`lg`,borderTopLeftRadius:e?`lg`:`sm`,paddingX:2.5,paddingY:1.5,fontSize:`xs`,lineClamp:3,children:t})}function Tt(){return(0,Z.jsx)(a,{display:`flex`,gap:`3px`,alignItems:`center`,height:`14px`,css:{"@keyframes pulse-dot":{"0%, 80%, 100%":{opacity:.3},"40%":{opacity:1}}},children:[0,1,2].map(e=>(0,Z.jsx)(a,{width:`5px`,height:`5px`,borderRadius:`full`,bg:`fg.muted`,animation:`pulse-dot 1.4s infinite`,style:{animationDelay:`${e*.2}s`}},e))})}function Et({messages:e,streamingMessages:t}){let n=new Set((e??[]).map(e=>e.id).filter(Boolean)),r=(t??[]).filter(e=>!n.has(e.messageId));return(!e||e.length===0)&&r.length===0?(0,Z.jsxs)(L,{align:`stretch`,gap:1.5,padding:3,height:`100%`,justifyContent:`flex-end`,css:{"@keyframes shimmer":{"0%":{opacity:.3},"50%":{opacity:.55},"100%":{opacity:.3}}},children:[(0,Z.jsx)(a,{alignSelf:`flex-end`,maxWidth:`65%`,children:(0,Z.jsx)(a,{bg:`bg.muted`,borderRadius:`lg`,h:`28px`,w:`100%`,css:{animation:`shimmer 2s ease-in-out infinite`}})}),(0,Z.jsxs)(L,{align:`flex-start`,gap:1,maxWidth:`80%`,children:[(0,Z.jsx)(a,{bg:`bg.subtle`,borderRadius:`lg`,h:`12px`,w:`100%`,css:{animation:`shimmer 2s ease-in-out 0.2s infinite`}}),(0,Z.jsx)(a,{bg:`bg.subtle`,borderRadius:`lg`,h:`12px`,w:`70%`,css:{animation:`shimmer 2s ease-in-out 0.4s infinite`}})]})]}):(0,Z.jsxs)(L,{align:`stretch`,gap:1.5,padding:3,height:`100%`,overflow:`hidden`,justifyContent:`flex-end`,children:[(e??[]).slice(-8).map((e,t)=>{let n=`tool_calls`in e&&e.tool_calls?e.tool_calls:`toolCalls`in e&&e.toolCalls?e.toolCalls:null;if(n)return n.map((n,r)=>(0,Z.jsxs)(k,{alignSelf:`flex-start`,gap:1,children:[(0,Z.jsx)(a,{color:`orange.fg`,children:(0,Z.jsx)(G,{size:10})}),(0,Z.jsx)(s,{fontSize:`2xs`,color:`orange.fg`,fontWeight:`medium`,lineClamp:1,children:n.function?.name??`tool`})]},`${e.id??t}-tc-${r}`));if(e.role===`tool`){let n=St(e.content);return n?(0,Z.jsx)(a,{alignSelf:`flex-start`,maxWidth:`85%`,children:(0,Z.jsx)(a,{bg:`bg.subtle`,borderRadius:`lg`,paddingX:2.5,paddingY:1.5,fontSize:`xs`,color:`fg.muted`,lineClamp:2,children:n})},e.id??t):null}let r=St(e.content);if(!r||r===`None`)return null;let i=e.role===`user`;return(0,Z.jsx)(a,{alignSelf:i?`flex-end`:`flex-start`,maxWidth:`85%`,children:(0,Z.jsx)(wt,{isUser:i,children:r})},e.id??t)}),r.map(e=>{let t=e.role===`user`;return(0,Z.jsx)(a,{alignSelf:t?`flex-end`:`flex-start`,maxWidth:`85%`,children:(0,Z.jsx)(wt,{isUser:t,children:e.content||(0,Z.jsx)(Tt,{})})},e.messageId)})]})}function Dt({onCancelJobSuccess:e,onCancelJobError:t,onCancelBatchSuccess:n,onCancelBatchError:r}={}){let i=U.scenarios.cancelJob.useMutation({onSuccess:n=>{n.cancelled?e?.():t?.({message:`Job could not be cancelled — it may have already completed`})},onError:e=>{t?.(e)}}),a=U.scenarios.cancelBatchRun.useMutation({onSuccess:()=>{n?.()},onError:e=>{r?.(e)}});return{cancelJob:(0,X.useCallback)(e=>{i.mutate(e)},[i]),cancelBatchRun:(0,X.useCallback)(e=>{a.mutate(e)},[a]),isCancellingJob:i.isPending,isCancellingBatch:a.isPending}}var Ot=5e3;function kt(){let{project:e}=q(),t=U.useContext();return(0,X.useCallback)(n=>{!e?.id||!n||t.scenarios.getRunState.prefetch({projectId:e.id,scenarioRunId:n},{staleTime:Ot})},[e?.id,t])}function At({scenarioRun:e,targetName:t,onClick:r,iteration:i,onCancel:o,isCancelling:c=!1}){let l=Pe({scenarioName:e.name??e.scenarioId,targetName:t,iteration:i}),u=kt(),d=()=>u(e.scenarioRunId);return(0,Z.jsx)(nt,{target:P({scenarioId:e.scenarioRunId,name:l}),children:(0,Z.jsxs)(a,{position:`relative`,borderRadius:`lg`,children:[(0,Z.jsx)(a,{as:`button`,onClick:r,onMouseEnter:d,onFocus:d,cursor:`pointer`,height:`200px`,textAlign:`left`,width:`full`,"aria-label":`View details for ${l}`,children:(0,Z.jsx)(xt,{title:l,status:e.status,children:(0,Z.jsx)(Et,{messages:e.messages})})}),o&&f(e.status)&&(0,Z.jsxs)(k,{as:`span`,role:`button`,tabIndex:c?-1:0,gap:1,paddingX:2,paddingY:.5,borderRadius:`md`,border:`1px solid`,borderColor:`border`,fontSize:`xs`,color:`fg`,bg:`bg.panel`,cursor:c?`default`:`pointer`,opacity:c?.6:1,_hover:c?void 0:{bg:`bg.muted`,borderColor:`border.emphasized`},position:`absolute`,top:2,right:2,zIndex:1,onClick:e=>{e.stopPropagation(),c||o()},onKeyDown:e=>{!c&&(e.key===`Enter`||e.key===` `)&&(e.stopPropagation(),e.preventDefault(),o())},"aria-label":`Stop run`,"aria-disabled":c,"data-testid":`cancel-run-button`,children:[c?(0,Z.jsx)(n,{size:`xs`}):(0,Z.jsx)(ue,{size:10}),(0,Z.jsx)(s,{fontSize:`xs`,children:`Stop`})]})]})})}var jt={[p.SUCCESS]:`Passed`,[p.FAILED]:`Failed`,[p.ERROR]:`Failed`,[p.CANCELLED]:`Cancelled`,[p.STALLED]:`Stalled`,[p.IN_PROGRESS]:`Running`,[p.PENDING]:`Pending`,[p.QUEUED]:`Queued`,[p.RUNNING]:`Running`},Mt=new Set([p.SUCCESS,p.FAILED,p.ERROR]);function Nt({status:e,results:t}){let n=jt[e];if(!Mt.has(e)||!t)return n;let r=t.metCriteria.length,i=r+t.unmetCriteria.length;return i===0?n:`${n} (${r}/${i})`}var Pt={[p.SUCCESS]:`green.500`,[p.FAILED]:`red.500`,[p.ERROR]:`red.500`,[p.STALLED]:`yellow.500`,[p.CANCELLED]:`gray.400`,[p.IN_PROGRESS]:`orange.400`,[p.PENDING]:`gray.400`,[p.QUEUED]:`blue.400`,[p.RUNNING]:`orange.400`};function Ft({scenarioRun:e}){let t=e.roleCosts??{},n=e.roleLatencies??{},r=Object.keys(n).filter(e=>n[e]&&n[e].length>0),i=Object.keys(t).filter(e=>t[e]&&t[e].length>0);return(0,Z.jsx)(L,{align:`stretch`,gap:0,fontSize:`12px`,minWidth:`180px`,color:`fg`,children:(0,Z.jsxs)(L,{align:`stretch`,gap:2,padding:2,children:[e.durationInMs>0&&(0,Z.jsxs)(k,{justify:`space-between`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Duration`}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Y(e.durationInMs)})]}),e.totalCost!=null&&(0,Z.jsxs)(k,{justify:`space-between`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Total Cost`}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Xe(e.totalCost)})]}),r.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(a,{borderTopWidth:`1px`,borderColor:`border.emphasized`,marginX:-2}),(0,Z.jsx)(s,{color:`fg`,fontWeight:`semibold`,children:`Latency`}),r.map(e=>{let t=n[e],r=t.reduce((e,t)=>e+t,0)/t.length;return(0,Z.jsxs)(k,{justify:`space-between`,paddingLeft:2,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:e}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Y(r)})]},`lat-${e}`)})]}),i.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[r.length===0&&(0,Z.jsx)(a,{borderTopWidth:`1px`,borderColor:`border.emphasized`,marginX:-2}),(0,Z.jsx)(s,{color:`fg`,fontWeight:`semibold`,children:`Cost`}),i.map(e=>{let n=t[e].reduce((e,t)=>e+t,0);return(0,Z.jsxs)(k,{justify:`space-between`,paddingLeft:2,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:e}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Xe(n)})]},`cost-${e}`)})]})]})})}function It({status:e}){return e===p.QUEUED||e===p.RUNNING?(0,Z.jsx)(n,{size:`xs`,"data-testid":`queued-spinner`}):(0,Z.jsx)(a,{width:`10px`,height:`10px`,borderRadius:`full`,bg:Pt[e]??`gray.400`,flexShrink:0})}function Lt({scenarioRun:e,targetName:t,onClick:r,iteration:i,onCancel:o,isCancelling:c=!1}){let u=Pe({scenarioName:e.name??e.scenarioId,targetName:t,iteration:i}),d=l[e.status],p=o&&f(e.status),h=e.durationInMs>0||e.totalCost!=null,g=kt(),_=()=>g(e.scenarioRunId);return(0,Z.jsx)(nt,{target:P({scenarioId:e.scenarioRunId,name:u}),children:(0,Z.jsx)(a,{position:`relative`,className:`group`,borderRadius:`lg`,borderBottom:`1px solid`,_last:{border:`none`},borderColor:`border.subtle`,_hover:{borderColor:`transparent`},children:(0,Z.jsxs)(k,{as:`button`,width:`full`,paddingX:4,paddingY:2,gap:4,_hover:{bg:`bg.muted/80`},borderRadius:`lg`,cursor:`pointer`,onClick:r,onMouseEnter:_,onFocus:_,tabIndex:0,"aria-label":`View details for ${u}`,children:[(0,Z.jsxs)(k,{children:[(0,Z.jsx)(It,{status:e.status}),(0,Z.jsx)(s,{fontSize:`xs`,fontWeight:`semibold`,color:d.fgColor,minWidth:`43px`,textAlign:`left`,whiteSpace:`nowrap`,children:Nt({status:e.status,results:e.results??void 0})})]}),(0,Z.jsx)(s,{fontSize:`sm`,textAlign:`left`,truncate:!0,children:u}),p&&(0,Z.jsxs)(k,{as:`span`,role:`button`,tabIndex:c?-1:0,gap:1,paddingX:2,paddingY:.5,borderRadius:`md`,border:`1px solid`,borderColor:`gray.300`,fontSize:`xs`,color:`fg.default`,cursor:c?`default`:`pointer`,opacity:c?.6:1,flexShrink:0,_hover:c?void 0:{bg:`gray.100`,borderColor:`gray.400`},onClick:e=>{e.stopPropagation(),c||o?.()},onKeyDown:e=>{!c&&(e.key===`Enter`||e.key===` `)&&(e.stopPropagation(),e.preventDefault(),o?.())},"aria-label":`Stop run`,"aria-disabled":c,"data-testid":`cancel-run-button`,children:[c?(0,Z.jsx)(n,{size:`xs`}):(0,Z.jsx)(ue,{size:10}),(0,Z.jsx)(s,{fontSize:`xs`,children:`Stop`})]}),(0,Z.jsx)(a,{flex:1}),h&&(0,Z.jsx)(m,{content:(0,Z.jsx)(Ft,{scenarioRun:e}),contentProps:{padding:0},positioning:{placement:`bottom`},interactive:!0,children:(0,Z.jsxs)(k,{gap:2,flexShrink:0,color:`fg.subtle`,children:[e.durationInMs>0&&(0,Z.jsx)(s,{fontSize:`11px`,children:Y(e.durationInMs)}),e.totalCost!=null&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(s,{color:`gray.300`,children:`⋅`}),(0,Z.jsx)(s,{fontSize:`xs`,children:Xe(e.totalCost)})]})]})})]})})})}var Rt=30,zt=200,Bt=16,Vt=16,Ht=216,Ut=37,Wt=(0,X.memo)(function({scenarioRun:e,targetName:t,onScenarioRunClick:n,iteration:r,onCancelRun:i,isCancelling:a}){let o=(0,X.useCallback)(()=>n(e),[n,e]),s=(0,X.useCallback)(()=>i?.(e),[i,e]);return(0,Z.jsx)(At,{scenarioRun:e,targetName:t,onClick:o,iteration:r,onCancel:i?s:void 0,isCancelling:a})});function Gt(e){return e.scenarioRuns.length>Rt?(0,Z.jsx)(Jt,{...e}):(0,Z.jsx)(Kt,{...e})}function Kt({scenarioRuns:e,viewMode:t,resolveTargetName:n,onScenarioRunClick:r,iterationMap:i,onCancelRun:a,cancellingJobId:o}){return t===`grid`?(0,Z.jsx)(y,{templateColumns:`repeat(auto-fill, minmax(250px, 1fr))`,gap:4,padding:4,position:`relative`,zIndex:0,"data-testid":`scenario-grid`,children:e.map(e=>(0,Z.jsx)(Wt,{scenarioRun:e,targetName:n(e),onScenarioRunClick:r,iteration:i.get(e.scenarioRunId),onCancelRun:a,isCancelling:o===e.scenarioRunId},e.scenarioRunId))}):(0,Z.jsx)(L,{align:`stretch`,gap:0,"data-testid":`scenario-list`,children:e.map(e=>(0,Z.jsx)(Lt,{scenarioRun:e,targetName:n(e),onClick:()=>r(e),iteration:i.get(e.scenarioRunId),onCancel:a?()=>a(e):void 0,isCancelling:o===e.scenarioRunId},e.scenarioRunId))})}function qt(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);if(/(auto|scroll)/.test(e.overflow+e.overflowY))return t;t=t.parentElement}return document.documentElement}function Jt({scenarioRuns:e,viewMode:t,resolveTargetName:n,onScenarioRunClick:r,iterationMap:i,onCancelRun:a,cancellingJobId:o}){let s=(0,X.useRef)(null),[c,l]=(0,X.useState)(null),[u,d]=(0,X.useState)(1),f=t===`grid`;(0,X.useLayoutEffect)(()=>{s.current&&l(qt(s.current))},[]),(0,X.useLayoutEffect)(()=>{if(!s.current||!f)return;let e=s.current.clientWidth-Vt*2;d(Math.max(1,Math.floor((e+Bt)/266)))},[f]),(0,X.useEffect)(()=>{if(!s.current||!f)return;let e=s.current,t=new ResizeObserver(()=>{let t=e.clientWidth-Vt*2;d(Math.max(1,Math.floor((t+Bt)/266)))});return t.observe(e),()=>t.disconnect()},[f]);let p=0;if(s.current&&c){let e=s.current.getBoundingClientRect(),t=c.getBoundingClientRect();p=Math.round(e.top-t.top+c.scrollTop)}let m=f?Math.ceil(e.length/u):e.length,h=f?Ht:Ut,g=te({count:m,getScrollElement:(0,X.useCallback)(()=>c,[c]),estimateSize:(0,X.useCallback)(()=>h,[h]),overscan:5,scrollMargin:p,enabled:!!c}),_=g.getVirtualItems(),v=g.getTotalSize();return f?(0,Z.jsx)(`div`,{ref:s,style:{height:v+Vt*2,width:`100%`,position:`relative`,flexShrink:0},"data-testid":`scenario-grid`,children:_.map(t=>{let s=t.index*u,c=e.slice(s,s+u);return(0,Z.jsx)(`div`,{style:{position:`absolute`,top:Vt,left:Vt,right:Vt,height:zt,transform:`translateY(${t.start-g.options.scrollMargin}px)`,display:`grid`,gridTemplateColumns:`repeat(${u}, 1fr)`,gap:Bt},children:c.map(e=>(0,Z.jsx)(Wt,{scenarioRun:e,targetName:n(e),onScenarioRunClick:r,iteration:i.get(e.scenarioRunId),onCancelRun:a,isCancelling:o===e.scenarioRunId},e.scenarioRunId))},t.index)})}):(0,Z.jsx)(`div`,{ref:s,style:{height:v,width:`100%`,position:`relative`,flexShrink:0},"data-testid":`scenario-list`,children:_.map(t=>{let s=e[t.index];return s?(0,Z.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:t.size,transform:`translateY(${t.start-g.options.scrollMargin}px)`},children:(0,Z.jsx)(Lt,{scenarioRun:s,targetName:n(s),onClick:()=>r(s),iteration:i.get(s.scenarioRunId),onCancel:a?()=>a(s):void 0,isCancelling:o===s.scenarioRunId})},s.scenarioRunId):null})})}var Yt=(0,X.createContext)(Date.now());function Xt(){return(0,X.useContext)(Yt)}function Zt({batch:e,resolveTargetName:t,onScenarioRunClick:n,viewMode:r,onCancelRun:i,cancellingJobId:o}){let c=(0,X.useMemo)(()=>We({batchRun:e}),[e]),l=(0,X.useMemo)(()=>Fe({scenarioRuns:e.scenarioRuns}),[e.scenarioRuns]),u=Xt();return(0,Z.jsxs)(L,{align:`stretch`,gap:0,children:[(0,Z.jsxs)(k,{paddingX:4,paddingY:2,gap:2,"data-testid":`batch-sub-header`,children:[(0,Z.jsx)(s,{fontSize:`xs`,color:`fg.subtle`,children:xe(e.timestamp,u)}),(0,Z.jsx)(a,{flex:1}),(0,Z.jsx)(Qt,{summary:c})]}),(0,Z.jsx)(Gt,{scenarioRuns:e.scenarioRuns,viewMode:r,resolveTargetName:t,onScenarioRunClick:n,iterationMap:l,onCancelRun:i,cancellingJobId:o})]})}function Qt({summary:e}){let t=[];return e.passedCount>0&&t.push({count:e.passedCount,color:`green.500`,label:`passed`}),e.failedCount>0&&t.push({count:e.failedCount,color:`red.500`,label:`failed`}),e.stalledCount>0&&t.push({count:e.stalledCount,color:`yellow.500`,label:`stalled`}),e.cancelledCount>0&&t.push({count:e.cancelledCount,color:`fg.muted`,label:`cancelled`}),e.inProgressCount>0&&t.push({count:e.inProgressCount,color:`orange.500`,label:`running`}),e.queuedCount>0&&t.push({count:e.queuedCount,color:`blue.500`,label:`queued`}),t.length===0?null:(0,Z.jsx)(k,{gap:2,children:t.map(e=>(0,Z.jsxs)(k,{gap:1,children:[(0,Z.jsx)(a,{width:`6px`,height:`6px`,borderRadius:`full`,bg:e.color,flexShrink:0}),(0,Z.jsxs)(s,{fontSize:`xs`,color:`fg.subtle`,children:[e.count,` `,e.label]})]},e.label))})}function $t(e){let t=[];return e.failedCount>0&&t.push(`${e.failedCount} failed`),e.stalledCount>0&&t.push(`${e.stalledCount} stalled`),e.cancelledCount>0&&t.push(`${e.cancelledCount} cancelled`),t.length>0?`(${t.join(`, `)})`:null}function en({summary:e}){let t=$t(e);return(0,Z.jsx)(L,{align:`stretch`,gap:0,fontSize:`12px`,minWidth:`220px`,color:`fg`,children:(0,Z.jsxs)(L,{align:`stretch`,gap:2,padding:2,children:[(0,Z.jsxs)(k,{justify:`space-between`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Pass`}),(0,Z.jsxs)(k,{gap:1.5,children:[(0,Z.jsx)(ot,{passRate:e.passRate}),(0,Z.jsx)(s,{fontWeight:`medium`,color:it(e.passRate),children:e.passRate===null?`-`:`${Math.round(e.passRate)}%`})]})]}),(0,Z.jsxs)(k,{justify:`space-between`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Completed`}),(0,Z.jsxs)(s,{fontWeight:`medium`,children:[e.completedCount,`/`,e.totalCount,t&&(0,Z.jsx)(s,{as:`span`,color:`red.300`,marginLeft:1,children:t})]})]}),e.agentLatencyStats?(0,Z.jsx)(m,{content:(0,Z.jsx)(Ze,{stats:e.agentLatencyStats}),positioning:{placement:`right`},openDelay:100,interactive:!0,children:(0,Z.jsxs)(k,{justify:`space-between`,cursor:`pointer`,_hover:{bg:`bg.muted`},marginX:-2,paddingX:2,paddingY:.5,borderRadius:`md`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Avg Agent Latency`}),(0,Z.jsxs)(k,{gap:1,children:[(0,Z.jsx)(b,{as:pe,color:`fg.muted`,boxSize:3}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Y(e.averageAgentLatencyMs)}),(0,Z.jsx)(b,{as:fe,boxSize:3,color:`fg.subtle`})]})]})}):e.averageAgentLatencyMs===null?null:(0,Z.jsxs)(k,{justify:`space-between`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Avg Agent Latency`}),(0,Z.jsxs)(k,{gap:1,children:[(0,Z.jsx)(b,{as:pe,color:`fg.muted`,boxSize:3}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Y(e.averageAgentLatencyMs)})]})]}),e.agentCostStats?(0,Z.jsx)(m,{content:(0,Z.jsx)(Qe,{stats:e.agentCostStats}),positioning:{placement:`right`},openDelay:100,interactive:!0,children:(0,Z.jsxs)(k,{justify:`space-between`,cursor:`pointer`,_hover:{bg:`bg.muted`},marginX:-2,paddingX:2,paddingY:.5,borderRadius:`md`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Avg Agent Cost`}),(0,Z.jsxs)(k,{gap:1,children:[(0,Z.jsx)(s,{fontWeight:`medium`,children:Xe(e.averageAgentCost)}),(0,Z.jsx)(b,{as:fe,boxSize:3,color:`fg.subtle`})]})]})}):null,e.totalDurationMs!==null&&(0,Z.jsxs)(k,{justify:`space-between`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Total Duration`}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Y(e.totalDurationMs)})]}),e.totalCost!==null&&(0,Z.jsxs)(k,{justify:`space-between`,children:[(0,Z.jsx)(s,{color:`fg.muted`,children:`Total Cost`}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Xe(e.totalCost)})]})]})})}function tn({summary:e}){let{isOpen:t,handleMouseEnter:n,handleMouseLeave:r}=at(150),i=e.inProgressCount>0||e.queuedCount>0;return(0,Z.jsx)(m,{content:(0,Z.jsx)(en,{summary:e}),contentProps:{padding:0,onMouseEnter:n,onMouseLeave:r},positioning:{placement:`bottom`},open:t,interactive:!0,children:(0,Z.jsxs)(k,{gap:2,fontSize:`12px`,color:`fg.muted`,paddingX:2,paddingY:1,borderRadius:`lg`,border:`1px solid`,borderColor:`border`,cursor:`default`,_hover:{borderColor:`border.emphasized`,bg:`bg.muted`},"data-testid":`run-metrics-summary`,onMouseEnter:n,onMouseLeave:r,overflow:`hidden`,children:[i&&(0,Z.jsxs)(k,{gap:1,children:[(0,Z.jsx)(b,{as:he,boxSize:3,color:`blue.fg`}),(0,Z.jsxs)(s,{color:`blue.fg`,fontWeight:`medium`,children:[e.completedCount,`/`,e.totalCount]})]}),!i&&e.totalCount>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(s,{fontWeight:`600`,children:`Pass`}),(0,Z.jsxs)(k,{gap:1,children:[(0,Z.jsx)(ot,{passRate:e.passRate}),(0,Z.jsx)(s,{color:it(e.passRate),fontWeight:`medium`,children:e.passRate===null?`-`:`${Math.round(e.passRate)}%`})]})]}),i&&e.completedCount>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(s,{fontWeight:`600`,children:`Pass`}),(0,Z.jsxs)(k,{gap:1,children:[(0,Z.jsx)(ot,{passRate:e.passRate}),(0,Z.jsx)(s,{color:it(e.passRate),fontWeight:`medium`,children:e.passRate===null?`-`:`${Math.round(e.passRate)}%`})]})]}),e.totalDurationMs!==null&&(0,Z.jsxs)(k,{gap:1,children:[(0,Z.jsx)(b,{as:pe,boxSize:3}),(0,Z.jsx)(s,{fontWeight:`medium`,children:Y(e.totalDurationMs)})]}),e.totalCost!==null&&(0,Z.jsx)(s,{fontWeight:`medium`,children:Xe(e.totalCost)})]})})}function nn({group:e,summary:t,isExpanded:n,onToggle:r,onScenarioRunClick:i,resolveTargetName:o,viewMode:c=`grid`,onCancelRun:l,cancellingJobId:u}){let d=e.scenarioRuns.length,f=(0,X.useMemo)(()=>Ye({runs:e.scenarioRuns}),[e.scenarioRuns]);return(0,Z.jsxs)(a,{children:[(0,Z.jsx)(a,{padding:2,paddingBottom:0,width:`full`,position:`sticky`,top:0,zIndex:20,children:(0,Z.jsxs)(k,{as:`button`,width:`full`,paddingX:4,paddingY:3,gap:3,flexWrap:`nowrap`,cursor:`pointer`,onClick:r,className:`group`,"aria-expanded":n,"aria-label":`${e.groupLabel} group`,bg:`color-mix(in srgb, var(--chakra-colors-bg-panel) var(--lw-panel-alpha, 70%), transparent)`,backdropFilter:`var(--lw-backdrop-blur, blur(12px) saturate(140%))`,borderWidth:`1px`,borderColor:`border.muted`,transition:`border-color 0.15s ease`,_hover:{borderColor:`border.emphasized`},"data-testid":`group-row-header`,borderRadius:`lg`,boxShadow:`xs`,children:[n?(0,Z.jsx)(I,{size:14,style:{flexShrink:0}}):(0,Z.jsx)(F,{size:14,style:{flexShrink:0}}),(0,Z.jsx)(s,{fontSize:`sm`,fontWeight:`medium`,color:`fg.default`,truncate:!0,minWidth:0,flexShrink:1,children:e.groupLabel}),(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,flexShrink:0,children:`·`}),(0,Z.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,flexShrink:0,children:[d,` `,d===1?`run`:`runs`]}),(0,Z.jsx)(a,{flex:1}),(0,Z.jsx)(a,{flexShrink:0,children:(0,Z.jsx)(tn,{summary:t})})]})}),(0,Z.jsx)(a,{padding:2,children:n&&(0,Z.jsxs)(Z.Fragment,{children:[f.map(e=>(0,Z.jsx)(Zt,{batch:e,resolveTargetName:o,onScenarioRunClick:i,viewMode:c,onCancelRun:l,cancellingJobId:u},e.batchRunId)),e.scenarioRuns.length===0&&(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,paddingX:4,paddingY:3,children:`No scenario runs in this group.`})]})})]})}var rn={none:`None`,scenario:`Scenario`,target:`Target`};function an({scenarioOptions:e,filters:t,onFiltersChange:n,groupBy:r,onGroupByChange:i,groupByOptions:a=[...Ke],viewMode:o,onViewModeChange:c}){return(0,Z.jsxs)(k,{gap:3,flexWrap:`wrap`,justifyContent:`space-between`,children:[(0,Z.jsxs)(k,{gap:3,flexWrap:`wrap`,children:[(0,Z.jsxs)(j,{size:`sm`,width:`auto`,minWidth:`150px`,children:[(0,Z.jsxs)(M,{value:t.scenarioId,onChange:e=>n({...t,scenarioId:e.target.value}),"aria-label":`Filter by scenario`,children:[(0,Z.jsx)(`option`,{value:``,children:`All Scenarios`}),e.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,Z.jsx)(A,{})]}),(0,Z.jsxs)(j,{size:`sm`,width:`auto`,minWidth:`120px`,children:[(0,Z.jsxs)(M,{value:t.passFailStatus,onChange:e=>n({...t,passFailStatus:e.target.value}),"aria-label":`Filter by pass/fail status`,children:[(0,Z.jsx)(`option`,{value:``,children:`All Statuses`}),(0,Z.jsx)(`option`,{value:`pass`,children:`Pass`}),(0,Z.jsx)(`option`,{value:`fail`,children:`Fail`}),(0,Z.jsx)(`option`,{value:`stalled`,children:`Stalled`})]}),(0,Z.jsx)(A,{})]})]}),(0,Z.jsxs)(k,{gap:3,children:[c&&(0,Z.jsxs)(k,{gap:1,role:`group`,"aria-label":`View mode`,children:[(0,Z.jsx)(C,{"aria-label":`List view`,"aria-pressed":o===`list`,size:`xs`,variant:o===`list`?`solid`:`ghost`,onClick:()=>c(`list`),children:(0,Z.jsx)(Ee,{size:14})}),(0,Z.jsx)(C,{"aria-label":`Grid view`,"aria-pressed":o===`grid`,size:`xs`,variant:o===`grid`?`solid`:`ghost`,onClick:()=>c(`grid`),children:(0,Z.jsx)(oe,{size:14})})]}),i&&(0,Z.jsxs)(k,{gap:2,children:[(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,whiteSpace:`nowrap`,children:`Group by:`}),(0,Z.jsxs)(j,{size:`sm`,width:`auto`,minWidth:`120px`,children:[(0,Z.jsx)(M,{value:r??`none`,onChange:e=>i(e.target.value),"aria-label":`Group by`,children:a.map(e=>(0,Z.jsx)(`option`,{value:e,children:rn[e]},e))}),(0,Z.jsx)(A,{})]})]})]})]})}function on(){return(0,Z.jsx)(a,{padding:2,paddingBottom:0,width:`full`,children:(0,Z.jsxs)(k,{width:`full`,paddingX:4,paddingY:3,gap:3,bg:`bg.panel/70`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`lg`,boxShadow:`xs`,children:[(0,Z.jsx)(o,{height:`14px`,width:`14px`,borderRadius:`sm`}),(0,Z.jsx)(o,{height:`14px`,width:`120px`}),(0,Z.jsx)(o,{height:`12px`,width:`48px`}),(0,Z.jsx)(a,{flex:1}),(0,Z.jsx)(o,{height:`22px`,width:`160px`,borderRadius:`lg`})]})})}function sn(){return(0,Z.jsxs)(L,{height:`200px`,borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`xl`,bg:`bg.panel`,boxShadow:`sm`,padding:3,align:`stretch`,gap:3,children:[(0,Z.jsx)(o,{height:`12px`,width:`70%`}),(0,Z.jsx)(a,{flex:1}),(0,Z.jsx)(o,{height:`26px`,width:`55%`,borderRadius:`lg`,alignSelf:`flex-end`}),(0,Z.jsx)(o,{height:`26px`,width:`75%`,borderRadius:`lg`}),(0,Z.jsx)(o,{height:`26px`,width:`45%`,borderRadius:`lg`,alignSelf:`flex-end`})]})}function cn({sections:e=2}){return(0,Z.jsx)(L,{align:`stretch`,gap:0,"data-testid":`run-history-skeleton`,role:`status`,"aria-busy":`true`,"aria-label":`Loading runs`,children:Array.from({length:e}).map((e,t)=>(0,Z.jsxs)(a,{children:[(0,Z.jsx)(on,{}),(0,Z.jsx)(y,{templateColumns:`repeat(auto-fill, minmax(250px, 1fr))`,gap:4,padding:4,children:Array.from({length:3-t}).map((e,t)=>(0,Z.jsx)(sn,{},t))})]},t))})}function ln(e){return e.loading?(0,Z.jsx)(un,{suiteName:e.suiteName}):(0,Z.jsx)(dn,{...e})}function un({suiteName:e}){return(0,Z.jsxs)(a,{children:[(0,Z.jsx)(a,{padding:2,paddingBottom:0,width:`full`,position:`sticky`,top:0,zIndex:20,children:(0,Z.jsxs)(k,{width:`full`,paddingX:4,paddingY:3,gap:3,flexWrap:`nowrap`,bg:`color-mix(in srgb, var(--chakra-colors-bg-panel) var(--lw-panel-alpha, 70%), transparent)`,backdropFilter:`var(--lw-backdrop-blur, blur(12px) saturate(140%))`,borderWidth:`1px`,borderColor:`border.muted`,"data-testid":`run-row-header`,borderRadius:`lg`,boxShadow:`xs`,children:[(0,Z.jsx)(n,{size:`xs`,color:`fg.muted`,css:{flexShrink:0,height:`14px`,width:`14px`}}),e&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(s,{fontSize:`sm`,fontWeight:`medium`,color:`fg.default`,flexShrink:0,children:e}),(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,flexShrink:0,children:`·`})]}),(0,Z.jsx)(s,{fontSize:`xs`,color:`fg.subtle`,flexShrink:0,children:`Starting...`}),(0,Z.jsx)(a,{flex:1}),(0,Z.jsx)(a,{paddingY:1,paddingX:2,borderRadius:`lg`,border:`1px solid transparent`,children:(0,Z.jsx)(s,{fontSize:`12px`,visibility:`hidden`,children:`\xA0`})})]})}),(0,Z.jsx)(a,{padding:2})]})}function dn({batchRun:e,summary:t,isExpanded:i,onToggle:o,resolveTargetName:c,onScenarioRunClick:l,expectedJobCount:u,suiteName:d,viewMode:p=`grid`,onCancelRun:m,onCancelAll:h,isCancellingBatch:g=!1,cancellingJobId:_,isHighlighted:v=!1}){let[y,b]=(0,X.useState)(!1),x=Xt(),S=xe(e.timestamp,x),ee=(0,X.useMemo)(()=>Fe({scenarioRuns:e.scenarioRuns}),[e.scenarioRuns]),C=(0,X.useMemo)(()=>e.scenarioRuns.filter(e=>f(e.status)).length,[e.scenarioRuns]),w=C>0;return(0,Z.jsxs)(a,{"data-batch-id":e.batchRunId,css:v?{"@keyframes yellowFlash":{"0%":{backgroundColor:`rgba(234, 179, 8, 0.3)`},"100%":{backgroundColor:`transparent`}},animation:`yellowFlash 2s ease-out`}:void 0,children:[(0,Z.jsx)(a,{padding:2,paddingBottom:0,width:`full`,position:`sticky`,top:0,zIndex:20,children:(0,Z.jsxs)(k,{as:`button`,width:`full`,paddingX:4,paddingY:3,gap:3,flexWrap:`nowrap`,cursor:`pointer`,onClick:o,className:`group`,"aria-expanded":i,"aria-label":`Run from ${S??`unknown time`}`,bg:`color-mix(in srgb, var(--chakra-colors-bg-panel) var(--lw-panel-alpha, 70%), transparent)`,backdropFilter:`var(--lw-backdrop-blur, blur(12px) saturate(140%))`,borderWidth:`1px`,borderColor:`border.muted`,transition:`border-color 0.15s ease`,_hover:{borderColor:`border.emphasized`},"data-testid":`run-row-header`,borderRadius:`lg`,boxShadow:`xs`,children:[i?(0,Z.jsx)(I,{size:14,style:{flexShrink:0}}):(0,Z.jsx)(F,{size:14,style:{flexShrink:0}}),d&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(s,{fontSize:`sm`,fontWeight:`medium`,color:`fg.default`,flexShrink:0,children:d}),(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,flexShrink:0,children:`·`})]}),(0,Z.jsx)(s,{fontSize:`xs`,color:`fg.subtle`,flexShrink:0,children:S}),u!=null&&t.totalCount<u&&(0,Z.jsxs)(s,{fontSize:`xs`,color:`fg.muted`,flexShrink:0,children:[t.totalCount,` of `,u]}),h&&w&&(0,Z.jsxs)(k,{as:`span`,role:`button`,tabIndex:g?-1:0,gap:1,paddingX:2,paddingY:.5,borderRadius:`md`,border:`1px solid`,borderColor:`border`,fontSize:`xs`,color:`fg`,cursor:g?`default`:`pointer`,flexShrink:0,opacity:g?.6:1,_hover:g?void 0:{bg:`bg.muted`,borderColor:`border.emphasized`},onClick:e=>{e.stopPropagation(),g||b(!0)},onKeyDown:e=>{!g&&(e.key===`Enter`||e.key===` `)&&(e.stopPropagation(),e.preventDefault(),b(!0))},"aria-label":`Stop all remaining runs`,"aria-disabled":g,"data-testid":`cancel-all-button`,children:[g?(0,Z.jsx)(n,{size:`xs`}):(0,Z.jsx)(ue,{size:10}),(0,Z.jsx)(s,{fontSize:`xs`,children:`Stop`})]}),(0,Z.jsx)(a,{flex:1}),(0,Z.jsx)(tn,{summary:t})]})}),(0,Z.jsx)(a,{padding:2,children:i&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Gt,{scenarioRuns:e.scenarioRuns,viewMode:p,resolveTargetName:c,onScenarioRunClick:l,iterationMap:ee,onCancelRun:m,cancellingJobId:_}),e.scenarioRuns.length===0&&(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,paddingX:4,paddingY:3,children:`No scenario runs in this batch.`})]})}),h&&(0,Z.jsx)(J.Root,{open:y,onOpenChange:({open:e})=>b(e),children:(0,Z.jsxs)(J.Content,{bg:`bg`,maxWidth:`sm`,children:[(0,Z.jsx)(J.Header,{children:(0,Z.jsx)(J.Title,{children:`Cancel remaining jobs?`})}),(0,Z.jsx)(J.Body,{children:(0,Z.jsxs)(s,{fontSize:`sm`,color:`fg.muted`,children:[`This will cancel `,C,` remaining`,` `,C===1?`job`:`jobs`,` in this batch run. This action cannot be undone.`]})}),(0,Z.jsxs)(J.Footer,{children:[(0,Z.jsx)(r,{variant:`outline`,onClick:()=>b(!1),children:`Keep running`}),(0,Z.jsxs)(r,{colorPalette:`red`,onClick:()=>{b(!1),h()},"data-testid":`confirm-cancel-all-button`,children:[`Cancel `,C,` `,C===1?`job`:`jobs`]})]})]})})]})}function fn({count:e,label:t,tooltip:n,icon:r,color:i,bg:a}){return(0,Z.jsx)(m,{content:n,children:(0,Z.jsxs)(k,{gap:`4px`,paddingX:`8px`,paddingY:`2px`,borderRadius:`md`,bg:a,children:[(0,Z.jsx)(r,{size:12,style:{color:`var(--chakra-colors-${i})`}}),(0,Z.jsxs)(s,{fontSize:`xs`,fontWeight:`semibold`,color:i,whiteSpace:`nowrap`,children:[e,` `,t]})]})})}function pn({summary:e}){return(0,Z.jsxs)(k,{gap:1,"data-testid":`run-summary-counts`,children:[e.passedCount>0&&(0,Z.jsx)(fn,{count:e.passedCount,label:`passed`,tooltip:`${e.passedCount} scenario${e.passedCount===1?``:`s`} passed all criteria`,icon:v,color:`green.fg`,bg:`green.subtle`}),e.failedCount>0&&(0,Z.jsx)(fn,{count:e.failedCount,label:`failed`,tooltip:`${e.failedCount} scenario${e.failedCount===1?``:`s`} failed one or more criteria`,icon:Ce,color:`red.fg`,bg:`red.subtle`}),e.stalledCount>0&&(0,Z.jsx)(fn,{count:e.stalledCount,label:`stalled`,tooltip:`${e.stalledCount} scenario${e.stalledCount===1?``:`s`} stalled (no response received)`,icon:V,color:`yellow.fg`,bg:`yellow.subtle`}),e.cancelledCount>0&&(0,Z.jsx)(fn,{count:e.cancelledCount,label:`cancelled`,tooltip:`${e.cancelledCount} scenario${e.cancelledCount===1?``:`s`} were cancelled`,icon:ae,color:`fg.muted`,bg:`bg.emphasized`}),e.inProgressCount>0&&(0,Z.jsx)(fn,{count:e.inProgressCount,label:`running`,tooltip:`${e.inProgressCount} scenario${e.inProgressCount===1?``:`s`} currently executing`,icon:ct,color:`orange.fg`,bg:`orange.subtle`}),e.queuedCount>0&&(0,Z.jsx)(fn,{count:e.queuedCount,label:`queued`,tooltip:`${e.queuedCount} scenario${e.queuedCount===1?``:`s`} waiting to execute`,icon:d,color:`blue.fg`,bg:`blue.subtle`})]})}var mn=`langwatch:run-history-expanded`,Q=new Map;try{let e=typeof window<`u`?localStorage.getItem(mn):null;if(e){let t=JSON.parse(e);for(let[e,n]of Object.entries(t))Array.isArray(n)?Q.set(e,{expanded:new Set(n),seen:new Set(n)}):Q.set(e,{expanded:new Set(n.expanded),seen:new Set(n.seen)})}}catch{}function hn(){try{let e={};for(let[t,n]of Q)e[t]={expanded:[...n.expanded],seen:[...n.seen]};localStorage.setItem(mn,JSON.stringify(e))}catch{}}function gn(e,t){return`${e}::${t}`}function _n({panelKey:e,groupBy:t,batchRuns:n,groups:r}){let i=gn(e,t),[a,o]=(0,X.useState)(()=>Q.get(i)?.expanded??new Set),s=(0,X.useRef)(t),c=(0,X.useRef)(e);return(0,X.useEffect)(()=>{if(s.current!==t||c.current!==e){let n=gn(e,t);o(Q.get(n)?.expanded??new Set),s.current=t,c.current=e}},[t,e]),(0,X.useEffect)(()=>{let e=t===`none`?n:r;if(e.length===0)return;let a=e.map(e=>`batchRunId`in e?e.batchRunId:e.groupKey),s=Q.get(i);if(s){let e=a.filter(e=>!s.seen.has(e));if(e.length===0)return;let t=a.findIndex(e=>s.seen.has(e)),n=t===-1?a.slice(0,1):a.slice(0,t);for(let t of e)s.seen.add(t);for(let e of n)s.expanded.add(e);o(new Set(s.expanded)),hn()}else{let e=a[0],t={expanded:new Set(e?[e]:[]),seen:new Set(a)};Q.set(i,t),o(t.expanded),hn()}},[t,n,r,i]),{expandedIds:a,toggleExpanded:(0,X.useCallback)(e=>{o(t=>{let n=new Set(t);n.has(e)?n.delete(e):n.add(e);let r=Q.get(i)??{expanded:new Set,seen:new Set};return r.expanded=n,r.seen.add(e),Q.set(i,r),hn(),n})},[i])}}function vn(e){if(e.startsWith(`{`)&&e.endsWith(`}`))throw Error(`Queue name "${e}" is already wrapped in hash tags. Do not call makeQueueName twice.`);return`{${e}}`}vn(`simulations/scenarios/executions`);var yn={TIMEOUT_MS:900*1e3}.TIMEOUT_MS*2,bn=3e3,xn=15e3,Sn=new Set([p.IN_PROGRESS,p.PENDING,p.QUEUED,p.RUNNING]);function Cn({runs:e}){return e.some(e=>Sn.has(e.status))?bn:xn}function wn({scenarioSetId:e,startDateMs:t,endDateMs:n,runs:r,enabled:i,sseConnected:a}){let{project:o}=q(),s=U.useContext(),{data:c}=U.scenarios.getSuiteRunFreshness.useQuery({projectId:o?.id??``,scenarioSetId:e,startDate:t,endDate:n},{enabled:!!o&&i,refetchInterval:a?!1:Cn({runs:r}),trpc:{context:{skipBatch:!0}}}),l=`${o?.id??``}:${e??``}:${t}:${n??``}`,u=(0,X.useRef)(null),d=(0,X.useRef)(l);(0,X.useEffect)(()=>{d.current!==l&&(d.current=l,u.current=null);let e=c?.lastUpdatedAt;if(e!==void 0){if(u.current===null){u.current=e;return}e>u.current&&(u.current=e,s.scenarios.getSuiteRunData.invalidate())}},[l,c?.lastUpdatedAt,s])}function Tn({scenarioSetId:e,startDateMs:t,sseConnected:n=!1}){let{project:r}=q(),[i,a]=(0,X.useState)(void 0),[o,s]=(0,X.useState)([]),c=(0,X.useRef)(void 0);(0,X.useEffect)(()=>{a(void 0),s([])},[t]);let{data:l,isLoading:u,error:d,refetch:f}=U.scenarios.getSuiteRunData.useQuery({projectId:r?.id??``,scenarioSetId:e,limit:20,cursor:i,startDate:t},{enabled:!!r,trpc:{context:{skipBatch:!0}}});(0,X.useEffect)(()=>{l?.changed&&(i===void 0?s([l]):i!==c.current&&s(e=>[...e,l]),c.current=i)},[l,i]);let m=(0,X.useMemo)(()=>{let e=Date.now();return o.flatMap(e=>e.runs).map(t=>t.status===p.IN_PROGRESS&&e-t.timestamp>=yn?{...t,status:p.STALLED}:t)},[o]);return wn({scenarioSetId:e,startDateMs:t,runs:m,enabled:o.length<=1,sseConnected:n}),{allRuns:m,allScenarioSetIds:(0,X.useMemo)(()=>{let e={};for(let t of o)Object.assign(e,t.scenarioSetIds);return e},[o]),hasMore:o.length>0?o[o.length-1]?.hasMore??!1:!1,loadMore:(0,X.useCallback)(()=>{let e=o[o.length-1];e?.nextCursor&&a(e.nextCursor)},[o]),isLoading:u&&o.length===0,error:d,refetch:f}}function En(e){return typeof e==`string`&&Ke.includes(e)}function Dn(e,t){let n=e[t];return Array.isArray(n)?n[0]??``:typeof n==`string`?n:``}function On(){return W((e,t)=>({groupBy:`none`,viewMode:`grid`,filters:{scenarioId:``,passFailStatus:``},setGroupBy:t=>{e({groupBy:t})},setViewMode:t=>{e({viewMode:t})},setFilter:(t,n)=>{e(e=>({filters:{...e.filters,[t]:n}}))},setFilters:t=>{e({filters:t})},syncToUrl:e=>{let{groupBy:n,filters:r}=t(),i={};for(let[t,n]of Object.entries(e.query))(typeof n==`string`||Array.isArray(n))&&(i[t]=n);n===`none`?delete i.groupBy:i.groupBy=n,r.scenarioId?i.scenarioId=r.scenarioId:delete i.scenarioId,r.passFailStatus?i.passFailStatus=r.passFailStatus:delete i.passFailStatus,e.push({query:i},void 0,{shallow:!0})},hydrateFromUrl:t=>{let n=Dn(t,`groupBy`);e({groupBy:En(n)?n:`none`,filters:{scenarioId:Dn(t,`scenarioId`),passFailStatus:Dn(t,`passFailStatus`)}})}}))}var $=On(),kn=2e3,An=100,jn=50;function Mn({highlightBatchId:e}){let[t,n]=(0,X.useState)(null);return(0,X.useEffect)(()=>{if(!e){n(null);return}let t=0,r=!1,i=null,a=()=>{if(r)return;let o=document.querySelector(`[data-batch-id="${e}"]`);if(!o){t++,t<jn&&requestAnimationFrame(a);return}document.querySelectorAll(`[data-batch-id]`)[0]!==o&&o.scrollIntoView({behavior:`smooth`,block:`center`}),n(e),i=setTimeout(()=>{r||n(null)},kn)},o=setTimeout(a,An);return()=>{r=!0,clearTimeout(o),i&&clearTimeout(i)}},[e]),{highlightedBatchId:t}}function Nn({scenarioSetId:e,period:t,onStatsReady:n,expectedJobCount:i,suiteNameMap:c,pendingBatchRunId:l,highlightBatchId:u}){let{project:d}=q(),f=de(),m=$(e=>e.groupBy),g=$(e=>e.viewMode),_=$(e=>e.filters),v=$(e=>e.setGroupBy),y=$(e=>e.setViewMode),b=$(e=>e.setFilters),x=$(e=>e.syncToUrl),S=$(e=>e.hydrateFromUrl),ee=(0,X.useRef)(null),C=(0,X.useRef)(!1);(0,X.useEffect)(()=>{!C.current&&f.isReady&&(S(f.query),C.current=!0)},[f.isReady,f.query,S]);let A=(0,X.useRef)(m),j=(0,X.useRef)(_);(0,X.useEffect)(()=>{C.current&&(A.current!==m||j.current!==_)&&(A.current=m,j.current=_,x(f))},[m,_,x,f]);let{isConnected:M}=Je({projectId:d?.id??``,enabled:!!d?.id,debounceMs:500,filter:e?{scenarioSetId:e}:void 0}),{allRuns:N,allScenarioSetIds:te,hasMore:P,loadMore:F,isLoading:I,error:R,refetch:ne}=Tn({scenarioSetId:e,startDateMs:t.startDate.getTime(),sseConnected:M}),{data:re}=U.scenarios.getAll.useQuery({projectId:d?.id??``},{enabled:!!d}),z=$e(),B=(0,X.useCallback)(e=>{let t=e.metadata?.langwatch?.targetReferenceId;return t?z.get(t)??t:null},[z]),ie=(0,X.useMemo)(()=>re?re.map(e=>({id:e.id,name:e.name})):[],[re]),[ae,oe]=(0,X.useState)(null),{cancelJob:se,cancelBatchRun:le,isCancellingBatch:ue}=Dt({onCancelJobSuccess:()=>{oe(null),ne(),h.create({title:`Cancellation requested`,type:`info`})},onCancelJobError:e=>{oe(null),ne(),h.create({title:`Failed to cancel job`,description:e.message,type:`error`})},onCancelBatchSuccess:()=>{ne(),h.create({title:`Jobs cancelled`,type:`success`})},onCancelBatchError:e=>{h.create({title:`Failed to cancel jobs`,description:e.message,type:`error`})}}),H=(0,X.useMemo)(()=>{if(N.length===0)return[];let e=N;return _.scenarioId&&(e=e.filter(e=>e.scenarioId===_.scenarioId)),_.passFailStatus===`pass`?e=e.filter(e=>e.status===p.SUCCESS):_.passFailStatus===`fail`?e=e.filter(e=>e.status===p.ERROR||e.status===p.FAILED):_.passFailStatus===`stalled`&&(e=e.filter(e=>e.status===p.STALLED)),e},[N,_]),W=(0,X.useMemo)(()=>Ye({runs:H,scenarioSetIds:te}),[H,te]),G=(0,X.useMemo)(()=>m===`none`?[]:m===`scenario`?Ie({runs:H}):Le({runs:H,targetNameMap:z}),[m,H,z]),{expandedIds:fe,toggleExpanded:pe}=_n({panelKey:e??`all-runs`,groupBy:m,batchRuns:W,groups:G}),K=(0,X.useMemo)(()=>Ve({runs:H}),[H]),me=m===`none`?W[0]?.timestamp??null:G[0]?.timestamp??null;(0,X.useEffect)(()=>{if(!n)return;let e=K.passedCount+K.failedCount,t=e>0?K.passedCount/e*100:0;n({runCount:K.runCount,passRate:t,lastActivityTimestamp:me})},[K,me,n]);let{highlightedBatchId:he}=Mn({highlightBatchId:u}),ge=e=>!!e&&(Re(e)||ze(e)),_e=(0,X.useCallback)(e=>t=>{d?.id&&(oe(t.scenarioRunId),se({projectId:d.id,scenarioSetId:e,batchRunId:t.batchRunId,scenarioRunId:t.scenarioRunId,scenarioId:t.scenarioId}))},[d?.id,se]),ve=(0,X.useCallback)((e,t)=>{d?.id&&le({projectId:d.id,scenarioSetId:t,batchRunId:e})},[d?.id,le]),{openDrawer:ye}=Se(),be=(0,X.useCallback)(e=>{ye(`scenarioRunDetail`,{urlParams:{scenarioRunId:e.scenarioRunId}})},[ye]),xe=(0,X.useCallback)(e=>{b(e)},[b]),Ce=(0,X.useMemo)(()=>l?!W.some(e=>e.batchRunId===l):!1,[l,W]);if(R)return(0,Z.jsx)(T,{paddingY:12,children:(0,Z.jsxs)(O,{children:[(0,Z.jsx)(D,{color:`red.fg`,children:(0,Z.jsx)(V,{size:28})}),(0,Z.jsx)(w,{children:`Couldn't load runs`}),(0,Z.jsx)(E,{maxWidth:`360px`,textAlign:`center`,children:R.message}),(0,Z.jsxs)(r,{size:`sm`,variant:`outline`,onClick:()=>void ne(),children:[(0,Z.jsx)(ce,{size:14}),` Try again`]})]})});let we=!!e,Te=m===`none`?W.length:G.length,Ee=!!(_.scenarioId||_.passFailStatus);return(0,Z.jsxs)(L,{align:`stretch`,gap:0,height:`100%`,children:[!we&&(0,Z.jsxs)(a,{paddingX:6,paddingY:4,children:[(0,Z.jsx)(s,{fontSize:`xl`,fontWeight:`semibold`,children:`All Runs`}),I?(0,Z.jsx)(o,{height:`20px`,width:`220px`,marginTop:.5}):(0,Z.jsxs)(k,{gap:2,"data-testid":`all-runs-header-totals`,children:[(0,Z.jsxs)(s,{fontSize:`sm`,color:`fg.muted`,children:[m===`none`?`${W.length} ${W.length===1?`execution`:`executions`} · `:`${G.length} ${G.length===1?`group`:`groups`} · `,K.runCount,` `,K.runCount===1?`run`:`runs`]}),(0,Z.jsx)(pn,{summary:{passedCount:K.passedCount,failedCount:K.failedCount,stalledCount:0,cancelledCount:0,completedCount:K.passedCount+K.failedCount,inProgressCount:K.pendingCount,queuedCount:0,passRate:0,totalCount:K.runCount,totalCost:null,averageAgentLatencyMs:null,totalDurationMs:null,agentLatencyStats:null,agentCostStats:null,averageAgentCost:null}})]})]}),(0,Z.jsx)(a,{paddingX:6,paddingY:4,bg:`bg`,position:`relative`,_after:{content:`""`,position:`absolute`,bottom:`-5px`,left:0,right:0,height:`5px`,borderTop:`1px solid var(--chakra-colors-border-muted)`,background:`linear-gradient(to bottom, color-mix(in srgb, var(--chakra-colors-border-muted) 40%, transparent), transparent)`,pointerEvents:`none`},children:(0,Z.jsx)(an,{scenarioOptions:ie,filters:_,onFiltersChange:xe,groupBy:m,onGroupByChange:v,viewMode:g,onViewModeChange:y})}),(0,Z.jsx)(ut,{scrollRef:ee}),I?(0,Z.jsx)(cn,{}):Te===0&&!Ce?(0,Z.jsx)(T,{paddingY:12,children:(0,Z.jsxs)(O,{children:[(0,Z.jsx)(D,{children:(0,Z.jsx)(ke,{size:28})}),(0,Z.jsx)(w,{children:Ee?`No matching runs`:`No runs yet`}),(0,Z.jsx)(E,{children:Ee?`No runs match the selected filters.`:we?`Run this suite to see results here.`:`Execute a suite to see results here.`}),Ee?null:(0,Z.jsx)(rt,{surface:`simulationRuns`})]})}):(0,Z.jsxs)(L,{ref:ee,align:`stretch`,gap:0,flex:1,minH:0,overflow:`auto`,children:[Ce&&(0,Z.jsx)(ln,{loading:!0}),m===`none`?W.map(t=>(0,Z.jsx)(ln,{batchRun:t,summary:We({batchRun:t}),isExpanded:fe.has(t.batchRunId),onToggle:()=>pe(t.batchRunId),resolveTargetName:B,onScenarioRunClick:be,expectedJobCount:i,suiteName:c?Ge({scenarioSetId:t.scenarioSetId,suiteNameMap:c})??void 0:void 0,viewMode:g,onCancelRun:ge(t.scenarioSetId??e)?_e(t.scenarioSetId??e??``):void 0,onCancelAll:ge(t.scenarioSetId??e)?()=>ve(t.batchRunId,t.scenarioSetId??e??``):void 0,isCancellingBatch:ue,cancellingJobId:ae,isHighlighted:he===t.batchRunId},t.batchRunId)):G.map(t=>(0,Z.jsx)(nn,{group:t,summary:qe({group:t}),isExpanded:fe.has(t.groupKey),onToggle:()=>pe(t.groupKey),onScenarioRunClick:be,resolveTargetName:B,viewMode:g,onCancelRun:ge(e)?_e(e??``):void 0,cancellingJobId:ae},t.groupKey)),P&&(0,Z.jsx)(a,{paddingX:6,paddingY:6,display:`flex`,justifyContent:`center`,children:(0,Z.jsx)(r,{variant:`outline`,onClick:F,children:`Load More...`})})]})]})}function Pn({open:e,onClose:t,onConfirm:i,suiteName:a,isLoading:o=!1}){return(0,Z.jsx)(J.Root,{open:e,onOpenChange:t,placement:`center`,children:(0,Z.jsxs)(J.Content,{bg:`bg`,maxWidth:`500px`,onClick:e=>e.stopPropagation(),children:[(0,Z.jsx)(J.CloseTrigger,{}),(0,Z.jsx)(J.Header,{children:(0,Z.jsx)(J.Title,{fontSize:`md`,fontWeight:`500`,children:`Archive run plan?`})}),(0,Z.jsx)(J.Body,{children:(0,Z.jsxs)(L,{align:`stretch`,gap:4,children:[(0,Z.jsx)(s,{children:(0,Z.jsx)(s,{as:`span`,fontWeight:`semibold`,children:a})}),(0,Z.jsx)(s,{color:`fg.muted`,fontSize:`sm`,children:`Archived run plans will no longer appear in the sidebar. Test runs are preserved.`})]})}),(0,Z.jsxs)(J.Footer,{children:[(0,Z.jsx)(r,{variant:`outline`,mr:3,onClick:e=>{e.stopPropagation(),t()},disabled:o,children:`Cancel`}),(0,Z.jsx)(r,{colorPalette:`orange`,onClick:e=>{e.stopPropagation(),i()},disabled:o,children:o?(0,Z.jsx)(n,{size:`sm`}):`Archive`})]})]})})}function Fn({x:e,y:t,onEdit:n,onDuplicate:r,onArchive:i,onClose:o}){let s=(0,X.useRef)(null);return(0,X.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&o()};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[o]),(0,Z.jsx)(a,{ref:s,position:`fixed`,left:`${e}px`,top:`${t}px`,bg:`bg.surface`,border:`1px solid`,borderColor:`border`,borderRadius:`md`,shadow:`lg`,zIndex:1e3,py:1,minWidth:`140px`,children:(0,Z.jsxs)(L,{align:`stretch`,gap:0,children:[(0,Z.jsx)(In,{label:`Edit`,onClick:()=>{n(),o()}}),(0,Z.jsx)(In,{label:`Duplicate`,onClick:()=>{r(),o()}}),(0,Z.jsx)(In,{label:`Archive`,onClick:()=>{i(),o()},color:`orange.fg`})]})})}function In({label:e,onClick:t,color:n}){return(0,Z.jsx)(a,{as:`button`,width:`full`,textAlign:`left`,paddingX:3,paddingY:1.5,cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:t,children:(0,Z.jsx)(s,{fontSize:`sm`,color:n,children:e})})}function Ln({suite:e,onEdit:t,onRun:n,isRunning:i=!1,pendingBatchRunId:o,period:c,highlightBatchId:l}){let u=Xt(),f=(()=>{try{return et(e.targets)}catch{return[]}})(),p=e.scenarioIds.length*f.length*e.repeatCount,[m,h]=(0,X.useState)(null);return(0,Z.jsxs)(L,{align:`stretch`,gap:0,height:`100%`,children:[(0,Z.jsx)(a,{paddingX:6,paddingY:4,children:(0,Z.jsxs)(k,{justify:`space-between`,align:`start`,children:[(0,Z.jsxs)(L,{align:`start`,gap:1,children:[(0,Z.jsx)(s,{fontSize:`xl`,fontWeight:`bold`,children:e.name}),e.description&&(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:e.description})]}),(0,Z.jsxs)(k,{gap:2,children:[(0,Z.jsxs)(r,{size:`sm`,variant:`outline`,onClick:t,children:[(0,Z.jsx)(Oe,{size:14}),`Edit`]}),(0,Z.jsxs)(r,{size:`sm`,colorPalette:`blue`,onClick:n,disabled:i,loading:i,children:[(0,Z.jsx)(_e,{size:14}),`Run`]})]})]})}),(0,Z.jsx)(a,{paddingX:6,paddingBottom:2,children:(0,Z.jsxs)(k,{gap:2,flexWrap:`wrap`,alignItems:`center`,children:[(0,Z.jsx)(zn,{icon:(0,Z.jsx)(De,{size:14}),value:e.scenarioIds.length,label:`scenarios`,colorScheme:`gray`}),(0,Z.jsx)(zn,{icon:(0,Z.jsx)(H,{size:14}),value:f.length,label:`targets`,colorScheme:`purple`}),(0,Z.jsx)(zn,{icon:(0,Z.jsx)(lt,{size:14}),value:`${e.repeatCount}x`,label:`trials`,colorScheme:`gray`}),m&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(_,{orientation:`vertical`,height:`24px`,borderColor:`border`}),(0,Z.jsx)(zn,{icon:(0,Z.jsx)(z,{size:14}),value:p,label:`executions`,colorScheme:`gray`}),(0,Z.jsx)(zn,{icon:(0,Z.jsx)(ne,{size:14}),value:m.runCount,label:`runs`,colorScheme:`gray`}),(0,Z.jsx)(Bn,{passRate:m.passRate}),m.lastActivityTimestamp&&(0,Z.jsx)(zn,{icon:(0,Z.jsx)(d,{size:14}),value:xe(m.lastActivityTimestamp,u),label:``,colorScheme:`gray`})]}),!m&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(_,{orientation:`vertical`,height:`24px`,borderColor:`border`}),(0,Z.jsx)(zn,{icon:(0,Z.jsx)(z,{size:14}),value:p,label:`executions`,colorScheme:`gray`})]})]})}),(0,Z.jsx)(Nn,{scenarioSetId:He(e.id),onStatsReady:h,period:c,pendingBatchRunId:o,highlightBatchId:l})]})}var Rn={gray:{bg:`bg.muted`,color:`fg.muted`},purple:{bg:`bg.muted`,color:`purple.fg`},blue:{bg:`bg.muted`,color:`blue.fg`},orange:{bg:`bg.muted`,color:`orange.fg`}};function zn({icon:e,value:t,label:n,colorScheme:r=`gray`}){let i=Rn[r]??Rn.gray;return(0,Z.jsxs)(k,{gap:1.5,paddingX:3,paddingY:1.5,borderRadius:`full`,bg:i.bg,children:[(0,Z.jsx)(a,{color:i.color,children:e}),(0,Z.jsx)(s,{fontSize:`sm`,fontWeight:`semibold`,children:t}),n&&(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:n})]})}function Bn({passRate:e}){return(0,Z.jsxs)(k,{gap:1.5,paddingX:3,paddingY:1.5,borderRadius:`full`,border:`1px solid`,borderColor:`border`,bg:`bg`,children:[(0,Z.jsx)(re,{size:14}),(0,Z.jsxs)(s,{fontSize:`sm`,fontWeight:`semibold`,children:[Math.round(e),`%`]}),(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:`pass`})]})}function Vn({onNewSuite:e}){return(0,Z.jsx)(ye,{flex:1,height:`100%`,children:(0,Z.jsx)(T,{children:(0,Z.jsxs)(O,{children:[(0,Z.jsx)(D,{children:(0,Z.jsx)(Te,{size:32})}),(0,Z.jsx)(w,{children:`No run plan selected`}),(0,Z.jsx)(E,{children:`Select a run plan from the sidebar or create a new one`}),(0,Z.jsxs)(k,{gap:2,children:[(0,Z.jsxs)(r,{colorPalette:`blue`,onClick:e,children:[(0,Z.jsx)(be,{size:16}),` New Run Plan`]}),(0,Z.jsx)(rt,{surface:`simulations`,size:`md`})]})]})})})}function Hn({visible:e}){return e?(0,Z.jsx)(m,{showArrow:!0,content:(0,Z.jsxs)(a,{maxWidth:`280px`,"data-testid":`scenario-tab-connected-popover`,children:[(0,Z.jsx)(s,{fontWeight:`medium`,children:`Connected to your local runs`}),(0,Z.jsx)(s,{marginTop:1,children:`Scenario runs started on this machine reuse this tab: when a new run starts, this view moves to it instead of opening another browser tab.`})]}),children:(0,Z.jsxs)(k,{"data-testid":`scenario-tab-connected-badge`,gap:1.5,paddingX:2.5,paddingY:1,borderRadius:`full`,borderWidth:`1px`,borderColor:`border.muted`,background:`bg.subtle`,cursor:`default`,children:[(0,Z.jsx)(a,{boxSize:2,borderRadius:`full`,background:`green.500`,css:{"@keyframes connected-dot":{"0%, 100%":{boxShadow:`0 0 0 0 var(--chakra-colors-green-300)`},"50%":{boxShadow:`0 0 0 3px transparent`}}},animation:`connected-dot 2.4s ease-in-out infinite`}),(0,Z.jsx)(s,{fontSize:`xs`,color:`fg.muted`,whiteSpace:`nowrap`,children:`Connected to local run`})]})}):null}var Un=Be({viewContext:`external`});function Wn({scenarioSetId:e,period:t,highlightBatchId:n,connectedToLocalRun:i=!1}){let{project:o}=q(),{openDrawer:c}=Se(),{highlightedBatchId:l}=Mn({highlightBatchId:n}),u=(0,X.useRef)(null),d=$(e=>e.groupBy),f=$(e=>e.viewMode),m=$(e=>e.filters),h=$(e=>e.setGroupBy),g=$(e=>e.setViewMode),_=$(e=>e.setFilters),v=Un.includes(d)?d:`none`,{isConnected:y}=Je({projectId:o?.id??``,enabled:!!o?.id,debounceMs:500,filter:{scenarioSetId:e}}),{data:b,isLoading:x,error:S,refetch:ee}=U.scenarios.getSuiteRunData.useQuery({projectId:o?.id??``,scenarioSetId:e,limit:100,startDate:t.startDate.getTime(),endDate:t.endDate.getTime()},{enabled:!!o,trpc:{context:{skipBatch:!0}}}),C=b&&`runs`in b?b.runs:void 0;wn({scenarioSetId:e,startDateMs:t.startDate.getTime(),endDateMs:t.endDate.getTime(),runs:C??[],enabled:!!o,sseConnected:y});let{data:A}=U.scenarios.getAll.useQuery({projectId:o?.id??``},{enabled:!!o}),j=(0,X.useMemo)(()=>{if(!A||!C)return[];let e=new Set(C.map(e=>e.scenarioId));return A.filter(t=>e.has(t.id)).map(e=>({id:e.id,name:e.name}))},[A,C]);(0,X.useEffect)(()=>{!m.scenarioId||j.length===0||new Set(j.map(e=>e.id)).has(m.scenarioId)||_({...m,scenarioId:``})},[m,j,_]);let M=(0,X.useMemo)(()=>{if(!C)return[];let e=C;return m.scenarioId&&(e=e.filter(e=>e.scenarioId===m.scenarioId)),m.passFailStatus===`pass`?e=e.filter(e=>e.status===p.SUCCESS):m.passFailStatus===`fail`?e=e.filter(e=>e.status===p.ERROR||e.status===p.FAILED):m.passFailStatus===`stalled`&&(e=e.filter(e=>e.status===p.STALLED)),e},[C,m.scenarioId,m.passFailStatus]),N=(0,X.useMemo)(()=>Ye({runs:M}),[M]),te=(0,X.useMemo)(()=>v===`none`?[]:Ie({runs:M}),[v,M]),{expandedIds:P,toggleExpanded:F}=_n({panelKey:`external:${e}`,groupBy:v,batchRuns:N,groups:te}),I=(0,X.useCallback)(e=>{c(`scenarioRunDetail`,{urlParams:{scenarioRunId:e.scenarioRunId}})},[c]),R=(0,X.useCallback)(()=>null,[]),ne=(0,X.useCallback)(e=>{_(e)},[_]),re=v===`none`?N.length>0:te.length>0,z=!!(m.scenarioId||m.passFailStatus);return(0,Z.jsxs)(L,{align:`stretch`,gap:0,height:`100%`,children:[(0,Z.jsxs)(k,{paddingX:6,paddingY:4,justify:`space-between`,children:[(0,Z.jsxs)(L,{align:`start`,gap:0,children:[(0,Z.jsx)(s,{fontSize:`xs`,fontWeight:`bold`,color:`fg.muted`,letterSpacing:`wider`,children:`EXTERNAL SET`}),(0,Z.jsx)(s,{fontSize:`lg`,fontWeight:`semibold`,children:e})]}),(0,Z.jsx)(Hn,{visible:i})]}),!x&&!S&&C&&C.length>0&&(0,Z.jsx)(a,{paddingX:6,paddingY:4,bg:`bg`,flexShrink:0,position:`relative`,_after:{content:`""`,position:`absolute`,bottom:`-5px`,left:0,right:0,height:`5px`,borderTop:`1px solid var(--chakra-colors-border-muted)`,background:`linear-gradient(to bottom, color-mix(in srgb, var(--chakra-colors-border-muted) 40%, transparent), transparent)`,pointerEvents:`none`},children:(0,Z.jsx)(an,{scenarioOptions:j,filters:m,onFiltersChange:ne,groupBy:v,onGroupByChange:h,groupByOptions:Un,viewMode:f,onViewModeChange:g})}),(0,Z.jsx)(ut,{scrollRef:u}),(0,Z.jsxs)(L,{ref:u,align:`stretch`,gap:0,flex:1,overflow:`auto`,children:[x&&(0,Z.jsx)(cn,{}),S&&(0,Z.jsx)(T,{paddingY:12,children:(0,Z.jsxs)(O,{children:[(0,Z.jsx)(D,{color:`red.fg`,children:(0,Z.jsx)(V,{size:28})}),(0,Z.jsx)(w,{children:`Couldn't load run data`}),(0,Z.jsx)(E,{maxWidth:`360px`,textAlign:`center`,children:S.message}),(0,Z.jsxs)(r,{size:`sm`,variant:`outline`,onClick:()=>void ee(),children:[(0,Z.jsx)(ce,{size:14}),` Try again`]})]})}),!x&&!S&&C&&C.length>0&&(0,Z.jsx)(Z.Fragment,{children:!re&&z?(0,Z.jsx)(a,{paddingX:6,paddingY:8,textAlign:`center`,children:(0,Z.jsx)(s,{color:`fg.muted`,children:`No runs match the selected filters.`})}):(0,Z.jsx)(Z.Fragment,{children:v===`none`?N.map(e=>(0,Z.jsx)(ln,{batchRun:e,summary:We({batchRun:e}),isExpanded:P.has(e.batchRunId),onToggle:()=>F(e.batchRunId),resolveTargetName:R,onScenarioRunClick:I,viewMode:f,isHighlighted:l===e.batchRunId},e.batchRunId)):te.map(e=>(0,Z.jsx)(nn,{group:e,summary:qe({group:e}),isExpanded:P.has(e.groupKey),onToggle:()=>F(e.groupKey),onScenarioRunClick:I,resolveTargetName:R,viewMode:f},e.groupKey))})}),!x&&!S&&(!C||C.length===0)&&(0,Z.jsx)(T,{paddingY:12,children:(0,Z.jsxs)(O,{children:[(0,Z.jsx)(D,{children:(0,Z.jsx)(ke,{size:28})}),(0,Z.jsx)(w,{children:`No runs yet`}),(0,Z.jsx)(E,{children:`No run data found for this set.`})]})})]})]})}var Gn=`all-runs`,Kn=`external:`;function qn(e){return e.startsWith(Kn)}function Jn(e){return e.slice(9)}function Yn(e){return`${Kn}${e}`}function Xn({projectSlug:e,segments:t,query:n}){let r=`/${e}/simulations`,[i,a,o]=t;if(i===`scenarios`||i===`scenario`)return a?`${r}/scenarios?drawer.open=scenarioEditor&drawer.scenarioId=${encodeURIComponent(a)}`:`${r}/scenarios`;if(i===`suites`){let e=n.suite,t=n.externalSet;return typeof e==`string`&&e?`${r}/run-plans/${e}`:typeof t==`string`&&t?`${r}/${t}`:r}return t.length===3&&i!==`run-plans`?`${r}/${i}/${a}?openRun=${o}`:null}var Zn=new Set([`project`,`path`]),Qn=e=>!Zn.has(e)&&!e.startsWith(`drawer`);function $n(){let e=de(),{selectedSuiteSlug:t,highlightBatchId:n}=er({isReady:e.isReady,path:e.query.path??tr(e.asPath)}),r=e.query.project;return{selectedSuiteSlug:t,navigateToSuite:(0,X.useCallback)(t=>{if(!r)return;let n={};for(let[t,r]of Object.entries(e.query))r===void 0||!Qn(t)||(n[t]=r);let i;i=t===`all-runs`?[]:qn(t)?[Jn(t)]:[`run-plans`,t];let a=i.length>0?`/${r}/simulations/${i.join(`/`)}`:`/${r}/simulations`,o=new URLSearchParams;for(let[e,t]of Object.entries(n))if(Array.isArray(t))for(let n of t)o.append(e,n);else o.set(e,t);let s=o.toString(),c=s?`${a}?${s}`:a;e.push({pathname:`/[project]/simulations/[[...path]]`,query:{project:r,...i.length>0?{path:i}:{},...n}},c,{shallow:!0})},[e,r]),highlightBatchId:n}}function er({isReady:e,path:t}){if(!e)return{selectedSuiteSlug:null,highlightBatchId:null};let n=(Array.isArray(t)?t:t?[t]:[]).filter(e=>e&&!e.startsWith(`?`)&&!e.includes(`=`));return n.length===0?{selectedSuiteSlug:Gn,highlightBatchId:null}:n[0]===`run-plans`&&n.length>=2?{selectedSuiteSlug:n[1],highlightBatchId:n[2]??null}:{selectedSuiteSlug:Yn(n[0]),highlightBatchId:n[1]??null}}function tr(e){let t=(e.split(`?`)[0]?.split(`#`)[0]??``).match(/\/simulations\/(.+?)\/?$/);if(t?.[1])return t[1].split(`/`).filter(Boolean)}var nr=336*60*60*1e3,rr=`langwatch:simulations-voice-callout-dismissed:v1:`,ir=`https://langwatch.ai/scenario/voice/getting-started`,ar=e=>`${rr}${e}`;function or(e){if(typeof window>`u`)return!1;try{let t=localStorage.getItem(ar(e));if(!t)return!1;let n=Number(t);return Number.isFinite(n)?n>Date.now():!1}catch{return!1}}function sr(e){if(!(typeof window>`u`))try{localStorage.setItem(ar(e),String(Date.now()+nr))}catch{}}function cr(){let{project:e}=q({redirectToOnboarding:!1,redirectToProjectOnboarding:!1}),t=e?.id,[n,r]=(0,X.useState)(!1),[i,o]=(0,X.useState)(!1);return(0,X.useEffect)(()=>{r(!0)},[]),(0,X.useEffect)(()=>{t&&o(or(t))},[t]),!n||!t||i?null:(0,Z.jsx)(a,{paddingX:3,paddingTop:2,paddingBottom:1,children:(0,Z.jsx)(`a`,{href:ir,target:`_blank`,rel:`noopener noreferrer`,onClick:()=>{ve.capture(`voice_agents_callout_click`,{surface:`simulations_sidebar`,projectId:t}),t&&sr(t)},"aria-label":`Open Voice Agents getting started guide in a new tab`,style:{textDecoration:`none`,display:`block`},children:(0,Z.jsxs)(a,{colorPalette:`blue`,position:`relative`,borderRadius:`lg`,padding:3,overflow:`hidden`,bg:`colorPalette.subtle`,borderWidth:`1px`,borderColor:`colorPalette.muted`,transition:`transform 0.12s ease, border-color 0.12s ease, background 0.12s ease`,_hover:{transform:`translateY(-1px)`,borderColor:`colorPalette.emphasized`,bg:`colorPalette.muted`},children:[(0,Z.jsxs)(k,{align:`start`,gap:2.5,children:[(0,Z.jsx)(a,{flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,boxSize:`26px`,borderRadius:`full`,bg:`colorPalette.solid`,children:(0,Z.jsx)(b,{as:ge,boxSize:3.5,color:`white`})}),(0,Z.jsxs)(L,{align:`start`,gap:1,flex:1,minWidth:0,children:[(0,Z.jsx)(s,{fontSize:`xs`,fontWeight:`700`,color:`colorPalette.fg`,lineHeight:1.25,letterSpacing:`-0.005em`,children:`Try voice agent simulations`}),(0,Z.jsx)(s,{fontSize:`xs`,color:`fg.muted`,lineHeight:1.4,children:`Test your voice agent end-to-end with realtime voices.`}),(0,Z.jsxs)(k,{gap:1,marginTop:.5,color:`colorPalette.fg`,fontSize:`xs`,fontWeight:`600`,children:[(0,Z.jsx)(s,{children:`Get started`}),(0,Z.jsx)(b,{as:me,boxSize:3})]})]})]}),(0,Z.jsx)(C,{"aria-label":`Dismiss`,size:`xs`,variant:`ghost`,color:`fg.muted`,position:`absolute`,top:1,right:1,minWidth:`20px`,height:`20px`,padding:0,_hover:{bg:`colorPalette.emphasized`,color:`colorPalette.fg`},_active:{bg:`colorPalette.emphasized`},onClick:e=>{e.stopPropagation(),e.preventDefault(),t&&sr(t),o(!0)},children:(0,Z.jsx)(K,{size:12})})]})})})}var lr=`suite-sidebar-collapsed`,ur=6;function dr({projectSlug:e,suites:t,selectedSuiteSlug:n,runSummaries:i,externalSets:c=[],onSelectSuite:l,onRunSuite:u,onContextMenu:d,onNewSuite:f,isLoading:p=!1}){let[h,g]=(0,X.useState)(``),[_,v]=(0,X.useState)(()=>{try{return localStorage.getItem(lr)===`true`}catch{return!1}}),y=()=>{let e=!_;v(e);try{localStorage.setItem(lr,String(e))}catch{}},b=(0,X.useMemo)(()=>{if(!h.trim())return t;let e=h.toLowerCase();return t.filter(t=>t.name.toLowerCase().includes(e))},[t,h]),x=(0,X.useMemo)(()=>[...h.trim()?c.filter(e=>e.scenarioSetId.toLowerCase().includes(h.toLowerCase())):c].sort((e,t)=>t.lastRunTimestamp-e.lastRunTimestamp),[c,h]),S=b.length===0&&x.length===0;return(0,Z.jsxs)(L,{width:_?`auto`:`280px`,minWidth:_?`auto`:`280px`,height:`100%`,align:`stretch`,gap:0,children:[!_&&(0,Z.jsx)(a,{paddingX:3,paddingBottom:2,children:(0,Z.jsx)(tt,{size:`sm`,borderRadius:`full`,placeholder:`Search...`,value:h,onChange:e=>g(e.target.value)})}),(0,Z.jsx)(a,{paddingX:_?6:2,paddingBottom:2,children:_?(0,Z.jsx)(m,{content:`All Runs`,positioning:{placement:`right`},children:(0,Z.jsx)(C,{"aria-label":`All Runs`,size:`sm`,width:`full`,variant:n===`all-runs`?`solid`:`ghost`,onClick:()=>l(Gn),children:(0,Z.jsx)(Ee,{size:16})})}):(0,Z.jsx)(fr,{icon:(0,Z.jsx)(Ee,{size:14}),label:`All Runs`,href:`/${e}/simulations`,isSelected:n===Gn,onClick:()=>l(Gn)})}),(0,Z.jsx)(ut,{}),(0,Z.jsxs)(L,{flex:1,overflow:`auto`,paddingX:_?6:2,paddingTop:2,paddingBottom:2,gap:+!_,align:`stretch`,children:[p&&!_&&Array.from({length:ur}).map((e,t)=>(0,Z.jsx)(o,{"data-testid":`suite-sidebar-skeleton`,height:`60px`,width:`100%`,borderRadius:`md`,marginBottom:1},t)),!p&&!_&&S&&t.length===0&&c.length===0&&(0,Z.jsx)(T,{size:`sm`,paddingY:6,children:(0,Z.jsxs)(O,{children:[(0,Z.jsx)(D,{children:(0,Z.jsx)(ke,{size:22})}),(0,Z.jsx)(w,{fontSize:`sm`,children:`No run plans yet`}),(0,Z.jsx)(E,{fontSize:`xs`,textAlign:`center`,maxWidth:`180px`,children:`Group scenarios into a plan and run them together against your agent.`}),f&&(0,Z.jsxs)(r,{size:`xs`,colorPalette:`blue`,onClick:f,children:[(0,Z.jsx)(be,{size:14}),` New Run Plan`]})]})}),!p&&!_&&S&&(t.length>0||c.length>0)&&(0,Z.jsx)(s,{fontSize:`sm`,color:`fg.muted`,paddingX:2,paddingY:4,textAlign:`center`,children:`No matching run plans`}),!p&&b.map(t=>_?(0,Z.jsx)(m,{content:t.name,positioning:{placement:`right`},children:(0,Z.jsx)(C,{"aria-label":t.name,size:`sm`,width:`full`,variant:t.slug===n?`solid`:`ghost`,onClick:()=>l(t.slug),children:(0,Z.jsx)(ye,{width:`22px`,height:`22px`,borderRadius:`full`,bg:t.slug===n?`transparent`:`bg.emphasized`,fontSize:`xs`,fontWeight:`bold`,children:t.name.charAt(0).toUpperCase()})})},t.id):(0,Z.jsx)(hr,{suite:t,projectSlug:e,isSelected:t.slug===n,runSummary:i?.get(t.id),onSelect:()=>l(t.slug),onRun:()=>u(t.id),onContextMenu:e=>d(e,t.id)},t.id)),!p&&x.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[!_&&(0,Z.jsx)(s,{"data-testid":`external-sets-header`,fontSize:`xs`,fontWeight:`bold`,color:`fg.muted`,letterSpacing:`wider`,paddingX:2,paddingTop:3,paddingBottom:1,children:`EXTERNAL SETS`}),_&&(0,Z.jsx)(a,{paddingY:.5,children:(0,Z.jsx)(ut,{})}),x.map(t=>_?(0,Z.jsx)(m,{content:t.scenarioSetId,positioning:{placement:`right`},children:(0,Z.jsx)(C,{"aria-label":t.scenarioSetId,size:`sm`,width:`full`,variant:n===Yn(t.scenarioSetId)?`solid`:`ghost`,onClick:()=>l(Yn(t.scenarioSetId)),children:(0,Z.jsx)(ye,{width:`22px`,height:`22px`,borderRadius:`full`,bg:n===Yn(t.scenarioSetId)?`transparent`:`bg.emphasized`,fontSize:`xs`,fontWeight:`bold`,children:t.scenarioSetId.charAt(0).toUpperCase()})})},t.scenarioSetId):(0,Z.jsx)(gr,{externalSet:t,projectSlug:e,isSelected:n===Yn(t.scenarioSetId),onSelect:()=>l(Yn(t.scenarioSetId))},t.scenarioSetId))]})]}),!_&&(0,Z.jsx)(cr,{}),(0,Z.jsx)(ut,{}),(0,Z.jsx)(k,{paddingX:_?6:3,paddingY:1.5,justify:`flex-start`,children:(0,Z.jsx)(C,{"aria-label":_?`Expand sidebar`:`Collapse sidebar`,size:`sm`,variant:`outline`,width:_?`full`:void 0,onClick:y,children:_?(0,Z.jsx)(B,{size:16}):(0,Z.jsx)(se,{size:16})})})]})}function fr({icon:e,label:t,href:n,isSelected:r=!1,onClick:i}){return(0,Z.jsx)(k,{asChild:!0,width:`full`,paddingX:2,paddingY:1.5,borderRadius:`md`,cursor:`pointer`,bg:r?`bg.emphasized`:`transparent`,_hover:{bg:r?`bg.emphasized`:`bg.subtle`},onClick:e=>{e.metaKey||e.ctrlKey||e.button===1||(e.preventDefault(),i())},gap:2,textDecoration:`none`,color:`inherit`,children:(0,Z.jsxs)(`a`,{href:n??`#`,children:[e,(0,Z.jsx)(s,{fontSize:`sm`,children:t})]})})}function pr({passedCount:e,failedCount:t,totalCount:n}){let r=n>0?e/n*100:null;return(0,Z.jsxs)(k,{gap:1,color:`fg.muted`,children:[(0,Z.jsx)(ot,{passRate:r,size:`8px`}),(0,Z.jsx)(s,{fontSize:`xs`,color:it(r),fontWeight:`medium`,children:r===null?`-`:`${Math.round(r)}%`}),(0,Z.jsx)(s,{fontSize:`xs`,color:`gray.400`,children:`·`}),(0,Z.jsxs)(s,{fontSize:`xs`,color:`fg.subtle`,children:[e,` passed`]})]})}function mr({isSelected:e,href:t,onClick:n,onContextMenu:r,className:i,"data-testid":a,children:o}){return(0,Z.jsx)(k,{asChild:!0,className:i,"data-testid":a,"data-selected":e||void 0,paddingX:3,position:`relative`,paddingY:3,borderRadius:`md`,cursor:`pointer`,bg:e?`bg.subtle`:`transparent`,border:e?`1px solid border.emphasized`:`none`,_hover:{bg:e?`bg.emphasized`:`bg.subtle`},onContextMenu:r,onClick:e=>{e.metaKey||e.ctrlKey||e.button===1||(e.preventDefault(),n())},justify:`space-between`,width:`full`,textDecoration:`none`,color:`inherit`,children:(0,Z.jsx)(`a`,{href:t??`#`,children:o})})}function hr({suite:e,projectSlug:t,isSelected:n,runSummary:r,onSelect:i,onRun:o,onContextMenu:l}){let u=Xt();return(0,Z.jsx)(mr,{className:`group`,"data-testid":`suite-list-item`,href:`/${t}/simulations/run-plans/${e.slug}`,isSelected:n,onClick:i,onContextMenu:l,children:(0,Z.jsxs)(L,{align:`start`,gap:0,flex:1,overflow:`hidden`,textAlign:`left`,children:[(0,Z.jsxs)(k,{gap:1.5,width:`full`,children:[(0,Z.jsx)(s,{fontSize:`13px`,fontWeight:`medium`,lineClamp:1,children:e.name||`<empty>`}),(0,Z.jsx)(N,{}),r?.lastRunTimestamp&&(0,Z.jsx)(s,{fontSize:`11px`,color:`fg.subtle`,flexShrink:0,whiteSpace:`nowrap`,children:xe(r.lastRunTimestamp,u)}),(0,Z.jsxs)(k,{gap:0,flexShrink:0,children:[(0,Z.jsxs)(a,{as:`button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),o()},paddingX:1,paddingY:.5,borderRadius:`sm`,_hover:{bg:`bg.muted`},cursor:`pointer`,display:`flex`,alignItems:`center`,gap:1,flexShrink:0,children:[(0,Z.jsx)(_e,{size:12}),(0,Z.jsx)(s,{fontSize:`xs`,children:`Run`})]}),(0,Z.jsx)(a,{as:`button`,"aria-label":`Run plan options`,"data-testid":`suite-menu-button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),l(e)},paddingX:1,paddingY:.5,borderRadius:`sm`,_hover:{bg:`bg.muted`},display:`flex`,alignItems:`center`,opacity:0,_groupHover:{opacity:1},transition:`opacity 150ms`,cursor:`pointer`,children:(0,Z.jsx)(c,{size:14})})]})]}),r&&(0,Z.jsx)(pr,{passedCount:r.passedCount,failedCount:r.failedCount,totalCount:r.totalCount})]})})}function gr({externalSet:e,projectSlug:t,isSelected:n,onSelect:r}){let i=Xt();return(0,Z.jsx)(mr,{"data-testid":`external-set-list-item`,href:`/${t}/simulations/${e.scenarioSetId}`,isSelected:n,onClick:r,children:(0,Z.jsxs)(L,{align:`start`,gap:0,flex:1,overflow:`hidden`,textAlign:`left`,children:[(0,Z.jsxs)(k,{gap:1.5,width:`full`,children:[(0,Z.jsx)(s,{fontSize:`13px`,fontWeight:`medium`,lineClamp:1,children:e.scenarioSetId||`<empty>`}),(0,Z.jsx)(N,{}),e.lastRunTimestamp&&(0,Z.jsx)(s,{fontSize:`11px`,color:`fg.subtle`,flexShrink:0,whiteSpace:`nowrap`,children:xe(e.lastRunTimestamp,i)})]}),(0,Z.jsx)(pr,{passedCount:e.passedCount,failedCount:e.failedCount,totalCount:e.totalCount})]})})}function _r(e={}){let{project:t}=q(),{openDrawer:n}=Se(),r=U.useContext(),i=(0,X.useRef)(e);i.current=e;let[a,o]=(0,X.useState)(null),[s,c]=(0,X.useState)(null),l=U.suites.run.useMutation({onSuccess:(e,t)=>{if(r.scenarios.getSuiteRunData.invalidate(),o(null),(e.skippedArchived?.scenarios?.length??0)+(e.skippedArchived?.targets?.length??0)>0){let r=[];e.skippedArchived.scenarios.length>0&&r.push(`${e.skippedArchived.scenarios.length} archived scenario${e.skippedArchived.scenarios.length>1?`s`:``}`),e.skippedArchived.targets.length>0&&r.push(`${e.skippedArchived.targets.length} archived target${e.skippedArchived.targets.length>1?`s`:``}`),h.create({title:`Run plan scheduled (${e.jobCount} jobs)`,description:`${r.join(` and `)} skipped.`,type:`warning`,meta:{closable:!0},action:{label:`Edit Run Plan`,onClick:()=>{n(`suiteEditor`,{urlParams:{suiteId:t.id}})}}})}else h.create({title:`Run plan scheduled (${e.jobCount} jobs)`,type:`success`,meta:{closable:!0},action:i.current.onViewRun?{label:`View run`,onClick:()=>i.current.onViewRun?.(t.id)}:void 0});i.current.onRunScheduled?.(t.id,t.batchRunId??e.batchRunId)},onError:(e,t)=>{o(null),c(null);let r=e.data?.code===`BAD_REQUEST`&&(e.message.includes(`All scenarios`)||e.message.includes(`All targets`));h.create({title:r?`Cannot start run plan`:`Run plan failed to start`,description:e.message,type:`error`,meta:{closable:!0},...r?{action:{label:`Edit Run Plan`,onClick:()=>{n(`suiteEditor`,{urlParams:{suiteId:t.id}})}}}:{}})}}),u=(0,X.useCallback)(e=>{!t||l.isPending||o(e)},[t,l.isPending]),d=(0,X.useCallback)(()=>{if(!t||!a||l.isPending)return;let e=Ne(g.SCENARIO_BATCH).toString();c(e),l.mutate({projectId:t.id,id:a.id,idempotencyKey:crypto.randomUUID(),batchRunId:e})},[t,a,l]),f=(0,X.useCallback)(()=>{l.isPending||o(null)},[l.isPending]),{data:p}=U.scenarios.getAll.useQuery({projectId:t?.id??``},{enabled:!!t&&!!a}),m=(0,X.useMemo)(()=>{if(!a||!p)return a?.scenarioIds.length??0;let e=new Set(p.map(e=>e.id));return a.scenarioIds.filter(t=>e.has(t)).length},[a,p]),_=(0,X.useMemo)(()=>a?et(a.targets).length:0,[a]);return{requestRun:u,confirmRun:d,cancelRun:f,isPending:l.isPending,pendingBatchRunId:s,dialogProps:{open:!!a,onClose:f,onConfirm:d,suiteName:a?.name??``,scenarioCount:m,targetCount:_,repeatCount:a?.repeatCount??1,isLoading:l.isPending}}}function vr({open:e,onClose:t,onConfirm:i,suiteName:a,scenarioCount:o,targetCount:c,repeatCount:l=1,isLoading:u=!1}){let d=o*c*l;return(0,Z.jsx)(J.Root,{open:e,onOpenChange:()=>{u||t()},placement:`center`,children:(0,Z.jsxs)(J.Content,{bg:`bg`,maxWidth:`500px`,onClick:e=>e.stopPropagation(),children:[!u&&(0,Z.jsx)(J.CloseTrigger,{}),(0,Z.jsx)(J.Header,{children:(0,Z.jsx)(J.Title,{children:a})}),(0,Z.jsx)(J.Body,{children:(0,Z.jsxs)(L,{align:`stretch`,gap:4,children:[(0,Z.jsxs)(s,{fontWeight:`semibold`,children:[` `,`Run `,d,` `,d===1?`simulation`:`simulations`,`?`]}),(0,Z.jsxs)(k,{gap:6,children:[(0,Z.jsxs)(L,{gap:0,align:`start`,children:[(0,Z.jsxs)(k,{gap:1.5,align:`center`,children:[(0,Z.jsx)(De,{size:14,color:`var(--chakra-colors-fg-muted)`}),(0,Z.jsx)(s,{fontSize:`lg`,fontWeight:`semibold`,children:o})]}),(0,Z.jsx)(s,{color:`fg.muted`,fontSize:`sm`,children:o===1?`scenario`:`scenarios`})]}),(0,Z.jsxs)(L,{gap:0,align:`start`,children:[(0,Z.jsxs)(k,{gap:1.5,align:`center`,children:[(0,Z.jsx)(st,{size:14,color:`var(--chakra-colors-fg-muted)`}),(0,Z.jsx)(s,{fontSize:`lg`,fontWeight:`semibold`,children:c})]}),(0,Z.jsx)(s,{color:`fg.muted`,fontSize:`sm`,children:c===1?`target`:`targets`})]}),l>1&&(0,Z.jsxs)(L,{gap:0,align:`start`,children:[(0,Z.jsxs)(k,{gap:1.5,align:`center`,children:[(0,Z.jsx)(le,{size:14,color:`var(--chakra-colors-fg-muted)`}),(0,Z.jsxs)(s,{fontSize:`lg`,fontWeight:`semibold`,children:[l,`x`]})]}),(0,Z.jsx)(s,{color:`fg.muted`,fontSize:`sm`,children:`repeats`})]})]})]})}),(0,Z.jsxs)(J.Footer,{children:[(0,Z.jsx)(r,{variant:`outline`,onClick:e=>{e.stopPropagation(),t()},disabled:u,children:`Cancel`}),(0,Z.jsx)(r,{colorPalette:`blue`,onClick:e=>{e.stopPropagation(),i()},disabled:u,children:u?(0,Z.jsx)(n,{size:`sm`}):`Run ${d} ${d===1?`Job`:`Jobs`}`})]})]})})}var yr=`langwatch:scenario-tab-key`,br=`langwatch:scenario-tab-id`;function xr(e){try{return window.sessionStorage.getItem(e)}catch{return null}}function Sr({key:e,value:t}){try{window.sessionStorage.setItem(e,t)}catch{}}function Cr(){return typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function wr(){let e=de(),[t,n]=(0,X.useState)(null),[r,i]=(0,X.useState)(null);return(0,X.useEffect)(()=>{if(typeof window>`u`||!e.isReady)return;let t=e.query[Ue],r=Array.isArray(t)?t[0]:t;if(r){Sr({key:yr,value:r});let{[Ue]:t,...n}=e.query;e.replace({pathname:e.pathname,query:n},void 0,{shallow:!0})}let a=r??xr(yr);if(!a)return;let o=xr(br);o||(o=Cr(),Sr({key:br,value:o})),n(a),i(o)},[e.isReady,e.query]),(0,X.useMemo)(()=>({tabKey:t,tabId:r}),[r,t])}var Tr=6e4;function Er({intervalMs:e=Tr,children:t}){let[n,r]=(0,X.useState)(()=>Date.now());return(0,X.useEffect)(()=>{let t=setInterval(()=>r(Date.now()),e);return()=>clearInterval(t)},[e]),(0,Z.jsx)(Yt,{value:n,children:t})}function Dr(){let{project:e}=q(),{openDrawer:t,setFlowCallbacks:n}=Se(),r=U.useContext(),{selectedSuiteSlug:i,navigateToSuite:o,highlightBatchId:s}=$n(),c=de();(0,X.useEffect)(()=>{if(!c.isReady)return;let e=c.query.openRun;if(typeof e==`string`&&e){t(`scenarioRunDetail`,{urlParams:{scenarioRunId:e}});let{openRun:n,...r}=c.query;c.replace({pathname:c.pathname,query:r},void 0,{shallow:!0})}},[c.isReady]);let[l,u]=(0,X.useState)(null);(0,X.useEffect)(()=>{if(!c.isReady)return;let e=c.query.pendingBatch;if(typeof e==`string`&&e){u(e);let{pendingBatch:t,...n}=c.query;c.replace({pathname:c.pathname,query:n},void 0,{shallow:!0})}},[c.isReady]);let{period:d,mode:f,setPeriod:p,setRelativePeriod:m}=je(30),[g,_]=(0,X.useState)(null),[v,y]=(0,X.useState)(null),{data:b,isLoading:S,error:ee}=U.suites.getAll.useQuery({projectId:e?.id??``},{enabled:!!e}),{data:C,isLoading:w}=U.scenarios.getExternalSetSummaries.useQuery({projectId:e?.id??``,startDate:d.startDate.getTime(),endDate:d.endDate.getTime()},{enabled:!!e,refetchInterval:15e3}),{data:T}=U.suites.getSummaries.useQuery({projectId:e?.id??``,startDate:d.startDate.getTime(),endDate:d.endDate.getTime()},{enabled:!!e,refetchInterval:3e4}),E=wr(),D=(0,X.useRef)(null),O=(0,X.useCallback)(e=>{let t=new URL(e.url);t.origin===window.location.origin&&t.pathname!==window.location.pathname&&D.current!==e.url&&(D.current=e.url,c.push(t.pathname+t.search))},[c]);Je({projectId:e?.id??``,refetch:()=>{r.suites.getSummaries.invalidate(),r.scenarios.getExternalSetSummaries.invalidate()},enabled:!!e?.id,debounceMs:500,tabKey:E.tabKey,tabId:E.tabId,onTabNavigate:O});let A=(0,X.useMemo)(()=>{if(T)return new Map(Object.entries(T))},[T]),j=(0,X.useMemo)(()=>{let e=new Map;if(b)for(let t of b)e.set(t.id,t.name);return e},[b]),M=(0,X.useMemo)(()=>!i||i===`all-runs`||qn(i)?null:b?.find(e=>e.slug===i)??null,[i,b]),N=(0,X.useMemo)(()=>!i||!qn(i)?null:Jn(i),[i]);(0,X.useEffect)(()=>{if(!i||i===`all-runs`)return;let e=null;if(qn(i)&&C){let t=Jn(i);e=C.find(e=>e.scenarioSetId===t)?.lastRunTimestamp??null}else M&&A&&(e=A.get(M.id)?.lastRunTimestamp??null);if(e&&e<d.startDate.getTime()){let t=Math.ceil((Date.now()-e)/864e5);p(we(new Date,t<=30?30:t<=90?90:365),new Date)}},[i]);let te=v?b?.find(e=>e.id===v):null,P=U.suites.archive.useMutation({onSuccess:()=>{r.suites.getAll.invalidate();let e=b?.find(e=>e.id===v);e&&e.slug===i&&o(Gn),y(null),h.create({title:`Run plan archived`,type:`success`,meta:{closable:!0}})},onError:e=>{h.create({title:`Failed to archive run plan`,description:e.message,type:`error`,meta:{closable:!0}})}}),F=U.suites.duplicate.useMutation({onSuccess:e=>{r.suites.getAll.invalidate(),o(e.slug),h.create({title:`Run plan duplicated`,type:`success`,meta:{closable:!0}})},onError:e=>{h.create({title:`Failed to duplicate run plan`,description:e.message,type:`error`,meta:{closable:!0}})}}),{requestRun:I,isPending:R,pendingBatchRunId:ne,dialogProps:re}=_r({onRunScheduled:()=>{r.suites.getSummaries.invalidate()},onViewRun:e=>{let t=b?.find(t=>t.id===e);t&&o(t.slug)}}),z=(0,X.useCallback)(e=>{o(e.slug)},[o]),B=(0,X.useCallback)(e=>{o(e.slug),I(e)},[o,I]),V=(0,X.useCallback)(()=>{n(`suiteEditor`,{onSaved:z,onRunRequested:B}),t(`suiteEditor`)},[t,n,z,B]),ae=(0,X.useCallback)(e=>{n(`suiteEditor`,{onSaved:z,onRunRequested:B}),t(`suiteEditor`,{urlParams:{suiteId:e}})},[t,n,z,B]),oe=(0,X.useCallback)(e=>{let t=b?.find(t=>t.id===e);t&&I(t)},[b,I]),se=(0,X.useCallback)(t=>{e&&F.mutate({projectId:e.id,id:t})},[e,F]),ce=(0,X.useCallback)(t=>{e&&y(t)},[e]),le=(0,X.useCallback)(()=>{!e||!v||P.mutate({projectId:e.id,id:v})},[e,v,P]),ue=(0,X.useCallback)((e,t)=>{e.preventDefault(),_({x:e.clientX,y:e.clientY,suiteId:t})},[]);return(0,Z.jsx)(Er,{children:(0,Z.jsxs)(ie,{children:[(0,Z.jsxs)(L,{width:`full`,height:`full`,gap:0,children:[(0,Z.jsx)(x.Header,{withBorder:!1,children:(0,Z.jsxs)(k,{justify:`space-between`,align:`center`,w:`full`,children:[(0,Z.jsx)(x.Heading,{children:`Simulations`}),(0,Z.jsxs)(k,{children:[(0,Z.jsx)(Ae,{period:d,mode:f,setPeriod:p,setRelativePeriod:m}),(0,Z.jsxs)(x.HeaderButton,{onClick:V,children:[(0,Z.jsx)(be,{size:16}),` New Run Plan`]})]})]})}),(0,Z.jsxs)(k,{flex:1,width:`full`,gap:0,overflow:`hidden`,minHeight:0,children:[(0,Z.jsx)(dr,{projectSlug:e?.slug??``,suites:b??[],selectedSuiteSlug:i,runSummaries:A,externalSets:C??[],onSelectSuite:o,onRunSuite:oe,onContextMenu:ue,onNewSuite:V,isLoading:S||w}),(0,Z.jsx)(a,{flex:1,height:`full`,minWidth:0,paddingBottom:3,paddingRight:4,children:(0,Z.jsx)(a,{height:`full`,width:`full`,borderRadius:`lg`,boxShadow:`0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1), 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)`,border:`1px solid`,borderColor:`border.muted`,background:`bg.panel`,overflow:`auto`,children:(0,Z.jsx)(Or,{error:ee??null,selectedSuiteSlug:i,selectedSuite:M,selectedExternalSetId:N,isLoading:S,onNewSuite:V,onEditSuite:ae,onRunSuite:oe,isRunning:R,pendingBatchRunId:ne??l,period:d,suiteNameMap:j,highlightBatchId:s,connectedToLocalRun:!!E.tabKey})})})]})]}),g&&(0,Z.jsx)(Fn,{x:g.x,y:g.y,onEdit:()=>ae(g.suiteId),onDuplicate:()=>se(g.suiteId),onArchive:()=>ce(g.suiteId),onClose:()=>_(null)}),(0,Z.jsx)(Pn,{open:!!v,onClose:()=>y(null),onConfirm:le,suiteName:te?.name??``,isLoading:P.isPending}),(0,Z.jsx)(vr,{...re})]})})}function Or({error:e,selectedSuiteSlug:t,selectedSuite:n,selectedExternalSetId:r,isLoading:i,onNewSuite:a,onEditSuite:o,onRunSuite:s,isRunning:c,pendingBatchRunId:l,period:u,suiteNameMap:d,highlightBatchId:f,connectedToLocalRun:p}){return e?(0,Z.jsx)(T,{paddingY:12,children:(0,Z.jsxs)(O,{children:[(0,Z.jsx)(D,{color:`red.fg`,children:(0,Z.jsx)(V,{size:28})}),(0,Z.jsx)(w,{children:`Couldn't load simulations`}),(0,Z.jsx)(E,{maxWidth:`360px`,textAlign:`center`,children:e.message})]})}):t===null?null:r?(0,Z.jsx)(Wn,{scenarioSetId:r,period:u,highlightBatchId:f,connectedToLocalRun:p}):t===`all-runs`?(0,Z.jsx)(Nn,{period:u,suiteNameMap:d,pendingBatchRunId:l,highlightBatchId:f}):n?(0,Z.jsx)(Ln,{suite:n,onEdit:()=>o(n.id),onRun:()=>s(n.id),isRunning:c,pendingBatchRunId:l,period:u,highlightBatchId:f}):i?null:(0,Z.jsx)(Vn,{onNewSuite:a})}function kr(){let e=de(),t=Array.isArray(e.query.path)?e.query.path:[],n=e.query.project,r=e.isReady&&n?Xn({projectSlug:n,segments:t,query:e.query}):null;return(0,X.useEffect)(()=>{r&&e.replace(r)},[r]),r?null:(0,Z.jsx)(Dr,{})}var Ar=Me(`scenarios:view`,{layoutComponent:ie})(kr);export{Ar as default};
|
|
22
|
-
//# sourceMappingURL=__...path__-3xWAWxQ-.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,o as t,r as n,s as r}from"./fetchSSE-DWKCnoHV.js";import{O as i,S as a,_ as o,a as s,f as c,h as l,i as u,l as ee,m as d,n as f,o as p,s as m,t as h,u as g,v as _,w as v,x as y,y as te}from"./_Uint8Array-B8b3z1r6.js";import{t as ne}from"./_arrayEach-D_HpLtqV.js";import{t as b}from"./_baseAssignValue-D7YNnh37.js";var x=Object.create,S=function(){function e(){}return function(t){if(!n(t))return{};if(x)return x(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function C(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var re=Object.prototype.hasOwnProperty;function w(e,t,n){var r=e[t];(!(re.call(e,t)&&v(r,n))||n===void 0&&!(t in e))&&b(e,t,n)}function T(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?b(n,s,c):w(n,s,c)}return n}function ie(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ae=Object.prototype.hasOwnProperty;function E(e){if(!n(e))return ie(e);var t=y(e),r=[];for(var i in e)i==`constructor`&&(t||!ae.call(e,i))||r.push(i);return r}function D(e){return a(e)?l(e,!0):E(e)}var O=d(Object.getPrototypeOf,Object);function oe(e,t){return e&&T(t,c(t),e)}function se(e,t){return e&&T(t,D(t),e)}var k=typeof exports==`object`&&exports&&!exports.nodeType&&exports,A=k&&typeof module==`object`&&module&&!module.nodeType&&module,j=A&&A.exports===k?r.Buffer:void 0,M=j?j.allocUnsafe:void 0;function N(e,t){if(t)return e.slice();var n=e.length,r=M?M(n):new e.constructor(n);return e.copy(r),r}function ce(e,t){return T(e,p(e),t)}var P=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)g(t,p(e)),e=O(e);return t}:m;function le(e,t){return T(e,P(e),t)}function ue(e){return s(e,D,P)}var F=Object.prototype.hasOwnProperty;function I(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&F.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function L(e){var t=new e.constructor(e.byteLength);return new h(t).set(new h(e)),t}function R(e,t){var n=t?L(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var z=/\w*$/;function B(e){var t=new e.constructor(e.source,z.exec(e));return t.lastIndex=e.lastIndex,t}var V=t?t.prototype:void 0,H=V?V.valueOf:void 0;function U(e){return H?Object(H.call(e)):{}}function W(e,t){var n=t?L(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var de=`[object Boolean]`,fe=`[object Date]`,pe=`[object Map]`,me=`[object Number]`,he=`[object RegExp]`,ge=`[object Set]`,_e=`[object String]`,ve=`[object Symbol]`,ye=`[object ArrayBuffer]`,be=`[object DataView]`,xe=`[object Float32Array]`,Se=`[object Float64Array]`,Ce=`[object Int8Array]`,we=`[object Int16Array]`,Te=`[object Int32Array]`,Ee=`[object Uint8Array]`,De=`[object Uint8ClampedArray]`,Oe=`[object Uint16Array]`,ke=`[object Uint32Array]`;function Ae(e,t,n){var r=e.constructor;switch(t){case ye:return L(e);case de:case fe:return new r(+e);case be:return R(e,n);case xe:case Se:case Ce:case we:case Te:case Ee:case De:case Oe:case ke:return W(e,n);case pe:return new r;case me:case _e:return new r(e);case he:return B(e);case ge:return new r;case ve:return U(e)}}function G(e){return typeof e.constructor==`function`&&!y(e)?S(O(e)):{}}var je=`[object Map]`;function Me(t){return e(t)&&f(t)==je}var K=o&&o.isMap,Ne=K?_(K):Me,Pe=`[object Set]`;function Fe(t){return e(t)&&f(t)==Pe}var q=o&&o.isSet,Ie=q?_(q):Fe,Le=1,Re=2,ze=4,J=`[object Arguments]`,Be=`[object Array]`,Ve=`[object Boolean]`,He=`[object Date]`,Ue=`[object Error]`,Y=`[object Function]`,We=`[object GeneratorFunction]`,Ge=`[object Map]`,Ke=`[object Number]`,X=`[object Object]`,qe=`[object RegExp]`,Je=`[object Set]`,Ye=`[object String]`,Xe=`[object Symbol]`,Z=`[object WeakMap]`,Ze=`[object ArrayBuffer]`,Qe=`[object DataView]`,$e=`[object Float32Array]`,et=`[object Float64Array]`,tt=`[object Int8Array]`,nt=`[object Int16Array]`,rt=`[object Int32Array]`,it=`[object Uint8Array]`,at=`[object Uint8ClampedArray]`,ot=`[object Uint16Array]`,st=`[object Uint32Array]`,Q={};Q[J]=Q[Be]=Q[Ze]=Q[Qe]=Q[Ve]=Q[He]=Q[$e]=Q[et]=Q[tt]=Q[nt]=Q[rt]=Q[Ge]=Q[Ke]=Q[X]=Q[qe]=Q[Je]=Q[Ye]=Q[Xe]=Q[it]=Q[at]=Q[ot]=Q[st]=!0,Q[Ue]=Q[Y]=Q[Z]=!1;function $(e,t,r,a,o,s){var l,d=t&Le,p=t&Re,m=t&ze;if(r&&(l=o?r(e,a,o,s):r(e)),l!==void 0)return l;if(!n(e))return e;var h=i(e);if(h){if(l=I(e),!d)return C(e,l)}else{var g=f(e),_=g==Y||g==We;if(te(e))return N(e,d);if(g==X||g==J||_&&!o){if(l=p||_?{}:G(e),!d)return p?le(e,se(l,e)):ce(e,oe(l,e))}else{if(!Q[g])return o?e:{};l=Ae(e,g,d)}}s||=new ee;var v=s.get(e);if(v)return v;s.set(e,l),Ie(e)?e.forEach(function(n){l.add($(n,t,r,n,e,s))}):Ne(e)&&e.forEach(function(n,i){l.set(i,$(n,t,r,i,e,s))});var y=h?void 0:(m?p?ue:u:p?D:c)(e);return ne(y||e,function(n,i){y&&(i=n,n=e[i]),w(l,i,$(n,t,r,i,e,s))}),l}export{O as a,w as c,N as i,C as l,G as n,D as o,W as r,T as s,$ as t};
|
|
2
|
-
//# sourceMappingURL=_baseClone-o3pPcmbM.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t}from"./fetchSSE-DWKCnoHV.js";import{t as n}from"./isSymbol-IFJb2-6T.js";import{C as r,O as i,S as a,T as o,b as s,d as c,f as l,l as u}from"./_Uint8Array-B8b3z1r6.js";import{n as d,o as f,t as p}from"./_baseFor-C04Mk-th.js";function m(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var h=1/0,g=e?e.prototype:void 0,_=g?g.toString:void 0;function v(e){if(typeof e==`string`)return e;if(i(e))return m(e,v)+``;if(n(e))return _?_.call(e):``;var t=e+``;return t==`0`&&1/e==-h?`-0`:t}var y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b=/^\w*$/;function x(e,t){if(i(e))return!1;var r=typeof e;return r==`number`||r==`symbol`||r==`boolean`||e==null||n(e)?!0:b.test(e)||!y.test(e)||t!=null&&e in Object(t)}var S=`Expected a function`;function C(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(S);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(C.Cache||c),n}C.Cache=c;var w=500;function T(e){var t=C(e,function(e){return n.size===w&&n.clear(),e}),n=t.cache;return t}var E=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,D=/\\(\\)?/g,O=T(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(E,function(e,n,r,i){t.push(r?i.replace(D,`$1`):n||e)}),t});function k(e){return e==null?``:v(e)}function A(e,t){return i(e)?e:x(e,t)?[e]:O(k(e))}var j=1/0;function M(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-j?`-0`:t}function N(e,t){t=A(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[M(t[n++])];return n&&n==r?e:void 0}function P(e,t,n){var r=e==null?void 0:N(e,t);return r===void 0?n:r}var F=1,I=2;function L(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],f=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var p=new u;if(r)var m=r(l,f,c,e,t,p);if(!(m===void 0?d(f,l,F|I,r,p):m))return!1}}return!0}function R(e){return e===e&&!t(e)}function z(e){for(var t=l(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,R(i)]}return t}function B(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function V(e){var t=z(e);return t.length==1&&t[0][2]?B(t[0][0],t[0][1]):function(n){return n===e||L(n,e,t)}}function H(e,t){return e!=null&&t in Object(e)}function U(e,t,n){t=A(t,e);for(var a=-1,c=t.length,l=!1;++a<c;){var u=M(t[a]);if(!(l=e!=null&&n(e,u)))break;e=e[u]}return l||++a!=c?l:(c=e==null?0:e.length,!!c&&r(c)&&o(u,c)&&(i(e)||s(e)))}function W(e,t){return e!=null&&U(e,t,H)}var G=1,K=2;function q(e,t){return x(e)&&R(t)?B(M(e),t):function(n){var r=P(n,e);return r===void 0&&r===t?W(n,e):d(t,r,G|K)}}function J(e){return function(t){return t?.[e]}}function Y(e){return function(t){return N(t,e)}}function X(e){return x(e)?J(M(e)):Y(e)}function Z(e){return typeof e==`function`?e:e==null?f:typeof e==`object`?i(e)?q(e[0],e[1]):V(e):X(e)}function Q(e,t){return e&&p(e,t,l)}function $(e,t){return function(n,r){if(n==null)return n;if(!a(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var ee=$(Q);export{W as a,M as c,m as d,J as i,A as l,Q as n,U as o,Z as r,N as s,ee as t,k as u};
|
|
2
|
-
//# sourceMappingURL=_baseEach-CJ0DbEY4.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,o as t}from"./fetchSSE-DWKCnoHV.js";import{O as n,d as r,g as i,i as a,l as o,n as s,t as c,w as l,y as u}from"./_Uint8Array-B8b3z1r6.js";function d(e){return e}var f=`__lodash_hash_undefined__`;function p(e){return this.__data__.set(e,f),this}function m(e){return this.__data__.has(e)}function h(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}h.prototype.add=h.prototype.push=p,h.prototype.has=m;function g(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function _(e,t){return e.has(t)}var v=1,y=2;function b(e,t,n,r,i,a){var o=n&v,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&y?new h:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],b=t[d];if(r)var x=o?r(b,m,d,t,e,a):r(m,b,d,e,t,a);if(x!==void 0){if(x)continue;f=!1;break}if(p){if(!g(t,function(e,t){if(!_(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===b||i(m,b,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function x(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function S(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var C=1,w=2,T=`[object Boolean]`,E=`[object Date]`,D=`[object Error]`,O=`[object Map]`,k=`[object Number]`,A=`[object RegExp]`,j=`[object Set]`,M=`[object String]`,N=`[object Symbol]`,P=`[object ArrayBuffer]`,F=`[object DataView]`,I=t?t.prototype:void 0,L=I?I.valueOf:void 0;function R(e,t,n,r,i,a,o){switch(n){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!a(new c(e),new c(t)));case T:case E:case k:return l(+e,+t);case D:return e.name==t.name&&e.message==t.message;case A:case M:return e==t+``;case O:var s=x;case j:var u=r&C;if(s||=S,e.size!=t.size&&!u)return!1;var d=o.get(e);if(d)return d==t;r|=w,o.set(e,t);var f=b(s(e),s(t),r,i,a,o);return o.delete(e),f;case N:if(L)return L.call(e)==L.call(t)}return!1}var z=1,B=Object.prototype.hasOwnProperty;function V(e,t,n,r,i,o){var s=n&z,c=a(e),l=c.length;if(l!=a(t).length&&!s)return!1;for(var u=l;u--;){var d=c[u];if(!(s?d in t:B.call(t,d)))return!1}var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var m=!0;o.set(e,t),o.set(t,e);for(var h=s;++u<l;){d=c[u];var g=e[d],_=t[d];if(r)var v=s?r(_,g,d,t,e,o):r(g,_,d,e,t,o);if(!(v===void 0?g===_||i(g,_,n,r,o):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return o.delete(e),o.delete(t),m}var H=1,U=`[object Arguments]`,W=`[object Array]`,G=`[object Object]`,K=Object.prototype.hasOwnProperty;function q(e,t,r,a,c,l){var d=n(e),f=n(t),p=d?W:s(e),m=f?W:s(t);p=p==U?G:p,m=m==U?G:m;var h=p==G,g=m==G,_=p==m;if(_&&u(e)){if(!u(t))return!1;d=!0,h=!1}if(_&&!h)return l||=new o,d||i(e)?b(e,t,r,a,c,l):R(e,t,p,r,a,c,l);if(!(r&H)){var v=h&&K.call(e,`__wrapped__`),y=g&&K.call(t,`__wrapped__`);if(v||y){var x=v?e.value():e,S=y?t.value():t;return l||=new o,c(x,S,r,a,l)}}return _?(l||=new o,V(e,t,r,a,c,l)):!1}function J(t,n,r,i,a){return t===n?!0:t==null||n==null||!e(t)&&!e(n)?t!==t&&n!==n:q(t,n,r,i,J,a)}function Y(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var X=Y();export{h as a,_ as i,J as n,d as o,S as r,X as t};
|
|
2
|
-
//# sourceMappingURL=_baseFor-C04Mk-th.js.map
|