@datalayer/core 1.1.60 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -18
- package/lib/api/DatalayerApi.d.ts +42 -1
- package/lib/api/DatalayerApi.js +90 -3
- package/lib/api/constants.d.ts +19 -1
- package/lib/api/constants.js +19 -1
- package/lib/api/contents/attachments.d.ts +9 -0
- package/lib/api/contents/attachments.js +39 -0
- package/lib/api/contents/bridges.d.ts +22 -0
- package/lib/api/contents/bridges.js +79 -0
- package/lib/api/contents/capabilities.d.ts +11 -0
- package/lib/api/contents/capabilities.js +21 -0
- package/lib/api/contents/cloudStorage.d.ts +31 -0
- package/lib/api/contents/cloudStorage.js +89 -0
- package/lib/api/contents/dataservers.d.ts +37 -0
- package/lib/api/contents/dataservers.js +121 -0
- package/lib/api/contents/datasets.d.ts +63 -0
- package/lib/api/contents/datasets.js +82 -0
- package/lib/api/contents/datasources.d.ts +70 -0
- package/lib/api/contents/datasources.js +149 -0
- package/lib/api/contents/generated.d.ts +1070 -0
- package/lib/api/contents/index.d.ts +16 -0
- package/lib/api/contents/index.js +20 -0
- package/lib/api/contents/mcp.d.ts +46 -0
- package/lib/api/contents/mcp.js +157 -0
- package/lib/api/contents/objects.d.ts +31 -0
- package/lib/api/contents/objects.js +88 -0
- package/lib/api/contents/operations.d.ts +3 -0
- package/lib/api/contents/operations.js +19 -0
- package/lib/api/contents/runtimeMounts.d.ts +40 -0
- package/lib/api/contents/runtimeMounts.js +59 -0
- package/lib/api/contents/sandboxUid.d.ts +21 -0
- package/lib/api/contents/sandboxUid.js +27 -0
- package/lib/api/contents/sources.d.ts +19 -0
- package/lib/api/contents/sources.js +119 -0
- package/lib/api/contents/sync.d.ts +18 -0
- package/lib/api/contents/sync.js +69 -0
- package/lib/api/contents/transfers.d.ts +38 -0
- package/lib/api/contents/transfers.js +123 -0
- package/lib/api/evals/client.d.ts +402 -0
- package/lib/api/evals/client.js +359 -0
- package/lib/api/evals/index.d.ts +10 -0
- package/lib/api/evals/index.js +18 -0
- package/lib/api/evals/request.d.ts +43 -0
- package/lib/api/evals/request.js +67 -0
- package/lib/api/evals/status.d.ts +27 -0
- package/lib/api/evals/status.js +122 -0
- package/lib/api/evals/types.d.ts +1335 -0
- package/lib/api/evals/types.js +5 -0
- package/lib/api/iam/connectedAgents.d.ts +68 -0
- package/lib/api/iam/connectedAgents.js +87 -0
- package/lib/api/iam/identityProviders.d.ts +76 -0
- package/lib/api/iam/identityProviders.js +187 -0
- package/lib/api/iam/index.d.ts +3 -1
- package/lib/api/iam/index.js +3 -1
- package/lib/api/iam/mcpAlertRules.d.ts +51 -0
- package/lib/api/iam/mcpAlertRules.js +198 -0
- package/lib/api/iam/mcpAuditSettings.d.ts +46 -0
- package/lib/api/iam/mcpAuditSettings.js +120 -0
- package/lib/api/iam/mcpPolicy.d.ts +181 -0
- package/lib/api/iam/mcpPolicy.js +168 -0
- package/lib/api/iam/organizationTeams.d.ts +13 -0
- package/lib/api/iam/organizationTeams.js +43 -0
- package/lib/api/iam/profile.d.ts +17 -1
- package/lib/api/iam/profile.js +27 -0
- package/lib/api/iam/scimTokens.d.ts +79 -0
- package/lib/api/iam/scimTokens.js +141 -0
- package/lib/api/iam/secrets.js +9 -21
- package/lib/api/iam/serviceAgents.d.ts +68 -0
- package/lib/api/iam/serviceAgents.js +119 -0
- package/lib/api/iam/trials.d.ts +38 -0
- package/lib/api/iam/trials.js +66 -0
- package/lib/api/index.d.ts +8 -1
- package/lib/api/index.js +7 -1
- package/lib/api/mcp/activity.d.ts +37 -0
- package/lib/api/mcp/activity.js +26 -0
- package/lib/api/mcp/alerts.d.ts +25 -0
- package/lib/api/mcp/alerts.js +51 -0
- package/lib/api/mcp/audit.d.ts +29 -0
- package/lib/api/mcp/audit.js +55 -0
- package/lib/api/mcp/bindings.d.ts +18 -0
- package/lib/api/mcp/bindings.js +42 -0
- package/lib/api/mcp/forwarding.d.ts +25 -0
- package/lib/api/mcp/forwarding.js +46 -0
- package/lib/api/mcp/gateway.d.ts +16 -0
- package/lib/api/mcp/gateway.js +70 -0
- package/lib/api/mcp/generated.d.ts +22 -0
- package/lib/api/mcp/generated.js +213 -0
- package/lib/api/mcp/index.d.ts +17 -0
- package/lib/api/mcp/index.js +25 -0
- package/lib/api/mcp/observability.d.ts +141 -0
- package/lib/api/mcp/observability.js +267 -0
- package/lib/api/mcp/operations.d.ts +83 -0
- package/lib/api/mcp/operations.js +50 -0
- package/lib/api/mcp/organizations.d.ts +102 -0
- package/lib/api/mcp/organizations.js +46 -0
- package/lib/api/mcp/policy.d.ts +9 -0
- package/lib/api/mcp/policy.js +23 -0
- package/lib/api/mcp/tasks.d.ts +49 -0
- package/lib/api/mcp/tasks.js +147 -0
- package/lib/api/orchestration/client.d.ts +53 -0
- package/lib/api/orchestration/client.js +105 -0
- package/lib/api/orchestration/events.d.ts +88 -0
- package/lib/api/orchestration/events.js +245 -0
- package/lib/api/orchestration/generated.d.ts +693 -0
- package/lib/api/orchestration/generated.js +687 -0
- package/lib/api/orchestration/index.d.ts +30 -0
- package/lib/api/orchestration/index.js +34 -0
- package/lib/api/orchestration/lifecycle.d.ts +39 -0
- package/lib/api/orchestration/lifecycle.js +57 -0
- package/lib/api/orchestration/measures.d.ts +55 -0
- package/lib/api/orchestration/measures.js +99 -0
- package/lib/api/otel/dashboards.d.ts +56 -0
- package/lib/api/otel/dashboards.js +50 -0
- package/lib/api/otel/index.d.ts +1 -0
- package/lib/api/otel/index.js +1 -0
- package/lib/api/otel/metrics.d.ts +16 -0
- package/lib/api/otel/metrics.js +15 -0
- package/lib/api/scheduler/client.d.ts +32 -0
- package/lib/api/scheduler/client.js +42 -0
- package/lib/api/scheduler/index.d.ts +8 -0
- package/lib/api/scheduler/index.js +16 -0
- package/lib/api/scheduler/request.d.ts +28 -0
- package/lib/api/scheduler/request.js +50 -0
- package/lib/api/scheduler/types.d.ts +88 -0
- package/lib/api/scheduler/types.js +5 -0
- package/lib/api/spacer/comments.d.ts +97 -0
- package/lib/api/spacer/comments.js +45 -0
- package/lib/api/spacer/index.d.ts +9 -0
- package/lib/api/spacer/index.js +17 -0
- package/lib/api/spacer/notebooks.d.ts +33 -0
- package/lib/api/spacer/notebooks.js +39 -0
- package/lib/api/spacer/request.d.ts +25 -0
- package/lib/api/spacer/request.js +46 -0
- package/lib/api/spacer/spaces.d.ts +68 -0
- package/lib/api/spacer/spaces.js +45 -0
- package/lib/api/utils/validation.d.ts +4 -4
- package/lib/api/utils/validation.js +10 -7
- package/lib/client/auth/index.js +0 -5
- package/lib/client/auth/storage.js +0 -5
- package/lib/client/auth/strategies.js +0 -5
- package/lib/client/base.d.ts +6 -0
- package/lib/client/base.js +8 -0
- package/lib/client/constants.d.ts +1 -0
- package/lib/client/constants.js +1 -0
- package/lib/client/index.d.ts +0 -10
- package/lib/client/index.js +2 -2
- package/lib/client/mixins/ContentsMixin.d.ts +71 -0
- package/lib/client/mixins/ContentsMixin.js +157 -0
- package/lib/client/mixins/IAMMixin.d.ts +0 -31
- package/lib/client/mixins/IAMMixin.js +0 -58
- package/lib/components/animation/AnimatedText.d.ts +2 -44
- package/lib/components/animation/AnimatedText.js +6 -126
- package/lib/components/anonymous/AnonymousKeyExpired.d.ts +56 -0
- package/lib/components/anonymous/AnonymousKeyExpired.js +96 -0
- package/lib/components/anonymous/AnonymousKeyTimer.d.ts +63 -0
- package/lib/components/anonymous/AnonymousKeyTimer.js +140 -0
- package/lib/components/anonymous/index.d.ts +7 -0
- package/lib/components/anonymous/index.js +15 -0
- package/lib/components/auth/SigInAPIKey.d.ts +1 -0
- package/lib/components/auth/SigInAPIKey.js +0 -6
- package/lib/components/auth/SignIn.d.ts +1 -0
- package/lib/components/auth/SignIn.js +0 -4
- package/lib/components/auth/SignIn.stories.d.ts +2 -2
- package/lib/components/avatars/BoringAvatar.d.ts +1 -1
- package/lib/components/avatars/BoringAvatar.stories.d.ts +1 -1
- package/lib/components/avatars/DLAvatar.d.ts +1 -1
- package/lib/components/avatars/DLAvatar.js +0 -4
- package/lib/components/avatars/UserAvatar.d.ts +16 -1
- package/lib/components/avatars/UserAvatar.js +15 -13
- package/lib/components/avatars/UserProfileAvatar.d.ts +1 -1
- package/lib/components/banners/NoAutomationBanner.d.ts +1 -1
- package/lib/components/billing/BillingEntitySelect.d.ts +16 -0
- package/lib/components/billing/BillingEntitySelect.js +49 -27
- package/lib/components/billing/eligibility.d.ts +22 -0
- package/lib/components/billing/eligibility.js +27 -0
- package/lib/components/billing/index.d.ts +1 -0
- package/lib/components/billing/index.js +1 -4
- package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
- package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
- package/lib/components/buttons/LongActionButton.d.ts +1 -0
- package/lib/components/buttons/LongActionButton.js +0 -4
- package/lib/components/buttons/UploadButton.d.ts +1 -0
- package/lib/components/buttons/UploadButton.js +0 -4
- package/lib/components/checkout/StripeCheckout.d.ts +1 -1
- package/lib/components/collaboration/LiveEditorCollaborators.d.ts +36 -0
- package/lib/components/collaboration/LiveEditorCollaborators.js +88 -53
- package/lib/components/collaboration/index.js +0 -4
- package/lib/components/confetti/ConfettiSuccess.d.ts +1 -1
- package/lib/components/contents/ContentSourceCard.d.ts +8 -0
- package/lib/components/contents/ContentSourceCard.js +23 -0
- package/lib/components/contents/HomeFolderObjectsBrowser.d.ts +10 -0
- package/lib/components/contents/HomeFolderObjectsBrowser.js +148 -0
- package/lib/components/contents/index.d.ts +2 -0
- package/lib/components/contents/index.js +6 -0
- package/lib/components/context/OrganizationSelect.d.ts +1 -1
- package/lib/components/display/AvatarSkeleton.d.ts +1 -1
- package/lib/components/display/BusyDots.d.ts +1 -1
- package/lib/components/display/CenteredSpinner.d.ts +1 -1
- package/lib/components/display/CodePreview.d.ts +1 -1
- package/lib/components/display/DatalayerBox.d.ts +7 -3
- package/lib/components/display/DatalayerBox.js +7 -7
- package/lib/components/display/HorizontalCenter.d.ts +1 -1
- package/lib/components/display/JupyterDialog.d.ts +1 -0
- package/lib/components/display/JupyterDialog.js +1 -7
- package/lib/components/display/Markdown.d.ts +1 -0
- package/lib/components/display/NavLink.js +3 -2
- package/lib/components/display/NotebookSkeleton.d.ts +1 -1
- package/lib/components/display/Placeholder.d.ts +1 -1
- package/lib/components/display/ToTopBranded.d.ts +1 -1
- package/lib/components/echarts/EChartsReact.d.ts +1 -1
- package/lib/components/flashes/FlashClosable.d.ts +1 -0
- package/lib/components/flashes/FlashClosable.js +0 -4
- package/lib/components/flashes/FlashGuest.d.ts +1 -1
- package/lib/components/flashes/FlashSurveys.d.ts +1 -1
- package/lib/components/flashes/FlashUnauthorized.d.ts +1 -0
- package/lib/components/flashes/FlashUnauthorized.js +0 -6
- package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
- package/lib/components/iam/ExternalTokenSilentLogin.d.ts +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +2 -0
- package/lib/components/labels/StatusLabels.d.ts +2 -9
- package/lib/components/labels/StatusLabels.js +2 -26
- package/lib/components/labels/VisibilityLabel.d.ts +1 -1
- package/lib/components/landings/StepBlock.d.ts +1 -1
- package/lib/components/mcp/ClientBadge.d.ts +41 -0
- package/lib/components/mcp/ClientBadge.js +33 -0
- package/lib/components/mcp/McpErrorBlankslate.d.ts +21 -0
- package/lib/components/mcp/McpErrorBlankslate.js +17 -0
- package/lib/components/mcp/ScopeList.d.ts +28 -0
- package/lib/components/mcp/ScopeList.js +14 -0
- package/lib/components/mcp/index.d.ts +10 -0
- package/lib/components/mcp/index.js +18 -0
- package/lib/components/navbar/NavigationVisbilityObserver.d.ts +2 -1
- package/lib/components/navbar/SubdomainNavBar.d.ts +10 -5
- package/lib/components/navbar/SubdomainNavBar.js +2 -1
- package/lib/components/notebooks/JupyterNotebook.d.ts +1 -1
- package/lib/components/notebooks/JupyterNotebookToolbar.d.ts +1 -1
- package/lib/components/principal/PrincipalAppearance.d.ts +22 -42
- package/lib/components/principal/PrincipalAppearance.js +232 -182
- package/lib/components/principal/PrincipalAvatar.d.ts +9 -1
- package/lib/components/principal/PrincipalAvatar.js +18 -10
- package/lib/components/principal/PrincipalBadge.d.ts +1 -1
- package/lib/components/principal/PrincipalBanner.d.ts +1 -1
- package/lib/components/principal/PrincipalDetailsOverlay.d.ts +38 -1
- package/lib/components/principal/PrincipalDetailsOverlay.js +64 -33
- package/lib/components/principal/PrincipalHoverCard.d.ts +31 -0
- package/lib/components/principal/PrincipalHoverCard.js +52 -0
- package/lib/components/principal/PrincipalSwitcherMenu.d.ts +1 -0
- package/lib/components/principal/PrincipalSwitcherMenu.js +5 -14
- package/lib/components/principal/index.d.ts +2 -1
- package/lib/components/principal/index.js +2 -1
- package/lib/components/progress/ConsumptionBar.d.ts +1 -0
- package/lib/components/progress/ConsumptionBar.js +0 -4
- package/lib/components/progress/ProgressRing.d.ts +1 -0
- package/lib/components/progress/SpinnerBar.d.ts +1 -1
- package/lib/components/progress/Timer.d.ts +1 -0
- package/lib/components/progress/Timer.js +0 -4
- package/lib/components/screencapture/Screencapture.js +46 -3
- package/lib/components/screencapture/ScreencaptureButton.d.ts +1 -1
- package/lib/components/sharing/ShareAccessComponent.d.ts +58 -3
- package/lib/components/sharing/ShareAccessComponent.js +143 -98
- package/lib/components/sharing/SharingEditor.d.ts +21 -0
- package/lib/components/sharing/SharingEditor.js +9 -28
- package/lib/components/sharing/index.d.ts +1 -0
- package/lib/components/sharing/index.js +1 -0
- package/lib/components/sharing/sandboxSharing.d.ts +26 -0
- package/lib/components/sharing/sandboxSharing.js +41 -0
- package/lib/components/spaces/SpaceDetailsOverlay.d.ts +39 -0
- package/lib/components/spaces/SpaceDetailsOverlay.js +80 -0
- package/lib/components/spaces/SpaceDisplay.d.ts +38 -0
- package/lib/components/spaces/SpaceDisplay.js +92 -0
- package/lib/components/spaces/index.d.ts +4 -0
- package/lib/components/spaces/index.js +7 -0
- package/lib/components/spaces/spaceDisplayModel.d.ts +93 -0
- package/lib/components/spaces/spaceDisplayModel.js +170 -0
- package/lib/components/sparklines/Sparklines.js +3 -4
- package/lib/components/sparklines/index.js +0 -4
- package/lib/components/storage/ContentsBrowser.d.ts +25 -1
- package/lib/components/storage/ContentsBrowser.js +145 -52
- package/lib/components/storage/ContentsBrowserMock.d.ts +3 -0
- package/lib/components/storage/ContentsBrowserMock.js +75 -0
- package/lib/components/storage/ContentsItems.d.ts +2 -1
- package/lib/components/storage/ContentsItems.js +0 -4
- package/lib/components/storage/ContentsTable.d.ts +50 -0
- package/lib/components/storage/ContentsTable.js +134 -0
- package/lib/components/storage/HomeFolderDrive.d.ts +71 -0
- package/lib/components/storage/HomeFolderDrive.js +248 -0
- package/lib/components/storage/index.d.ts +2 -0
- package/lib/components/storage/index.js +2 -0
- package/lib/components/students/StudentItemStatus.d.ts +1 -1
- package/lib/components/students/StudentResultCircle.d.ts +1 -1
- package/lib/components/subnav/SubNav.d.ts +5 -5
- package/lib/components/subnav/SubNav.js +11 -9
- package/lib/components/tables/DataTable.d.ts +1 -1
- package/lib/components/text-reveal/TextRevealAnimation.d.ts +2 -2
- package/lib/components/text-reveal/useTextRevealAnimationLines.d.ts +1 -1
- package/lib/components/time/LiveRelativeTime.d.ts +1 -0
- package/lib/components/time/LiveRelativeTime.js +0 -8
- package/lib/components/time/index.js +0 -4
- package/lib/components/timeline/Timeline.d.ts +1 -1
- package/lib/components/timeline/index.js +0 -4
- package/lib/components/users/PeerIndicator.d.ts +1 -0
- package/lib/components/users/PeerIndicator.js +0 -4
- package/lib/config/Configuration.d.ts +15 -17
- package/lib/config/Configuration.js +7 -0
- package/lib/hooks/cacheConverters.d.ts +0 -7
- package/lib/hooks/cacheConverters.js +0 -25
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/layouts/LayoutBackdrop.d.ts +1 -1
- package/lib/hooks/layouts/LayoutScreencapture.d.ts +1 -1
- package/lib/hooks/useBackdrop.d.ts +1 -1
- package/lib/hooks/useBackdropJupyterLab.d.ts +3 -2
- package/lib/hooks/useBackdropJupyterLab.js +0 -4
- package/lib/hooks/useBillingEntityStore.js +3 -0
- package/lib/hooks/useCache.d.ts +478 -130
- package/lib/hooks/useCache.js +1580 -676
- package/lib/hooks/useContainsFocus.d.ts +1 -1
- package/lib/hooks/useContents.d.ts +334 -0
- package/lib/hooks/useContents.js +1033 -0
- package/lib/hooks/useFocusTrap.d.ts +4 -4
- package/lib/hooks/useFocusTrap.js +1 -1
- package/lib/hooks/useMcp.d.ts +315 -0
- package/lib/hooks/useMcp.js +891 -0
- package/lib/hooks/useMobile.js +0 -5
- package/lib/hooks/useNavigate.d.ts +41 -3
- package/lib/hooks/useNavigate.js +106 -52
- package/lib/hooks/usePrincipalCacheStore.js +3 -0
- package/lib/hooks/usePrincipalStore.js +3 -0
- package/lib/hooks/useProjectStore.d.ts +3 -3
- package/lib/hooks/useProjectStore.js +4 -4
- package/lib/hooks/useRef.d.ts +1 -1
- package/lib/hooks/useRef.js +3 -0
- package/lib/hooks/useScreencapture.d.ts +2 -1
- package/lib/hooks/useScreencapture.js +0 -4
- package/lib/hooks/useSpaceCacheStore.d.ts +50 -0
- package/lib/hooks/useSpaceCacheStore.js +85 -0
- package/lib/hooks/useToast.js +0 -4
- package/lib/hooks/useVisibilityObserver.d.ts +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +3 -1
- package/lib/mocks/components/FlashMock.d.ts +1 -1
- package/lib/mocks/views/ActionMenuMock.d.ts +1 -1
- package/lib/mocks/views/ChartMock.d.ts +1 -1
- package/lib/mocks/views/DashboardMock.d.ts +1 -1
- package/lib/mocks/views/FormMock.d.ts +1 -1
- package/lib/mocks/views/TableMock.d.ts +1 -1
- package/lib/mocks/views/WipMock.d.ts +1 -1
- package/lib/models/Credits.d.ts +16 -0
- package/lib/models/Credits.js +22 -0
- package/lib/models/CreditsDTO.d.ts +6 -5
- package/lib/models/CreditsDTO.js +7 -5
- package/lib/models/McpAuditEvent.d.ts +52 -0
- package/lib/models/McpAuditEvent.js +5 -0
- package/lib/models/McpBinding.d.ts +57 -0
- package/lib/models/McpBinding.js +5 -0
- package/lib/models/McpPolicy.d.ts +77 -0
- package/lib/models/McpPolicy.js +5 -0
- package/lib/models/McpTask.d.ts +94 -0
- package/lib/models/McpTask.js +7 -0
- package/lib/models/Organization.d.ts +69 -0
- package/lib/models/Organization.js +96 -0
- package/lib/models/Secret.d.ts +1 -2
- package/lib/models/Secret.js +2 -18
- package/lib/models/StartedBy.d.ts +91 -0
- package/lib/models/StartedBy.js +117 -0
- package/lib/models/Team.d.ts +2 -0
- package/lib/models/Team.js +2 -0
- package/lib/models/User.d.ts +4 -0
- package/lib/models/User.js +3 -0
- package/lib/models/UserDTO.js +4 -2
- package/lib/models/UserSettings.d.ts +13 -0
- package/lib/models/UserSettings.js +9 -0
- package/lib/models/contents/__fixtures__/solr-codec.json +57 -0
- package/lib/models/contents/__fixtures__/v1-contracts.json +194 -0
- package/lib/models/contents/fieldCase.d.ts +8 -0
- package/lib/models/contents/fieldCase.js +37 -0
- package/lib/models/contents/index.d.ts +2 -0
- package/lib/models/contents/index.js +6 -0
- package/lib/models/contents/permissions.d.ts +16 -0
- package/lib/models/contents/permissions.js +34 -0
- package/lib/models/index.d.ts +5 -1
- package/lib/models/index.js +5 -1
- package/lib/navigation/components.js +2 -3
- package/lib/routes/publicPaths.js +4 -0
- package/lib/state/index.d.ts +1 -0
- package/lib/state/index.js +1 -0
- package/lib/state/sessionEnd.d.ts +55 -0
- package/lib/state/sessionEnd.js +162 -0
- package/lib/state/substates/CoreState.d.ts +15 -7
- package/lib/state/substates/CoreState.js +21 -17
- package/lib/state/substates/IAMState.d.ts +1 -1
- package/lib/state/substates/IAMState.js +12 -5
- package/lib/state/substates/LayoutState.js +12 -0
- package/lib/state/substates/ProfileState.d.ts +1 -0
- package/lib/state/substates/ProfileState.js +1 -4
- package/lib/state/substates/index.d.ts +0 -1
- package/lib/state/substates/index.js +0 -1
- package/lib/utils/Jwt.d.ts +26 -0
- package/lib/utils/Jwt.js +37 -0
- package/lib/utils/Lazy.d.ts +20 -0
- package/lib/utils/Lazy.js +32 -6
- package/lib/utils/Screencapture.js +3 -0
- package/lib/utils/WithSuspense.d.ts +11 -1
- package/lib/utils/WithSuspense.js +11 -1
- package/lib/views/api-keys/APIKeyEdit.d.ts +1 -1
- package/lib/views/api-keys/APIKeyNew.d.ts +1 -1
- package/lib/views/api-keys/APIKeys.d.ts +1 -1
- package/lib/views/api-keys/APIKeys.js +30 -4
- package/lib/views/api-keys/APIKeysStandalone.d.ts +5 -1
- package/lib/views/api-keys/APIKeysStandalone.js +2 -2
- package/lib/views/datasources/DatasourceDetail.d.ts +12 -5
- package/lib/views/datasources/DatasourceDetail.js +80 -110
- package/lib/views/datasources/DatasourceNew.d.ts +14 -8
- package/lib/views/datasources/DatasourceNew.js +129 -118
- package/lib/views/datasources/Datasources.d.ts +39 -7
- package/lib/views/datasources/Datasources.js +95 -40
- package/lib/views/datasources/DatasourcesMock.d.ts +3 -0
- package/lib/views/datasources/DatasourcesMock.js +57 -0
- package/lib/views/iam/SignInSimple.d.ts +12 -0
- package/lib/views/iam/SignInSimple.js +4 -4
- package/lib/views/index.d.ts +1 -0
- package/lib/views/index.js +1 -0
- package/lib/views/mcp/AdmittedClients.d.ts +44 -0
- package/lib/views/mcp/AdmittedClients.js +59 -0
- package/lib/views/mcp/AlertDestinations.d.ts +34 -0
- package/lib/views/mcp/AlertDestinations.js +75 -0
- package/lib/views/mcp/AlertRules.d.ts +32 -0
- package/lib/views/mcp/AlertRules.js +245 -0
- package/lib/views/mcp/ApprovalQueue.d.ts +66 -0
- package/lib/views/mcp/ApprovalQueue.js +95 -0
- package/lib/views/mcp/AuditLog.d.ts +42 -0
- package/lib/views/mcp/AuditLog.js +144 -0
- package/lib/views/mcp/ConnectedAgents.d.ts +34 -0
- package/lib/views/mcp/ConnectedAgents.js +135 -0
- package/lib/views/mcp/EnterpriseConsole.d.ts +74 -0
- package/lib/views/mcp/EnterpriseConsole.js +195 -0
- package/lib/views/mcp/IdentityProviders.d.ts +33 -0
- package/lib/views/mcp/IdentityProviders.js +299 -0
- package/lib/views/mcp/McpDashboard.d.ts +50 -0
- package/lib/views/mcp/McpDashboard.js +430 -0
- package/lib/views/mcp/McpHome.d.ts +92 -0
- package/lib/views/mcp/McpHome.js +153 -0
- package/lib/views/mcp/McpObservability.d.ts +79 -0
- package/lib/views/mcp/McpObservability.js +236 -0
- package/lib/views/mcp/NotebookRuns.d.ts +39 -0
- package/lib/views/mcp/NotebookRuns.js +44 -0
- package/lib/views/mcp/OrganizationPolicy.d.ts +45 -0
- package/lib/views/mcp/OrganizationPolicy.js +108 -0
- package/lib/views/mcp/OrganizationUsage.d.ts +69 -0
- package/lib/views/mcp/OrganizationUsage.js +113 -0
- package/lib/views/mcp/PersonalPolicy.d.ts +54 -0
- package/lib/views/mcp/PersonalPolicy.js +126 -0
- package/lib/views/mcp/Policies.d.ts +53 -0
- package/lib/views/mcp/Policies.js +210 -0
- package/lib/views/mcp/PolicyForm.d.ts +83 -0
- package/lib/views/mcp/PolicyForm.js +113 -0
- package/lib/views/mcp/PolicyHistory.d.ts +58 -0
- package/lib/views/mcp/PolicyHistory.js +75 -0
- package/lib/views/mcp/RunDetail.d.ts +87 -0
- package/lib/views/mcp/RunDetail.js +186 -0
- package/lib/views/mcp/ScimProvisioning.d.ts +54 -0
- package/lib/views/mcp/ScimProvisioning.js +173 -0
- package/lib/views/mcp/ServiceAgents.d.ts +46 -0
- package/lib/views/mcp/ServiceAgents.js +194 -0
- package/lib/views/mcp/TeamPolicies.d.ts +33 -0
- package/lib/views/mcp/TeamPolicies.js +159 -0
- package/lib/views/mcp/ToolAccess.d.ts +60 -0
- package/lib/views/mcp/ToolAccess.js +101 -0
- package/lib/views/mcp/TraceTimeline.d.ts +81 -0
- package/lib/views/mcp/TraceTimeline.js +132 -0
- package/lib/views/mcp/format.d.ts +25 -0
- package/lib/views/mcp/format.js +77 -0
- package/lib/views/mcp/index.d.ts +34 -0
- package/lib/views/mcp/index.js +42 -0
- package/lib/views/mcp/types.d.ts +66 -0
- package/lib/views/mcp/types.js +5 -0
- package/lib/views/otel/simpleAuthStore.js +3 -0
- package/lib/views/secrets/SecretEdit.d.ts +5 -1
- package/lib/views/secrets/SecretEdit.js +5 -4
- package/lib/views/secrets/SecretNew.d.ts +11 -1
- package/lib/views/secrets/SecretNew.js +7 -3
- package/lib/views/secrets/Secrets.d.ts +12 -1
- package/lib/views/secrets/Secrets.js +2 -2
- package/package.json +269 -260
- package/scripts/generate-contents-types.py +169 -0
- package/scripts/generate-mcp-types.py +233 -0
- package/scripts/generate-orchestration-types.py +920 -0
- package/lib/api/iam/datasources.d.ts +0 -86
- package/lib/api/iam/datasources.js +0 -185
- package/lib/components/toolbars/index.d.ts +0 -1
- package/lib/models/Datasource.d.ts +0 -181
- package/lib/models/Datasource.js +0 -154
- package/lib/state/substates/DatasourceState.d.ts +0 -11
- package/lib/state/substates/DatasourceState.js +0 -16
- /package/lib/{components/toolbars/index.js → api/contents/generated.js} +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading, Label, Text, Truncate } from '@primer/react';
|
|
3
|
+
import { Box } from '@datalayer/primer-addons';
|
|
4
|
+
import { durationLabel } from './format.js';
|
|
5
|
+
/**
|
|
6
|
+
* The narrowest a bar is drawn, as a percentage of the run.
|
|
7
|
+
*
|
|
8
|
+
* A 2ms authorization check inside a ten-minute run is 0.003% wide, which is
|
|
9
|
+
* nothing at all — and the check happening is exactly what somebody reading
|
|
10
|
+
* a trace is looking for. It is drawn as a mark rather than dropped; the
|
|
11
|
+
* label carries the real duration.
|
|
12
|
+
*/
|
|
13
|
+
export const MIN_BAR_PERCENT = 0.75;
|
|
14
|
+
/**
|
|
15
|
+
* The instants a span covers, as epoch milliseconds.
|
|
16
|
+
*
|
|
17
|
+
* `end` is never before `start`, and one comparison is enough for both ways
|
|
18
|
+
* that happens: an end that will not parse is `NaN`, and every comparison
|
|
19
|
+
* with `NaN` is false, so it falls to `start` along with an end that is
|
|
20
|
+
* merely backwards. A `Number.isFinite` check beside it reads as belt and
|
|
21
|
+
* braces but is dead code — which is what the mutation run showed.
|
|
22
|
+
*
|
|
23
|
+
* The `NaN` case is the one that matters. A single unparseable timestamp
|
|
24
|
+
* left in would poison the window every other bar is measured against, and
|
|
25
|
+
* the timeline would go on drawing — as a column of identical marks.
|
|
26
|
+
*/
|
|
27
|
+
const extentOf = (span) => {
|
|
28
|
+
const start = Date.parse(span.start_time);
|
|
29
|
+
const end = Date.parse(span.end_time);
|
|
30
|
+
return { start, end: end > start ? end : start };
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The spans of a trace, flattened depth-first and placed against one clock.
|
|
34
|
+
*
|
|
35
|
+
* Three cases are not the ordinary one and each is drawn rather than
|
|
36
|
+
* dropped, because a trace a person opens is a trace they need to read:
|
|
37
|
+
*
|
|
38
|
+
* - a span whose timestamps do not parse is placed at the left as a mark —
|
|
39
|
+
* it happened, we cannot say when;
|
|
40
|
+
* - a trace with no duration at all — one instant, or a single unfinished
|
|
41
|
+
* span — gives every bar the full width, since there is nothing to divide;
|
|
42
|
+
* - a child that starts before its parent, which clock skew between two
|
|
43
|
+
* services makes real, is clamped into the run rather than drawn off the
|
|
44
|
+
* end of it.
|
|
45
|
+
*/
|
|
46
|
+
export const timelineRows = (tree) => {
|
|
47
|
+
const flat = [];
|
|
48
|
+
const walk = (nodes, depth) => {
|
|
49
|
+
for (const node of nodes) {
|
|
50
|
+
flat.push({ span: node.span, depth });
|
|
51
|
+
walk(node.children, depth + 1);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
walk(tree, 0);
|
|
55
|
+
let first = Number.POSITIVE_INFINITY;
|
|
56
|
+
let last = Number.NEGATIVE_INFINITY;
|
|
57
|
+
for (const { span } of flat) {
|
|
58
|
+
const { start, end } = extentOf(span);
|
|
59
|
+
if (Number.isFinite(start)) {
|
|
60
|
+
first = Math.min(first, start);
|
|
61
|
+
last = Math.max(last, end);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const total = last - first;
|
|
65
|
+
return flat.map(({ span, depth }) => {
|
|
66
|
+
const { start, end } = extentOf(span);
|
|
67
|
+
if (!Number.isFinite(start) || !Number.isFinite(total) || total <= 0) {
|
|
68
|
+
// No clock to divide: an unplaceable span is a mark, and a run with no
|
|
69
|
+
// duration is one bar across.
|
|
70
|
+
const placeable = Number.isFinite(start) && Number.isFinite(total);
|
|
71
|
+
return { span, depth, left: 0, width: placeable ? 100 : MIN_BAR_PERCENT };
|
|
72
|
+
}
|
|
73
|
+
// The width is settled first, then the bar is slid left far enough to
|
|
74
|
+
// hold it: a zero-length span at the very end of a run is a mark that
|
|
75
|
+
// has to fit inside the track, not one hanging off its right edge.
|
|
76
|
+
const width = Math.max(MIN_BAR_PERCENT, ((end - start) / total) * 100);
|
|
77
|
+
const left = Math.min(100 - width, Math.max(0, ((start - first) / total) * 100));
|
|
78
|
+
return { span, depth, left, width };
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* A colour per service, so the four processes are told apart at a glance.
|
|
83
|
+
*
|
|
84
|
+
* Named by what the service *is* rather than by its span prefix: the same
|
|
85
|
+
* palette has to hold when a fifth service starts emitting, and the fallback
|
|
86
|
+
* is a neutral rather than a collision.
|
|
87
|
+
*/
|
|
88
|
+
export const SERVICE_TONE = {
|
|
89
|
+
'jupyter-mcp-server': 'accent.emphasis',
|
|
90
|
+
'datalayer-durable': 'done.emphasis',
|
|
91
|
+
'datalayer-runtimes': 'success.emphasis',
|
|
92
|
+
'datalayer-iam': 'severe.emphasis',
|
|
93
|
+
};
|
|
94
|
+
/** The bar colour of a span, by the service that emitted it and how it ended. */
|
|
95
|
+
export const toneOf = (span) => {
|
|
96
|
+
if (span.status_code === 'STATUS_CODE_ERROR' || span.status_code === 'ERROR') {
|
|
97
|
+
return 'danger.emphasis';
|
|
98
|
+
}
|
|
99
|
+
return SERVICE_TONE[span.service_name] ?? 'neutral.emphasis';
|
|
100
|
+
};
|
|
101
|
+
export const TraceTimeline = ({ tree, traceId, live = false, }) => {
|
|
102
|
+
const rows = timelineRows(tree);
|
|
103
|
+
if (rows.length === 0) {
|
|
104
|
+
return (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: live
|
|
105
|
+
? 'No spans yet. They arrive as the services report them.'
|
|
106
|
+
: 'This run reported no spans. A run started before tracing reached the service that ran it has none.' }));
|
|
107
|
+
}
|
|
108
|
+
return (_jsxs(Box, { sx: { display: 'grid', gap: 1, minWidth: 0 }, children: [traceId && (_jsx(Text, { sx: { fontFamily: 'mono', fontSize: 0, color: 'fg.muted' }, children: traceId })), rows.map(row => (_jsxs(Box, { sx: {
|
|
109
|
+
display: 'grid',
|
|
110
|
+
gridTemplateColumns: 'minmax(0, 14rem) 1fr auto',
|
|
111
|
+
gap: 2,
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
minWidth: 0,
|
|
114
|
+
}, children: [_jsx(Box, { sx: { pl: row.depth, minWidth: 0 }, children: _jsx(Truncate, { title: `${row.span.span_name} · ${row.span.service_name}`, sx: { fontSize: 0, maxWidth: '100%' }, children: row.span.span_name }) }), _jsx(Box, { sx: {
|
|
115
|
+
position: 'relative',
|
|
116
|
+
height: '0.75rem',
|
|
117
|
+
bg: 'canvas.subtle',
|
|
118
|
+
borderRadius: 1,
|
|
119
|
+
minWidth: 0,
|
|
120
|
+
}, children: _jsx(Box, { sx: {
|
|
121
|
+
position: 'absolute',
|
|
122
|
+
top: 0,
|
|
123
|
+
bottom: 0,
|
|
124
|
+
left: `${row.left}%`,
|
|
125
|
+
width: `${row.width}%`,
|
|
126
|
+
bg: toneOf(row.span),
|
|
127
|
+
borderRadius: 1,
|
|
128
|
+
}, title: `${row.span.service_name} · ${durationLabel(row.span.duration_ms)}` }) }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', fontVariantNumeric: 'tabular-nums' }, children: durationLabel(row.span.duration_ms) })] }, row.span.span_id)))] }));
|
|
129
|
+
};
|
|
130
|
+
/** The timeline under its own heading, as the Runs detail draws it. */
|
|
131
|
+
export const TraceTimelineSection = (props) => (_jsxs(Box, { children: [_jsxs(Box, { sx: { display: 'flex', gap: 2, alignItems: 'center', mb: 2 }, children: [_jsx(Heading, { as: "h3", sx: { fontSize: 1 }, children: "Where the time went" }), props.live && (_jsx(Label, { size: "small", variant: "success", children: "Live" }))] }), _jsx(TraceTimeline, { ...props })] }));
|
|
132
|
+
export default TraceTimeline;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The small readings every MCP surface shares: how long ago, how long it
|
|
3
|
+
* took, and whether a client is still there.
|
|
4
|
+
*
|
|
5
|
+
* Plain functions with no React in them, so the wording of "4m ago" is one
|
|
6
|
+
* decision rather than one per view.
|
|
7
|
+
*
|
|
8
|
+
* @module views/mcp/format
|
|
9
|
+
*/
|
|
10
|
+
/** A client that called within this window is drawn as active. */
|
|
11
|
+
export declare const MCP_ACTIVE_WINDOW_MS: number;
|
|
12
|
+
/**
|
|
13
|
+
* A client idle longer than this has left the activity answer, and its card
|
|
14
|
+
* leaves the home grid — the same window the gateway bounds `/activity` by.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MCP_ACTIVITY_WINDOW_MS: number;
|
|
17
|
+
/** Where a client is, from when it last called. */
|
|
18
|
+
export type McpClientStatus = 'active' | 'idle' | 'disconnected';
|
|
19
|
+
export declare const clientStatusOf: (lastCallAt: string | null | undefined, now?: number) => McpClientStatus;
|
|
20
|
+
/** How long ago a moment was, in the words the home page uses. */
|
|
21
|
+
export declare const timeAgo: (iso: string | null | undefined, now?: number) => string;
|
|
22
|
+
/** A duration in the unit that reads: milliseconds, seconds, minutes. */
|
|
23
|
+
export declare const durationLabel: (milliseconds: number | null | undefined) => string;
|
|
24
|
+
/** A count in the page's terms: `1 call`, `12 calls`, `no call`. */
|
|
25
|
+
export declare const plural: (count: number, singular: string, many?: string) => string;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The small readings every MCP surface shares: how long ago, how long it
|
|
11
|
+
* took, and whether a client is still there.
|
|
12
|
+
*
|
|
13
|
+
* Plain functions with no React in them, so the wording of "4m ago" is one
|
|
14
|
+
* decision rather than one per view.
|
|
15
|
+
*
|
|
16
|
+
* @module views/mcp/format
|
|
17
|
+
*/
|
|
18
|
+
/** A client that called within this window is drawn as active. */
|
|
19
|
+
export const MCP_ACTIVE_WINDOW_MS = 5 * 60_000;
|
|
20
|
+
/**
|
|
21
|
+
* A client idle longer than this has left the activity answer, and its card
|
|
22
|
+
* leaves the home grid — the same window the gateway bounds `/activity` by.
|
|
23
|
+
*/
|
|
24
|
+
export const MCP_ACTIVITY_WINDOW_MS = 30 * 60_000;
|
|
25
|
+
export const clientStatusOf = (lastCallAt, now = Date.now()) => {
|
|
26
|
+
if (!lastCallAt) {
|
|
27
|
+
// A grant that has never been used is connected but has done nothing.
|
|
28
|
+
return 'idle';
|
|
29
|
+
}
|
|
30
|
+
const at = Date.parse(lastCallAt);
|
|
31
|
+
if (Number.isNaN(at)) {
|
|
32
|
+
return 'idle';
|
|
33
|
+
}
|
|
34
|
+
const age = now - at;
|
|
35
|
+
if (age <= MCP_ACTIVE_WINDOW_MS) {
|
|
36
|
+
return 'active';
|
|
37
|
+
}
|
|
38
|
+
return age <= MCP_ACTIVITY_WINDOW_MS ? 'idle' : 'disconnected';
|
|
39
|
+
};
|
|
40
|
+
/** How long ago a moment was, in the words the home page uses. */
|
|
41
|
+
export const timeAgo = (iso, now = Date.now()) => {
|
|
42
|
+
if (!iso) {
|
|
43
|
+
return '';
|
|
44
|
+
}
|
|
45
|
+
const at = Date.parse(iso);
|
|
46
|
+
if (Number.isNaN(at)) {
|
|
47
|
+
return '';
|
|
48
|
+
}
|
|
49
|
+
const seconds = Math.max(0, (now - at) / 1000);
|
|
50
|
+
if (seconds < 60) {
|
|
51
|
+
return 'just now';
|
|
52
|
+
}
|
|
53
|
+
if (seconds < 3600) {
|
|
54
|
+
return `${Math.floor(seconds / 60)}m ago`;
|
|
55
|
+
}
|
|
56
|
+
if (seconds < 86400) {
|
|
57
|
+
return `${Math.floor(seconds / 3600)}h ago`;
|
|
58
|
+
}
|
|
59
|
+
return `${Math.floor(seconds / 86400)}d ago`;
|
|
60
|
+
};
|
|
61
|
+
/** A duration in the unit that reads: milliseconds, seconds, minutes. */
|
|
62
|
+
export const durationLabel = (milliseconds) => {
|
|
63
|
+
if (milliseconds === null || milliseconds === undefined) {
|
|
64
|
+
return '';
|
|
65
|
+
}
|
|
66
|
+
if (milliseconds < 1000) {
|
|
67
|
+
return `${Math.round(milliseconds)}ms`;
|
|
68
|
+
}
|
|
69
|
+
if (milliseconds < 60_000) {
|
|
70
|
+
return `${(milliseconds / 1000).toFixed(1)}s`;
|
|
71
|
+
}
|
|
72
|
+
const minutes = Math.floor(milliseconds / 60_000);
|
|
73
|
+
const seconds = Math.round((milliseconds % 60_000) / 1000);
|
|
74
|
+
return `${minutes}m ${seconds}s`;
|
|
75
|
+
};
|
|
76
|
+
/** A count in the page's terms: `1 call`, `12 calls`, `no call`. */
|
|
77
|
+
export const plural = (count, singular, many = `${singular}s`) => `${count} ${count === 1 ? singular : many}`;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP surfaces, as views the application composes: the dashboard, the
|
|
3
|
+
* setup page, the connected agents, the audit log, the observability panes,
|
|
4
|
+
* the effective policy and the organization's console.
|
|
5
|
+
*
|
|
6
|
+
* Every one of them owns its data and its states and nothing about routing,
|
|
7
|
+
* which is what lets the web application, JupyterLab, VS Code and Desktop
|
|
8
|
+
* draw the same page.
|
|
9
|
+
*
|
|
10
|
+
* @module views/mcp
|
|
11
|
+
*/
|
|
12
|
+
export * from './types';
|
|
13
|
+
export * from './format';
|
|
14
|
+
export * from './McpDashboard';
|
|
15
|
+
export * from './McpHome';
|
|
16
|
+
export * from './ConnectedAgents';
|
|
17
|
+
export * from './RunDetail';
|
|
18
|
+
export * from './NotebookRuns';
|
|
19
|
+
export * from './AlertDestinations';
|
|
20
|
+
export * from './AlertRules';
|
|
21
|
+
export * from './OrganizationPolicy';
|
|
22
|
+
export * from './PersonalPolicy';
|
|
23
|
+
export * from './PolicyForm';
|
|
24
|
+
export * from './PolicyHistory';
|
|
25
|
+
export * from './TeamPolicies';
|
|
26
|
+
export * from './ServiceAgents';
|
|
27
|
+
export * from './AuditLog';
|
|
28
|
+
export * from './McpObservability';
|
|
29
|
+
export * from './Policies';
|
|
30
|
+
export * from './OrganizationUsage';
|
|
31
|
+
export * from './EnterpriseConsole';
|
|
32
|
+
export * from './TraceTimeline';
|
|
33
|
+
export * from './ApprovalQueue';
|
|
34
|
+
export * from './ToolAccess';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The MCP surfaces, as views the application composes: the dashboard, the
|
|
11
|
+
* setup page, the connected agents, the audit log, the observability panes,
|
|
12
|
+
* the effective policy and the organization's console.
|
|
13
|
+
*
|
|
14
|
+
* Every one of them owns its data and its states and nothing about routing,
|
|
15
|
+
* which is what lets the web application, JupyterLab, VS Code and Desktop
|
|
16
|
+
* draw the same page.
|
|
17
|
+
*
|
|
18
|
+
* @module views/mcp
|
|
19
|
+
*/
|
|
20
|
+
export * from './types.js';
|
|
21
|
+
export * from './format.js';
|
|
22
|
+
export * from './McpDashboard.js';
|
|
23
|
+
export * from './McpHome.js';
|
|
24
|
+
export * from './ConnectedAgents.js';
|
|
25
|
+
export * from './RunDetail.js';
|
|
26
|
+
export * from './NotebookRuns.js';
|
|
27
|
+
export * from './AlertDestinations.js';
|
|
28
|
+
export * from './AlertRules.js';
|
|
29
|
+
export * from './OrganizationPolicy.js';
|
|
30
|
+
export * from './PersonalPolicy.js';
|
|
31
|
+
export * from './PolicyForm.js';
|
|
32
|
+
export * from './PolicyHistory.js';
|
|
33
|
+
export * from './TeamPolicies.js';
|
|
34
|
+
export * from './ServiceAgents.js';
|
|
35
|
+
export * from './AuditLog.js';
|
|
36
|
+
export * from './McpObservability.js';
|
|
37
|
+
export * from './Policies.js';
|
|
38
|
+
export * from './OrganizationUsage.js';
|
|
39
|
+
export * from './EnterpriseConsole.js';
|
|
40
|
+
export * from './TraceTimeline.js';
|
|
41
|
+
export * from './ApprovalQueue.js';
|
|
42
|
+
export * from './ToolAccess.js';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What every MCP view is given by the application that draws it.
|
|
3
|
+
*
|
|
4
|
+
* Two things a Core view does not decide for itself: the words for a
|
|
5
|
+
* failure, and the addresses to link to. Both belong to the application —
|
|
6
|
+
* the web application says "Sign in to see your agents" and routes at
|
|
7
|
+
* `/audit`, JupyterLab says something else and routes somewhere else — so
|
|
8
|
+
* they arrive as props rather than as a second copy of the same catalog
|
|
9
|
+
* inside Core.
|
|
10
|
+
*
|
|
11
|
+
* The classification itself lives once, in the application, beside its
|
|
12
|
+
* specification: `ui/src/views/mcp/mcpErrorState.ts` and its spec.
|
|
13
|
+
*
|
|
14
|
+
* @module views/mcp/types
|
|
15
|
+
*/
|
|
16
|
+
/** What a failed request actually was, in the reader's terms. */
|
|
17
|
+
export type McpErrorReason = 'unauthenticated' | 'forbidden' | 'not-found' | 'unavailable' | 'unknown';
|
|
18
|
+
export interface McpErrorState {
|
|
19
|
+
reason: McpErrorReason;
|
|
20
|
+
heading: string;
|
|
21
|
+
description: string;
|
|
22
|
+
/** Whether retrying in place could plausibly succeed. */
|
|
23
|
+
retryable: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Describe a failure in terms of what the reader was looking at; `subject`
|
|
27
|
+
* names it as it appears on screen ("Connected agents", "Audit").
|
|
28
|
+
*/
|
|
29
|
+
export type McpErrorStateFn = (error: unknown, subject: string) => McpErrorState;
|
|
30
|
+
/**
|
|
31
|
+
* Where the MCP surfaces live in the application drawing them.
|
|
32
|
+
*
|
|
33
|
+
* A view links onward — a call to its audit row, an agent to its runs — and
|
|
34
|
+
* must not invent the addresses; the application owns its routing.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Where an application puts the surfaces these views link to.
|
|
38
|
+
*
|
|
39
|
+
* Required at every mount, with no defaults. There were defaults, naming the
|
|
40
|
+
* layout the web application had when these views were written — the audit at
|
|
41
|
+
* `/audit`, the runs at `/runs`. The application moved them under `/mcp`, and
|
|
42
|
+
* every view mounted without `routes` went on linking to the old addresses:
|
|
43
|
+
* the page rendered, the links looked right, and clicking one left the tabs
|
|
44
|
+
* or landed on a route that had stopped existing.
|
|
45
|
+
*
|
|
46
|
+
* That was found four separate times by clicking, and fixed four times by
|
|
47
|
+
* eye. A default here is a wrong answer that looks like a right one, so
|
|
48
|
+
* there is none: an application that mounts these says where its own pages
|
|
49
|
+
* are, or it does not compile.
|
|
50
|
+
*/
|
|
51
|
+
export interface McpRoutes {
|
|
52
|
+
/** The dashboard: what the connected clients are doing right now. */
|
|
53
|
+
dashboard: string;
|
|
54
|
+
/** Setup and access: the endpoint and the per-client cards. */
|
|
55
|
+
access: string;
|
|
56
|
+
/** The audit log. */
|
|
57
|
+
audit: string;
|
|
58
|
+
/** The runs list; a task appends `/{uid}`. */
|
|
59
|
+
runs: string;
|
|
60
|
+
/** The observability panes. */
|
|
61
|
+
observability: string;
|
|
62
|
+
/** The connected agents. */
|
|
63
|
+
agents: string;
|
|
64
|
+
/** The effective policy. */
|
|
65
|
+
policies: string;
|
|
66
|
+
}
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { create } from 'zustand';
|
|
16
16
|
import { persist } from 'zustand/middleware';
|
|
17
|
+
import { registerSessionState } from '../../state/sessionEnd.js';
|
|
17
18
|
export const useSimpleAuthStore = create()(persist(set => ({
|
|
18
19
|
token: null,
|
|
19
20
|
handle: null,
|
|
20
21
|
setAuth: (token, handle) => set({ token, handle }),
|
|
21
22
|
clearAuth: () => set({ token: null, handle: null }),
|
|
22
23
|
}), { name: 'datalayer-simple-auth' }));
|
|
24
|
+
// A token is the session's: forgotten when it ends.
|
|
25
|
+
registerSessionState({ forget: () => useSimpleAuthStore.getState().clearAuth() });
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type SecretEditProps = {
|
|
2
|
+
/** The list to return to once the secret is deleted. */
|
|
3
|
+
secretsListRoute?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const SecretEdit: ({ secretsListRoute, }?: SecretEditProps) => import("react").JSX.Element;
|
|
2
6
|
export default SecretEdit;
|
|
@@ -11,7 +11,7 @@ import { EyeIcon, EyeClosedIcon } from '@primer/octicons-react';
|
|
|
11
11
|
import { BoringAvatar } from '../../components/avatars/index.js';
|
|
12
12
|
import { useCache, useNavigate, useToast } from '../../hooks/index.js';
|
|
13
13
|
import { useRunStore } from '../../state/index.js';
|
|
14
|
-
export const SecretEdit = () => {
|
|
14
|
+
export const SecretEdit = ({ secretsListRoute = '/settings/secrets', } = {}) => {
|
|
15
15
|
const { secretId } = useParams();
|
|
16
16
|
const runStore = useRunStore();
|
|
17
17
|
const navigate = useNavigate();
|
|
@@ -44,7 +44,8 @@ export const SecretEdit = () => {
|
|
|
44
44
|
name: secret.name || '',
|
|
45
45
|
nameConfirm: '',
|
|
46
46
|
description: secret.description || '',
|
|
47
|
-
|
|
47
|
+
// `secret.value` is already what its owner wrote (E3-05).
|
|
48
|
+
value: secret.value ?? '',
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
}, [secretQuery.data]);
|
|
@@ -97,7 +98,7 @@ export const SecretEdit = () => {
|
|
|
97
98
|
runStore.layout().showBackdrop('Updating the secret...');
|
|
98
99
|
secret.name = formValues.name;
|
|
99
100
|
secret.description = formValues.description;
|
|
100
|
-
secret.value =
|
|
101
|
+
secret.value = formValues.value;
|
|
101
102
|
updateSecretMutation.mutate(secret, {
|
|
102
103
|
onSuccess: (resp) => {
|
|
103
104
|
if (resp.success) {
|
|
@@ -120,7 +121,7 @@ export const SecretEdit = () => {
|
|
|
120
121
|
enqueueToast('The secret is successfully deleted.', {
|
|
121
122
|
variant: 'success',
|
|
122
123
|
});
|
|
123
|
-
navigate(
|
|
124
|
+
navigate(secretsListRoute);
|
|
124
125
|
}
|
|
125
126
|
},
|
|
126
127
|
onSettled: () => {
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type SecretNewProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The list to return to once the secret is created.
|
|
4
|
+
*
|
|
5
|
+
* It was hardcoded to a settings address this view no longer lives at, so a
|
|
6
|
+
* caller that mounted it elsewhere — and passed this prop, which did not
|
|
7
|
+
* exist — landed on a dead URL after every successful save.
|
|
8
|
+
*/
|
|
9
|
+
secretsListRoute?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const SecretNew: ({ secretsListRoute, }?: SecretNewProps) => import("react").JSX.Element;
|
|
2
12
|
export default SecretNew;
|
|
@@ -8,7 +8,7 @@ import { PageHeader, FormControl, Button, TextInput, Textarea, Select, } from '@
|
|
|
8
8
|
import { Box } from '@datalayer/primer-addons';
|
|
9
9
|
import { useCache, useNavigate, useToast } from '../../hooks/index.js';
|
|
10
10
|
import { useRunStore } from '../../state/index.js';
|
|
11
|
-
export const SecretNew = () => {
|
|
11
|
+
export const SecretNew = ({ secretsListRoute = '/settings/secrets', } = {}) => {
|
|
12
12
|
const runStore = useRunStore();
|
|
13
13
|
const navigate = useNavigate();
|
|
14
14
|
const { useCreateSecret } = useCache();
|
|
@@ -76,12 +76,16 @@ export const SecretNew = () => {
|
|
|
76
76
|
variant: formValues.variant,
|
|
77
77
|
name: formValues.name,
|
|
78
78
|
description: formValues.description,
|
|
79
|
-
|
|
79
|
+
// As it is: a secret has one representation end to end
|
|
80
|
+
// (PLAN_ENVS.md E3-05). This used to `btoa` and nothing on the read
|
|
81
|
+
// side undid it, so a build secret arrived at its build encoded and
|
|
82
|
+
// opened nothing.
|
|
83
|
+
value: formValues.value,
|
|
80
84
|
}, {
|
|
81
85
|
onSuccess: (resp) => {
|
|
82
86
|
if (resp.success) {
|
|
83
87
|
enqueueToast(resp.message, { variant: 'success' });
|
|
84
|
-
navigate(
|
|
88
|
+
navigate(secretsListRoute);
|
|
85
89
|
}
|
|
86
90
|
},
|
|
87
91
|
onSettled: () => {
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type SecretsProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Where the "New Secret" button goes.
|
|
4
|
+
*
|
|
5
|
+
* A prop because the same list is mounted at more than one base: the web
|
|
6
|
+
* application serves it under the settings, a JupyterLab extension under its
|
|
7
|
+
* own route. Hardcoding one of those sent the other somewhere that does not
|
|
8
|
+
* exist.
|
|
9
|
+
*/
|
|
10
|
+
newSecretRoute?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Secrets: ({ newSecretRoute, }?: SecretsProps) => import("react").JSX.Element;
|
|
2
13
|
export default Secrets;
|
|
@@ -41,8 +41,8 @@ const SecretsTable = () => {
|
|
|
41
41
|
},
|
|
42
42
|
] }) }));
|
|
43
43
|
};
|
|
44
|
-
export const Secrets = () => {
|
|
44
|
+
export const Secrets = ({ newSecretRoute = '/settings/secrets/new', } = {}) => {
|
|
45
45
|
const navigate = useNavigate();
|
|
46
|
-
return (_jsxs(PageLayout, { containerWidth: "full", padding: "normal", style: { overflow: 'visible', minHeight: 'calc(100vh - 45px)' }, children: [_jsx(PageLayout.Header, { children: _jsxs(PageHeader, { children: [_jsx(PageHeader.TitleArea, { variant: "large", children: _jsx(PageHeader.Title, { children: "Secrets" }) }), _jsx(PageHeader.Actions, { children: _jsx(Button, { size: "small", variant: "primary", onClick: e => navigate(
|
|
46
|
+
return (_jsxs(PageLayout, { containerWidth: "full", padding: "normal", style: { overflow: 'visible', minHeight: 'calc(100vh - 45px)' }, children: [_jsx(PageLayout.Header, { children: _jsxs(PageHeader, { children: [_jsx(PageHeader.TitleArea, { variant: "large", children: _jsx(PageHeader.Title, { children: "Secrets" }) }), _jsx(PageHeader.Actions, { children: _jsx(Button, { size: "small", variant: "primary", onClick: e => navigate(newSecretRoute, e), children: "New secret" }) })] }) }), _jsx(PageLayout.Content, { children: _jsx(Box, { children: _jsx(SecretsTable, {}) }) })] }));
|
|
47
47
|
};
|
|
48
48
|
export default Secrets;
|