@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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{$t as n,B as r,F as i,Y as a,Zt as o,_ as s,a as c,b as l,d as u,en as d,f,g as p,h as m,l as h,o as g,p as _,pt as v,u as ee,v as te}from"./portal-FJIui2Z2.js";import{t as ne}from"./jsx-runtime-CFwixLRt.js";import{p as y,t as re}from"./resize-observer-DVkbZnNT.js";import{c as ie,n as ae,t as b}from"./visually-hidden-Bv77dNd2.js";import{l as x,n as S}from"./icon-CkSWK_vf.js";import{i as oe,n as se}from"./dist-B6lQ-KU0.js";import{i as ce}from"./field-AkuX7DGP.js";import{Gr as C}from"./index-DtiounXP.js";var w=e=>e.ids?.root??`radio-group:${e.id}`,T=e=>e.ids?.label??`radio-group:${e.id}:label`,E=(e,t)=>e.ids?.item?.(t)??`radio-group:${e.id}:radio:${t}`,D=(e,t)=>e.ids?.itemHiddenInput?.(t)??`radio-group:${e.id}:radio:input:${t}`,le=(e,t)=>e.ids?.itemControl?.(t)??`radio-group:${e.id}:radio:control:${t}`,O=(e,t)=>e.ids?.itemLabel?.(t)??`radio-group:${e.id}:radio:label:${t}`,k=e=>e.ids?.indicator??`radio-group:${e.id}:indicator`,A=e=>e.getById(w(e)),ue=(e,t)=>e.getById(D(e,t)),de=e=>e.getById(k(e)),fe=e=>A(e)?.querySelector(`input:not(:disabled)`),pe=e=>A(e)?.querySelector(`input:not(:disabled):checked`),j=e=>{let t=`input[type=radio][data-ownedby='${CSS.escape(w(e))}']:not([disabled])`;return x(A(e),t)},me=(e,t)=>{if(t)return e.getById(E(e,t))},he=e=>({x:e?.offsetLeft??0,y:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function M(e,t){let{context:n,send:o,computed:s,prop:c,scope:l}=e,u=s(`isDisabled`),d=c(`invalid`),f=c(`readOnly`);function p(e){return{value:e.value,invalid:!!e.invalid||!!d,disabled:!!e.disabled||u,checked:n.get(`value`)===e.value,focused:n.get(`focusedValue`)===e.value,focusVisible:n.get(`focusVisibleValue`)===e.value,hovered:n.get(`hoveredValue`)===e.value,active:n.get(`activeValue`)===e.value}}function m(e){let t=p(e);return{"data-focus":v(t.focused),"data-focus-visible":v(t.focusVisible),"data-disabled":v(t.disabled),"data-readonly":v(f),"data-state":t.checked?`checked`:`unchecked`,"data-hover":v(t.hovered),"data-invalid":v(t.invalid),"data-orientation":c(`orientation`),"data-ssr":v(n.get(`ssr`))}}let h=()=>{(pe(l)??fe(l))?.focus()};return{focus:h,value:n.get(`value`),setValue(e){o({type:`SET_VALUE`,value:e,isTrusted:!1})},clearValue(){o({type:`SET_VALUE`,value:null,isTrusted:!1})},getRootProps(){return t.element({...C.root.attrs,role:`radiogroup`,id:w(l),"aria-labelledby":T(l),"aria-required":c(`required`)||void 0,"aria-disabled":u||void 0,"aria-readonly":f||void 0,"data-orientation":c(`orientation`),"data-disabled":v(u),"data-invalid":v(d),"data-required":v(c(`required`)),"aria-orientation":c(`orientation`),dir:c(`dir`),style:{position:`relative`}})},getLabelProps(){return t.element({...C.label.attrs,dir:c(`dir`),"data-orientation":c(`orientation`),"data-disabled":v(u),"data-invalid":v(d),"data-required":v(c(`required`)),id:T(l),onClick:h})},getItemState:p,getItemProps(e){let n=p(e);return t.label({...C.item.attrs,dir:c(`dir`),id:E(l,e.value),htmlFor:D(l,e.value),...m(e),onPointerMove(){n.disabled||n.hovered||o({type:`SET_HOVERED`,value:e.value,hovered:!0})},onPointerLeave(){n.disabled||o({type:`SET_HOVERED`,value:null})},onPointerDown(t){n.disabled||r(t)&&(n.focused&&t.pointerType===`mouse`&&t.preventDefault(),o({type:`SET_ACTIVE`,value:e.value,active:!0}))},onPointerUp(){n.disabled||o({type:`SET_ACTIVE`,value:null})},onClick(){!n.disabled&&a()&&ue(l,e.value)?.focus()}})},getItemTextProps(e){return t.element({...C.itemText.attrs,dir:c(`dir`),id:O(l,e.value),...m(e)})},getItemControlProps(e){let n=p(e);return t.element({...C.itemControl.attrs,dir:c(`dir`),id:le(l,e.value),"data-active":v(n.active),"aria-hidden":!0,...m(e)})},getItemHiddenInputProps(e){let n=p(e);return t.input({"data-ownedby":w(l),id:D(l,e.value),type:`radio`,name:c(`name`)||c(`id`),form:c(`form`),value:e.value,required:c(`required`),"aria-labelledby":O(l,e.value),"aria-invalid":n.invalid||void 0,onClick(t){if(f){t.preventDefault();return}t.currentTarget.checked&&o({type:`SET_VALUE`,value:e.value,isTrusted:!0})},onBlur(){o({type:`SET_FOCUSED`,value:null,focused:!1,focusVisible:!1})},onFocus(){let t=se();o({type:`SET_FOCUSED`,value:e.value,focused:!0,focusVisible:t})},onKeyDown(t){t.defaultPrevented||t.key===` `&&o({type:`SET_ACTIVE`,value:e.value,active:!0})},onKeyUp(e){e.defaultPrevented||e.key===` `&&o({type:`SET_ACTIVE`,value:null})},disabled:n.disabled||f,defaultChecked:n.checked,style:b})},getIndicatorProps(){let e=n.get(`indicatorRect`),r=n.get(`animateIndicator`);return t.element({id:k(l),...C.indicator.attrs,dir:c(`dir`),hidden:n.get(`value`)==null||ge(e),"data-disabled":v(u),"data-orientation":c(`orientation`),onTransitionEnd(e){i(e)===e.currentTarget&&o({type:`INDICATOR_TRANSITION_END`})},style:{"--transition-property":`left, top, width, height`,"--left":y(e?.x),"--top":y(e?.y),"--width":y(e?.width),"--height":y(e?.height),position:`absolute`,willChange:r?`var(--transition-property)`:`auto`,transitionProperty:r?`var(--transition-property)`:`none`,transitionDuration:r?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[c(`orientation`)===`horizontal`?`left`:`top`]:c(`orientation`)===`horizontal`?`var(--left)`:`var(--top)`}})}}}var ge=e=>e==null||e.width===0&&e.height===0&&e.x===0&&e.y===0,{not:_e}=s(),N=te({props({props:e}){return{orientation:`vertical`,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),focusVisibleValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:null})),animateIndicator:t(()=>({defaultValue:!1})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null,prevValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`)},entry:[`syncPrevValue`,`syncIndicatorRect`,`syncSsr`],exit:[`cleanupObserver`],effects:[`trackFormControlState`,`trackFocusVisible`],watch({track:e,action:t,context:n}){e([()=>n.get(`value`)],()=>{t([`syncIndicatorAnimation`,`syncIndicatorRect`,`syncInputElements`])})},on:{SET_VALUE:[{guard:_e(`isTrusted`),actions:[`setValue`,`dispatchChangeEvent`]},{actions:[`setValue`]}],SET_HOVERED:{actions:[`setHovered`]},SET_ACTIVE:{actions:[`setActive`]},SET_FOCUSED:{actions:[`setFocused`]},INDICATOR_TRANSITION_END:{actions:[`clearIndicatorAnimation`]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return ie(A(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},trackFocusVisible({scope:e}){return oe({root:e.getRootNode?.()})}},actions:{setValue({context:e,event:t}){e.set(`value`,t.value)},setHovered({context:e,event:t}){e.set(`hoveredValue`,t.value)},setActive({context:e,event:t}){e.set(`activeValue`,t.value)},setFocused({context:e,event:t}){e.set(`focusedValue`,t.value);let n=t.value!=null&&t.focusVisible?t.value:null;e.set(`focusVisibleValue`,n)},syncPrevValue({context:e,refs:t}){t.set(`prevValue`,e.get(`value`))},syncIndicatorAnimation({context:e,refs:t}){let n=t.get(`prevValue`),r=e.get(`value`),i=n!=null&&r!=null&&n!==r;e.set(`animateIndicator`,i),t.set(`prevValue`,r)},clearIndicatorAnimation({context:e}){e.set(`animateIndicator`,!1)},syncInputElements({context:e,scope:t}){j(t).forEach(t=>{t.checked=t.value===e.get(`value`)})},cleanupObserver({refs:e}){e.get(`indicatorCleanup`)?.()},syncSsr({context:e}){e.set(`ssr`,!1)},syncIndicatorRect({context:e,scope:t,refs:n}){if(n.get(`indicatorCleanup`)?.(),!de(t))return;let r=e.get(`value`),i=me(t,r);if(r==null||!i){e.set(`indicatorRect`,null);return}let a=()=>{e.set(`indicatorRect`,he(i))};a();let o=re.observe(i,a);n.set(`indicatorCleanup`,o)},dispatchChangeEvent({context:e,scope:t}){j(t).forEach(t=>{let n=t.value===e.get(`value`);n!==t.checked&&ae(t,{checked:n})})}}}}),P=e(t(),1),F=ne(),[I,L]=m({name:`RadioGroupItemContext`,hookName:`useRadioGroupItemContext`,providerName:`<RadioGroupItemProvider />`}),[R,z]=m({name:`RadioGroupContext`,hookName:`useRadioGroupContext`,providerName:`<RadioGroupProvider />`}),ve=e=>e.children(z()),B=(0,P.forwardRef)((e,t)=>{let n=l(z().getIndicatorProps(),e);return(0,F.jsx)(_.div,{...n,ref:t})});B.displayName=`RadioGroupIndicator`;var[ye,V]=m({name:`RadioGroupItemPropsContext`,hookName:`useRadioGroupItemPropsContext`,providerName:`<RadioGroupItemPropsProvider />`}),be=S(),H=(0,P.forwardRef)((e,t)=>{let[n,r]=be(e,[`value`,`disabled`,`invalid`]),i=z(),a=l(i.getItemProps(n),r);return(0,F.jsx)(I,{value:i.getItemState(n),children:(0,F.jsx)(ye,{value:n,children:(0,F.jsx)(_.label,{...a,ref:t})})})});H.displayName=`RadioGroupItem`;var xe=e=>e.children(L()),U=(0,P.forwardRef)((e,t)=>{let n=z(),r=V(),i=l(n.getItemControlProps(r),e);return(0,F.jsx)(_.div,{...i,ref:t})});U.displayName=`RadioGroupItemControl`;var W=(0,P.forwardRef)((e,t)=>{let n=z(),r=V(),i=l(n.getItemHiddenInputProps(r),e);return(0,F.jsx)(_.input,{...i,ref:t})});W.displayName=`RadioGroupItemHiddenInput`;var G=(0,P.forwardRef)((e,t)=>{let n=z(),r=V(),i=l(n.getItemTextProps(r),e);return(0,F.jsx)(_.span,{...i,ref:t})});G.displayName=`RadioGroupItemText`;var K=(0,P.forwardRef)((e,t)=>{let n=l(z().getLabelProps(),e);return(0,F.jsx)(_.span,{...n,ref:t})});K.displayName=`RadioGroupLabel`;var Se=e=>{let t=ce(),n=(0,P.useId)(),{getRootNode:r}=f(),{dir:i}=u();return M(ee(N,{id:n,ids:{label:t?.ids?.legend},dir:i,disabled:t?.disabled,invalid:t?.invalid,getRootNode:r,...e}),h)},Ce=S(),q=(0,P.forwardRef)((e,t)=>{let[n,r]=Ce(e,[`defaultValue`,`disabled`,`form`,`id`,`ids`,`invalid`,`name`,`onValueChange`,`orientation`,`readOnly`,`required`,`value`]),i=Se(n),a=l(i.getRootProps(),r);return(0,F.jsx)(R,{value:i,children:(0,F.jsx)(_.div,{...a,ref:t})})});q.displayName=`RadioGroupRoot`;var we=S(),J=(0,P.forwardRef)((e,t)=>{let[{value:n},r]=we(e,[`value`]),i=l(n.getRootProps(),r);return(0,F.jsx)(R,{value:n,children:(0,F.jsx)(_.div,{...i,ref:t})})});J.displayName=`RadioGroupRootProvider`;var Y=p({Context:()=>ve,Indicator:()=>B,Item:()=>H,ItemContext:()=>xe,ItemControl:()=>U,ItemHiddenInput:()=>W,ItemText:()=>G,Label:()=>K,Root:()=>q,RootProvider:()=>J}),X=(0,P.forwardRef)(function(e,t){let r=o({key:`radiomark`,recipe:e.recipe}),[i,a]=r.splitVariantProps(e),{checked:s,disabled:l,unstyled:u,children:f,...p}=a,m=u?n:r(i),h={ref:t,"data-checked":c(s),"data-disabled":c(l),...p,css:[m,e.css]};return(0,F.jsx)(d.span,{...h,children:s&&(0,F.jsx)(`span`,{className:`dot`})})});X.displayName=`Radiomark`;var{withProvider:Z,withContext:Q,useStyles:Te,PropsProvider:Ee}=g({key:`radioGroup`});Z(Y.RootProvider,`root`,{forwardAsChild:!0});var De=Z(Y.Root,`root`,{forwardAsChild:!0});Q(Y.Label,`label`,{forwardAsChild:!0});var $=Q(Y.Item,`item`,{forwardAsChild:!0}),Oe=Q(Y.ItemText,`itemText`,{forwardAsChild:!0});Q(Y.ItemControl,`itemControl`,{forwardAsChild:!0});var ke=(0,P.forwardRef)(function(e,t){let n=Te();return(0,F.jsx)(Y.ItemContext,{children:r=>(0,F.jsx)(Y.ItemControl,{asChild:!0,children:(0,F.jsx)(X,{ref:t,unstyled:!0,...e,checked:r.checked,disabled:r.disabled,css:[n.itemControl,e.css]})})})});Y.Context,Y.ItemContext;var Ae=Y.ItemHiddenInput;export{De as a,L as c,Oe as i,N as l,Ae as n,X as o,ke as r,Y as s,$ as t,M as u};
|
|
2
|
+
//# sourceMappingURL=radio-group-y_PtCP6q.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Tn as e,_n as t,xn as n}from"./index-DtiounXP.js";import{t as r}from"./loadModelCatalog-31-xT4W4.js";var i=900*1e3,a=t({CODEX_ACCESS_TOKEN:n().min(1),CODEX_REFRESH_TOKEN:n().min(1),CODEX_ID_TOKEN:n(),CODEX_ACCOUNT_ID:n(),CODEX_PLAN:n(),CODEX_EMAIL:n(),CODEX_TOKENS_SAVED_AT:n()}),o=[{key:`langy.chat`,role:`LANGY`,displayName:`Langy`,description:`The model Langy chats and works with.`},{key:`prompt.create_default`,role:`DEFAULT`,displayName:`New prompt model`,description:`Model written into a freshly created prompt.`},{key:`evaluator.create_default`,role:`DEFAULT`,displayName:`New evaluator model`,description:`Model written into a freshly created LLM-as-a-judge evaluator.`},{key:`scenarios.user_simulator`,role:`DEFAULT`,displayName:`Scenario user simulator`,description:`Model that role-plays the user in scenario simulations.`},{key:`scenarios.judge`,role:`DEFAULT`,displayName:`Scenario judge`,description:`Model that judges whether a scenario met its success criteria.`},{key:`workflows.create_default`,role:`DEFAULT`,displayName:`New workflow model`,description:`Starts new workflows with a ready-to-use model.`},{key:`traces.ai_search`,role:`FAST`,displayName:`AI search`,description:`Natural-language search over your traces.`},{key:`workflows.commit_message`,role:`FAST`,displayName:`Workflow commit messages`,description:`Auto-generates a commit message when you save a workflow change.`},{key:`studio.autocomplete`,role:`FAST`,displayName:`Code editor autocomplete`,description:`Inline completion in the prompt and workflow editors.`},{key:`scenarios.generator`,role:`FAST`,displayName:`Scenario generator`,description:`Generates synthetic agent scenarios from a goal.`},{key:`datasets.generator`,role:`FAST`,displayName:`Dataset generator`,description:`Generates synthetic dataset rows from a description.`},{key:`translate.text`,role:`FAST`,displayName:`Inline translation`,description:`Translates user-supplied text into English.`},{key:`analytics.topic_clustering_llm`,role:`FAST`,displayName:`Topic clustering`,description:`Names the clusters surfaced in Analytics → Topics.`},{key:`langy.conversation_title`,role:`FAST`,displayName:`Langy chat titles`,description:`Names each Langy conversation from its messages. Point this at a cheap model.`},{key:`analytics.topic_clustering_embeddings`,role:`EMBEDDINGS`,displayName:`Topic clustering`,description:`Vectors used to group similar traces in Analytics → Topics.`}];function s(e){let t=new Set;for(let n of e){if(t.has(n.key))throw Error(`Duplicate feature registry key: "${n.key}". Feature keys must be unique.`);t.add(n.key)}}s(o);var c=e=>o.filter(t=>t.role===e),l=`langy.chat`,u=[l,...c(`FAST`).map(e=>e.key)];function d(e){return u.includes(e)}var f=`openai_codex`;function p(e){return e.startsWith(`${f}/`)}var m=`openai_codex/gpt-5.6-terra`;function h({modelId:e,featureKey:t}){return p(e)?d(t):!0}function g(e,t){return p(e)?t===`LANGY`||t===`FAST`:!0}var _=e=>r.models[e],v=(e,t)=>Object.entries(r.models).filter(([n,r])=>r.provider===e&&r.mode===t).map(([e,t])=>({value:t.id.split(`/`).slice(1).join(`/`),label:t.id.split(`/`).slice(1).join(`/`)})),y={custom:{name:`Custom (OpenAI-compatible)`,type:`llm`,apiKey:`CUSTOM_API_KEY`,endpointKey:`CUSTOM_BASE_URL`,keysSchema:t({CUSTOM_API_KEY:n().nullable().optional(),CUSTOM_BASE_URL:n().nullable().optional()}),optionalKeys:[`CUSTOM_API_KEY`],enabledSince:new Date(`2023-01-01`),blurb:`Use this option for LiteLLM proxy, self-hosted vLLM or any other model providers that supports the /chat/completions endpoint.`},openai_codex:{name:`Codex (OpenAI account)`,type:`llm`,apiKey:`CODEX_ACCESS_TOKEN`,endpointKey:void 0,keysSchema:a,authFlow:`oauth-device`,restrictedToFeatureKeys:u,enabledSince:new Date(`2026-07-20`),blurb:`Sign in with your OpenAI account and Langy runs on your ChatGPT plan. Serves the coding-assistant surfaces only.`},openai:{name:`OpenAI`,type:`llm`,apiKey:`OPENAI_API_KEY`,endpointKey:`OPENAI_BASE_URL`,keysSchema:t({OPENAI_API_KEY:n().nullable().optional(),OPENAI_BASE_URL:n().nullable().optional()}).superRefine((t,n)=>{(!t.OPENAI_API_KEY||t.OPENAI_API_KEY.trim()===``)&&(!t.OPENAI_BASE_URL||t.OPENAI_BASE_URL.trim()===``)&&n.addIssue({code:e.custom,message:`Add an API key, or a base URL if your endpoint does not need one.`})}),optionalKeys:[`OPENAI_BASE_URL`],enabledSince:new Date(`2023-01-01`)},anthropic:{name:`Anthropic`,type:`llm`,apiKey:`ANTHROPIC_API_KEY`,endpointKey:`ANTHROPIC_BASE_URL`,keysSchema:t({ANTHROPIC_API_KEY:n().nullable().optional(),ANTHROPIC_BASE_URL:n().nullable().optional()}).superRefine((t,n)=>{(!t.ANTHROPIC_API_KEY||t.ANTHROPIC_API_KEY.trim()===``)&&(!t.ANTHROPIC_BASE_URL||t.ANTHROPIC_BASE_URL.trim()===``)&&n.addIssue({code:e.custom,message:`Add an API key, or a base URL if your endpoint does not need one.`})}),optionalKeys:[`ANTHROPIC_BASE_URL`],enabledSince:new Date(`2023-01-01`),parameterConstraints:{temperature:{min:0,max:1}}},gemini:{name:`Gemini`,type:`llm`,apiKey:`GEMINI_API_KEY`,endpointKey:void 0,keysSchema:t({GEMINI_API_KEY:n().min(1)}),enabledSince:new Date(`2023-01-01`)},elevenlabs:{name:`ElevenLabs`,type:`llm`,apiKey:`ELEVENLABS_API_KEY`,endpointKey:void 0,keysSchema:t({ELEVENLABS_API_KEY:n().min(1)}),enabledSince:new Date(`2026-07-25`),blurb:`Voice models for lifelike text to speech and accurate transcription.`},azure:{name:`Azure OpenAI`,type:`llm`,apiKey:`AZURE_OPENAI_API_KEY`,endpointKey:`AZURE_OPENAI_ENDPOINT`,keysSchema:t({AZURE_OPENAI_API_KEY:n().nullable().optional(),AZURE_OPENAI_ENDPOINT:n().nullable().optional(),AZURE_OPENAI_API_VERSION:n().nullable().optional(),AZURE_API_GATEWAY_BASE_URL:n().nullable().optional(),AZURE_API_GATEWAY_VERSION:n().nullable().optional()}).passthrough(),optionalKeys:[`AZURE_OPENAI_API_VERSION`,`AZURE_API_GATEWAY_VERSION`],enabledSince:new Date(`2023-01-01`)},bedrock:{name:`Bedrock`,type:`llm`,apiKey:`AWS_ACCESS_KEY_ID`,endpointKey:void 0,keysSchema:t({AWS_ACCESS_KEY_ID:n().nullable().optional(),AWS_SECRET_ACCESS_KEY:n().nullable().optional(),AWS_REGION_NAME:n().nullable().optional()}),optionalKeys:[],enabledSince:new Date(`2023-01-01`)},vertex_ai:{name:`Vertex AI`,type:`llm`,apiKey:`GOOGLE_APPLICATION_CREDENTIALS`,endpointKey:void 0,keysSchema:t({GOOGLE_APPLICATION_CREDENTIALS:n().min(1).refine(C),VERTEXAI_PROJECT:n().min(1),VERTEXAI_LOCATION:n().min(1)}),enabledSince:new Date(`2023-01-01`)},deepseek:{name:`DeepSeek`,type:`llm`,apiKey:`DEEPSEEK_API_KEY`,endpointKey:void 0,keysSchema:t({DEEPSEEK_API_KEY:n().min(1)}),enabledSince:new Date(`2023-01-01`)},xai:{name:`xAI`,type:`llm`,apiKey:`XAI_API_KEY`,endpointKey:void 0,keysSchema:t({XAI_API_KEY:n().min(1)}),enabledSince:new Date(`2024-11-01`)},cerebras:{name:`Cerebras`,type:`llm`,apiKey:`CEREBRAS_API_KEY`,endpointKey:void 0,keysSchema:t({CEREBRAS_API_KEY:n().min(1)}),enabledSince:new Date(`2024-06-01`)},groq:{name:`Groq`,type:`llm`,apiKey:`GROQ_API_KEY`,endpointKey:void 0,keysSchema:t({GROQ_API_KEY:n().min(1)}),enabledSince:new Date(`2023-01-01`)},voyage:{name:`Voyage AI`,type:`llm`,apiKey:`VOYAGE_API_KEY`,endpointKey:void 0,keysSchema:t({VOYAGE_API_KEY:n().min(1)}),enabledSince:new Date(`2026-05-18`)},azure_safety:{name:`Azure Safety`,type:`safety`,apiKey:`AZURE_CONTENT_SAFETY_KEY`,endpointKey:`AZURE_CONTENT_SAFETY_ENDPOINT`,keysSchema:t({AZURE_CONTENT_SAFETY_ENDPOINT:n().url(),AZURE_CONTENT_SAFETY_KEY:n().min(1)}),enabledSince:new Date(`2026-04-10`),blurb:`Azure Content Safety for content moderation, prompt injection, and jailbreak detection. Your subscription is billed directly by Microsoft.`}},b=[`free`,`thinking`,`extended`,`beta`];function x(e){let t=e.lastIndexOf(`:`);if(t===-1)return!1;let n=e.substring(t+1);return/^\d+$/.test(n)?!1:b.includes(n.toLowerCase())}var S=Object.fromEntries(Object.entries(r.models).filter(([e])=>!x(e)).map(([e,t])=>[e,{mode:t.mode}]));function C(e){try{return JSON.parse(e),!0}catch{return!1}}export{m as a,g as c,y as i,h as l,_ as n,l as o,v as r,p as s,S as t,i as u};
|
|
2
|
+
//# sourceMappingURL=registry-KCPOxhx0.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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{An as s}from"./useLiteMemberGuard-ChV0lUs4.js";import{t as c}from"./tooltip-CYWvZEOf.js";import{n as l}from"./toaster-CRP22oRW.js";import{G as u,I as d}from"./ExternalImage-As_YKOAz.js";import{r as f}from"./external-link-CtHzR85H.js";import{a as p,i as m,n as h,r as g}from"./alert-C5hocQt_.js";import{r as _,t as v}from"./card-54_vstoB.js";import{t as y}from"./h-stack-CMPhqSp5.js";import{t as b}from"./spacer-CbmCSsJg.js";import{t as x}from"./v-stack-ClAMS101.js";import{t as S}from"./createLucideIcon-WbxVGt4j.js";import{t as C}from"./chart-no-axes-column-DNiBb2_4.js";import{t as w}from"./funnel-CYNH9pLK.js";import{_ as T,b as E,d as D,g as O,l as k,m as A,o as j,p as M,v as ee,y as N}from"./DashboardLayout-cHFbN-Gk.js";import{t as P}from"./square-pen-DMQXN2m2.js";import{r as F}from"./next-router-Bn5Y8Iek.js";import{n as I}from"./api-BK6L1im2.js";import{t as te}from"./CustomGraph-D1JcOEDG.js";import{t as ne}from"./FilterDisplay-ClLW19sO.js";import{Qn as L,Rt as R,Sr as z,V as B,ni as V,t as H}from"./index-DtiounXP.js";import{t as U}from"./WithPermissionGuard-BBKTBlhW.js";import{t as W}from"./seriesIdentifier-nW7BcYaa.js";import{a as G,t as K}from"./FilterSidebar-_ppaUjTr.js";import{t as q}from"./GraphsLayout-CjPYn5X3.js";var J=S(`grid-3x3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Y=e=>{let t=[],n=new Set,r=(e,t)=>`${e},${t}`,i=(e,t,i,a)=>{for(let o=e;o<e+i;o++)for(let e=t;e<t+a;e++)if(o>=2||n.has(r(o,e)))return!1;return!0},a=(e,t,i,a)=>{for(let o=e;o<e+i;o++)for(let e=t;e<t+a;e++)n.add(r(o,e))};for(let n of e){let{colSpan:e,rowSpan:r}=n,o=!1,s=0;for(;!o;){for(let c=0;c<=2-e;c++)if(i(c,s,e,r)){a(c,s,e,r),t.push({graphId:n.id,gridColumn:c,gridRow:s,colSpan:e,rowSpan:r}),o=!0;break}o||s++}}return t},X=e(t()),Z=r(),Q=[{value:`1x1`,label:`Small (1x1)`,colSpan:1,rowSpan:1},{value:`2x1`,label:`Wide (2x1)`,colSpan:2,rowSpan:1},{value:`1x2`,label:`Tall (1x2)`,colSpan:1,rowSpan:2},{value:`2x2`,label:`Large (2x2)`,colSpan:2,rowSpan:2}],re=(e,t)=>e===2&&t===2?`2x2`:e===2&&t===1?`2x1`:e===1&&t===2?`1x2`:`1x1`;function ie({graphId:e,projectSlug:t,dashboardId:r,colSpan:i,rowSpan:a,onSizeChange:o,onDelete:c,isDeleting:l}){let f=F(),p=re(i,a),m=`/${t}/analytics/custom/${e}${r?`?dashboard=${r}`:``}`;return(0,Z.jsxs)(d.Root,{children:[(0,Z.jsx)(d.Trigger,{asChild:!0,children:(0,Z.jsx)(n,{variant:`ghost`,loading:l,children:(0,Z.jsx)(s,{})})}),(0,Z.jsxs)(d.Content,{children:[(0,Z.jsxs)(d.Item,{value:`edit`,onClick:()=>{f.push(m)},children:[(0,Z.jsx)(P,{}),` Edit Graph`]}),(0,Z.jsxs)(d.Root,{positioning:{placement:`right-start`,gutter:2},children:[(0,Z.jsxs)(d.TriggerItem,{value:`size`,children:[(0,Z.jsx)(J,{}),` Size (`,p,`)`]}),(0,Z.jsx)(d.Content,{children:Q.map(e=>(0,Z.jsxs)(d.Item,{value:e.value,onClick:()=>o(e.value),children:[e.label,e.value===p&&` ✓`]},e.value))})]}),(0,Z.jsxs)(d.Item,{value:`delete`,color:`red.600`,onClick:c,children:[(0,Z.jsx)(u,{}),` Delete Graph`]})]})]})}function ae({filters:e}){return(0,Z.jsx)(c,{content:(0,Z.jsx)(x,{align:`start`,backgroundColor:`black`,color:`white`,height:`100%`,textWrap:`wrap`,children:(0,Z.jsx)(ne,{filters:e})}),positioning:{placement:`top`},showArrow:!0,children:(0,Z.jsx)(i,{padding:1,children:(0,Z.jsx)(w,{width:16,style:{minWidth:16}})})})}function oe({graphId:e,name:t,graph:r,projectSlug:a,dashboardId:o,colSpan:s,rowSpan:l,filters:u,trigger:d,isDragging:f,dragAttributes:p,dragListeners:m,onSizeChange:h,onDelete:g,isDeleting:_}){let{openDrawer:v}=B(),x=(0,X.useMemo)(()=>{if(t?.trim())return t;if(r&&typeof r==`object`&&`series`in r){let e=r;if(e.series&&e.series.length>0){let t=e.series.map(e=>e.name).filter(Boolean).join(`, `);if(t)return t.replace(/,([^,]*)$/,` and$1`)}}return`Untitled Graph`},[t,r]),S=(0,X.useMemo)(()=>W(r,0),[r]),w=(0,X.useMemo)(()=>!!(u&&typeof u==`object`&&Object.keys(u).length>0),[u]),T=!!(e&&e!==`custom`&&r),E=()=>{d&&v(`automation`,{automationId:d.id,prefilledGraphId:e,prefilledSeriesName:S})};return(0,Z.jsxs)(y,{...p,...m,align:`center`,marginBottom:4,cursor:f?`grabbing`:`grab`,children:[(0,Z.jsx)(C,{color:`orange`}),(0,Z.jsx)(V,{size:`sm`,marginLeft:2,children:x}),(0,Z.jsx)(b,{}),T&&(0,Z.jsx)(Z.Fragment,{children:d?.active?(0,Z.jsx)(c,{content:`Edit alert`,positioning:{placement:`top`},showArrow:!0,children:(0,Z.jsx)(i,{role:`button`,"aria-label":`Edit alert`,tabIndex:0,padding:1,cursor:`pointer`,color:`fg`,onClick:e=>{e.stopPropagation(),E()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),E())},children:(0,Z.jsx)(z,{width:18})})}):(0,Z.jsxs)(n,{variant:`outline`,colorPalette:`gray`,size:`sm`,onClick:t=>{t.stopPropagation(),v(`automation`,{prefilledGraphId:e,prefilledSeriesName:S})},children:[(0,Z.jsx)(z,{width:16}),`Add alert`]})}),w&&(0,Z.jsx)(ae,{filters:u}),(0,Z.jsx)(ie,{graphId:e,projectSlug:a,dashboardId:o,colSpan:s,rowSpan:l,onSizeChange:h,onDelete:g,isDeleting:_})]})}function $({graph:e,projectSlug:t,dashboardId:n,onDelete:r,onSizeChange:a,isDeleting:o}){let{attributes:s,listeners:c,setNodeRef:l,transform:u,transition:d,isDragging:f}=D({id:e.id}),p={transform:E.Transform.toString(u),transition:d,opacity:f?.5:1,gridColumn:`span ${e.colSpan}`,gridRow:`span ${e.rowSpan}`},m=e.rowSpan===2?600:300;return(0,Z.jsx)(i,{ref:l,style:p,minWidth:0,children:(0,Z.jsx)(_,{height:`full`,minWidth:0,children:(0,Z.jsxs)(v,{height:`full`,display:`flex`,flexDirection:`column`,minWidth:0,overflow:`hidden`,children:[(0,Z.jsx)(oe,{graphId:e.id,name:e.name,graph:e.graph,projectSlug:t,dashboardId:n,colSpan:e.colSpan,rowSpan:e.rowSpan,filters:e.filters,trigger:e.trigger,isDragging:f,dragAttributes:s,dragListeners:c,onSizeChange:a,onDelete:r,isDeleting:o}),(0,Z.jsx)(i,{flex:1,minHeight:0,children:(0,Z.jsx)(te,{input:{...e.graph,height:m},filters:e.filters},e.id)})]})})})}function se({graphs:e,projectSlug:t,dashboardId:n,onGraphDelete:r,onGraphSizeChange:a,onGraphsReorder:s,deletingGraphId:c}){let[l,u]=(0,X.useState)(null),d=e.find(e=>e.id===l),p=N(ee(O,{activationConstraint:{distance:8}}));return(0,Z.jsxs)(M,{sensors:p,collisionDetection:T,onDragStart:e=>{u(e.active.id)},onDragEnd:t=>{u(null);let{active:n,over:r}=t;if(!r||n.id===r.id)return;let i=e.findIndex(e=>e.id===n.id),a=e.findIndex(e=>e.id===r.id);if(i!==-1&&a!==-1){let t=[...e],[n]=t.splice(i,1);t.splice(a,0,n),s(Y(t))}},children:[(0,Z.jsx)(j,{items:e.map(e=>e.id),strategy:k,children:(0,Z.jsx)(f,{templateColumns:`repeat(2, 1fr)`,autoRows:`minmax(350px, auto)`,gap:5,width:`100%`,children:e.map(e=>(0,Z.jsx)($,{graph:e,projectSlug:t,dashboardId:n,onDelete:()=>r(e.id),onSizeChange:t=>a(e.id,t),isDeleting:c===e.id},e.id))})}),(0,Z.jsx)(A,{children:d?(0,Z.jsx)(_,{boxShadow:`xl`,opacity:.9,width:d.colSpan===2?`600px`:`300px`,height:d.rowSpan===2?`400px`:`200px`,children:(0,Z.jsxs)(v,{children:[(0,Z.jsxs)(y,{align:`center`,marginBottom:4,children:[(0,Z.jsx)(C,{color:`orange`}),(0,Z.jsx)(o,{marginLeft:2,fontSize:`md`,fontWeight:`bold`,children:d.name})]}),(0,Z.jsx)(i,{flex:1,background:`gray.50`,borderRadius:`md`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`fg.subtle`,height:`calc(100% - 40px)`,children:`Chart preview`})]})}):null})]})}function ce(){let{project:e}=R(),{showFilters:t}=G(),r=F(),s=e?.id??``,c=r.query.dashboard,u=I.dashboards.getOrCreateFirst.useQuery({projectId:s},{enabled:!!s&&!c}),d=c??u.data?.id,f=I.dashboards.getAll.useQuery({projectId:s},{enabled:!!s}),_=f.data?.find(e=>e.id===d)?.name??`Reports`,v=I.graphs.getAll.useQuery({projectId:s,dashboardId:d},{enabled:!!s&&!!d}),b=I.graphs.delete.useMutation(),S=I.graphs.updateLayout.useMutation(),C=I.graphs.batchUpdateLayouts.useMutation(),w=I.dashboards.rename.useMutation(),T=e=>{d&&w.mutate({projectId:s,dashboardId:d,name:e},{onSuccess:()=>{f.refetch()},onError:()=>{l.create({title:`Error renaming dashboard`,type:`error`,duration:3e3,meta:{closable:!0}})}})},E=e=>{b.mutate({projectId:s,id:e},{onSuccess:()=>{v.refetch()},onError:()=>{l.create({title:`Error deleting graph`,type:`error`,duration:3e3,meta:{closable:!0}})}})},D=(e,t)=>{let n=Q.find(e=>e.value===t);if(!n)return;let r=v.data?.find(t=>t.id===e);r&&S.mutate({projectId:s,graphId:e,gridColumn:r.gridColumn,gridRow:r.gridRow,colSpan:n.colSpan,rowSpan:n.rowSpan},{onSuccess:()=>{let t=v.data?.map(t=>t.id===e?{...t,colSpan:n.colSpan,rowSpan:n.rowSpan}:t);if(t){let e=Y(t);C.mutate({projectId:s,layouts:e},{onSuccess:()=>{v.refetch()}})}},onError:()=>{l.create({title:`Error updating graph size`,type:`error`,duration:3e3,meta:{closable:!0}})}})},O=e=>{C.mutate({projectId:s,layouts:e},{onSuccess:()=>{v.refetch()},onError:()=>{l.create({title:`Error reordering graphs`,type:`error`,duration:3e3,meta:{closable:!0}})}})},k=v.data??[],A=k.length===0&&!v.isLoading,j=d?`/${e?.slug}/analytics/custom?dashboard=${d}`:`/${e?.slug}/analytics/custom`;return(0,Z.jsxs)(q,{title:_,analyticsHeaderProps:{isEditable:!0,onTitleSave:T},extraHeaderButtons:e?(0,Z.jsx)(H,{href:j,asChild:!0,children:(0,Z.jsxs)(n,{colorPalette:`orange`,size:`sm`,children:[(0,Z.jsx)(L,{}),` Add chart`]})}):null,children:[A&&(0,Z.jsxs)(m,{status:`info`,borderStartWidth:`4px`,borderStartColor:`colorPalette.solid`,marginBottom:6,children:[(0,Z.jsx)(g,{alignSelf:`start`}),(0,Z.jsxs)(x,{align:`start`,children:[(0,Z.jsx)(p,{children:`Add your custom graphs here`}),(0,Z.jsx)(h,{children:(0,Z.jsxs)(o,{as:`span`,children:[`You haven`,`'`,`t set up any custom graphs yet. Click + Add chart to get started.`]})})]})]}),(0,Z.jsxs)(y,{align:`start`,gap:6,width:`full`,children:[(0,Z.jsx)(i,{flex:1,children:v.isLoading?(0,Z.jsx)(a,{height:`300px`}):(0,Z.jsx)(se,{graphs:k,projectSlug:e?.slug??``,dashboardId:d??void 0,onGraphDelete:E,onGraphSizeChange:D,onGraphsReorder:O,deletingGraphId:b.isLoading?b.variables?.id??null:null})}),t?(0,Z.jsx)(K,{}):null]})]})}var le=U(`analytics:view`)(ce);export{le as default};
|
|
2
|
+
//# sourceMappingURL=reports-B_Y4pHYs.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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{n as o}from"./toaster-CRP22oRW.js";import{a as s,i as c,n as l,r as u}from"./alert-C5hocQt_.js";import{t as d}from"./h-stack-CMPhqSp5.js";import{t as f}from"./spacer-CbmCSsJg.js";import{it as p}from"./immer-BdlOHsfO.js";import{t as m}from"./v-stack-ClAMS101.js";import{t as h}from"./circle-check-gT80KFsf.js";import{n as g}from"./close-button-RGOW3hmk.js";import{t as _}from"./mail-DbwjHsAx.js";import{r as v}from"./next-router-Bn5Y8Iek.js";import{n as y}from"./api-BK6L1im2.js";import{Rt as b,Wn as x,ni as S,zt as C}from"./index-DtiounXP.js";import{t as w}from"./next-head-B6Im7q_p.js";import{t as T}from"./WithFeatureFlagGuard-D09SSCsN.js";import{t as E}from"./formatBudgetUsd-BYb25IkY.js";import{t as D}from"./MyLayout-BCFIoFGU.js";var O=e(t()),k=r(),A=e=>E(e),j=e=>typeof e==`string`?e:Array.isArray(e)&&typeof e[0]==`string`?e[0]:``,M=e=>{if(!e)return null;let t=Number.parseFloat(e);return Number.isFinite(t)?t:null};function N(){let e=v(),{data:t}=C(),{organization:r}=b({redirectToOnboarding:!1,redirectToProjectOnboarding:!1}),T=j(e.query.scope),E=j(e.query.scope_id),N=j(e.query.limit_usd),F=j(e.query.spent_usd),I=j(e.query.period),L=M(N),R=M(F),z=I||`current period`,B=!!(T&&E&&L!==null&&R!==null),V=y.user.personalBudget.useQuery({organizationId:r?.id??``},{enabled:!!r,refetchOnWindowFocus:!1}),H=V.data&&`adminEmail`in V.data?V.data.adminEmail??null:null,[U,W]=(0,O.useState)(``),[G,K]=(0,O.useState)(`idle`),q=y.user.requestBudgetIncrease.useMutation({onSuccess:()=>{K(`sent`)},onError:e=>{K(`idle`),o.create({title:e.message===`no_admin_found`?`No organization admin is configured`:`Could not send request`,description:e.message===`no_admin_found`?`Contact LangWatch support to configure an admin.`:H?`Try again, or email ${H} directly.`:`Try again or contact your organization admin directly.`,type:`error`,duration:7e3})}}),J=!!t&&!r;return(0,k.jsxs)(D,{children:[(0,k.jsx)(w,{children:(0,k.jsx)(`title`,{children:`Request budget increase · LangWatch`})}),(0,k.jsxs)(m,{align:`stretch`,gap:6,width:`full`,maxWidth:`640px`,children:[(0,k.jsxs)(d,{alignItems:`end`,children:[(0,k.jsxs)(m,{align:`start`,gap:0,children:[(0,k.jsx)(S,{as:`h2`,size:`lg`,children:`Request budget increase`}),(0,k.jsx)(a,{color:`fg.muted`,fontSize:`sm`,children:`Send the request to your organization admin with the current spend and limit context.`})]}),(0,k.jsx)(f,{})]}),J&&(0,k.jsxs)(c,{status:`info`,borderRadius:`md`,children:[(0,k.jsx)(u,{}),(0,k.jsxs)(i,{children:[(0,k.jsx)(s,{children:`Personal account — no admin to email`}),(0,k.jsx)(l,{fontSize:`sm`,children:`Budget-increase requests only apply to organization-managed accounts. Personal accounts manage their own limits in Settings.`})]})]}),!J&&G===`sent`&&(0,k.jsxs)(c,{status:`success`,borderRadius:`md`,children:[(0,k.jsx)(u,{children:(0,k.jsx)(h,{size:18})}),(0,k.jsxs)(i,{children:[(0,k.jsx)(s,{children:`Request sent`}),(0,k.jsxs)(l,{fontSize:`sm`,children:[`We emailed `,H??`your organization admin`,` with the spend context. They'll review and update the budget in Settings → AI Governance → Budgets.`]})]})]}),!J&&G!==`sent`&&(0,k.jsxs)(k.Fragment,{children:[B?(0,k.jsxs)(i,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:4,backgroundColor:`bg.subtle`,children:[(0,k.jsx)(a,{fontSize:`xs`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,marginBottom:3,children:`Context (carried from the gateway block)`}),(0,k.jsxs)(m,{align:`stretch`,gap:2,children:[(0,k.jsx)(P,{label:`Scope`,value:T}),(0,k.jsx)(P,{label:`Period`,value:z}),(0,k.jsx)(P,{label:`Spent so far`,value:A(R??0),tone:`red`}),(0,k.jsx)(P,{label:`Current limit`,value:A(L??0)})]})]}):(0,k.jsxs)(c,{status:`warning`,borderRadius:`md`,children:[(0,k.jsx)(u,{children:(0,k.jsx)(g,{size:18})}),(0,k.jsxs)(i,{children:[(0,k.jsx)(s,{children:`No context attached`}),(0,k.jsx)(l,{fontSize:`sm`,children:`The page was opened without a budget block context. You can still send a free-form message — the admin will review and decide.`})]})]}),(0,k.jsxs)(i,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:4,children:[(0,k.jsxs)(d,{marginBottom:2,fontSize:`sm`,color:`fg.muted`,children:[(0,k.jsx)(_,{size:14}),(0,k.jsxs)(a,{children:[`To: `,(0,k.jsx)(`strong`,{children:H??`your organization admin`})]})]}),(0,k.jsx)(a,{fontSize:`xs`,color:`fg.muted`,marginBottom:3,children:`Optional message — explain why you need the increase`}),(0,k.jsx)(p,{placeholder:`e.g. Need it for the demo on Friday — usually under limit`,value:U,onChange:e=>W(e.target.value),minHeight:`100px`,resize:`vertical`})]}),(0,k.jsxs)(d,{children:[(0,k.jsx)(f,{}),(0,k.jsxs)(n,{colorPalette:`orange`,onClick:()=>{r&&(K(`submitting`),q.mutate({organizationId:r.id,scope:T,scopeId:E,limitUsd:N,spentUsd:F,period:I||void 0,message:U.trim()?U.trim():void 0}))},disabled:G===`submitting`||!r||V.isLoading,loading:G===`submitting`,children:[(0,k.jsx)(x,{size:16}),`Send request`]})]})]})]})]})}function P({label:e,value:t,tone:n=`default`}){return(0,k.jsxs)(d,{fontSize:`sm`,children:[(0,k.jsx)(a,{color:`fg.muted`,minWidth:`120px`,children:e}),(0,k.jsx)(a,{fontFamily:`mono`,color:n===`red`?`red.500`:`fg`,fontWeight:n===`red`?`semibold`:`normal`,children:t})]})}var F=T(`release_ui_ai_governance_enabled`,{bypassOnboardingRedirect:!0})(N);export{F as default};
|
|
2
|
+
//# sourceMappingURL=request-bU99z82H.js.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-7ugfKe9P.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-WYO6CB5R-DrXopwXN.js";import{g as f}from"./chunk-ICXQ74PX-CBGBbB0s.js";import"./chunk-HOUHSVGY-KCI5VyfN.js";import"./chunk-Q4XR5HBZ-Ckl7D0pA.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-tXhe91qF.js";import{t as p}from"./chunk-XXDRQBXY-B-zyTdG8.js";import{t as m}from"./chunk-VR4S4FIN-kgt10gXB.js";import"./chunk-C7G6YPKG-Cczu3qbd.js";import"./chunk-ZGVPDNZ5-_vNOpeVi.js";import"./chunk-52WLFC77-CyjMpySG.js";import{r as h,t as g}from"./chunk-FWX5IMBZ-CIlmcu0O.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return`title`;case 1:return this.begin(`acc_title`),9;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),11;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin(`style`),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return`PERCENT`;case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin(`string`);break;case 58:this.popState();break;case 59:return this.begin(`style`),72;case 60:return this.begin(`style`),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin(`string`);break;case 65:this.popState();break;case 66:return`qString`;case 67:return t.yytext=t.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},`anonymous`),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}})();function ue(){this.yy={}}return e(ue,`Parser`),ue.prototype=le,le.Parser=ue,new ue})();_.parser=_;var v=_,y=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction=`TB`,this.RequirementType={REQUIREMENT:`Requirement`,FUNCTIONAL_REQUIREMENT:`Functional Requirement`,INTERFACE_REQUIREMENT:`Interface Requirement`,PERFORMANCE_REQUIREMENT:`Performance Requirement`,PHYSICAL_REQUIREMENT:`Physical Requirement`,DESIGN_CONSTRAINT:`Design Constraint`},this.RiskLevel={LOW_RISK:`Low`,MED_RISK:`Medium`,HIGH_RISK:`High`},this.VerifyType={VERIFY_ANALYSIS:`Analysis`,VERIFY_DEMONSTRATION:`Demonstration`,VERIFY_INSPECTION:`Inspection`,VERIFY_TEST:`Test`},this.Relationships={CONTAINS:`contains`,COPIES:`copies`,DERIVES:`derives`,SATISFIES:`satisfies`,VERIFIES:`verifies`,REFINES:`refines`,TRACES:`traces`},this.setAccTitle=a,this.getAccTitle=d,this.setAccDescription=r,this.getAccDescription=c,this.setDiagramTitle=i,this.getDiagramTitle=l,this.getConfig=e(()=>u().requirement,`getConfig`),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,`RequirementDB`)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:``,text:``,risk:``,verifyMethod:``,name:``,type:``,cssStyles:[],classes:[`default`]}}getInitialElement(){return{name:``,type:``,docRef:``,cssStyles:[],classes:[`default`]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:[`default`]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:[`default`]}),n.info(`Added new element: `,e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,n){this.relations.push({type:e,src:t,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,o()}setCssStyle(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(!t||!e)return;for(let n of t)n.includes(`,`)?e.cssStyles.push(...n.split(`,`)):e.cssStyles.push(n)}}setClass(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(e)for(let n of t){e.classes.push(n);let t=this.classes.get(n)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(let n of e){let e=this.classes.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.classes.set(n,e)),t&&t.forEach(function(t){if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))}),this.elements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))})}}getClasses(){return this.classes}getData(){let e=u(),t=[],n=[];for(let n of this.requirements.values()){let r=n;r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.shape=`requirementBox`,r.look=e.look,r.colorIndex=t.length,t.push(r)}for(let n of this.elements.values()){let r=n;r.shape=`requirementBox`,r.look=e.look,r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.colorIndex=t.length,t.push(r)}for(let t of this.relations){let r=0,i=t.type===this.Relationships.CONTAINS,a={id:`${t.src}-${t.dst}-${r}`,start:this.requirements.get(t.src)?.name??this.elements.get(t.src)?.name,end:this.requirements.get(t.dst)?.name??this.elements.get(t.dst)?.name,label:`<<${t.type}>>`,classes:`relationshipLine`,style:[`fill:none`,i?``:`stroke-dasharray: 10,7`],labelpos:`c`,thickness:`normal`,type:`normal`,pattern:i?`normal`:`dashed`,arrowTypeStart:i?`requirement_contains`:``,arrowTypeEnd:i?``:`requirement_arrow`,look:e.look,labelType:`markdown`};n.push(a),r++}return{nodes:t,edges:n,other:{},config:e,direction:this.getDirection()}}},b=e(e=>{let{themeVariables:t,look:n}=s(),{bkgColorArray:r,borderColorArray:i}=t;if(!i?.length)return``;let a=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)a+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${n}"][data-color-id="color-${t}"].node path {
|
|
9
|
+
stroke: ${i[t]};
|
|
10
|
+
fill: ${r?.length?r[t]:``};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${n}"][data-color-id="color-${t}"].node rect {
|
|
14
|
+
stroke: ${i[t]};
|
|
15
|
+
fill: ${r?.length?r[t]:``};
|
|
16
|
+
}
|
|
17
|
+
`;return a},`genColor`),x=e(e=>{let{look:t,themeVariables:n}=s(),{requirementEdgeLabelBackground:r}=n;return`
|
|
18
|
+
${b(e)}
|
|
19
|
+
marker {
|
|
20
|
+
fill: ${e.relationColor};
|
|
21
|
+
stroke: ${e.relationColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
marker.cross {
|
|
25
|
+
stroke: ${e.lineColor};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
svg {
|
|
29
|
+
font-family: ${e.fontFamily};
|
|
30
|
+
font-size: ${e.fontSize};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.reqBox {
|
|
34
|
+
fill: ${e.requirementBackground};
|
|
35
|
+
fill-opacity: 1.0;
|
|
36
|
+
stroke: ${e.requirementBorderColor};
|
|
37
|
+
stroke-width: ${e.requirementBorderSize};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.reqTitle, .reqLabel{
|
|
41
|
+
fill: ${e.requirementTextColor};
|
|
42
|
+
}
|
|
43
|
+
.reqLabelBox {
|
|
44
|
+
fill: ${e.relationLabelBackground};
|
|
45
|
+
fill-opacity: 1.0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.req-title-line {
|
|
49
|
+
stroke: ${e.requirementBorderColor};
|
|
50
|
+
stroke-width: ${e.requirementBorderSize};
|
|
51
|
+
}
|
|
52
|
+
.relationshipLine {
|
|
53
|
+
stroke: ${e.relationColor};
|
|
54
|
+
stroke-width: ${t===`neo`?e.strokeWidth:`1px`};
|
|
55
|
+
}
|
|
56
|
+
.relationshipLabel {
|
|
57
|
+
fill: ${e.relationLabelColor};
|
|
58
|
+
}
|
|
59
|
+
.edgeLabel {
|
|
60
|
+
background-color: ${e.edgeLabelBackground};
|
|
61
|
+
}
|
|
62
|
+
.edgeLabel .label rect {
|
|
63
|
+
fill: ${e.edgeLabelBackground};
|
|
64
|
+
}
|
|
65
|
+
.edgeLabel .label text {
|
|
66
|
+
fill: ${e.relationLabelColor};
|
|
67
|
+
}
|
|
68
|
+
.divider {
|
|
69
|
+
stroke: ${e.nodeBorder};
|
|
70
|
+
stroke-width: 1;
|
|
71
|
+
}
|
|
72
|
+
.label {
|
|
73
|
+
font-family: ${e.fontFamily};
|
|
74
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
75
|
+
}
|
|
76
|
+
.label text,span {
|
|
77
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
78
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
79
|
+
}
|
|
80
|
+
.labelBkg {
|
|
81
|
+
background-color: ${r??e.edgeLabelBackground};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
`},`getStyles`),S={};t(S,{draw:()=>C});var C=e(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing requirement diagram (unified)`,t);let{securityLevel:a,state:o,layout:s,look:c}=u(),l=i.db.getData(),d=p(t,a);l.type=i.type,l.layoutAlgorithm=g(s),l.nodeSpacing=o?.nodeSpacing??50,l.rankSpacing=o?.rankSpacing??50,l.markers=c===`neo`?[`requirement_contains_neo`,`requirement_arrow_neo`]:[`requirement_contains`,`requirement_arrow`],l.diagramId=t,await h(l,d),f.insertTitle(d,`requirementDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),m(d,8,`requirementDiagram`,o?.useMaxWidth??!0)},`draw`),w={parser:v,get db(){return new y},renderer:S,styles:x};export{w as diagram};
|
|
85
|
+
//# sourceMappingURL=requirementDiagram-TGXJPOKE-BYId9zaF.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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{i as o,n as s,r as c,t as l}from"./alert-C5hocQt_.js";import{n as u,r as d,t as f}from"./card-54_vstoB.js";import{t as p}from"./container-CAygaZzW.js";import{t as m}from"./h-stack-CMPhqSp5.js";import{t as h}from"./spacer-CbmCSsJg.js";import{t as g}from"./v-stack-ClAMS101.js";import{n as _}from"./auth-client-4OIM4EvK.js";import{Ar as v,_n as y,n as b,ni as x,p as S,xn as C}from"./index-DtiounXP.js";import{s as w}from"./index.esm-C0ipNBTK.js";import{t as T}from"./zod-BGMkf8aO.js";import{t as E}from"./LogoIcon-CWeDeArg.js";import{n as D,t as O}from"./HorizontalFormControl-COLSSPyK.js";var k=e(t()),A=r(),j=`This password reset link is invalid or has expired. Request a new one to continue.`,M=y({password:C().min(8,{message:`Password must be at least 8 characters`}),confirmPassword:C()}).refine(e=>e.password===e.confirmPassword,{message:`Passwords don't match`,path:[`confirmPassword`]});function N(){let e=S()?.get(`token`)??null;return e?(0,A.jsx)(P,{token:e}):(0,A.jsxs)(F,{title:`Invalid reset link`,children:[(0,A.jsx)(a,{children:j}),(0,A.jsx)(I,{})]})}function P({token:e}){let t=w({resolver:T(M)}),[r,y]=(0,k.useState)(!1),[S,C]=(0,k.useState)(!1),[N,P]=(0,k.useState)(null);return S?(0,A.jsxs)(F,{title:`Password updated`,children:[(0,A.jsx)(a,{children:`Your password has been reset. You can now sign in with your new password.`}),(0,A.jsx)(n,{colorPalette:`orange`,variant:`solid`,asChild:!0,children:(0,A.jsx)(b,{href:`/auth/signin`,style:{color:`white`},children:`Sign in`})})]}):(0,A.jsx)(p,{maxW:`container.md`,paddingTop:`calc(40vh - 164px)`,children:(0,A.jsx)(`form`,{onSubmit:t.handleSubmit(async t=>{y(!0),P(null);try{if((await _.resetPassword({newPassword:t.password,token:e}))?.error){P(j);return}C(!0)}catch{P(j)}finally{y(!1)}}),children:(0,A.jsxs)(d,{children:[(0,A.jsx)(u,{children:(0,A.jsxs)(m,{gap:4,children:[(0,A.jsx)(E,{width:30.69,height:42}),(0,A.jsx)(x,{size:`lg`,as:`h1`,children:`Reset password`})]})}),(0,A.jsx)(f,{children:(0,A.jsxs)(g,{width:`full`,children:[(0,A.jsx)(O,{label:`New Password`,helper:`Enter your new password`,invalid:t.formState.errors.password?.message!==void 0,children:(0,A.jsxs)(g,{align:`stretch`,gap:1,width:`full`,children:[(0,A.jsx)(v,{type:`password`,...t.register(`password`)}),(0,A.jsx)(D,{error:t.formState.errors.password})]})}),(0,A.jsx)(O,{label:`Confirm Password`,helper:`Confirm your new password`,invalid:t.formState.errors.confirmPassword?.message!==void 0,children:(0,A.jsxs)(g,{align:`stretch`,gap:1,width:`full`,children:[(0,A.jsx)(v,{type:`password`,...t.register(`confirmPassword`)}),(0,A.jsx)(D,{error:t.formState.errors.confirmPassword})]})}),N&&(0,A.jsxs)(o,{status:`error`,width:`full`,children:[(0,A.jsx)(c,{}),(0,A.jsxs)(l,{children:[(0,A.jsx)(s,{children:N}),(0,A.jsx)(I,{})]})]}),(0,A.jsxs)(m,{width:`full`,paddingTop:4,children:[(0,A.jsx)(i,{asChild:!0,children:(0,A.jsx)(b,{href:`/auth/signin`,style:{textDecoration:`underline`},children:`Back to sign in`})}),(0,A.jsx)(h,{}),(0,A.jsx)(n,{colorPalette:`orange`,type:`submit`,loading:r,children:`Reset password`})]})]})})]})})})}function F({title:e,children:t}){return(0,A.jsx)(p,{maxW:`container.md`,paddingTop:`calc(40vh - 164px)`,children:(0,A.jsxs)(d,{children:[(0,A.jsx)(u,{children:(0,A.jsxs)(m,{gap:4,children:[(0,A.jsx)(E,{width:30.69,height:42}),(0,A.jsx)(x,{size:`lg`,as:`h1`,children:e})]})}),(0,A.jsx)(f,{children:(0,A.jsx)(g,{width:`full`,align:`start`,gap:4,children:t})})]})})}function I(){return(0,A.jsx)(i,{asChild:!0,children:(0,A.jsx)(b,{href:`/auth/forgot-password`,style:{textDecoration:`underline`},children:`Request a new reset link`})})}export{N as default};
|
|
2
|
+
//# sourceMappingURL=reset-password-zMr6-23y.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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"./text-A3qvcMyN.js";import{n as s}from"./info-CtYT35g4.js";import{$ as c,Q as l,X as u,Y as d,Z as f,et as p,nt as m}from"./ExternalImage-As_YKOAz.js";import{r as h,t as g}from"./card-54_vstoB.js";import{t as _}from"./h-stack-CMPhqSp5.js";import{t as v}from"./spacer-CbmCSsJg.js";import{t as y}from"./v-stack-ClAMS101.js";import{n as b}from"./api-BK6L1im2.js";import{En as x,Rt as S,Un as C,ni as w}from"./index-DtiounXP.js";import{t as T}from"./RandomColorAvatar-D4Pjdi5E.js";import{t as E}from"./useActivePlan-DZotDN7k.js";import{t as D}from"./WithPermissionGuard-BBKTBlhW.js";import{t as O}from"./SettingsLayout-TFI-annu.js";import{t as k}from"./ContactSalesBlock-BKfDeTTe.js";var A=e(t()),j=x(),M=i();function N(e){return e===`ADMIN`?`red`:e===`MEMBER`?`blue`:e===`VIEWER`?`gray`:`purple`}function P(e){return e===j.RoleBindingScopeType.ORGANIZATION?`orange`:e===j.RoleBindingScopeType.TEAM?`teal`:`purple`}function F(e){return e===j.RoleBindingScopeType.ORGANIZATION?`Org`:e===j.RoleBindingScopeType.TEAM?`Team`:`Project`}function I(e){let t=new Map;for(let n of e){let e=n.userId??n.groupId??`unknown`;t.has(e)||t.set(e,{key:e,userId:n.userId,userName:n.userName,userEmail:n.userEmail,userImage:n.userImage,groupId:n.groupId,groupName:n.groupName,groupScimSource:n.groupScimSource,bindings:[]}),t.get(e).bindings.push(n)}return[...t.values()].sort((e,t)=>{let n=e.userName??e.groupName??e.userEmail??``,r=t.userName??t.groupName??t.userEmail??``;return n.localeCompare(r)})}function L({principal:e}){return e.userId?(0,M.jsxs)(_,{gap:2,children:[(0,M.jsx)(T,{id:e.userId,name:e.userName??e.userEmail??`?`,image:e.userImage,size:`xs`}),(0,M.jsxs)(y,{gap:0,align:`start`,children:[e.userName&&(0,M.jsx)(o,{fontWeight:`medium`,fontSize:`sm`,children:e.userName}),(0,M.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:e.userEmail??``})]})]}):(0,M.jsxs)(_,{gap:2,children:[(0,M.jsx)(a,{width:`6`,height:`6`,borderRadius:`full`,bg:`blue.subtle`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,children:(0,M.jsx)(C,{size:12})}),(0,M.jsxs)(y,{gap:0,align:`start`,children:[(0,M.jsx)(o,{fontWeight:`medium`,fontSize:`sm`,children:e.groupName??`Unknown group`}),e.groupScimSource&&(0,M.jsx)(s,{size:`xs`,colorPalette:`blue`,children:e.groupScimSource.toUpperCase()})]})]})}function R({bindings:e}){return(0,M.jsx)(y,{gap:1,align:`end`,children:e.map(e=>(0,M.jsxs)(_,{gap:1,children:[(0,M.jsx)(s,{colorPalette:N(e.role),size:`sm`,children:e.customRoleName??e.role}),(0,M.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`on`}),(0,M.jsxs)(s,{colorPalette:P(e.scopeType),size:`sm`,children:[F(e.scopeType),` · `,e.scopeName??e.scopeId.slice(0,8)+`…`]})]},e.id))})}var z=[{label:`All`,value:`ALL`},{label:`Org`,value:j.RoleBindingScopeType.ORGANIZATION},{label:`Team`,value:j.RoleBindingScopeType.TEAM},{label:`Project`,value:j.RoleBindingScopeType.PROJECT}];function B({active:e,onChange:t}){return(0,M.jsx)(_,{gap:1,children:z.map(n=>(0,M.jsx)(r,{size:`sm`,variant:e===n.value?`subtle`:`ghost`,colorPalette:e===n.value?`blue`:`gray`,onClick:()=>t(n.value),children:n.label},n.value))})}function V(){let{organization:e}=S(),{isEnterprise:t,isLoading:r}=E(),[i,s]=(0,A.useState)(`ALL`),{data:x,isLoading:C}=b.roleBinding.listForOrg.useQuery({organizationId:e?.id??``},{enabled:!!e?.id&&t});if(r||!e)return(0,M.jsx)(O,{children:(0,M.jsx)(n,{})});if(!t)return(0,M.jsx)(O,{children:(0,M.jsx)(a,{width:`full`,children:(0,M.jsx)(k,{})})});let T=I(i===`ALL`?x??[]:(x??[]).filter(e=>e.scopeType===i));return(0,M.jsx)(O,{children:(0,M.jsxs)(y,{align:`start`,gap:6,width:`full`,children:[(0,M.jsxs)(y,{align:`start`,gap:1,width:`full`,children:[(0,M.jsx)(w,{as:`h2`,children:`Role Bindings`}),(0,M.jsx)(o,{color:`fg.muted`,fontSize:`sm`,children:`All role bindings in this organization.`})]}),(0,M.jsx)(m,{}),(0,M.jsxs)(_,{width:`full`,children:[(0,M.jsx)(B,{active:i,onChange:s}),(0,M.jsx)(v,{}),x&&(0,M.jsxs)(o,{fontSize:`sm`,color:`fg.muted`,children:[T.length,` `,T.length===1?`principal`:`principals`]})]}),(0,M.jsx)(h,{width:`full`,overflow:`hidden`,children:(0,M.jsx)(g,{paddingY:0,paddingX:0,overflowX:`auto`,children:C?(0,M.jsx)(a,{padding:8,display:`flex`,justifyContent:`center`,children:(0,M.jsx)(n,{})}):T.length===0?(0,M.jsx)(a,{padding:8,textAlign:`center`,children:(0,M.jsx)(o,{color:`fg.muted`,children:`No role bindings found.`})}):(0,M.jsxs)(c,{variant:`line`,size:`md`,width:`full`,children:[(0,M.jsx)(l,{children:(0,M.jsxs)(p,{children:[(0,M.jsx)(f,{width:`240px`,children:`Who`}),(0,M.jsx)(f,{textAlign:`right`,children:`Access`})]})}),(0,M.jsx)(d,{children:T.map(e=>(0,M.jsxs)(p,{children:[(0,M.jsx)(u,{children:(0,M.jsx)(L,{principal:e})}),(0,M.jsx)(u,{children:(0,M.jsx)(R,{bindings:e.bindings})})]},e.key))})]})})})]})})}var H=D(`organization:manage`,{layoutComponent:O})(V);export{H as default};
|
|
2
|
+
//# sourceMappingURL=role-bindings-BvPzAUj1.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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"./text-A3qvcMyN.js";import{lr as s,xn as c}from"./useLiteMemberGuard-ChV0lUs4.js";import{n as l}from"./info-CtYT35g4.js";import{t as u}from"./tooltip-CYWvZEOf.js";import{n as d}from"./toaster-CRP22oRW.js";import{D as f,G as p,K as m,l as h,nt as g}from"./ExternalImage-As_YKOAz.js";import{n as _,r as v,t as ee}from"./fieldset-CIGh0Uxg.js";import{r as te}from"./UpgradeModal-DaVSEBO2.js";import{a as y,i as b,n as x,r as S,t as C}from"./alert-C5hocQt_.js";import{n as w,r as T,t as E}from"./card-54_vstoB.js";import{a as D,n as ne,r as O,t as k}from"./field-Dz4Xmo3X.js";import{t as A}from"./h-stack-CMPhqSp5.js";import{it as j}from"./immer-BdlOHsfO.js";import{t as M}from"./v-stack-ClAMS101.js";import{t as N}from"./createLucideIcon-WbxVGt4j.js";import{t as P}from"./square-pen-DMQXN2m2.js";import{n as F,u as I}from"./api-BK6L1im2.js";import{t as L}from"./info-Bii0i81f.js";import{t as R}from"./check-D7gK__iL.js";import{t as re}from"./plus-B6aIX-yZ.js";import{t as ie}from"./shield-DMNrG8X9.js";import{t as ae}from"./users-D5Vyi82_.js";import{Ar as z,Bt as B,En as V,Ht as oe,Rt as H,Vt as U,ni as W,qn as G,yt as K}from"./index-DtiounXP.js";import{s as se}from"./index.esm-C0ipNBTK.js";import{t as ce}from"./useActivePlan-DZotDN7k.js";import{t as le}from"./WithPermissionGuard-BBKTBlhW.js";import{t as q}from"./SettingsLayout-TFI-annu.js";import{t as ue}from"./ContactSalesBlock-BKfDeTTe.js";var de=N(`shield-user`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M6.376 18.91a6 6 0 0 1 11.249.003`,key:`hnjrf2`}],[`circle`,{cx:`12`,cy:`11`,r:`4`,key:`1gt34v`}]]),J=e(t()),Y=V(),fe=[U.TRACES,U.COST,U.SCENARIOS,U.ANNOTATIONS,U.ANALYTICS,U.EVALUATIONS,U.DATASETS,U.TRIGGERS,U.WORKFLOWS,U.EXPERIMENTS,U.PROMPTS,U.SECRETS,U.AUDIT_LOG,U.TEAM,U.PROJECT,U.GOVERNANCE,U.INGESTION_SOURCES,U.ANOMALY_RULES,U.COMPLIANCE_EXPORT,U.ACTIVITY_MONITOR,U.AI_TOOLS];function X(e){return e===U.COST?[B.VIEW]:e===U.TRACES?[B.VIEW,B.SHARE]:e===U.SECRETS||e===U.EXPERIMENTS?[B.VIEW,B.MANAGE]:e===U.SCENARIOS||e===U.AUDIT_LOG||e===U.COMPLIANCE_EXPORT||e===U.ACTIVITY_MONITOR?[B.VIEW]:[B.MANAGE,B.VIEW,B.CREATE,B.UPDATE,B.DELETE]}var Z=i();function Q({permissions:e}){let t=(e,t)=>`${e}:${t}`,n={};return fe.forEach(e=>{n[e]=X(e).map(n=>t(e,n))}),(0,Z.jsx)(M,{align:`start`,width:`full`,gap:4,children:Object.keys(n).map(n=>{let r=X(n);if(!r.some(t=>e.includes(`${n}:${t}`)))return null;let i=r.filter(t=>e.includes(`${n}:${t}`)),s=i.includes(`manage`)?i.filter(e=>e===`manage`||e===`share`):i;return(0,Z.jsxs)(a,{width:`full`,children:[(0,Z.jsxs)(M,{align:`start`,gap:2,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`semibold`,textTransform:`capitalize`,fontSize:`md`,children:n}),(0,Z.jsx)(M,{align:`start`,gap:1.5,paddingLeft:4,width:`full`,children:s.map(e=>{let r=t(n,e),i=e===`manage`?`Manage (Create, Update, Delete)`:e.charAt(0).toUpperCase()+e.slice(1);return(0,Z.jsxs)(A,{gap:2,align:`center`,children:[(0,Z.jsx)(R,{size:14,color:`var(--chakra-colors-green-500)`}),(0,Z.jsx)(o,{fontSize:`sm`,color:`fg`,children:i})]},r)})})]}),(0,Z.jsx)(g,{marginY:3})]},n)})})}function $({name:e,description:t,permissionCount:n,isDefault:i=!1,icon:a=G,onDelete:s,onEdit:c,onViewPermissions:u,hasPermission:d}){let f=d(`organization:manage`);return(0,Z.jsxs)(T,{width:`100%`,height:`100%`,borderWidth:`1px`,borderColor:`border`,_hover:u?{borderColor:`orange.400`,shadow:`md`}:{},transition:`all 0.2s`,display:`flex`,flexDirection:`column`,cursor:u&&f?`pointer`:`default`,onClick:u&&f?u:void 0,position:`relative`,children:[!i&&(0,Z.jsxs)(A,{gap:1,onClick:e=>e.stopPropagation(),position:`absolute`,right:4,top:`50%`,transform:`translateY(-50%)`,children:[u&&(0,Z.jsx)(r,{size:`sm`,variant:`ghost`,colorPalette:`blue`,onClick:e=>{e.stopPropagation(),u()},disabled:!d(`organization:manage`),children:(0,Z.jsx)(m,{size:14})}),c&&(0,Z.jsx)(r,{size:`sm`,variant:`ghost`,colorPalette:`orange`,onClick:e=>{e.stopPropagation(),c()},disabled:!d(`organization:manage`),children:(0,Z.jsx)(P,{size:14})}),s&&(0,Z.jsx)(r,{size:`sm`,variant:`ghost`,colorPalette:`red`,onClick:e=>{e.stopPropagation(),s()},disabled:!d(`organization:manage`),children:(0,Z.jsx)(p,{size:14})})]}),(0,Z.jsx)(w,{children:(0,Z.jsxs)(M,{align:`start`,gap:1,children:[(0,Z.jsxs)(A,{children:[(0,Z.jsx)(a,{size:18}),(0,Z.jsx)(o,{fontWeight:`semibold`,children:e})]}),i&&(0,Z.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`Built-in Role`})]})}),(0,Z.jsx)(E,{paddingTop:0,flex:1,display:`flex`,flexDirection:`column`,children:(0,Z.jsxs)(M,{align:`start`,gap:2,flex:1,width:`full`,justifyContent:`space-between`,children:[(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:t}),i?(0,Z.jsx)(l,{colorPalette:`orange`,size:`sm`,children:n}):(0,Z.jsx)(o,{fontSize:`xs`,color:`orange.fg`,fontWeight:`medium`,children:n})]})})]})}function pe({selectedPermissions:e,onChange:t}){let n=(e,t)=>`${e}:${t}`,r=(0,J.useMemo)(()=>{let e={};return fe.forEach(t=>{e[t]=X(t).map(e=>n(t,e))}),e},[]),i=(e,t)=>{if(e.endsWith(`:manage`))return r[t]||[];let[n,i]=e.split(`:`);if(i===`view`){let n=r[t]||[],i=[`create`,`update`,`delete`];return[e,...n.filter(e=>i.some(t=>e.endsWith(`:${t}`)))]}return[e]},s=(e,t)=>{if(e.endsWith(`:manage`))return r[t]||[];let[i,a]=e.split(`:`);return a===`create`||a===`update`||a===`delete`?[e,n(t,`view`)]:[e]},c=n=>{let[r]=n.split(`:`),a=i(n,r);t(e.filter(e=>!a.includes(e)))},l=n=>{let[r]=n.split(`:`),i=s(n,r);t([...e,...i.filter(t=>!e.includes(t))])},d=t=>{let[r,i]=t.split(`:`),a=n(r,`manage`),o=e.includes(a);e.includes(t)||o&&i!==`manage`?c(t):l(t)};return(0,Z.jsx)(M,{align:`start`,width:`full`,gap:4,children:Object.keys(r).map(t=>{let r=X(t);return(0,Z.jsxs)(a,{width:`full`,children:[(0,Z.jsxs)(v,{children:[(0,Z.jsx)(_,{fontSize:`sm`,fontWeight:`semibold`,textTransform:`capitalize`,marginBottom:2,children:(0,Z.jsx)(o,{children:t})}),(0,Z.jsx)(ee,{children:(0,Z.jsx)(A,{gap:4,flexWrap:`wrap`,paddingLeft:6,children:r.map(r=>{let i=n(t,r),s=e.includes(i),c=n(t,`manage`),l=e.includes(c),p=r!==`manage`&&l;return(0,Z.jsx)(f,{checked:s||p,onChange:()=>{d(p?c:i)},opacity:p?.6:1,cursor:p?`not-allowed`:`pointer`,children:r===`manage`?(0,Z.jsx)(u,{content:`Manage includes all permissions (view, create, update, delete) for this resource`,positioning:{placement:`top`},showArrow:!0,children:(0,Z.jsxs)(A,{gap:1,children:[(0,Z.jsx)(o,{fontSize:`sm`,textTransform:`capitalize`,children:r}),(0,Z.jsx)(a,{color:`fg.muted`,children:(0,Z.jsx)(L,{size:14})})]})}):(0,Z.jsx)(o,{fontSize:`sm`,textTransform:`capitalize`,children:r})},i)})})})]}),(0,Z.jsx)(g,{marginY:3})]},t)})})}function me({open:e,onClose:t,onSubmit:n,initialData:i,title:a,submitLabel:s=`Create Role`,isSubmitting:c=!1}){let{register:l,handleSubmit:u,reset:d,formState:{errors:f},setValue:p,watch:m}=se({defaultValues:{name:i?.name??``,description:i?.description??``,permissions:i?.permissions??[]}}),h=m(`permissions`)||[];(0,J.useEffect)(()=>{i?(p(`name`,i.name),p(`description`,i.description),p(`permissions`,i.permissions)):d({name:``,description:``,permissions:[]})},[i,p,d]);let _=u(async e=>{await n(e),i||d()});return(0,Z.jsx)(K.Root,{open:e,onOpenChange:({open:e})=>!e&&t(),children:(0,Z.jsxs)(K.Content,{bg:`bg`,maxWidth:`900px`,maxHeight:`90vh`,overflowY:`auto`,children:[(0,Z.jsx)(K.Header,{children:(0,Z.jsx)(K.Title,{children:a})}),(0,Z.jsx)(K.Body,{children:(0,Z.jsx)(`form`,{id:`role-form`,onSubmit:e=>void _(e),children:(0,Z.jsxs)(M,{gap:6,align:`start`,children:[(0,Z.jsxs)(D,{invalid:!!f.name,children:[(0,Z.jsxs)(O,{children:[`Role Name`,` `,(0,Z.jsx)(o,{as:`span`,color:`red.500`,children:`*`})]}),(0,Z.jsx)(z,{...l(`name`,{required:`Role name is required`}),placeholder:`e.g., Data Analyst`}),f.name&&(0,Z.jsx)(k,{children:f.name.message})]}),(0,Z.jsxs)(D,{children:[(0,Z.jsx)(O,{children:`Description`}),(0,Z.jsx)(ne,{children:`Describe what this role is for`}),(0,Z.jsx)(j,{...l(`description`),placeholder:`e.g., Can view and analyze data but cannot modify settings`,rows:3})]}),(0,Z.jsx)(g,{}),(0,Z.jsxs)(M,{align:`start`,width:`full`,gap:4,children:[(0,Z.jsx)(W,{size:`sm`,children:`Permissions`}),(0,Z.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Select the permissions this role should have`}),(0,Z.jsx)(pe,{selectedPermissions:h,onChange:e=>p(`permissions`,e)})]})]})})}),(0,Z.jsxs)(K.Footer,{children:[(0,Z.jsx)(r,{variant:`outline`,onClick:t,children:`Cancel`}),(0,Z.jsx)(r,{type:`submit`,form:`role-form`,colorPalette:`orange`,loading:c,children:s})]}),(0,Z.jsx)(K.CloseTrigger,{})]})})}function he(){let{organization:e,hasPermission:t}=H(),{isEnterprise:r,isLoading:i}=ce();return!e||i?(0,Z.jsx)(q,{children:(0,Z.jsx)(M,{align:`center`,justify:`center`,width:`full`,height:`200px`,children:(0,Z.jsx)(n,{})})}):r?(0,Z.jsx)(q,{children:(0,Z.jsx)(_e,{organizationId:e.id,hasPermission:t})}):(0,Z.jsx)(q,{children:(0,Z.jsxs)(M,{gap:6,width:`full`,align:`start`,children:[(0,Z.jsxs)(b,{status:`info`,children:[(0,Z.jsx)(S,{}),(0,Z.jsxs)(C,{children:[(0,Z.jsx)(y,{children:`Enterprise Feature`}),(0,Z.jsx)(x,{children:`Custom roles are available on Enterprise plans. Contact sales to upgrade.`})]})]}),(0,Z.jsx)(a,{width:`full`,children:(0,Z.jsx)(ue,{})})]})})}var ge=le(`organization:manage`,{layoutComponent:q})(he);function _e({organizationId:e,hasPermission:t}){let{open:i,onOpen:l,onClose:f}=s(),{open:p,onOpen:m,onClose:_}=s(),{open:v,onOpen:ee,onClose:y}=s(),{open:b,onOpen:x,onClose:S}=s(),[C,w]=(0,J.useState)(null),[D,ne]=(0,J.useState)(null),[O,k]=(0,J.useState)(null),[j,N]=(0,J.useState)(null),P=F.useContext(),L=F.role.getAll.useQuery({organizationId:e}),R=F.role.create.useMutation({onSuccess:()=>{P.role.getAll.invalidate(),d.create({title:`Role created successfully`,type:`success`}),f()},onError:e=>{I(e)||d.create({title:`Failed to create role`,description:e.message,type:`error`})}}),z=F.role.delete.useMutation({onSuccess:()=>{P.role.getAll.invalidate(),d.create({title:`Role deleted successfully`,type:`success`})},onError:e=>{I(e)||d.create({title:`Failed to delete role`,description:e.message,type:`error`})}}),B=F.role.update.useMutation({onSuccess:()=>{P.role.getAll.invalidate(),d.create({title:`Role updated successfully`,type:`success`}),_(),w(null)},onError:e=>{I(e)||d.create({title:`Failed to update role`,description:e.message,type:`error`})}}),V=async e=>{try{let t=await P.role.getById.fetch({roleId:e});w({id:t.id,name:t.name,description:t.description??``,permissions:t.permissions}),m()}catch{d.create({title:`Failed to load role`,description:`Could not load role details for editing`,type:`error`})}},H=async e=>{try{let t=await P.role.getById.fetch({roleId:e});ne({id:t.id,name:t.name,description:t.description??``,permissions:t.permissions}),ee()}catch{d.create({title:`Failed to load role`,description:`Could not load role details for viewing`,type:`error`})}},U=(e,t)=>{let n=oe(t);k({name:e,description:G(e),permissions:n}),x()},G=e=>{switch(e){case`Admin`:return`Full access to all features and settings`;case`Member`:return`Can create and modify most resources, view costs and debug info`;case`Viewer`:return`Read-only access to analytics, messages, and guardrails`;default:return``}};return(0,Z.jsxs)(M,{align:`start`,width:`full`,gap:6,children:[(0,Z.jsxs)(A,{justify:`space-between`,width:`full`,children:[(0,Z.jsxs)(M,{align:`start`,gap:1,children:[(0,Z.jsx)(W,{as:`h2`,children:`Roles & Permissions`}),(0,Z.jsx)(o,{color:`fg.muted`,fontSize:`sm`,children:`Create custom roles and assign specific permissions to control access`})]}),(0,Z.jsx)(u,{content:`You need organization:manage permissions to create roles.`,disabled:t(`organization:manage`),children:(0,Z.jsxs)(te.HeaderButton,{onClick:l,disabled:!t(`organization:manage`),children:[(0,Z.jsx)(re,{size:16}),` Create Role`]})})]}),(0,Z.jsx)(g,{}),(0,Z.jsxs)(M,{align:`start`,width:`full`,gap:4,children:[(0,Z.jsxs)(a,{children:[(0,Z.jsx)(W,{as:`h3`,children:`Default Roles`}),(0,Z.jsx)(o,{color:`fg.muted`,fontSize:`sm`,children:`These are the built-in roles that cannot be modified or deleted.`})]}),(0,Z.jsxs)(a,{width:`full`,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(300px, 1fr))`,gap:4,children:[(0,Z.jsx)($,{hasPermission:t,name:`Admin`,description:`Full access to all features and settings`,isDefault:!0,permissionCount:`All Permissions`,icon:de,onViewPermissions:()=>U(`Admin`,Y.TeamUserRole.ADMIN)}),(0,Z.jsx)($,{hasPermission:t,name:`Member`,description:`Can create and modify most resources, view costs and debug info`,isDefault:!0,permissionCount:`Most Permissions`,icon:ae,onViewPermissions:()=>U(`Member`,Y.TeamUserRole.MEMBER)}),(0,Z.jsx)($,{hasPermission:t,name:`Viewer`,description:`Read-only access to analytics, messages, and guardrails`,isDefault:!0,permissionCount:`View Only`,icon:c,onViewPermissions:()=>U(`Viewer`,Y.TeamUserRole.VIEWER)})]})]}),(0,Z.jsx)(g,{}),(0,Z.jsxs)(M,{align:`start`,width:`full`,gap:4,children:[(0,Z.jsxs)(a,{children:[(0,Z.jsx)(W,{as:`h3`,children:`Custom Roles`}),(0,Z.jsx)(o,{color:`fg.muted`,fontSize:`sm`,children:`Custom roles created for your organization with specific permission sets.`})]}),L.isLoading&&(0,Z.jsx)(M,{align:`center`,width:`full`,padding:8,children:(0,Z.jsx)(n,{})}),L.data&&L.data.length===0&&(0,Z.jsx)(T,{width:`full`,children:(0,Z.jsx)(E,{textAlign:`center`,padding:8,children:(0,Z.jsxs)(M,{gap:2,children:[(0,Z.jsx)(ie,{size:48,color:`gray`}),(0,Z.jsx)(o,{color:`fg.muted`,children:`No custom roles yet. Create your first custom role to get started.`})]})})}),(0,Z.jsx)(a,{width:`full`,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(300px, 1fr))`,gap:4,children:L.data?.map(e=>(0,Z.jsx)($,{name:e.name,description:e.description??``,permissionCount:`${e.permissions.length} permissions`,hasPermission:t,onDelete:()=>N({id:e.id,name:e.name}),onEdit:()=>{V(e.id)},onViewPermissions:()=>{H(e.id)}},e.id))})]}),(0,Z.jsx)(me,{open:i,onClose:f,onSubmit:async t=>{await R.mutateAsync({organizationId:e,name:t.name,description:t.description,permissions:t.permissions})},title:`Create Custom Role`,submitLabel:`Create Role`,isSubmitting:R.isLoading}),(0,Z.jsx)(me,{open:p,onClose:()=>{_(),w(null)},onSubmit:async e=>{C&&await B.mutateAsync({roleId:C.id,name:e.name,description:e.description,permissions:e.permissions})},initialData:C?{name:C.name,description:C.description,permissions:C.permissions}:void 0,title:`Edit Role`,submitLabel:`Update Role`,isSubmitting:B.isLoading}),(0,Z.jsx)(h,{open:!!j,onOpenChange:e=>{e||N(null)},title:`Delete role`,message:`Are you sure you want to delete the role "${j?.name??``}"?`,confirmLabel:`Delete`,tone:`danger`,loading:z.isLoading,onConfirm:()=>{j&&z.mutate({roleId:j.id},{onSettled:()=>N(null)})}}),(0,Z.jsx)(K.Root,{open:v,onOpenChange:({open:e})=>!e&&y(),children:(0,Z.jsxs)(K.Content,{bg:`bg`,maxWidth:`600px`,maxHeight:`80vh`,overflowY:`auto`,children:[(0,Z.jsx)(K.Header,{children:(0,Z.jsxs)(K.Title,{children:[`View Permissions - `,D?.name]})}),(0,Z.jsx)(K.Body,{children:D&&(0,Z.jsxs)(M,{gap:4,align:`start`,children:[(0,Z.jsxs)(M,{align:`start`,gap:2,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`semibold`,children:`Description:`}),(0,Z.jsx)(o,{color:`fg.muted`,children:D.description||`No description provided`})]}),(0,Z.jsx)(g,{}),(0,Z.jsxs)(M,{align:`start`,gap:3,width:`full`,children:[(0,Z.jsxs)(o,{fontWeight:`semibold`,children:[`Permissions (`,D.permissions.length,`):`]}),(0,Z.jsx)(Q,{permissions:D.permissions})]})]})}),(0,Z.jsx)(K.Footer,{children:(0,Z.jsx)(r,{variant:`outline`,onClick:y,children:`Close`})}),(0,Z.jsx)(K.CloseTrigger,{})]})}),(0,Z.jsx)(K.Root,{open:b,onOpenChange:({open:e})=>!e&&S(),children:(0,Z.jsxs)(K.Content,{bg:`bg`,maxWidth:`600px`,maxHeight:`80vh`,overflowY:`auto`,children:[(0,Z.jsx)(K.Header,{children:(0,Z.jsxs)(K.Title,{children:[`View Permissions - `,O?.name]})}),(0,Z.jsx)(K.Body,{children:O&&(0,Z.jsxs)(M,{gap:4,align:`start`,children:[(0,Z.jsxs)(M,{align:`start`,gap:2,width:`full`,children:[(0,Z.jsx)(o,{fontWeight:`semibold`,children:`Description:`}),(0,Z.jsx)(o,{color:`fg.muted`,children:O.description})]}),(0,Z.jsx)(g,{}),(0,Z.jsxs)(M,{align:`start`,gap:3,width:`full`,children:[(0,Z.jsxs)(o,{fontWeight:`semibold`,children:[`Permissions (`,O.permissions.length,`):`]}),(0,Z.jsx)(Q,{permissions:O.permissions})]})]})}),(0,Z.jsx)(K.Footer,{children:(0,Z.jsx)(r,{variant:`outline`,onClick:S,children:`Close`})}),(0,Z.jsx)(K.CloseTrigger,{})]})})]})}export{ge as default};
|
|
2
|
+
//# sourceMappingURL=roles-CjwqOKoo.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
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"./text-A3qvcMyN.js";import{cn as s}from"./useLiteMemberGuard-ChV0lUs4.js";import{n as c}from"./info-CtYT35g4.js";import{n as l}from"./toaster-CRP22oRW.js";import{D as u,G as d,l as f,nt as p}from"./ExternalImage-As_YKOAz.js";import{t as m}from"./icon-button-Ce2kwA7j.js";import{a as h,n as g,r as _}from"./field-Dz4Xmo3X.js";import{t as v}from"./h-stack-CMPhqSp5.js";import{r as y,t as b}from"./native-select-Bj4m9rSh.js";import{t as x}from"./spacer-CbmCSsJg.js";import{it as S}from"./immer-BdlOHsfO.js";import{t as C}from"./v-stack-ClAMS101.js";import{t as w}from"./GovernanceLayout-DO9JArUM.js";import{t as T}from"./arrow-down-Y7gGW9pp.js";import{t as E}from"./arrow-up-DVKoLGAx.js";import{t as D}from"./ScopeChipPicker-DW0UYA9z.js";import{t as O}from"./star-C7aqwH1q.js";import{n as k}from"./api-BK6L1im2.js";import{Ar as A,Qn as j,Rt as M,Vn as N,ni as P,nr as F,or as I,t as L}from"./index-DtiounXP.js";import{t as R}from"./WithFeatureFlagGuard-D09SSCsN.js";import{t as z}from"./WithPermissionGuard-BBKTBlhW.js";import{t as B}from"./docsUrl-AJ4sHLyi.js";import{t as V}from"./FieldInfoTooltip-s2rM7SM0.js";import{t as H}from"./ProviderScopeChips-DAith1M3.js";var U=e(t()),W=i(),G=[{scope:`organization`,label:`Organization defaults`,subtitle:`Apply to every team / project that doesn't define its own default`},{scope:`team`,label:`Team defaults`,subtitle:`Override the org default for users in a specific team`},{scope:`project`,label:`Project defaults`,subtitle:`Override at the project level for production agents`}],K=[{value:`priority`,label:`Priority (try in order)`},{value:`cost`,label:`Cost-optimised`},{value:`latency`,label:`Latency-optimised`},{value:`round_robin`,label:`Round-robin`}];function q(){let{organization:e,project:t}=M({redirectToOnboarding:!1}),i=e?.id??``,s=k.routingPolicy.list.useQuery({organizationId:i},{enabled:!!i,refetchOnWindowFocus:!1}),c=k.modelProvider.listAllForOrganizationForFrontend.useQuery({organizationId:i},{enabled:!!i,refetchOnWindowFocus:!1}),[u,d]=(0,U.useState)(null),[p,m]=(0,U.useState)(null),[h,g]=(0,U.useState)(null),_=(0,U.useMemo)(()=>e?.teams?.map(e=>({id:e.id,name:e.name}))??[],[e?.teams]),y=(0,U.useMemo)(()=>e?.teams?.flatMap(e=>e.projects.map(t=>({id:t.id,name:`${t.name} · ${e.name}`,teamId:e.id})))??[],[e?.teams]),b=(0,U.useMemo)(()=>{let t=new Map;for(let n of e?.teams??[])t.set(n.id,n.name);return t},[e?.teams]),S=(0,U.useMemo)(()=>{let t=new Map;for(let n of e?.teams??[])for(let e of n.projects)t.set(e.id,e.name);return t},[e?.teams]),T=t=>t.map(t=>({scopeType:t.scopeType,scopeId:t.scopeId,name:t.scopeType===`ORGANIZATION`?e?.name:t.scopeType===`TEAM`?b.get(t.scopeId):S.get(t.scopeId)})),E=k.useUtils(),D=()=>E.routingPolicy.list.invalidate({organizationId:i}),[O,A]=(0,U.useState)(null),N=k.routingPolicy.create.useMutation({onSuccess:()=>{D(),d(null),g(null),A(null),l.create({title:`Routing policy created`,type:`success`})},onError:e=>{A(e.message),l.create({title:`Failed to create policy`,description:e.message,type:`error`})}}),F=k.routingPolicy.update.useMutation({onSuccess:()=>{D(),d(null),g(null),A(null),l.create({title:`Routing policy updated`,type:`success`})},onError:e=>{A(e.message),l.create({title:`Failed to update policy`,description:e.message,type:`error`})}}),R=k.routingPolicy.setDefault.useMutation({onSuccess:()=>{D(),l.create({title:`Default policy updated`,type:`success`})},onError:e=>l.create({title:`Failed to set default`,description:e.message,type:`error`})}),z=k.routingPolicy.delete.useMutation({onSuccess:()=>{D(),m(null),l.create({title:`Routing policy deleted`,type:`success`})},onError:e=>l.create({title:`Failed to delete policy`,description:e.message,type:`error`})}),V=(0,U.useMemo)(()=>{let e={organization:[],team:[],project:[]};for(let t of s.data??[]){let n=t.scopes?.[0];if(!n)continue;let r=String(n.scopeType).toLowerCase();e[r]&&e[r].push(t)}return e},[s.data]),H=(e,t,n=!1)=>{A(null),d(`new`);let r=e.toUpperCase(),a=r===`ORGANIZATION`?i:t;g({scopes:a?[{scopeType:r,scopeId:a}]:[],name:``,description:``,strategy:`priority`,modelProviderIds:[],modelAllowlist:[],isDefault:n,aliases:[],policyRules:Y})},K=e=>{A(null),d(e.id);let t=e.scopes.map(e=>({scopeType:e.scopeType,scopeId:e.scopeId})),n=e.modelAliases??{};g({scopes:t,name:e.name,description:e.description??``,strategy:e.strategy,modelProviderIds:Array.isArray(e.modelProviderIds)?e.modelProviderIds:[],modelAllowlist:Array.isArray(e.modelAllowlist)?e.modelAllowlist:[],isDefault:e.isDefault,aliases:Object.entries(n).map(([e,t])=>({from:e,to:t})),policyRules:$(e.policyRules)})},q=()=>{if(!h)return;let e={};for(let t of h.aliases){let n=t.from.trim(),r=t.to.trim();n&&r&&(e[n]=r)}let t=Q(h.policyRules);u===`new`?N.mutate({organizationId:i,scopes:h.scopes,name:h.name,description:h.description||null,modelProviderIds:h.modelProviderIds,modelAllowlist:h.modelAllowlist.length>0?h.modelAllowlist:null,strategy:h.strategy,isDefault:h.isDefault,modelAliases:e,policyRules:t}):u&&F.mutate({organizationId:i,id:u,name:h.name,description:h.description||null,modelProviderIds:h.modelProviderIds,modelAllowlist:h.modelAllowlist.length>0?h.modelAllowlist:null,strategy:h.strategy,modelAliases:e,policyRules:t})},X=V.organization.length+V.team.length+V.project.length>0,Z=[...V.organization,...V.team,...V.project].some(e=>e.isDefault);return(0,W.jsxs)(w,{pageTitle:`Routing Policies · AI Governance · LangWatch`,children:[(0,W.jsxs)(C,{align:`stretch`,gap:6,width:`full`,maxW:`container.xl`,children:[(0,W.jsxs)(v,{alignItems:`end`,children:[(0,W.jsxs)(C,{align:`start`,gap:0,children:[(0,W.jsx)(P,{as:`h2`,size:`lg`,children:`Routing Policies`}),(0,W.jsx)(o,{color:`fg.muted`,fontSize:`sm`,children:`Define which providers and models personal, team, and project keys route through. The hierarchy is project → team → organization; first match wins.`})]}),(0,W.jsx)(x,{})]}),s.isLoading&&(0,W.jsx)(n,{size:`sm`}),!s.isLoading&&!Z&&(0,W.jsx)(a,{borderWidth:`1px`,borderColor:`orange.300`,borderRadius:`md`,backgroundColor:`orange.50`,padding:4,children:(0,W.jsxs)(v,{alignItems:`start`,gap:3,children:[(0,W.jsx)(a,{color:`orange.600`,paddingTop:`2px`,children:(0,W.jsx)(I,{size:18})}),(0,W.jsxs)(C,{align:`start`,gap:1,children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,children:X?`Mark one of your policies as default`:`Publish a default policy to unblock end-user keys`}),(0,W.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[`When at least one model provider is reachable from a user's personal team, personal keys still mint without a default and the gateway picks providers in `,` `,(0,W.jsx)(o,{as:`span`,fontFamily:`mono`,children:`fallbackPriorityGlobal`}),` `,`order. Orgs with zero accessible providers still hit a 409 at issue time; configure a model provider first. Publish an explicit default to pin a deterministic chain at the organization level, then override per-team or per-project as needed.`]}),(0,W.jsxs)(v,{gap:3,paddingTop:1,children:[(0,W.jsxs)(r,{size:`xs`,colorPalette:`orange`,onClick:()=>H(`organization`,i,!0),children:[(0,W.jsx)(j,{size:12}),` Add organization default`]}),(0,W.jsx)(L,{href:B(`/ai-gateway/governance/routing-policies`),isExternal:!0,color:`orange.700`,fontSize:`xs`,fontWeight:`medium`,children:`Docs →`})]})]})]})}),G.map(({scope:e,label:t,subtitle:n})=>(0,W.jsxs)(a,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`md`,padding:4,children:[(0,W.jsxs)(v,{alignItems:`start`,marginBottom:3,children:[(0,W.jsxs)(C,{align:`start`,gap:0,children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,children:t}),(0,W.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:n})]}),(0,W.jsx)(x,{}),(0,W.jsxs)(r,{size:`sm`,variant:`outline`,onClick:()=>H(e,e===`organization`?i:``),children:[(0,W.jsx)(j,{size:14}),` New`]})]}),(0,W.jsxs)(C,{align:`stretch`,gap:2,children:[V[e].length===0&&(0,W.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`No policies defined at this scope.`}),V[e].map(e=>(0,W.jsx)(J,{policy:e,onEdit:()=>K(e),onSetDefault:()=>R.mutate({organizationId:i,id:e.id}),onDelete:()=>m(e),isPendingSetDefault:R.isPending&&R.variables?.id===e.id,isPendingDelete:z.isPending&&z.variables?.id===e.id,resolveScopeEntriesWithNames:T},e.id))]})]},e))]}),(0,W.jsx)(ne,{open:h!==null,composer:h,setComposer:g,mode:u===`new`?`create`:`edit`,isPending:u===`new`?N.isPending:F.isPending,availableCredentials:c.data?c.data.providers.filter(e=>!!e.id).map(e=>({id:e.id,modelProviderName:e.name??e.provider,slot:`primary`,disabledAt:e.disabledAt?new Date(e.disabledAt).toISOString():null,healthStatus:e.healthStatus??`UNKNOWN`})):[],credentialsLoading:c.isLoading,modelProvidersAdminPath:`/settings/model-providers`,errorMessage:O,onClearError:()=>A(null),onSubmit:q,onCancel:()=>{A(null),d(null),g(null)},organizationId:i,organizationName:e?.name,availableTeams:_,availableProjects:y,resolveScopeEntriesWithNames:T}),(0,W.jsx)(f,{open:!!p,onOpenChange:e=>{e||m(null)},title:p?.isDefault?`Delete default policy "${p?.name}"?`:`Delete routing policy "${p?.name??``}"?`,message:p?.isDefault?`This is the default policy at this scope. NEW personal-key issuance falls back to fallbackPriorityGlobal ordering across scope-eligible providers until another default is published. Existing VKs that already reference this policy keep the persisted routingPolicyId and will fail closed on the next request until you re-bind them to another policy.`:`Virtual keys that explicitly reference this policy will lose the reference and fail closed at the next request. Re-publish or pick another policy on the affected VKs to restore routing.`,confirmLabel:`Delete policy`,tone:`danger`,loading:z.isPending,onConfirm:()=>{p&&z.mutate({organizationId:i,id:p.id})}})]})}function J({policy:e,onEdit:t,onSetDefault:n,onDelete:i,isPendingSetDefault:a,isPendingDelete:s,resolveScopeEntriesWithNames:l}){let u=Array.isArray(e.modelAllowlist)?e.modelAllowlist.length:0,f=Array.isArray(e.modelProviderIds)?e.modelProviderIds.length:0,p=e.scopes.map(e=>({scopeType:e.scopeType,scopeId:e.scopeId}));return(0,W.jsxs)(v,{borderWidth:`1px`,borderColor:e.isDefault?`blue.300`:`border.muted`,borderRadius:`sm`,padding:3,gap:3,children:[(0,W.jsxs)(C,{align:`start`,gap:1,flex:1,minWidth:0,children:[(0,W.jsxs)(v,{gap:2,flexWrap:`wrap`,children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,children:e.name}),e.isDefault&&(0,W.jsx)(c,{colorPalette:`blue`,size:`sm`,variant:`surface`,children:`default`}),(0,W.jsx)(c,{size:`sm`,variant:`surface`,children:e.strategy}),(0,W.jsx)(H,{scopes:l(p),size:`xs`})]}),e.description&&(0,W.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:e.description}),(0,W.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[f,` provider`,f===1?``:`s`,u>0&&` · ${u} model glob${u===1?``:`s`} allow-listed`,u===0&&` · no model restrictions`]})]}),!e.isDefault&&(0,W.jsxs)(r,{size:`sm`,variant:`ghost`,onClick:n,loading:a,title:`Set as default for this scope`,children:[(0,W.jsx)(O,{size:14}),` Set default`]}),(0,W.jsxs)(r,{size:`sm`,variant:`ghost`,onClick:t,children:[(0,W.jsx)(F,{size:14}),` Edit`]}),(0,W.jsx)(r,{size:`sm`,variant:`ghost`,colorPalette:`red`,onClick:i,loading:s,children:(0,W.jsx)(d,{size:14})})]})}var Y={tools:{deny:``,allow:``},mcp:{deny:``,allow:``},urls:{deny:``,allow:``},models:{deny:``,allow:``}},X={tools:{label:`Tools`,placeholderDeny:`e.g. ^shell_.*
|
|
2
|
+
delete_user`,helper:`RE2 regexes matched against OpenAI tools[].function.name + Anthropic tools[].name. Deny wins.`},mcp:{label:`MCP servers`,placeholderDeny:`e.g. unapproved\\.example\\.com`,helper:`Matched against mcp_servers[].name and .url. Deny wins; applies before dispatch.`},urls:{label:`URLs`,placeholderDeny:`e.g. internal\\.corp\\..*`,helper:`Extracted from the raw request body (user messages, tool args, system prompts). First deny match returns 403 url_not_allowed.`},models:{label:`Models (policy)`,placeholderDeny:`e.g. gpt-4o-search.*`,helper:`RE2 regex policy distinct from the model allowlist above. Use this to enforce company policy (e.g. no non-deterministic models).`}};function Z(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e.length>0)}function Q(e){let t={};for(let n of[`tools`,`mcp`,`urls`,`models`]){let r=Z(e[n].deny),i=Z(e[n].allow);t[n]={deny:r,allow:i.length>0?i:null}}return t}function $(e){let t={...Y};if(!e||typeof e!=`object`)return t;let n=e;for(let e of[`tools`,`mcp`,`urls`,`models`]){let r=n[e];if(!r||typeof r!=`object`)continue;let i=r,a=Array.isArray(i.deny)?i.deny.filter(e=>typeof e==`string`):[],o=Array.isArray(i.allow)?i.allow.filter(e=>typeof e==`string`):[];t[e]={deny:a.join(`
|
|
3
|
+
`),allow:o.join(`
|
|
4
|
+
`)}}return t}function ee({values:e,onChange:t,placeholder:n,ordered:i,inputAriaLabel:a}){let[s,c]=(0,U.useState)(``),l=()=>{let n=s.split(`,`).map(e=>e.trim()).filter(t=>t.length>0&&!e.includes(t));if(n.length===0){c(``);return}t([...e,...n]),c(``)},u=n=>t(e.filter((e,t)=>t!==n)),d=(n,r)=>{if(n<0||r<0||n>=e.length||r>=e.length)return;let i=e.slice(),a=i[n];i[n]=i[r],i[r]=a,t(i)},f=e=>d(e,e-1),p=e=>d(e,e+1);return(0,W.jsxs)(C,{align:`stretch`,gap:2,children:[e.length>0&&(0,W.jsx)(C,{align:`stretch`,gap:1,children:e.map((t,n)=>(0,W.jsxs)(v,{borderWidth:`1px`,borderColor:`border.muted`,borderRadius:`sm`,paddingX:2,paddingY:1,gap:2,backgroundColor:`bg.subtle`,children:[i&&(0,W.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,minWidth:`20px`,children:[n+1,`.`]}),(0,W.jsx)(o,{fontSize:`sm`,flex:1,fontFamily:`mono`,children:t}),i&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(r,{size:`xs`,variant:`ghost`,onClick:()=>f(n),disabled:n===0,"aria-label":`Move up`,children:(0,W.jsx)(E,{size:12})}),(0,W.jsx)(r,{size:`xs`,variant:`ghost`,onClick:()=>p(n),disabled:n===e.length-1,"aria-label":`Move down`,children:(0,W.jsx)(T,{size:12})})]}),(0,W.jsx)(r,{size:`xs`,variant:`ghost`,onClick:()=>u(n),"aria-label":`Remove`,children:(0,W.jsx)(N,{size:12})})]},`${t}-${n}`))}),(0,W.jsxs)(v,{gap:2,children:[(0,W.jsx)(A,{"aria-label":a,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{(e.key===`Enter`||e.key===`,`)&&(e.preventDefault(),l())},onBlur:()=>{s.trim().length>0&&l()},placeholder:n,size:`sm`}),(0,W.jsxs)(r,{size:`sm`,variant:`outline`,onClick:l,disabled:s.trim().length===0,children:[(0,W.jsx)(j,{size:12}),` Add`]})]})]})}function te({selectedIds:e,onChange:t,available:i,loading:s,modelProvidersAdminPath:c}){let l=(0,U.useMemo)(()=>{let e=new Map;for(let t of i)e.set(t.id,t);return e},[i]),u=(0,U.useMemo)(()=>i.filter(e=>!e.disabledAt),[i]),d=(0,U.useMemo)(()=>u.filter(t=>!e.includes(t.id)),[u,e]),f=i.length>0&&u.length===0,p=n=>t(e.filter((e,t)=>t!==n)),m=(n,r)=>{if(n<0||r<0||n>=e.length||r>=e.length)return;let i=e.slice(),a=i[n];i[n]=i[r],i[r]=a,t(i)},h=n=>{!n||e.includes(n)||t([...e,n])},g=e=>e.slot&&e.slot!==`primary`?`${e.modelProviderName} (${e.slot})`:e.modelProviderName;return s?(0,W.jsxs)(v,{gap:2,children:[(0,W.jsx)(n,{size:`xs`}),(0,W.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:`Loading model providers…`})]}):i.length===0&&e.length===0?(0,W.jsx)(a,{borderWidth:`1px`,borderColor:`orange.300`,borderRadius:`md`,backgroundColor:`orange.50`,padding:3,children:(0,W.jsxs)(C,{align:`start`,gap:1,children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,children:`No model providers yet`}),(0,W.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`A routing policy points at one or more model providers. Configure at least one before saving this policy.`}),c&&(0,W.jsx)(L,{href:c,color:`orange.700`,fontSize:`xs`,fontWeight:`medium`,children:`Open Model Providers admin →`})]})}):f&&e.length===0?(0,W.jsx)(a,{borderWidth:`1px`,borderColor:`orange.300`,borderRadius:`md`,backgroundColor:`orange.50`,padding:3,children:(0,W.jsxs)(C,{align:`start`,gap:1,children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,children:`All model providers are disabled`}),(0,W.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,children:[i.length===1?`The org has 1 model provider, but it's disabled.`:`The org has ${i.length} model providers, but all are disabled.`,` `,`Re-enable one (or add a fresh one) before this policy can route traffic.`]}),c&&(0,W.jsx)(L,{href:c,color:`orange.700`,fontSize:`xs`,fontWeight:`medium`,children:`Open Model Providers admin →`})]})}):(0,W.jsxs)(C,{align:`stretch`,gap:2,children:[e.length>0&&(0,W.jsx)(C,{align:`stretch`,gap:1,children:e.map((t,n)=>{let i=l.get(t),a=i?g(i):null;return(0,W.jsxs)(v,{borderWidth:`1px`,borderColor:i?`border.muted`:`red.300`,borderRadius:`sm`,paddingX:2,paddingY:1,gap:2,backgroundColor:i?`bg.subtle`:`red.50`,children:[(0,W.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,minWidth:`20px`,children:[n+1,`.`]}),(0,W.jsxs)(C,{align:`start`,gap:0,flex:1,minWidth:0,children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,children:a??`Unknown credential`}),(0,W.jsx)(o,{fontSize:`xs`,color:`fg.muted`,fontFamily:`mono`,children:t}),i?.disabledAt&&(0,W.jsx)(o,{fontSize:`xs`,color:`orange.600`,children:`Disabled - requests will skip this credential`})]}),(0,W.jsx)(r,{size:`xs`,variant:`ghost`,onClick:()=>m(n,n-1),disabled:n===0,"aria-label":`Move up`,children:(0,W.jsx)(E,{size:12})}),(0,W.jsx)(r,{size:`xs`,variant:`ghost`,onClick:()=>m(n,n+1),disabled:n===e.length-1,"aria-label":`Move down`,children:(0,W.jsx)(T,{size:12})}),(0,W.jsx)(r,{size:`xs`,variant:`ghost`,onClick:()=>p(n),"aria-label":`Remove`,children:(0,W.jsx)(N,{size:12})})]},`${t}-${n}`)})}),d.length>0?(0,W.jsx)(y,{size:`sm`,children:(0,W.jsxs)(b,{value:``,"aria-label":`Add model provider`,onChange:e=>{let t=e.target.value;t&&(h(t),e.target.value=``)},children:[(0,W.jsx)(`option`,{value:``,children:`+ Add model provider…`}),d.map(e=>(0,W.jsxs)(`option`,{value:e.id,children:[g(e),e.disabledAt?` - disabled`:``]},e.id))]})}):(0,W.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`All configured model providers are in this policy.`})]})}function ne({open:e,composer:t,setComposer:n,mode:i,isPending:c,availableCredentials:l,credentialsLoading:f,modelProvidersAdminPath:x,errorMessage:w,onClearError:T,onSubmit:E,onCancel:O,organizationId:k,organizationName:M,availableTeams:P,availableProjects:F,resolveScopeEntriesWithNames:I}){let L=!t||!t.name.trim()||t.scopes.length===0||t.modelProviderIds.length===0||c;return(0,W.jsx)(s.Root,{open:e,onOpenChange:({open:e})=>{e||O()},placement:`end`,size:`md`,children:(0,W.jsxs)(s.Content,{children:[(0,W.jsxs)(s.Header,{children:[(0,W.jsx)(s.Title,{children:i===`create`?`New routing policy`:`Edit routing policy`}),(0,W.jsx)(s.CloseTrigger,{})]}),(0,W.jsx)(s.Body,{children:t&&(0,W.jsxs)(C,{align:`stretch`,gap:4,children:[(0,W.jsxs)(h,{required:!0,children:[(0,W.jsx)(_,{children:`Scopes`}),i===`create`?(0,W.jsx)(D,{value:t.scopes,onChange:e=>n({...t,scopes:e}),organizationId:k,organizationName:M,availableTeams:P,availableProjects:F,label:``}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{scopes:I(t.scopes)}),(0,W.jsx)(g,{children:`Scope is fixed after create. Delete and recreate to change which org / team / project this policy applies to.`})]})]}),(0,W.jsxs)(h,{required:!0,children:[(0,W.jsx)(_,{children:`Name`}),(0,W.jsx)(A,{value:t.name,onChange:e=>n({...t,name:e.target.value}),placeholder:`e.g. developer-default`,autoFocus:!0})]}),(0,W.jsxs)(h,{required:!0,children:[(0,W.jsx)(_,{children:`Strategy`}),(0,W.jsx)(y,{size:`sm`,children:(0,W.jsx)(b,{value:t.strategy,onChange:e=>n({...t,strategy:e.target.value}),children:K.map(e=>(0,W.jsx)(`option`,{value:e.value,children:e.label},e.value))})})]}),(0,W.jsxs)(h,{children:[(0,W.jsx)(_,{children:`Description`}),(0,W.jsx)(S,{rows:2,value:t.description,onChange:e=>n({...t,description:e.target.value}),placeholder:`What this policy is for`})]}),(0,W.jsxs)(h,{required:!0,children:[(0,W.jsxs)(_,{children:[`Model Providers (ordered)`,(0,W.jsx)(V,{description:`Ordered list of the org's model providers. The gateway tries #1 first; on 5xx, timeout, rate-limit, or circuit-breaker the next item in the list takes over. Re-order with the ↑/↓ arrows on each row to set fallback priority.`,docHref:`/ai-gateway/governance/routing-policies`})]}),(0,W.jsx)(te,{selectedIds:t.modelProviderIds,onChange:e=>n({...t,modelProviderIds:e}),available:l,loading:f,modelProvidersAdminPath:x}),(0,W.jsx)(g,{children:`First match wins. Use ↑/↓ to set fallback priority.`})]}),(0,W.jsxs)(h,{children:[(0,W.jsx)(_,{children:`Model allowlist (globs)`}),(0,W.jsx)(ee,{values:t.modelAllowlist,onChange:e=>n({...t,modelAllowlist:e}),placeholder:`claude-*`,ordered:!1,inputAriaLabel:`Add model allowlist glob`}),(0,W.jsx)(g,{children:`Empty = no restriction. Globs match against the requested model name.`})]}),(0,W.jsx)(p,{}),(0,W.jsxs)(v,{children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,children:`Model aliases`}),(0,W.jsx)(V,{description:`Rewrite the model name a client requests before it reaches the provider. Useful for mapping 'gpt-4o' -> 'gpt-4o-mini' for cost control, or fanning one logical model across providers.`,docHref:`/ai-gateway/model-aliases`})]}),(0,W.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`Per-policy alias rewrite. Applied to the model field before dispatch.`}),(0,W.jsxs)(C,{align:`stretch`,gap:2,children:[t.aliases.map((e,r)=>(0,W.jsxs)(v,{children:[(0,W.jsx)(A,{placeholder:`from (e.g. gpt-4o)`,size:`sm`,value:e.from,onChange:e=>n({...t,aliases:t.aliases.map((t,n)=>n===r?{...t,from:e.target.value}:t)})}),(0,W.jsx)(o,{children:`->`}),(0,W.jsx)(A,{placeholder:`to (e.g. gpt-4o-mini)`,size:`sm`,value:e.to,onChange:e=>n({...t,aliases:t.aliases.map((t,n)=>n===r?{...t,to:e.target.value}:t)})}),(0,W.jsx)(m,{"aria-label":`Remove alias`,variant:`ghost`,size:`xs`,onClick:()=>n({...t,aliases:t.aliases.filter((e,t)=>t!==r)}),children:(0,W.jsx)(d,{size:12})})]},r)),(0,W.jsxs)(r,{size:`xs`,variant:`outline`,onClick:()=>n({...t,aliases:[...t.aliases,{from:``,to:``}]}),children:[(0,W.jsx)(j,{size:12}),` Add alias`]})]}),(0,W.jsx)(p,{}),(0,W.jsxs)(v,{children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,children:`Policy rules`}),(0,W.jsx)(V,{description:`RE2 regex deny/allow lists across 4 dimensions: tools, MCP servers, URLs, models. Enforced pre-dispatch (zero provider cost). Deny wins.`,docHref:`/ai-gateway/policy-rules`})]}),(0,W.jsx)(o,{fontSize:`xs`,color:`fg.muted`,children:`One pattern per line. Broken regex returns 503 fail-closed (never silent bypass).`}),[`tools`,`mcp`,`urls`,`models`].map(e=>(0,W.jsxs)(a,{children:[(0,W.jsx)(o,{fontSize:`sm`,fontWeight:`medium`,mb:1,children:X[e].label}),(0,W.jsx)(o,{fontSize:`xs`,color:`fg.muted`,mb:2,children:X[e].helper}),(0,W.jsxs)(v,{gap:3,align:`flex-start`,children:[(0,W.jsxs)(h,{flex:1,children:[(0,W.jsx)(_,{fontSize:`xs`,children:`Deny`}),(0,W.jsx)(S,{value:t.policyRules[e].deny,onChange:r=>n({...t,policyRules:{...t.policyRules,[e]:{...t.policyRules[e],deny:r.target.value}}}),placeholder:X[e].placeholderDeny,rows:3,fontFamily:`mono`,fontSize:`xs`})]}),(0,W.jsxs)(h,{flex:1,children:[(0,W.jsx)(_,{fontSize:`xs`,children:`Allow (optional)`}),(0,W.jsx)(S,{value:t.policyRules[e].allow,onChange:r=>n({...t,policyRules:{...t.policyRules,[e]:{...t.policyRules[e],allow:r.target.value}}}),placeholder:`leave blank = no allowlist`,rows:3,fontFamily:`mono`,fontSize:`xs`})]})]})]},e)),(0,W.jsx)(u,{checked:t.isDefault,onChange:e=>n({...t,isDefault:e.target.checked}),children:(0,W.jsx)(o,{fontSize:`sm`,children:`Set as default for this scope`})})]})}),(0,W.jsx)(s.Footer,{children:(0,W.jsxs)(C,{align:`stretch`,gap:3,width:`full`,children:[w&&(0,W.jsx)(a,{borderWidth:`1px`,borderColor:`red.300`,borderRadius:`md`,backgroundColor:`red.50`,padding:3,children:(0,W.jsxs)(v,{alignItems:`start`,gap:2,children:[(0,W.jsx)(a,{color:`red.600`,paddingTop:`2px`,children:(0,W.jsx)(N,{size:14})}),(0,W.jsxs)(C,{align:`start`,gap:0,flex:1,minWidth:0,children:[(0,W.jsx)(o,{fontSize:`xs`,fontWeight:`semibold`,color:`red.700`,children:i===`create`?`Couldn't create the policy`:`Couldn't save the policy`}),(0,W.jsx)(o,{fontSize:`xs`,color:`red.700`,children:w})]}),(0,W.jsx)(r,{size:`xs`,variant:`ghost`,onClick:T,"aria-label":`Dismiss error`,children:(0,W.jsx)(N,{size:12})})]})}),(0,W.jsxs)(v,{gap:2,width:`full`,justifyContent:`flex-end`,children:[(0,W.jsx)(r,{variant:`ghost`,onClick:O,disabled:c,children:`Cancel`}),(0,W.jsx)(r,{onClick:E,loading:c,disabled:L,children:i===`create`?`Create policy`:`Save changes`})]})]})})]})})}var re=R(`release_ui_ai_governance_enabled`,{bypassOnboardingRedirect:!0})(z(`organization:manage`,{})(q));export{re as default};
|
|
5
|
+
//# sourceMappingURL=routing-policies-C7yjQJuY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{en as n,i as r,r as i}from"./portal-FJIui2Z2.js";import{t as a}from"./jsx-runtime-CFwixLRt.js";import{t as o}from"./box-Ck5lef6C.js";import{t as s}from"./text-A3qvcMyN.js";import{An as c,Dt as l,Et as u,On as d,Ot as f,ir as p,kt as m}from"./useLiteMemberGuard-ChV0lUs4.js";import{n as h}from"./toaster-CRP22oRW.js";import{$ as g,D as _,I as v,Q as y,X as b,Y as x,Z as S,et as C}from"./ExternalImage-As_YKOAz.js";import{t as w}from"./icon-CkSWK_vf.js";import{r as T}from"./UpgradeModal-DaVSEBO2.js";import{t as E}from"./icon-button-Ce2kwA7j.js";import{t as D}from"./h-stack-CMPhqSp5.js";import{n as O,r as k}from"./list-B9tuDjf4.js";import{t as ee}from"./spacer-CbmCSsJg.js";import{L as A,it as j,rt as M}from"./immer-BdlOHsfO.js";import{t as N}from"./v-stack-ClAMS101.js";import{t as te}from"./createLucideIcon-WbxVGt4j.js";import{t as P}from"./circle-alert-CIuvyhhX.js";import{t as F}from"./DashboardLayout-cHFbN-Gk.js";import{n as I}from"./close-button-RGOW3hmk.js";import{t as L}from"./archive-By2KlORp.js";import{t as R}from"./arrow-right-00XC9HsO.js";import{t as z}from"./refresh-cw-BNkF8mW1.js";import{t as ne}from"./tag-Dilat65p.js";import{n as B,u as re}from"./api-BK6L1im2.js";import{A as ie,Er as V,Qn as H,Rt as U,V as W,k as G,ni as ae,pr as oe,w as se,yt as K}from"./index-DtiounXP.js";import{t as ce}from"./WithPermissionGuard-BBKTBlhW.js";import{t as le}from"./useLicenseEnforcement-BIiCopDI.js";import{a as ue,i as de,n as fe,o as pe,r as me,t as q}from"./lib-epD9Y2nV.js";import{t as he}from"./useModelProvidersSettings-DwRsXmh4.js";import{a as ge,i as _e,n as J,o as ve,s as ye,t as be}from"./defaultModelState-ByR0bEhZ.js";import{i as Y}from"./asaplangy-BjnuNv4L.js";import{t as xe}from"./LangyContextTarget-C6xwYVGg.js";var X=te(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Z=e(t()),Q=a();function Se({allLabels:e,activeLabels:t,onToggle:n}){let r=t.length>0;return(0,Q.jsxs)(f,{positioning:{placement:`bottom-start`},children:[(0,Q.jsx)(m,{asChild:!0,children:(0,Q.jsxs)(i,{size:`sm`,variant:r?`solid`:`outline`,colorPalette:r?`blue`:`gray`,children:[(0,Q.jsx)(ne,{size:14}),`Labels`,r&&(0,Q.jsxs)(s,{as:`span`,fontSize:`xs`,ml:1,children:[`(`,t.length,`)`]})]})}),(0,Q.jsx)(l,{width:`200px`,children:(0,Q.jsx)(u,{children:e.length===0?(0,Q.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:`No labels available`}):(0,Q.jsx)(N,{align:`stretch`,gap:2,children:e.map(e=>(0,Q.jsxs)(D,{cursor:`pointer`,onClick:()=>n(e),children:[(0,Q.jsx)(_,{checked:t.includes(e)}),(0,Q.jsx)(s,{fontSize:`sm`,children:e})]},e))})})})]})}function Ce({selectedCount:e,onArchive:t}){return e===0?null:(0,Q.jsx)(o,{position:`fixed`,bottom:10,left:`50%`,transform:`translateX(-50%)`,backgroundColor:`#ffffff`,border:`1px solid #ccc`,boxShadow:`0 0 15px rgba(0, 0, 0, 0.2)`,borderRadius:`md`,padding:`8px`,paddingX:`16px`,zIndex:1e3,"data-bottom-floating-bar":``,"data-testid":`batch-action-bar`,children:(0,Q.jsxs)(D,{gap:3,children:[(0,Q.jsxs)(s,{whiteSpace:`nowrap`,fontSize:`sm`,fontWeight:`medium`,children:[e,` selected`]}),(0,Q.jsxs)(i,{size:`sm`,variant:`outline`,colorPalette:`orange`,onClick:t,children:[(0,Q.jsx)(L,{size:14}),`Archive`]})]})})}function we({open:e,onClose:t,onConfirm:n,scenarios:a,isLoading:o=!1}){let c=a.length>1,l=c?`Archive ${a.length} scenarios?`:`Archive scenario?`;return(0,Q.jsx)(K.Root,{open:e,onOpenChange:t,placement:`center`,children:(0,Q.jsxs)(K.Content,{bg:`bg`,maxWidth:`500px`,onClick:e=>e.stopPropagation(),children:[(0,Q.jsx)(K.CloseTrigger,{}),(0,Q.jsx)(K.Header,{children:(0,Q.jsx)(K.Title,{fontSize:`md`,fontWeight:`500`,children:l})}),(0,Q.jsx)(K.Body,{children:(0,Q.jsxs)(N,{align:`stretch`,gap:4,children:[c?(0,Q.jsx)(k,{paddingLeft:4,children:a.map(e=>(0,Q.jsx)(O,{fontSize:`sm`,children:e.name},e.id))}):a[0]&&(0,Q.jsx)(s,{children:(0,Q.jsx)(s,{as:`span`,fontWeight:`semibold`,children:a[0].name})}),(0,Q.jsx)(s,{color:`fg.muted`,fontSize:`sm`,children:`Archived scenarios will no longer appear in the library.`})]})}),(0,Q.jsxs)(K.Footer,{children:[(0,Q.jsx)(i,{variant:`outline`,mr:3,onClick:e=>{e.stopPropagation(),t()},disabled:o,children:`Cancel`}),(0,Q.jsx)(i,{colorPalette:`orange`,onClick:e=>{e.stopPropagation(),n()},disabled:o,children:o?(0,Q.jsx)(r,{size:`sm`}):`Archive`})]})]})})}var Te=`Describe your scenario. What does your agent do? What situation do you want to test?`,Ee=`Generating...`,De=6e4;function Oe({open:e,onClose:t,title:n,placeholder:r=Te,exampleTemplates:i,onGenerate:a,onSkip:c,generatingText:l=Ee,footerHint:u,assistant:d}){let[f,p]=(0,Z.useState)(``),[m,h]=(0,Z.useState)(`idle`),[g,_]=(0,Z.useState)(`assist`),[v,y]=(0,Z.useState)(null),b=(0,Z.useRef)(null);(0,Z.useEffect)(()=>()=>{b.current&&clearTimeout(b.current)},[]),(0,Z.useEffect)(()=>{e&&(p(``),h(`idle`),_(`assist`),y(null))},[e]);let x=(0,Z.useCallback)(e=>{p(e.target.value)},[]),S=(0,Z.useCallback)(e=>{p(e)},[]),C=(0,Z.useCallback)(async()=>{if(!f.trim())return;let e=a(f);if(!e)return;h(`generating`),y(null);let t=new Promise((e,t)=>{b.current=setTimeout(()=>{t(Error(`Generation timed out. Please try again.`))},De)});try{await Promise.race([e,t])}catch(e){console.error(`[AICreateModal] generation error:`,e),h(`error`),y(e)}finally{b.current&&=(clearTimeout(b.current),null)}},[f,a]),w=(0,Z.useCallback)(()=>{C()},[C]),T=(0,Z.useCallback)(()=>{c()},[c]),E=(0,Z.useCallback)(e=>{!e.open&&m!==`generating`&&t()},[m,t]),O=m!==`generating`;return(0,Q.jsx)(K.Root,{open:e,onOpenChange:E,children:(0,Q.jsxs)(K.Content,{className:d?`langy-root`:void 0,bg:d?Y.bg:`bg`,maxWidth:d?`620px`:void 0,overflow:`hidden`,borderWidth:d?`1px`:void 0,borderColor:d?Y.border:void 0,boxShadow:d?`0 28px 90px -32px rgba(2, 6, 23, 0.62)`:void 0,children:[d&&(0,Q.jsx)(ie,{}),O&&(0,Q.jsx)(K.CloseTrigger,{}),(0,Q.jsx)(K.Header,{pb:d?3:void 0,children:d?(0,Q.jsxs)(D,{align:`start`,gap:3,paddingRight:8,children:[(0,Q.jsx)(o,{display:`grid`,placeItems:`center`,width:`42px`,height:`42px`,flexShrink:0,borderRadius:`12px`,borderWidth:`1px`,borderColor:`border.muted`,bg:`bg.surface`,children:(0,Q.jsx)(G,{size:27})}),(0,Q.jsxs)(o,{children:[(0,Q.jsxs)(D,{gap:2,align:`baseline`,flexWrap:`wrap`,children:[(0,Q.jsx)(K.Title,{children:n}),g===`assist`&&(0,Q.jsxs)(s,{fontSize:`xs`,fontWeight:`semibold`,color:`fg.muted`,letterSpacing:`0.04em`,children:[`with `,d.name]})]}),(0,Q.jsx)(s,{color:`fg.muted`,fontSize:`sm`,marginTop:1,children:g===`manual`?`Build the scenario yourself. ${d.name} stays one click away if you want a first draft.`:d.description})]})]}):(0,Q.jsx)(K.Title,{children:n})}),(0,Q.jsxs)(K.Body,{pb:d?4:void 0,children:[m===`idle`&&(d?(0,Q.jsxs)(N,{align:`stretch`,gap:5,children:[(0,Q.jsx)(Fe,{mode:g,onChange:_,assistantName:d.name}),g===`assist`?(0,Q.jsxs)(N,{align:`stretch`,gap:4,children:[(0,Q.jsxs)(o,{children:[(0,Q.jsx)(s,{mb:2,fontSize:`11px`,fontWeight:`bold`,color:`fg.muted`,letterSpacing:`0.1em`,textTransform:`uppercase`,children:d.promptLabel??`Tell ${d.name} what to test`}),(0,Q.jsx)(j,{placeholder:r,value:f,onChange:x,rows:6,resize:`vertical`,fontSize:`md`})]}),(0,Q.jsx)(Ae,{assistantName:d.name,templates:i,onTemplate:S})]}):(0,Q.jsx)(Le,{assistantName:d.name})]}):(0,Q.jsx)(ke,{description:f,placeholder:r,exampleTemplates:i,onDescriptionChange:x,onExampleClick:S})),m===`generating`&&(0,Q.jsx)(Me,{text:l,assistant:d}),m===`error`&&(0,Q.jsx)(Ne,{error:v})]}),(0,Q.jsxs)(K.Footer,{children:[m===`idle`&&(d?g===`assist`?(0,Q.jsx)(je,{onGenerate:C,isGenerateDisabled:!f.trim(),footerHint:u,assistant:d}):(0,Q.jsx)(Re,{onSkip:T}):(0,Q.jsx)(Pe,{onSkip:T,onGenerate:C,isGenerateDisabled:!f.trim(),footerHint:u})),m===`error`&&(0,Q.jsx)(ze,{error:v,onSkip:T,onTryAgain:w,assistant:d})]})]})})}function ke({description:e,placeholder:t,exampleTemplates:n,onDescriptionChange:r,onExampleClick:a}){return(0,Q.jsxs)(N,{align:`stretch`,gap:4,children:[(0,Q.jsx)(j,{placeholder:t,value:e,onChange:r,rows:5,resize:`vertical`}),(0,Q.jsxs)(o,{children:[(0,Q.jsx)(s,{fontSize:`sm`,color:`fg.muted`,mb:2,children:`Try an example:`}),(0,Q.jsx)(D,{gap:2,flexWrap:`wrap`,children:n.map(e=>(0,Q.jsx)(i,{size:`xs`,variant:`outline`,onClick:()=>a(e.text),children:e.label},e.label))})]})]})}function Ae({assistantName:e,templates:t,onTemplate:n}){return t.length===0?null:(0,Q.jsxs)(o,{children:[(0,Q.jsxs)(s,{fontSize:`sm`,color:`fg.muted`,mb:2,children:[`Need inspiration? Pick a pattern and `,e,` takes it from there.`]}),(0,Q.jsx)(D,{gap:2,flexWrap:`wrap`,children:t.map(e=>(0,Q.jsx)(i,{size:`xs`,variant:`subtle`,borderRadius:`full`,onClick:()=>n(e.text),children:e.label},e.label))})]})}function je({onGenerate:e,isGenerateDisabled:t,footerHint:n,assistant:r}){return(0,Q.jsxs)(D,{gap:2,width:`full`,justify:n?`space-between`:`flex-end`,align:`center`,flexWrap:`wrap`,children:[n,(0,Q.jsxs)(i,{colorPalette:`orange`,onClick:e,disabled:t,"aria-label":`Generate with AI using ${r.name}`,children:[(0,Q.jsx)(V,{size:14}),r.generateLabel??`Draft with ${r.name}`]})]})}function Me({text:e,assistant:t}){return t?(0,Q.jsxs)(N,{gap:4,py:8,textAlign:`center`,children:[(0,Q.jsxs)(o,{display:`grid`,placeItems:`center`,width:`52px`,height:`52px`,borderRadius:`16px`,borderWidth:`1px`,borderColor:`border`,bg:`bg.surface`,position:`relative`,children:[(0,Q.jsx)(G,{size:32}),(0,Q.jsx)(r,{position:`absolute`,inset:`-5px`,width:`60px`,height:`60px`,borderWidth:`2px`,color:`orange.400`})]}),(0,Q.jsxs)(N,{gap:1,children:[(0,Q.jsx)(s,{fontWeight:`semibold`,children:e}),(0,Q.jsx)(s,{color:`fg.muted`,fontSize:`sm`,children:t.reviewHint??`Nothing is saved yet — you will review and edit the draft first.`})]})]}):(0,Q.jsxs)(N,{gap:4,py:8,children:[(0,Q.jsx)(r,{size:`lg`,color:`blue.500`}),(0,Q.jsx)(s,{color:`fg.muted`,children:e})]})}function Ne({error:e}){let t=J(e);return(0,Q.jsxs)(N,{gap:4,py:4,children:[(0,Q.jsx)(o,{p:3,borderRadius:`full`,bg:`red.100`,color:`red.600`,children:(0,Q.jsx)(w,{as:P,boxSize:6})}),(0,Q.jsxs)(N,{gap:1,children:[(0,Q.jsx)(s,{fontWeight:`semibold`,children:`Something went wrong`}),(0,Q.jsx)(s,{color:`fg.muted`,fontSize:`sm`,textAlign:`center`,children:t.copy}),t.tier===`unknown`&&t.rawMessage&&(0,Q.jsx)(p,{fontSize:`xs`,mt:2,px:2,py:1,borderRadius:`md`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxW:`100%`,children:t.rawMessage})]})]})}function Pe({onSkip:e,onGenerate:t,isGenerateDisabled:n,footerHint:r}){return(0,Q.jsxs)(D,{gap:2,width:`full`,justify:r?`space-between`:`flex-end`,align:`center`,flexWrap:`wrap`,children:[r,(0,Q.jsxs)(D,{gap:2,children:[(0,Q.jsx)(i,{variant:`ghost`,onClick:e,children:`I'll write it myself`}),(0,Q.jsxs)(i,{colorPalette:`blue`,onClick:t,disabled:n,children:[(0,Q.jsx)(V,{size:14}),`Generate with AI`]})]})]})}function Fe({mode:e,onChange:t,assistantName:n}){return(0,Q.jsxs)(D,{gap:1,padding:`3px`,alignSelf:`center`,borderWidth:`1px`,borderColor:`border`,borderRadius:`full`,bg:`bg.subtle`,children:[(0,Q.jsxs)(Ie,{active:e===`assist`,accent:!0,onClick:()=>t(`assist`),children:[(0,Q.jsx)(V,{size:13}),`With `,n]}),(0,Q.jsxs)(Ie,{active:e===`manual`,onClick:()=>t(`manual`),children:[(0,Q.jsx)(X,{size:13}),`Build it myself`]})]})}function Ie({active:e,accent:t=!1,onClick:r,children:i}){return(0,Q.jsx)(n.button,{type:`button`,onClick:r,display:`inline-flex`,alignItems:`center`,gap:1.5,paddingX:3.5,paddingY:`7px`,borderRadius:`full`,fontSize:`sm`,fontWeight:`medium`,whiteSpace:`nowrap`,cursor:`pointer`,transition:`color 120ms ease, background 120ms ease, box-shadow 120ms ease`,color:e?t?`orange.fg`:`fg`:`fg.muted`,bg:e?`bg.surface`:`transparent`,boxShadow:e?`0 1px 2px rgba(2, 6, 23, 0.12)`:`none`,_hover:e?void 0:{color:`fg`},children:i})}function Le({assistantName:e}){return(0,Q.jsx)(o,{borderWidth:`1px`,borderColor:`border`,borderRadius:`xl`,bg:`bg.surface`,padding:5,children:(0,Q.jsxs)(D,{align:`start`,gap:3,children:[(0,Q.jsx)(o,{display:`grid`,placeItems:`center`,width:`36px`,height:`36px`,flexShrink:0,borderRadius:`10px`,borderWidth:`1px`,borderColor:`border`,bg:`bg.subtle`,color:`fg.muted`,children:(0,Q.jsx)(X,{size:18})}),(0,Q.jsxs)(N,{align:`start`,gap:1,children:[(0,Q.jsx)(s,{fontWeight:`semibold`,children:`Build it yourself`}),(0,Q.jsxs)(s,{color:`fg.muted`,fontSize:`sm`,lineHeight:`tall`,children:[`Open a blank scenario and write the situation and success criteria by hand — no model involved. You can hand it to `,e,` for a draft at any point.`]})]})]})})}function Re({onSkip:e}){return(0,Q.jsx)(D,{width:`full`,justify:`flex-end`,children:(0,Q.jsxs)(i,{colorPalette:`gray`,onClick:e,children:[`Open blank editor`,(0,Q.jsx)(R,{size:14})]})})}function ze({error:e,onSkip:t,onTryAgain:n,assistant:r}){let a=J(e),o=a.cta===`configure`||a.cta===`configure-and-retry`,s=a.cta===`retry`||a.cta===`configure-and-retry`||a.cta===`retry-or-skip`;return(0,Q.jsxs)(D,{gap:2,justify:`flex-end`,children:[(0,Q.jsx)(i,{variant:`ghost`,onClick:t,children:r?`Set up manually`:`I'll write it myself`}),o&&(0,Q.jsx)(i,{colorPalette:`blue`,asChild:!0,children:(0,Q.jsx)(`a`,{"data-testid":`error-configure-model-provider-button`,href:`/settings/model-providers`,target:`_blank`,rel:`noopener noreferrer`,style:{color:`white`},children:`Configure model provider`})}),s&&(0,Q.jsx)(i,{colorPalette:`blue`,onClick:n,children:`Try again`})]})}function Be({open:e,onClose:t,onProceedAnyway:n}){return(0,Q.jsx)(K.Root,{open:e,onOpenChange:e=>!e.open&&t(),children:(0,Q.jsxs)(K.Content,{bg:`bg`,children:[(0,Q.jsx)(K.CloseTrigger,{}),(0,Q.jsx)(K.Header,{children:(0,Q.jsx)(K.Title,{children:`Model provider not ready`})}),(0,Q.jsx)(K.Body,{children:(0,Q.jsxs)(N,{gap:4,py:4,align:`center`,justify:`center`,children:[(0,Q.jsx)(o,{p:3,borderRadius:`full`,bg:`orange.100`,color:`orange.600`,children:(0,Q.jsx)(w,{as:I,boxSize:6})}),(0,Q.jsx)(s,{color:`fg.muted`,fontSize:`sm`,textAlign:`center`,children:`Scenarios need an enabled provider with a default model to run. Configure default model provider to get started, or proceed to create a new scenario anyway.`})]})}),(0,Q.jsx)(K.Footer,{children:(0,Q.jsxs)(D,{gap:2,justify:`flex-end`,children:[(0,Q.jsx)(i,{variant:`ghost`,onClick:n,children:`Proceed anyway`}),(0,Q.jsx)(i,{colorPalette:`blue`,asChild:!0,children:(0,Q.jsx)(`a`,{"data-testid":`model-provider-required-modal-configure-button`,href:`/settings/model-providers`,target:`_blank`,rel:`noopener noreferrer`,style:{color:`white`},children:`Configure model provider`})})]})})]})})}var Ve=`Create new scenario`,He=`Explain your agent, its goals and what behavior you want to test.`,Ue=`Drafting your scenario…`,We=[{label:`Customer Support`,text:`A customer support agent that handles complaints. Test an angry customer who was charged twice and wants a refund.`},{label:`RAG Q&A`,text:`A knowledge bot that answers questions from documentation. Test a question that requires combining info from multiple sources.`},{label:`Tool-calling Agent`,text:`An agent that uses tools to complete tasks. Test a request that requires calling multiple tools in sequence.`}];function Ge({open:e,onClose:t}){let{project:n}=U(),{openDrawer:r}=W(),{checkAndProceed:i}=le(`scenarios`),{hasEnabledProviders:a,providers:o}=he({projectId:n?.id}),s=B.modelProvider.getResolvedDefault.useQuery({projectId:n?.id??``,featureKey:`scenarios.generator`},{enabled:!!n?.id}),c=be({hasEnabledProviders:a,providers:o,defaultModel:s.data?.model}),l=(0,Z.useCallback)(e=>{r(`scenarioEditor`,{initialFormData:e},{resetStack:!0}),t()},[r,t]),u=(0,Z.useCallback)(async e=>{if(!n?.id)throw Error(`No project selected`);try{let t=await ge(e,n.id);_e(e),l(t)}catch(e){if(re(e))return;throw e}},[n?.id,l]),d=(0,Z.useCallback)(()=>{l({name:``,situation:``,criteria:[]})},[l]);return c.ok?(0,Q.jsx)(Oe,{open:e,onClose:t,title:Ve,placeholder:He,exampleTemplates:We,onGenerate:e=>i(()=>u(e)),onSkip:()=>i(d),generatingText:Ue,footerHint:(0,Q.jsx)(ve,{model:s.data?.model}),assistant:{name:`AI`,description:`Describe the behavior you care about. AI will turn it into an editable situation and success criteria.`,promptLabel:`What should this simulation prove?`,generateLabel:`Draft with AI`,reviewHint:`AI is shaping the situation and criteria. You will review everything before it is saved.`}}):(0,Q.jsx)(Be,{open:e,onClose:t,onProceedAnyway:()=>i(d)})}function Ke({onCreateClick:e}){return(0,Q.jsxs)(N,{gap:4,align:`center`,py:12,children:[(0,Q.jsx)(s,{fontSize:`lg`,color:`fg.muted`,children:`No scenarios yet`}),(0,Q.jsx)(s,{fontSize:`sm`,color:`fg.subtle`,children:`Create your first scenario to get started`}),(0,Q.jsxs)(i,{colorPalette:`blue`,onClick:e,children:[(0,Q.jsx)(H,{size:16}),` Create Scenario`]})]})}var $=me(),qe=(e,t,n)=>{let r=e.getValue(t),i=n;return!i||i.length===0?!0:i.some(e=>r.includes(e))};function Je({scenarios:e,columnFilters:t,onColumnFiltersChange:n,onRowClick:r,rowSelection:i,onRowSelectionChange:a,onArchive:o}){let[l,u]=(0,Z.useState)([]),f=fe({data:e,columns:(0,Z.useMemo)(()=>[$.display({id:`select`,header:({table:e})=>(0,Q.jsx)(_,{"aria-label":`Select all`,checked:e.getIsAllPageRowsSelected(),onChange:()=>e.toggleAllPageRowsSelected(),onClick:e=>e.stopPropagation()}),cell:({row:e})=>(0,Q.jsx)(_,{"aria-label":`Select ${e.original.name}`,checked:e.getIsSelected(),onChange:()=>e.toggleSelected(),onClick:e=>e.stopPropagation()}),enableSorting:!1}),$.accessor(`name`,{header:`Name`,cell:e=>(0,Q.jsx)(s,{fontWeight:`medium`,children:e.getValue()})}),$.accessor(`labels`,{header:`Labels`,enableSorting:!1,filterFn:qe,cell:e=>(0,Q.jsx)(ye,{labels:e.getValue()})}),$.accessor(`updatedAt`,{header:`Updated`,cell:e=>(0,Q.jsx)(s,{color:`fg.muted`,children:se(e.getValue().getTime())})}),$.display({id:`actions`,header:``,cell:({row:e})=>(0,Q.jsxs)(v.Root,{children:[(0,Q.jsx)(v.Trigger,{asChild:!0,children:(0,Q.jsx)(E,{"aria-label":`Actions for ${e.original.name}`,variant:`ghost`,size:`sm`,onClick:e=>e.stopPropagation(),children:(0,Q.jsx)(c,{size:16})})}),(0,Q.jsx)(v.Content,{portalled:!1,children:(0,Q.jsxs)(v.Item,{value:`archive`,color:`orange.500`,onClick:t=>{t.stopPropagation(),o(e.original)},children:[(0,Q.jsx)(L,{size:14}),`Archive`]})})]}),enableSorting:!1})],[o]),state:{sorting:l,columnFilters:t,rowSelection:i},enableRowSelection:!0,onRowSelectionChange:e=>{a(typeof e==`function`?e(i):e)},onSortingChange:u,onColumnFiltersChange:e=>{n(typeof e==`function`?e(t):e)},getCoreRowModel:de(),getFilteredRowModel:ue(),getSortedRowModel:pe(),getRowId:e=>e.id});return(0,Q.jsxs)(g,{variant:`line`,width:`full`,size:`md`,children:[(0,Q.jsx)(y,{children:f.getHeaderGroups().map(e=>(0,Q.jsx)(C,{children:e.headers.map(e=>(0,Q.jsx)(S,{cursor:e.column.getCanSort()?`pointer`:`default`,onClick:e.column.getToggleSortingHandler(),userSelect:`none`,width:e.id===`select`?`40px`:e.id===`actions`?`48px`:void 0,children:(0,Q.jsxs)(D,{gap:1,children:[q(e.column.columnDef.header,e.getContext()),e.column.getIsSorted()===`asc`&&(0,Q.jsx)(d,{size:14}),e.column.getIsSorted()===`desc`&&(0,Q.jsx)(M,{size:14})]})},e.id))},e.id))}),(0,Q.jsx)(x,{children:f.getRowModel().rows.map(e=>(0,Q.jsx)(xe,{target:A({scenarioId:e.original.id,name:e.original.name,noun:`scenario`}),children:(0,Q.jsx)(C,{cursor:`pointer`,_hover:{bg:`bg.emphasized`},onClick:()=>r(e.original.id),children:e.getVisibleCells().map(e=>(0,Q.jsx)(b,{children:q(e.column.columnDef.cell,e.getContext())},e.id))})},e.id))})]})}var Ye=[{icon:oe,title:`Automated Testing`,description:`Define test scenarios that run automatically against your AI agent to verify it handles real-world situations correctly.`},{icon:z,title:`Regression Detection`,description:`Catch regressions early by re-running scenarios after every change, ensuring your agent never breaks existing behavior.`}];function Xe({onProceed:e}){return(0,Q.jsxs)(N,{gap:8,align:`center`,children:[(0,Q.jsxs)(N,{gap:3,textAlign:`center`,children:[(0,Q.jsx)(ae,{as:`h2`,size:`xl`,children:`Welcome to Scenarios`}),(0,Q.jsx)(s,{fontSize:`md`,color:`fg.muted`,children:`Scenarios let you test your agent behavior with repeatable, automated checks. Define situations, set expectations, and verify your agent responds correctly every time.`})]}),(0,Q.jsx)(N,{gap:4,w:`full`,children:Ye.map(({icon:e,title:t,description:n})=>(0,Q.jsxs)(D,{gap:4,p:5,w:`full`,borderWidth:`1px`,borderColor:`border`,borderRadius:`lg`,align:`start`,children:[(0,Q.jsx)(o,{p:2,borderRadius:`md`,bg:`blue.50`,color:`blue.600`,_dark:{bg:`blue.900`,color:`blue.200`},flexShrink:0,children:(0,Q.jsx)(e,{size:20})}),(0,Q.jsxs)(N,{gap:1,align:`start`,children:[(0,Q.jsx)(s,{fontWeight:`semibold`,children:t}),(0,Q.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:n})]})]},t))}),(0,Q.jsxs)(i,{colorPalette:`blue`,size:`lg`,onClick:e,children:[`Create Your First Scenario `,(0,Q.jsx)(R,{size:16})]})]})}function Ze({onProceed:e}){return(0,Q.jsx)(N,{py:16,px:8,maxW:`640px`,mx:`auto`,children:(0,Q.jsx)(Xe,{onProceed:e})})}function Qe({open:e,onOpenChange:t,onProceed:n}){return(0,Q.jsx)(K.Root,{open:e,onOpenChange:e=>t(e.open),placement:`center`,size:`lg`,children:(0,Q.jsxs)(K.Content,{bg:`bg`,maxWidth:`640px`,children:[(0,Q.jsx)(K.CloseTrigger,{}),(0,Q.jsx)(K.Body,{py:8,px:8,children:(0,Q.jsx)(Xe,{onProceed:n})})]})})}function $e(e){let[t,n]=(0,Z.useState)([]);return{columnFilters:t,setColumnFilters:n,allLabels:(0,Z.useMemo)(()=>{if(!e)return[];let t=new Set;return e.forEach(e=>e.labels.forEach(e=>t.add(e))),Array.from(t).sort()},[e]),activeLabels:(0,Z.useMemo)(()=>t.find(e=>e.id===`labels`)?.value??[],[t]),handleLabelToggle:(0,Z.useCallback)(e=>{n(t=>{let n=t.find(e=>e.id===`labels`)?.value??[],r=n.includes(e)?n.filter(t=>t!==e):[...n,e],i=t.filter(e=>e.id!==`labels`);return r.length===0?i:[...i,{id:`labels`,value:r}]})},[])}}var et=`langwatch:scenarios:welcomeSeen`;function tt(){try{return localStorage.getItem(et)===`true`}catch{return!1}}function nt(){try{localStorage.setItem(et,`true`)}catch{}}function rt({scenarioCount:e,isLoading:t}){let[n,r]=(0,Z.useState)(tt),[i,a]=(0,Z.useState)(!1),[o,s]=(0,Z.useState)(!1),c=!t&&e===0&&!n,l=(0,Z.useCallback)(()=>{nt(),r(!0)},[]);return{showInlineWelcome:c,showWelcomeModal:i,showCreateModal:o,handleNewScenario:(0,Z.useCallback)(()=>{!n&&!t&&e===0?a(!0):s(!0)},[n,t,e]),handleWelcomeProceed:(0,Z.useCallback)(()=>{l(),a(!1),s(!0)},[l]),handleWelcomeModalOpenChange:(0,Z.useCallback)(e=>{e||(l(),a(!1))},[l]),handleCloseCreateModal:(0,Z.useCallback)(()=>{s(!1)},[])}}function it(){let[e,t]=(0,Z.useState)({}),n=(0,Z.useCallback)(e=>{t(t=>typeof e==`function`?e(t):e)},[]),r=(0,Z.useCallback)(e=>{t(t=>{let n={...t};return n[e]?delete n[e]:n[e]=!0,n})},[]),i=(0,Z.useCallback)(e=>{t(t=>{let n={...t};for(let t of e)n[t]=!0;return n})},[]),a=(0,Z.useCallback)(()=>{t({})},[]),o=(0,Z.useMemo)(()=>Object.keys(e).filter(t=>e[t]),[e]);return{toggle:r,selectAll:i,deselectAll:a,selectedIds:o,selectionCount:o.length,rowSelection:e,onRowSelectionChange:n}}function at(){let{project:e}=U(),{openDrawer:t}=W(),{rowSelection:n,onRowSelectionChange:i,selectedIds:a,selectionCount:o,deselectAll:c}=it(),[l,u]=(0,Z.useState)(null),d=B.useContext(),{data:f,isLoading:p,error:m}=B.scenarios.getAll.useQuery({projectId:e?.id??``},{enabled:!!e}),g=(0,Z.useCallback)(()=>{d.scenarios.getAll.invalidate(),c(),u(null)},[d.scenarios.getAll,c]),_=B.scenarios.archive.useMutation({onSuccess:g,onError:e=>{h.create({title:`Failed to archive scenario`,description:e.message,type:`error`,meta:{closable:!0}})}}),v=B.scenarios.batchArchive.useMutation({onSuccess:e=>{e.failed.length>0&&h.create({title:`Some scenarios couldn't be archived`,description:`${e.failed.length} failed. Please retry.`,type:`error`,meta:{closable:!0}}),d.scenarios.getAll.invalidate(),c(),u(null)},onError:e=>{h.create({title:`Failed to archive scenarios`,description:e.message,type:`error`,meta:{closable:!0}})}}),{columnFilters:y,setColumnFilters:b,allLabels:x,activeLabels:S,handleLabelToggle:C}=$e(f),{showInlineWelcome:w,showWelcomeModal:E,showCreateModal:O,handleNewScenario:k,handleWelcomeProceed:A,handleWelcomeModalOpenChange:j,handleCloseCreateModal:M}=rt({scenarioCount:f?.length??0,isLoading:p}),te=e=>{t(`scenarioEditor`,{urlParams:{scenarioId:e}})},P=(0,Z.useCallback)(e=>{u({type:`single`,scenario:e})},[]),I=(0,Z.useCallback)(()=>{u({type:`batch`})},[]),L=()=>{e?.id&&(l?.type===`single`?_.mutate({projectId:e.id,id:l.scenario.id}):l?.type===`batch`&&v.mutate({projectId:e.id,ids:a}))},R=()=>{u(null)},z=(0,Z.useMemo)(()=>!l||!f?[]:l.type===`single`?[{id:l.scenario.id,name:l.scenario.name}]:f.filter(e=>a.includes(e.id)).map(e=>({id:e.id,name:e.name})),[l,f,a]);return(0,Q.jsxs)(F,{children:[(0,Q.jsx)(T.Header,{children:(0,Q.jsxs)(D,{justify:`space-between`,align:`center`,w:`full`,children:[(0,Q.jsx)(T.Heading,{children:`Scenario Library`}),(0,Q.jsx)(ee,{}),(0,Q.jsx)(Se,{allLabels:x,activeLabels:S,onToggle:C}),(0,Q.jsxs)(T.HeaderButton,{onClick:k,children:[(0,Q.jsx)(H,{size:16}),` New Scenario`]})]})}),(0,Q.jsxs)(T.Container,{padding:0,children:[p&&(0,Q.jsx)(N,{gap:4,align:`center`,py:8,children:(0,Q.jsx)(r,{borderWidth:`3px`,animationDuration:`0.8s`})}),m&&!f?.length&&(0,Q.jsxs)(N,{gap:4,align:`center`,py:8,children:[(0,Q.jsx)(s,{color:`red.500`,children:`Error loading scenarios`}),(0,Q.jsx)(s,{fontSize:`sm`,color:`fg.muted`,children:m.message})]}),!p&&!m&&f?.length===0&&w&&(0,Q.jsx)(Ze,{onProceed:A}),!p&&!m&&f?.length===0&&!w&&(0,Q.jsx)(Ke,{onCreateClick:k}),f&&f.length>0&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ce,{selectedCount:o,onArchive:I}),(0,Q.jsx)(Je,{scenarios:f,columnFilters:y,onColumnFiltersChange:b,onRowClick:te,rowSelection:n,onRowSelectionChange:i,onArchive:P})]})]}),(0,Q.jsx)(Qe,{open:E,onOpenChange:j,onProceed:A}),(0,Q.jsx)(Ge,{open:O,onClose:M}),(0,Q.jsx)(we,{open:l!==null,onClose:R,onConfirm:L,scenarios:z,isLoading:_.isPending||v.isPending})]})}var ot=ce(`scenarios:view`,{layoutComponent:F})(at);export{ot as default};
|
|
2
|
+
//# sourceMappingURL=scenarios-CdrzuCtM.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e}from"./portal-FJIui2Z2.js";import{t}from"./jsx-runtime-CFwixLRt.js";import{t as n}from"./text-A3qvcMyN.js";import{n as r}from"./info-CtYT35g4.js";import{$ as i,Q as a,X as o,Y as s,Z as c,et as l}from"./ExternalImage-As_YKOAz.js";import{r as u}from"./UpgradeModal-DaVSEBO2.js";import{a as d,i as f,n as p,r as m,t as h}from"./empty-state-Al7XUd1I.js";import{t as g}from"./h-stack-CMPhqSp5.js";import{B as _,t as v}from"./DashboardLayout-cHFbN-Gk.js";import{n as y}from"./api-BK6L1im2.js";import{Mr as b}from"./index-DtiounXP.js";import{t as x}from"./OpsPageShell-BOi49ML9.js";var S=t();function C(e){if(!e)return`—`;let t=new Date(e).getTime()-Date.now(),n=Math.round(Math.abs(t)/6e4),r=n<1?`just now`:n<60?`${n}m`:n<1440?`${Math.round(n/60)}h`:`${Math.round(n/1440)}d`,i=t>=0?`in ${r}`:`${r} ago`;return`${new Date(e).toLocaleString()} (${n<1?r:i})`}function w(){let t=y.ops.listScheduledJobs.useQuery({limit:200},{refetchInterval:1e4});return(0,S.jsx)(x,{children:(0,S.jsxs)(v,{children:[(0,S.jsx)(u.Header,{children:(0,S.jsx)(u.Heading,{children:`Scheduler`})}),(0,S.jsxs)(u.Container,{children:[(0,S.jsxs)(n,{textStyle:`sm`,color:`fg.muted`,marginBottom:4,children:[`Durable `,(0,S.jsx)(`code`,{children:`ScheduledJob`}),` entries driving the in-process calendar scheduler (reports and other schedule-triggered work). When each next fires, when it last fired, and whether it is active.`]}),t.isLoading?(0,S.jsx)(b,{paddingY:20,children:(0,S.jsx)(f,{children:(0,S.jsxs)(h,{children:[(0,S.jsx)(m,{children:(0,S.jsx)(e,{size:`lg`})}),(0,S.jsx)(d,{children:`Loading scheduled jobs`})]})})}):(t.data?.length??0)===0?(0,S.jsx)(b,{paddingY:20,children:(0,S.jsx)(f,{children:(0,S.jsxs)(h,{children:[(0,S.jsx)(m,{children:(0,S.jsx)(_,{})}),(0,S.jsx)(d,{children:`No scheduled jobs`}),(0,S.jsx)(p,{children:`Nothing is on the calendar scheduler yet.`})]})})}):(0,S.jsxs)(i,{variant:`line`,size:`sm`,children:[(0,S.jsx)(a,{children:(0,S.jsxs)(l,{children:[(0,S.jsx)(c,{children:`Target`}),(0,S.jsx)(c,{children:`Project`}),(0,S.jsx)(c,{children:`Schedule`}),(0,S.jsx)(c,{children:`Next run`}),(0,S.jsx)(c,{children:`Last fired`}),(0,S.jsx)(c,{children:`In progress`}),(0,S.jsx)(c,{children:`Retries`}),(0,S.jsx)(c,{children:`Last error`}),(0,S.jsx)(c,{children:`Status`})]})}),(0,S.jsx)(s,{children:t.data?.map(e=>(0,S.jsxs)(l,{children:[(0,S.jsx)(o,{children:(0,S.jsxs)(g,{gap:2,children:[(0,S.jsx)(r,{colorPalette:`purple`,variant:`subtle`,children:e.targetType}),(0,S.jsx)(n,{textStyle:`xs`,color:`fg.muted`,fontFamily:`mono`,children:e.targetId})]})}),(0,S.jsx)(o,{children:(0,S.jsx)(n,{textStyle:`xs`,fontFamily:`mono`,children:e.projectId})}),(0,S.jsxs)(o,{children:[(0,S.jsx)(n,{textStyle:`xs`,fontFamily:`mono`,children:e.cron}),(0,S.jsx)(n,{textStyle:`xs`,color:`fg.muted`,children:e.timezone})]}),(0,S.jsx)(o,{children:C(e.nextRunAt)}),(0,S.jsx)(o,{children:C(e.lastSlot)}),(0,S.jsx)(o,{children:e.currentSlot?e.attempts>0?(0,S.jsx)(r,{colorPalette:`orange`,variant:`subtle`,children:`Retrying`}):(0,S.jsx)(r,{colorPalette:`blue`,variant:`subtle`,children:`Running`}):(0,S.jsx)(n,{textStyle:`xs`,color:`fg.muted`,children:`—`})}),(0,S.jsx)(o,{children:e.attempts>0?(0,S.jsx)(r,{colorPalette:e.attempts>=3?`red`:`orange`,variant:`subtle`,children:e.attempts}):(0,S.jsx)(n,{textStyle:`xs`,color:`fg.muted`,children:`—`})}),(0,S.jsx)(o,{maxWidth:`280px`,children:(0,S.jsx)(n,{textStyle:`xs`,color:`fg.muted`,truncate:!0,children:e.lastError??`—`})}),(0,S.jsx)(o,{children:e.active?(0,S.jsx)(r,{colorPalette:`green`,variant:`subtle`,children:`Active`}):(0,S.jsx)(r,{colorPalette:`gray`,variant:`subtle`,children:`Inactive`})})]},e.id))})]})]})]})})}export{w as default};
|
|
2
|
+
//# sourceMappingURL=scheduler-CfXVwiOa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./automations-Bds5nLI_.js";export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
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"./text-A3qvcMyN.js";import{lr as a}from"./useLiteMemberGuard-ChV0lUs4.js";import{n as o}from"./info-CtYT35g4.js";import{n as s}from"./toaster-CRP22oRW.js";import{$ as c,G as l,Q as u,X as d,Y as f,Z as p,et as m}from"./ExternalImage-As_YKOAz.js";import{r as h,t as g}from"./card-54_vstoB.js";import{t as _}from"./h-stack-CMPhqSp5.js";import{t as v}from"./spacer-CbmCSsJg.js";import{t as y}from"./v-stack-ClAMS101.js";import{n as b}from"./api-BK6L1im2.js";import{Ar as x,Qn as S,Rt as C,cr as w,ni as T,yt as E}from"./index-DtiounXP.js";import{t as D}from"./WithPermissionGuard-BBKTBlhW.js";import{t as O}from"./SettingsLayout-TFI-annu.js";import{t as k}from"./CopyInput-D4OHtSik.js";var A=e(t()),j=r();function M(){let{organization:e}=C();return e?(0,j.jsx)(P,{organizationId:e.id}):(0,j.jsx)(O,{})}var N=D(`organization:manage`,{layoutComponent:O})(M);function P({organizationId:e}){let t=b.scimToken.list.useQuery({organizationId:e}),r=b.scimToken.generate.useMutation(),C=b.scimToken.revoke.useMutation(),D=b.useContext(),{open:M,onOpen:N,onClose:P}=a(),[F,I]=(0,A.useState)(``),[L,R]=(0,A.useState)(null),[z,B]=(0,A.useState)(null),V=()=>{r.mutate({organizationId:e,description:F||void 0},{onSuccess:e=>{R(e.token),I(``),D.scimToken.list.invalidate()},onError:()=>{s.create({title:`Failed to generate token`,type:`error`,duration:5e3,meta:{closable:!0}})}})},H=t=>{C.mutate({organizationId:e,tokenId:t},{onSuccess:()=>{B(null),s.create({title:`Token revoked`,type:`success`,duration:3e3,meta:{closable:!0}}),D.scimToken.list.invalidate()},onError:()=>{s.create({title:`Failed to revoke token`,type:`error`,duration:5e3,meta:{closable:!0}})}})},U=typeof window<`u`?`${window.location.origin}/api/scim/v2`:``;return(0,j.jsxs)(O,{children:[(0,j.jsxs)(y,{gap:6,width:`full`,align:`start`,children:[(0,j.jsxs)(_,{width:`full`,children:[(0,j.jsx)(T,{children:`SCIM Provisioning`}),(0,j.jsx)(v,{})]}),(0,j.jsx)(h,{width:`full`,children:(0,j.jsx)(g,{children:(0,j.jsxs)(y,{gap:4,align:`start`,children:[(0,j.jsx)(i,{children:`SCIM (System for Cross-domain Identity Management) allows your identity provider (Okta, Azure AD, etc.) to automatically provision and deprovision users in LangWatch.`}),(0,j.jsxs)(y,{gap:2,align:`start`,width:`full`,children:[(0,j.jsx)(i,{fontWeight:`600`,children:`SCIM Base URL`}),(0,j.jsx)(k,{value:U,label:`SCIM Base URL`})]}),(0,j.jsx)(i,{fontSize:`sm`,color:`gray.500`,children:`Use this URL and a bearer token below to configure SCIM in your identity provider.`})]})})}),(0,j.jsxs)(_,{width:`full`,children:[(0,j.jsx)(T,{size:`md`,children:`Bearer Tokens`}),(0,j.jsx)(v,{}),(0,j.jsxs)(n,{size:`sm`,onClick:N,children:[(0,j.jsx)(S,{size:16}),`Generate Token`]})]}),(0,j.jsx)(h,{width:`full`,overflow:`hidden`,children:(0,j.jsx)(g,{paddingY:0,paddingX:0,overflowX:`auto`,children:(0,j.jsxs)(c,{variant:`line`,size:`md`,width:`full`,children:[(0,j.jsx)(u,{children:(0,j.jsxs)(m,{children:[(0,j.jsx)(p,{children:`Description`}),(0,j.jsx)(p,{children:`Created`}),(0,j.jsx)(p,{children:`Last Used`}),(0,j.jsx)(p,{width:`80px`})]})}),(0,j.jsxs)(f,{children:[t.data?.length===0&&(0,j.jsx)(m,{children:(0,j.jsx)(d,{colSpan:4,children:(0,j.jsx)(i,{color:`gray.500`,textAlign:`center`,paddingY:4,children:`No SCIM tokens yet. Generate one to get started.`})})}),t.data?.map(e=>(0,j.jsxs)(m,{children:[(0,j.jsx)(d,{children:(0,j.jsxs)(_,{children:[(0,j.jsx)(w,{size:14}),(0,j.jsx)(i,{children:e.description??`No description`})]})}),(0,j.jsx)(d,{children:new Date(e.createdAt).toLocaleDateString()}),(0,j.jsx)(d,{children:e.lastUsedAt?new Date(e.lastUsedAt).toLocaleDateString():(0,j.jsx)(o,{size:`sm`,colorPalette:`gray`,children:`Never`})}),(0,j.jsx)(d,{children:(0,j.jsx)(n,{size:`xs`,variant:`ghost`,colorPalette:`red`,onClick:()=>B(e.id),children:(0,j.jsx)(l,{size:14})})})]},e.id))]})]})})})]}),(0,j.jsx)(E.Root,{open:M&&!L,onOpenChange:({open:e})=>{e||(P(),I(``))},children:(0,j.jsxs)(E.Content,{bg:`bg`,children:[(0,j.jsx)(E.Header,{children:(0,j.jsx)(E.Title,{children:(0,j.jsx)(T,{size:`md`,children:`Generate SCIM Token`})})}),(0,j.jsx)(E.CloseTrigger,{}),(0,j.jsx)(E.Body,{paddingBottom:6,children:(0,j.jsxs)(y,{gap:4,align:`start`,children:[(0,j.jsx)(i,{children:`This token will be used by your identity provider to authenticate SCIM requests.`}),(0,j.jsxs)(y,{gap:1,align:`start`,width:`full`,children:[(0,j.jsx)(i,{fontWeight:`600`,fontSize:`sm`,children:`Description (optional)`}),(0,j.jsx)(x,{placeholder:`e.g., Okta SCIM integration`,value:F,onChange:e=>I(e.target.value)})]}),(0,j.jsx)(n,{width:`full`,onClick:V,disabled:r.isLoading,children:`Generate Token`})]})})]})}),(0,j.jsx)(E.Root,{open:!!L,onOpenChange:({open:e})=>{e||(R(null),P())},children:(0,j.jsxs)(E.Content,{bg:`bg`,children:[(0,j.jsx)(E.Header,{children:(0,j.jsx)(E.Title,{children:(0,j.jsx)(T,{size:`md`,children:`Token Generated`})})}),(0,j.jsx)(E.CloseTrigger,{}),(0,j.jsx)(E.Body,{paddingBottom:6,children:(0,j.jsxs)(y,{gap:4,align:`start`,children:[(0,j.jsx)(i,{color:`orange.500`,fontWeight:`600`,children:`Copy this token now. You won't be able to see it again.`}),L&&(0,j.jsx)(k,{value:L,label:`SCIM Token`})]})})]})}),(0,j.jsx)(E.Root,{open:!!z,onOpenChange:({open:e})=>{e||B(null)},children:(0,j.jsxs)(E.Content,{bg:`bg`,children:[(0,j.jsx)(E.Header,{children:(0,j.jsx)(E.Title,{children:(0,j.jsx)(T,{size:`md`,children:`Revoke Token`})})}),(0,j.jsx)(E.CloseTrigger,{}),(0,j.jsx)(E.Body,{paddingBottom:6,children:(0,j.jsxs)(y,{gap:4,align:`start`,children:[(0,j.jsx)(i,{children:`Are you sure you want to revoke this token? Any identity provider using it will no longer be able to provision users.`}),(0,j.jsxs)(_,{width:`full`,justify:`end`,gap:2,children:[(0,j.jsx)(n,{variant:`outline`,onClick:()=>B(null),children:`Cancel`}),(0,j.jsx)(n,{colorPalette:`red`,onClick:()=>z&&H(z),disabled:C.isLoading,children:`Revoke`})]})]})})]})})]})}export{N as default};
|
|
2
|
+
//# sourceMappingURL=scim-CGJ8MwNu.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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"./text-A3qvcMyN.js";import{An as s}from"./useLiteMemberGuard-ChV0lUs4.js";import{t as c}from"./tooltip-CYWvZEOf.js";import{n as l}from"./toaster-CRP22oRW.js";import{$ as ee,G as u,I as d,Q as f,X as p,Y as te,Z as m,et as h}from"./ExternalImage-As_YKOAz.js";import{r as ne}from"./UpgradeModal-DaVSEBO2.js";import{r as g,t as _}from"./card-54_vstoB.js";import{a as v,i as y,n as b,r as x,t as S}from"./empty-state-Al7XUd1I.js";import{t as C}from"./h-stack-CMPhqSp5.js";import{t as w}from"./spacer-CbmCSsJg.js";import{t as T}from"./v-stack-ClAMS101.js";import{n as E}from"./DashboardLayout-cHFbN-Gk.js";import{t as D}from"./square-pen-DMQXN2m2.js";import{n as O}from"./api-BK6L1im2.js";import{Ar as k,Qn as A,Rt as re,cr as ie,ni as ae,yt as j}from"./index-DtiounXP.js";import{t as M}from"./SettingsLayout-TFI-annu.js";var N=e(t()),P=i();function F(){let{project:e,organizations:t,hasPermission:i}=re(),F=i(`secrets:manage`),I=O.secrets.list.useQuery({projectId:e?.id??``},{enabled:!!e?.id}),L=I.data??[],R=O.secrets.create.useMutation(),z=O.secrets.update.useMutation(),B=O.secrets.delete.useMutation(),V=O.useContext(),[H,U]=(0,N.useState)(!1),[W,G]=(0,N.useState)(``),[K,q]=(0,N.useState)(``),[J,Y]=(0,N.useState)(null),[X,Z]=(0,N.useState)(null),[Q,$]=(0,N.useState)(``),oe=async()=>{if(!(!e?.id||!W||!K))try{await R.mutateAsync({projectId:e.id,name:W,value:K}),U(!1),G(``),q(``),await V.secrets.list.invalidate()}catch(e){l.create({title:e instanceof Error?e.message:`Failed to create secret`,type:`error`})}},se=async()=>{if(!(!e?.id||!J))try{await B.mutateAsync({projectId:e.id,secretId:J.id}),Y(null),await V.secrets.list.invalidate()}catch(e){l.create({title:e instanceof Error?e.message:`Failed to delete secret`,type:`error`})}},ce=async()=>{if(!(!e?.id||!X||!Q))try{await z.mutateAsync({projectId:e.id,secretId:X.id,value:Q}),Z(null),$(``),await V.secrets.list.invalidate()}catch(e){l.create({title:e instanceof Error?e.message:`Failed to update secret`,type:`error`})}};return(0,P.jsx)(M,{children:(0,P.jsxs)(T,{gap:6,width:`full`,align:`start`,children:[(0,P.jsxs)(C,{width:`full`,marginTop:2,children:[(0,P.jsx)(ae,{as:`h2`,children:`Secrets`}),(0,P.jsx)(w,{}),t&&e&&(0,P.jsx)(E,{organizations:t,project:e}),F&&(0,P.jsx)(c,{content:`Add a new secret for use in code blocks`,disabled:!1,children:(0,P.jsxs)(ne.HeaderButton,{onClick:()=>U(!0),children:[(0,P.jsx)(A,{}),` Add Secret`]})})]}),I.isLoading?(0,P.jsx)(n,{}):L.length===0?(0,P.jsx)(y,{width:`full`,children:(0,P.jsxs)(S,{children:[(0,P.jsx)(x,{children:(0,P.jsx)(ie,{size:24})}),(0,P.jsxs)(T,{textAlign:`center`,children:[(0,P.jsx)(v,{children:`No secrets configured`}),(0,P.jsx)(b,{children:`Add secrets to use in code blocks`})]})]})}):(0,P.jsx)(g,{width:`full`,overflow:`hidden`,children:(0,P.jsx)(_,{paddingY:0,paddingX:0,overflowX:`auto`,children:(0,P.jsxs)(ee,{width:`full`,children:[(0,P.jsx)(f,{children:(0,P.jsxs)(h,{children:[(0,P.jsx)(m,{children:`Name`}),(0,P.jsx)(m,{children:`Created By`}),(0,P.jsx)(m,{children:`Last Updated`}),(0,P.jsx)(m,{})]})}),(0,P.jsx)(te,{children:L.map(e=>(0,P.jsxs)(h,{children:[(0,P.jsx)(p,{children:(0,P.jsx)(o,{fontFamily:`mono`,children:e.name})}),(0,P.jsx)(p,{children:(0,P.jsx)(o,{children:e.createdBy?.name??`-`})}),(0,P.jsx)(p,{children:(0,P.jsx)(o,{children:new Date(e.updatedAt).toLocaleDateString()})}),(0,P.jsx)(p,{textAlign:`right`,children:F&&(0,P.jsxs)(d.Root,{children:[(0,P.jsx)(d.Trigger,{asChild:!0,children:(0,P.jsx)(r,{variant:`ghost`,size:`sm`,children:(0,P.jsx)(s,{})})}),(0,P.jsxs)(d.Content,{children:[(0,P.jsx)(d.Item,{value:`update`,onClick:()=>{Z({id:e.id,name:e.name}),$(``)},children:(0,P.jsxs)(a,{display:`flex`,alignItems:`center`,gap:2,children:[(0,P.jsx)(D,{size:14}),`Update Value`]})}),(0,P.jsx)(d.Item,{value:`delete`,color:`red`,onClick:()=>{Y({id:e.id,name:e.name})},children:(0,P.jsxs)(a,{display:`flex`,alignItems:`center`,gap:2,children:[(0,P.jsx)(u,{size:14}),`Delete Secret`]})})]})]})})]},e.id))})]})})}),(0,P.jsx)(j.Root,{open:H,onOpenChange:e=>{e.open||(U(!1),G(``),q(``))},children:(0,P.jsxs)(j.Content,{bg:`bg`,children:[(0,P.jsx)(j.Header,{children:(0,P.jsx)(j.Title,{children:`Add Secret`})}),(0,P.jsx)(j.Body,{children:(0,P.jsxs)(T,{gap:4,align:`start`,children:[(0,P.jsxs)(T,{gap:1,align:`start`,width:`full`,children:[(0,P.jsx)(o,{fontWeight:`medium`,children:`Name`}),(0,P.jsx)(k,{placeholder:`e.g., OPENAI_API_KEY`,value:W,onChange:e=>G(e.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,``))})]}),(0,P.jsxs)(T,{gap:1,align:`start`,width:`full`,children:[(0,P.jsx)(o,{fontWeight:`medium`,children:`Value`}),(0,P.jsx)(k,{type:`password`,placeholder:`Enter secret value`,value:K,onChange:e=>q(e.target.value)})]})]})}),(0,P.jsxs)(j.Footer,{children:[(0,P.jsx)(j.ActionTrigger,{asChild:!0,children:(0,P.jsx)(r,{variant:`outline`,children:`Cancel`})}),(0,P.jsx)(r,{colorPalette:`blue`,loading:R.isPending,disabled:!W||!K,onClick:()=>void oe(),children:`Save`})]}),(0,P.jsx)(j.CloseTrigger,{})]})}),(0,P.jsx)(j.Root,{open:!!J,onOpenChange:e=>{e.open||Y(null)},children:(0,P.jsxs)(j.Content,{bg:`bg`,children:[(0,P.jsx)(j.Header,{children:(0,P.jsxs)(j.Title,{children:[`Delete `,J?.name??``,`?`]})}),(0,P.jsx)(j.Body,{children:(0,P.jsx)(o,{children:`Code blocks referencing this secret will no longer have access.`})}),(0,P.jsxs)(j.Footer,{children:[(0,P.jsx)(j.ActionTrigger,{asChild:!0,children:(0,P.jsx)(r,{variant:`outline`,children:`Cancel`})}),(0,P.jsx)(r,{colorPalette:`red`,loading:B.isPending,onClick:()=>void se(),children:`Delete`})]}),(0,P.jsx)(j.CloseTrigger,{})]})}),(0,P.jsx)(j.Root,{open:!!X,onOpenChange:e=>{e.open||(Z(null),$(``))},children:(0,P.jsxs)(j.Content,{bg:`bg`,children:[(0,P.jsx)(j.Header,{children:(0,P.jsxs)(j.Title,{children:[`Update Value for `,X?.name??``]})}),(0,P.jsx)(j.Body,{children:(0,P.jsxs)(T,{gap:1,align:`start`,width:`full`,children:[(0,P.jsx)(o,{fontWeight:`medium`,children:`New Value`}),(0,P.jsx)(k,{type:`password`,placeholder:`Enter new secret value`,value:Q,onChange:e=>$(e.target.value)})]})}),(0,P.jsxs)(j.Footer,{children:[(0,P.jsx)(j.ActionTrigger,{asChild:!0,children:(0,P.jsx)(r,{variant:`outline`,children:`Cancel`})}),(0,P.jsx)(r,{colorPalette:`blue`,loading:z.isPending,disabled:!Q,onClick:()=>void ce(),children:`Save`})]}),(0,P.jsx)(j.CloseTrigger,{})]})})]})})}export{F as default};
|
|
2
|
+
//# sourceMappingURL=secrets-DZef0jTb.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{b as n,d as r,f as i,g as a,h as o,l as s,o as c,p as l,u}from"./portal-FJIui2Z2.js";import{t as d}from"./jsx-runtime-CFwixLRt.js";import{n as f}from"./icon-CkSWK_vf.js";import{l as p,u as m}from"./radio-group-y_PtCP6q.js";import{Ir as h}from"./index-DtiounXP.js";var[g,_]=o({name:`SegmentGroupContext`,hookName:`useSegmentGroupContext`,providerName:`<SegmentGroupProvider />`}),v=e=>e.children(_()),y=e(t(),1),b=d(),x=(0,y.forwardRef)((e,t)=>{let r=n(_().getIndicatorProps(),h.indicator.attrs,e);return(0,b.jsx)(l.div,{...r,ref:t})});x.displayName=`SegmentGroupIndicator`;var[S,C]=o({name:`SegmentGroupItemContext`,hookName:`useSegmentGroupItemContext`,providerName:`<SegmentGroupItemProvider />`}),[w,T]=o({name:`SegmentGroupItemPropsContext`,hookName:`useSegmentGroupItemPropsContext`,providerName:`<SegmentGroupItemPropsProvider />`}),E=f(),D=(0,y.forwardRef)((e,t)=>{let[r,i]=E(e,[`value`,`disabled`,`invalid`]),a=_(),o=n(a.getItemProps(r),h.item.attrs,i);return(0,b.jsx)(w,{value:r,children:(0,b.jsx)(S,{value:a.getItemState(r),children:(0,b.jsx)(l.label,{...o,ref:t})})})});D.displayName=`SegmentGroupItem`;var O=e=>e.children(C()),k=(0,y.forwardRef)((e,t)=>{let r=_(),i=T(),a=n(r.getItemControlProps(i),h.itemControl.attrs,e);return(0,b.jsx)(l.div,{...a,ref:t})});k.displayName=`SegmentGroupItemControl`;var A=(0,y.forwardRef)((e,t)=>{let r=_(),i=T(),a=n(r.getItemHiddenInputProps(i),e);return(0,b.jsx)(l.input,{...a,ref:t})});A.displayName=`SegmentGroupItemHiddenInput`;var j=(0,y.forwardRef)((e,t)=>{let r=_(),i=T(),a=n(r.getItemTextProps(i),h.itemText.attrs,e);return(0,b.jsx)(l.span,{...a,ref:t})});j.displayName=`SegmentGroupItemText`;var M=(0,y.forwardRef)((e,t)=>{let r=n(_().getLabelProps(),h.label.attrs,e);return(0,b.jsx)(l.span,{...r,ref:t})});M.displayName=`SegmentGroupLabel`;var N=e=>{let t=(0,y.useId)(),{getRootNode:n}=i(),{dir:a}=r();return m(u(p,{id:t,dir:a,getRootNode:n,...e}),s)},P=f(),F=(0,y.forwardRef)((e,t)=>{let[r,i]=P(e,[`defaultValue`,`disabled`,`form`,`id`,`ids`,`invalid`,`name`,`onValueChange`,`orientation`,`readOnly`,`required`,`value`]),a=N(r),o=n(a.getRootProps(),h.root.attrs,i);return(0,b.jsx)(g,{value:a,children:(0,b.jsx)(l.div,{...o,ref:t})})});F.displayName=`SegmentGroupRoot`;var I=f(),L=(0,y.forwardRef)((e,t)=>{let[{value:r},i]=I(e,[`value`]),a=n(r.getRootProps(),h.root.attrs,i);return(0,b.jsx)(g,{value:r,children:(0,b.jsx)(l.div,{...a,ref:t})})});L.displayName=`SegmentGroupRootProvider`;var R=a({Context:()=>v,Indicator:()=>x,Item:()=>D,ItemContext:()=>O,ItemControl:()=>k,ItemHiddenInput:()=>A,ItemText:()=>j,Label:()=>M,Root:()=>F,RootProvider:()=>L}),{withProvider:z,withContext:B,useStyles:V,PropsProvider:H}=c({key:`segmentGroup`});z(R.RootProvider,`root`,{forwardAsChild:!0});var U=z(R.Root,`root`,{forwardAsChild:!0,forwardProps:[`orientation`],defaultProps:{orientation:`horizontal`}}),W=B(R.Item,`item`,{forwardAsChild:!0}),G=B(R.ItemText,`itemText`,{forwardAsChild:!0}),K=B(R.Indicator,`indicator`,{forwardAsChild:!0}),q=R.ItemHiddenInput;R.Context,R.ItemContext;export{U as a,G as i,W as n,q as r,K as t};
|
|
2
|
+
//# sourceMappingURL=segment-group-EW0AyNd-.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{a as r,i,n as a,r as o,t as s}from"./segment-group-EW0AyNd-.js";var c=e(t()),l=n();function u(e){return e.map(e=>typeof e==`string`?{value:e,label:e}:e)}var d=c.forwardRef(function(e,t){let{items:n,...d}=e,f=c.useMemo(()=>u(n),[n]);return(0,l.jsxs)(r,{ref:t,...d,children:[(0,l.jsx)(s,{}),f.map(e=>(0,l.jsxs)(a,{value:e.value,disabled:e.disabled,children:[(0,l.jsx)(i,{children:e.label}),(0,l.jsx)(o,{})]},e.value))]})});export{d as t};
|
|
2
|
+
//# sourceMappingURL=segmented-control-SS4Yq_Ti.js.map
|