@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,430 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { ActionList, ActionMenu, Button, Heading, Label, Link, RelativeTime, Select, Spinner, Text, } from '@primer/react';
|
|
4
|
+
import { Blankslate, DataTable, Dialog, Table, } from '@primer/react/experimental';
|
|
5
|
+
import { Box } from '@datalayer/primer-addons';
|
|
6
|
+
import { ChecklistIcon, KebabHorizontalIcon, PlayIcon, PlugIcon, StackIcon, TelescopeIcon, } from '@primer/octicons-react';
|
|
7
|
+
import { ShareAccessDialog, sandboxSharingUrl } from '../../components/sharing/index.js';
|
|
8
|
+
import { ClientBadge, McpErrorBlankslate } from '../../components/mcp/index.js';
|
|
9
|
+
import { useDisconnectAgent, useMcpActivity, useTerminateBinding, } from '../../hooks/useMcp.js';
|
|
10
|
+
import { useNavigate, useToast } from '../../hooks/index.js';
|
|
11
|
+
import { useCoreStore } from '../../state/index.js';
|
|
12
|
+
import { clientStatusOf, durationLabel, plural, timeAgo } from './format.js';
|
|
13
|
+
/** How a client's status is drawn. */
|
|
14
|
+
const STATUS_LOOK = {
|
|
15
|
+
active: { label: 'Active', variant: 'success' },
|
|
16
|
+
idle: { label: 'Idle', variant: 'attention' },
|
|
17
|
+
disconnected: { label: 'Disconnected', variant: 'secondary' },
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* How a task's status is drawn.
|
|
21
|
+
*
|
|
22
|
+
* `input_required` is `attention` rather than `secondary` because it is the
|
|
23
|
+
* one status that is waiting on a person: a run stopped for an approval is
|
|
24
|
+
* not idling, it is asking, and it stays asking until somebody answers.
|
|
25
|
+
*/
|
|
26
|
+
const TASK_LOOK = {
|
|
27
|
+
working: { label: 'Working', variant: 'success' },
|
|
28
|
+
input_required: { label: 'Waiting on you', variant: 'attention' },
|
|
29
|
+
completed: { label: 'Completed', variant: 'secondary' },
|
|
30
|
+
failed: { label: 'Failed', variant: 'danger' },
|
|
31
|
+
cancelled: { label: 'Cancelled', variant: 'secondary' },
|
|
32
|
+
};
|
|
33
|
+
/** What a task is running, in one phrase. */
|
|
34
|
+
const taskContext = (task) => {
|
|
35
|
+
if (task.notebookUid) {
|
|
36
|
+
return task.cellId
|
|
37
|
+
? `Notebook ${task.notebookUid} · cell ${task.cellId}`
|
|
38
|
+
: `Notebook ${task.notebookUid}`;
|
|
39
|
+
}
|
|
40
|
+
return task.sandboxUid ? `Sandbox ${task.sandboxUid}` : '';
|
|
41
|
+
};
|
|
42
|
+
/** What a client is working on, in one phrase. */
|
|
43
|
+
const boundTo = (client) => {
|
|
44
|
+
const call = client.lastCall;
|
|
45
|
+
if (!call) {
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
if (call.itemUid) {
|
|
49
|
+
return `Notebook ${call.itemUid}`;
|
|
50
|
+
}
|
|
51
|
+
if (call.sourceUid) {
|
|
52
|
+
return `Source ${call.sourceUid}`;
|
|
53
|
+
}
|
|
54
|
+
return '';
|
|
55
|
+
};
|
|
56
|
+
const countLook = (tone) => tone === 'danger' ? 'danger.fg' : 'fg.default';
|
|
57
|
+
const Count = ({ label, value, tone = 'neutral', note, }) => (_jsxs(Box, { sx: {
|
|
58
|
+
p: 3,
|
|
59
|
+
border: '1px solid',
|
|
60
|
+
borderColor: 'border.default',
|
|
61
|
+
borderRadius: 2,
|
|
62
|
+
bg: 'canvas.default',
|
|
63
|
+
minWidth: 0,
|
|
64
|
+
}, children: [_jsx(Text, { sx: {
|
|
65
|
+
display: 'block',
|
|
66
|
+
fontSize: 4,
|
|
67
|
+
fontWeight: 'bold',
|
|
68
|
+
color: countLook(tone),
|
|
69
|
+
}, children: value }), _jsx(Text, { sx: { display: 'block', fontSize: 0, color: 'fg.muted' }, children: label }), note && (_jsx(Text, { sx: { display: 'block', fontSize: 0, color: 'fg.subtle', mt: 1 }, children: note }))] }));
|
|
70
|
+
/** A panel that has nothing to show, and the step that would fill it. */
|
|
71
|
+
const PanelEmpty = ({ icon: Icon, heading, description, action, }) => (_jsxs(Blankslate, { border: true, spacious: true, children: [_jsx(Blankslate.Visual, { children: _jsx(Icon, { size: "medium" }) }), _jsx(Blankslate.Heading, { children: heading }), _jsx(Blankslate.Description, { children: _jsx(Text, { as: "p", sx: { textAlign: 'center', m: 0 }, children: description }) }), action && (_jsx(Button, { size: "small", onClick: action.onClick, children: action.label }))] }));
|
|
72
|
+
export const McpDashboard = ({ errorState, routes, org, showTitle = true, section, }) => {
|
|
73
|
+
/** Whether this section is the one being drawn. */
|
|
74
|
+
const draws = (name) => section === name;
|
|
75
|
+
const navigate = useNavigate();
|
|
76
|
+
const { enqueueToast } = useToast();
|
|
77
|
+
const activity = useMcpActivity(org ? { org } : {});
|
|
78
|
+
const disconnect = useDisconnectAgent();
|
|
79
|
+
const terminate = useTerminateBinding();
|
|
80
|
+
const [disconnecting, setDisconnecting] = useState(null);
|
|
81
|
+
const [terminating, setTerminating] = useState(null);
|
|
82
|
+
const [sharing, setSharing] = useState(null);
|
|
83
|
+
// Runtimes owns a sandbox's sharing, and addresses it by the *runtime's*
|
|
84
|
+
// name rather than by the handle the session holds.
|
|
85
|
+
const runtimesUrl = useCoreStore(state => state.configuration.runtimesUrl || state.configuration.managerUrl || '');
|
|
86
|
+
// Primer 37 types Dialog's focus refs with React 18's non-nullable
|
|
87
|
+
// `RefObject<HTMLElement>`. React 19's `useRef(null)` is nullable, and this
|
|
88
|
+
// ref is only handed to Dialog, so narrow it once here.
|
|
89
|
+
const returnFocusRef = useRef(null);
|
|
90
|
+
// The calls panel filters what is already in hand: the answer carries the
|
|
91
|
+
// last fifty calls, so narrowing them is a matter of the browser, not of
|
|
92
|
+
// another request.
|
|
93
|
+
const [callClient, setCallClient] = useState('');
|
|
94
|
+
const [callTool, setCallTool] = useState('');
|
|
95
|
+
const [callOutcome, setCallOutcome] = useState('');
|
|
96
|
+
const data = activity.data;
|
|
97
|
+
const clients = useMemo(() => (data?.clients ?? []).map(client => ({
|
|
98
|
+
...client,
|
|
99
|
+
id: client.clientId,
|
|
100
|
+
status: clientStatusOf(client.lastCall?.at),
|
|
101
|
+
})), [data?.clients]);
|
|
102
|
+
const sandboxes = useMemo(() => (data?.sandboxes ?? []).map(binding => ({ ...binding, id: binding.uid })), [data?.sandboxes]);
|
|
103
|
+
/**
|
|
104
|
+
* The runs, the ones asking for a person first.
|
|
105
|
+
*
|
|
106
|
+
* `input_required` is a run that has stopped and will not move until
|
|
107
|
+
* somebody answers it, so it goes to the top however long it has been
|
|
108
|
+
* there; `working` next; then whatever has just finished, newest first. A
|
|
109
|
+
* list ordered only by time buries the one row that needs a hand.
|
|
110
|
+
*/
|
|
111
|
+
const tasks = useMemo(() => {
|
|
112
|
+
const rank = {
|
|
113
|
+
input_required: 0,
|
|
114
|
+
working: 1,
|
|
115
|
+
failed: 2,
|
|
116
|
+
completed: 3,
|
|
117
|
+
cancelled: 3,
|
|
118
|
+
};
|
|
119
|
+
return [...(data?.tasks ?? [])]
|
|
120
|
+
.map(task => ({ ...task, id: task.uid }))
|
|
121
|
+
.sort((left, right) => rank[left.status] - rank[right.status] ||
|
|
122
|
+
right.lastUpdatedAt.localeCompare(left.lastUpdatedAt));
|
|
123
|
+
}, [data?.tasks]);
|
|
124
|
+
const calls = useMemo(() => (data?.calls ?? []).map(call => ({ ...call, id: call.uid })), [data?.calls]);
|
|
125
|
+
const filteredCalls = useMemo(() => calls.filter(call => (!callClient || call.clientId === callClient) &&
|
|
126
|
+
(!callTool || call.tool === callTool) &&
|
|
127
|
+
(!callOutcome ||
|
|
128
|
+
(callOutcome === 'refused'
|
|
129
|
+
? call.decision === 'refused'
|
|
130
|
+
: call.outcome === callOutcome))), [calls, callClient, callTool, callOutcome]);
|
|
131
|
+
const callTools = useMemo(() => [
|
|
132
|
+
...new Set(calls.map(call => call.tool).filter(Boolean)),
|
|
133
|
+
].sort(), [calls]);
|
|
134
|
+
const auditFor = (call) => {
|
|
135
|
+
const parameters = new URLSearchParams();
|
|
136
|
+
if (call.taskId) {
|
|
137
|
+
parameters.set('task', call.taskId);
|
|
138
|
+
}
|
|
139
|
+
else if (call.traceId) {
|
|
140
|
+
parameters.set('trace', call.traceId);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
if (call.clientId) {
|
|
144
|
+
parameters.set('agent', call.clientId);
|
|
145
|
+
}
|
|
146
|
+
if (call.tool) {
|
|
147
|
+
parameters.set('tool', call.tool);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const search = parameters.toString();
|
|
151
|
+
return search ? `${routes.audit}?${search}` : routes.audit;
|
|
152
|
+
};
|
|
153
|
+
const traceFor = (call) => {
|
|
154
|
+
if (call.taskId) {
|
|
155
|
+
return `${routes.observability}?task=${encodeURIComponent(call.taskId)}`;
|
|
156
|
+
}
|
|
157
|
+
if (call.traceId) {
|
|
158
|
+
return `${routes.observability}?trace=${encodeURIComponent(call.traceId)}`;
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
161
|
+
};
|
|
162
|
+
const confirmDisconnect = () => {
|
|
163
|
+
const client = disconnecting;
|
|
164
|
+
if (!client?.grantUid) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
disconnect.mutate(client.grantUid, {
|
|
168
|
+
onSuccess: () => {
|
|
169
|
+
enqueueToast(`${client.clientName || client.clientId} is disconnected.`, {
|
|
170
|
+
variant: 'success',
|
|
171
|
+
});
|
|
172
|
+
setDisconnecting(null);
|
|
173
|
+
},
|
|
174
|
+
onError: reason => {
|
|
175
|
+
enqueueToast(`Could not disconnect: ${reason.message}`, {
|
|
176
|
+
variant: 'error',
|
|
177
|
+
});
|
|
178
|
+
setDisconnecting(null);
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
const confirmTerminate = () => {
|
|
183
|
+
const binding = terminating;
|
|
184
|
+
if (!binding) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
terminate.mutate(binding.uid, {
|
|
188
|
+
onSuccess: () => {
|
|
189
|
+
enqueueToast(`Sandbox ${binding.uid} is terminated.`, {
|
|
190
|
+
variant: 'success',
|
|
191
|
+
});
|
|
192
|
+
setTerminating(null);
|
|
193
|
+
},
|
|
194
|
+
onError: reason => {
|
|
195
|
+
enqueueToast(`Could not terminate: ${reason.message}`, {
|
|
196
|
+
variant: 'error',
|
|
197
|
+
});
|
|
198
|
+
setTerminating(null);
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
const clientColumns = [
|
|
203
|
+
{
|
|
204
|
+
header: 'Client',
|
|
205
|
+
field: 'clientId',
|
|
206
|
+
rowHeader: true,
|
|
207
|
+
renderCell: row => (_jsx(ClientBadge, { clientId: row.clientId, clientName: row.clientName })),
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
header: 'Kind',
|
|
211
|
+
id: 'kind',
|
|
212
|
+
width: '110px',
|
|
213
|
+
// Service agents are principals of an organization and arrive with
|
|
214
|
+
// milestone 3; every grant IAM answers today is a delegation.
|
|
215
|
+
renderCell: () => (_jsx(Label, { size: "small", variant: "secondary", children: "Delegated" })),
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
header: 'Bound to',
|
|
219
|
+
id: 'bound',
|
|
220
|
+
width: 'growCollapse',
|
|
221
|
+
renderCell: row => (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: boundTo(row) || '—' })),
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
header: 'Last tool',
|
|
225
|
+
id: 'last-tool',
|
|
226
|
+
renderCell: row => row.lastCall ? (_jsxs(Box, { sx: { display: 'grid', gap: '2px', minWidth: 0 }, children: [_jsx(Text, { sx: { fontSize: 0 }, children: row.lastCall.tool || row.lastCall.method }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: timeAgo(row.lastCall.at) })] })) : (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Nothing yet" })),
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
header: 'Status',
|
|
230
|
+
id: 'status',
|
|
231
|
+
width: '120px',
|
|
232
|
+
renderCell: row => (_jsx(Label, { size: "small", variant: STATUS_LOOK[row.status].variant, children: STATUS_LOOK[row.status].label })),
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
header: '',
|
|
236
|
+
id: 'actions',
|
|
237
|
+
width: '48px',
|
|
238
|
+
align: 'end',
|
|
239
|
+
renderCell: row => (_jsxs(ActionMenu, { children: [_jsx(ActionMenu.Anchor, { children: _jsx(Button, { variant: "invisible", size: "small", "aria-label": `Actions for ${row.clientName || row.clientId}`, icon: KebabHorizontalIcon }) }), _jsx(ActionMenu.Overlay, { align: "end", children: _jsxs(ActionList, { children: [_jsx(ActionList.Item, { onSelect: () => navigate(`${routes.audit}?agent=${encodeURIComponent(row.clientId)}`), children: "Audit" }), _jsx(ActionList.Divider, {}), _jsx(ActionList.Item, { variant: "danger", disabled: !row.grantUid, onSelect: () => setDisconnecting(row), children: "Disconnect" })] }) })] })),
|
|
240
|
+
},
|
|
241
|
+
];
|
|
242
|
+
const taskColumns = [
|
|
243
|
+
{
|
|
244
|
+
header: 'Run',
|
|
245
|
+
field: 'uid',
|
|
246
|
+
rowHeader: true,
|
|
247
|
+
renderCell: row => (_jsx(Link, { href: `${routes.runs}/${encodeURIComponent(row.uid)}`, onClick: event => {
|
|
248
|
+
event.preventDefault();
|
|
249
|
+
navigate(`${routes.runs}/${encodeURIComponent(row.uid)}`);
|
|
250
|
+
}, sx: { fontFamily: 'mono', fontSize: 0 }, children: row.uid })),
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
header: 'Status',
|
|
254
|
+
id: 'status',
|
|
255
|
+
width: '150px',
|
|
256
|
+
renderCell: row => (_jsx(Label, { size: "small", variant: TASK_LOOK[row.status].variant, children: TASK_LOOK[row.status].label })),
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
header: 'Tool',
|
|
260
|
+
id: 'tool',
|
|
261
|
+
width: '160px',
|
|
262
|
+
renderCell: row => _jsx(Text, { sx: { fontSize: 0 }, children: row.tool || '—' }),
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
header: 'Running',
|
|
266
|
+
id: 'context',
|
|
267
|
+
width: 'growCollapse',
|
|
268
|
+
renderCell: row => (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: taskContext(row) || '—' })),
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
header: 'Updated',
|
|
272
|
+
id: 'updated',
|
|
273
|
+
width: '140px',
|
|
274
|
+
renderCell: row => (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: _jsx(RelativeTime, { datetime: row.lastUpdatedAt }) })),
|
|
275
|
+
},
|
|
276
|
+
];
|
|
277
|
+
const sandboxColumns = [
|
|
278
|
+
{
|
|
279
|
+
header: 'Handle',
|
|
280
|
+
field: 'uid',
|
|
281
|
+
rowHeader: true,
|
|
282
|
+
renderCell: row => (_jsx(Text, { sx: { fontFamily: 'mono', fontSize: 0 }, children: row.uid })),
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
header: 'Provider',
|
|
286
|
+
id: 'provider',
|
|
287
|
+
width: '120px',
|
|
288
|
+
renderCell: row => (_jsx(Text, { sx: { fontSize: 0 }, children: row.sandboxProvider || 'datalayer' })),
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
header: 'Capabilities',
|
|
292
|
+
id: 'capabilities',
|
|
293
|
+
width: 'growCollapse',
|
|
294
|
+
renderCell: row => (_jsxs(Box, { sx: { display: 'flex', gap: 1, flexWrap: 'wrap' }, children: [(row.capabilities ?? []).map(capability => (_jsx(Label, { size: "small", variant: "secondary", children: capability }, capability))), (row.capabilities ?? []).length === 0 && (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "\u2014" }))] })),
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
header: 'Last used',
|
|
298
|
+
id: 'last-used',
|
|
299
|
+
width: '120px',
|
|
300
|
+
renderCell: row => (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: timeAgo(row.lastUsedAt ?? row.createdAt) || '—' })),
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
header: 'State',
|
|
304
|
+
id: 'state',
|
|
305
|
+
width: '150px',
|
|
306
|
+
renderCell: row => row.state === 'lost' ? (
|
|
307
|
+
// The loss is a fact of the session, not a hiccup: it is named
|
|
308
|
+
// with the error the next call was answered with.
|
|
309
|
+
_jsx(Label, { size: "small", variant: "danger", children: "SANDBOX_LOST" })) : (_jsx(Label, { size: "small", variant: row.state === 'active' ? 'success' : 'secondary', children: row.state ?? 'active' })),
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
header: '',
|
|
313
|
+
id: 'actions',
|
|
314
|
+
width: '190px',
|
|
315
|
+
align: 'end',
|
|
316
|
+
renderCell: row => (_jsxs(Box, { sx: { display: 'flex', gap: 2, justifyContent: 'flex-end' }, children: [sandboxSharingUrl(runtimesUrl, row.runtimeName) && (_jsx(Button, { size: "small", disabled: row.state === 'closed', onClick: () => setSharing(row), children: "Share" })), _jsx(Button, { size: "small", variant: "danger", disabled: row.state === 'closed', onClick: () => setTerminating(row), children: "Terminate" })] })),
|
|
317
|
+
},
|
|
318
|
+
];
|
|
319
|
+
const callColumns = [
|
|
320
|
+
{
|
|
321
|
+
header: 'Tool',
|
|
322
|
+
field: 'tool',
|
|
323
|
+
rowHeader: true,
|
|
324
|
+
renderCell: row => (_jsxs(Box, { sx: { display: 'grid', gap: '2px', minWidth: 0 }, children: [_jsx(Text, { sx: { fontSize: 1 }, children: row.tool || row.method }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: timeAgo(row.at) })] })),
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
header: 'Client',
|
|
328
|
+
id: 'client',
|
|
329
|
+
renderCell: row => (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: row.clientId || '—' })),
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
header: 'On',
|
|
333
|
+
id: 'item',
|
|
334
|
+
width: 'growCollapse',
|
|
335
|
+
renderCell: row => (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: row.itemUid || row.sourceUid || '—' })),
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
header: 'Decision',
|
|
339
|
+
id: 'decision',
|
|
340
|
+
width: '110px',
|
|
341
|
+
renderCell: row => (_jsx(Label, { size: "small", variant: row.decision === 'refused' ? 'danger' : 'success', children: row.decision })),
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
header: 'Outcome',
|
|
345
|
+
id: 'outcome',
|
|
346
|
+
width: '110px',
|
|
347
|
+
renderCell: row => (_jsx(Text, { sx: {
|
|
348
|
+
fontSize: 0,
|
|
349
|
+
color: row.outcome === 'ok' ? 'fg.muted' : 'danger.fg',
|
|
350
|
+
}, children: row.outcome ?? '—' })),
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
header: 'Took',
|
|
354
|
+
id: 'duration',
|
|
355
|
+
width: '90px',
|
|
356
|
+
renderCell: row => (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: durationLabel(row.durationMs) || '—' })),
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
header: '',
|
|
360
|
+
id: 'links',
|
|
361
|
+
width: '150px',
|
|
362
|
+
align: 'end',
|
|
363
|
+
renderCell: row => {
|
|
364
|
+
const trace = traceFor(row);
|
|
365
|
+
return (_jsxs(Box, { sx: { display: 'flex', gap: 2, justifyContent: 'flex-end' }, children: [_jsx(Link, { as: "button", sx: { fontSize: 0, cursor: 'pointer' }, onClick: () => navigate(auditFor(row)), children: "Audit" }), trace && (_jsx(Link, { as: "button", sx: { fontSize: 0, cursor: 'pointer' }, onClick: () => navigate(trace), children: "Trace" }))] }));
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
];
|
|
369
|
+
if (activity.isError) {
|
|
370
|
+
return (_jsx(Box, { sx: { display: 'grid', gap: 3 }, children: _jsx(McpErrorBlankslate, { state: errorState(activity.error, 'MCP activity'), onRetry: () => activity.refetch() }) }));
|
|
371
|
+
}
|
|
372
|
+
const loading = activity.isPending && !data;
|
|
373
|
+
return (_jsxs(Box, { sx: { display: 'grid', gap: 4, minWidth: 0 }, children: [showTitle && (_jsxs(Box, { children: [_jsx(Heading, { as: "h2", sx: { fontSize: 3, mb: 1 }, children: "MCP" }), _jsx(Text, { as: "p", sx: { color: 'fg.muted', fontSize: 1, m: 0 }, children: "What the agents connected to your workspace are doing right now." })] })), draws('overview') &&
|
|
374
|
+
(loading ? (_jsx(Box, { sx: { display: 'flex', justifyContent: 'center', py: 5 }, children: _jsx(Spinner, {}) })) : (_jsxs(Box, { sx: {
|
|
375
|
+
display: 'grid',
|
|
376
|
+
gap: 3,
|
|
377
|
+
gridTemplateColumns: [
|
|
378
|
+
'repeat(2, 1fr)',
|
|
379
|
+
'repeat(3, 1fr)',
|
|
380
|
+
'repeat(6, 1fr)',
|
|
381
|
+
],
|
|
382
|
+
}, children: [_jsx(Count, { label: "Clients connected", value: clients.length }), _jsx(Count, { label: "Sandboxes bound", value: sandboxes.filter(binding => (binding.state ?? 'active') === 'active').length }), _jsx(Count, { label: "Tasks running", value: data?.tasks.length ?? 0 }), _jsx(Count, { label: "Calls today", value: data?.today.calls ?? 0 }), _jsx(Count, { label: "Refusals today", value: data?.today.refusals ?? 0, tone: (data?.today.refusals ?? 0) > 0 ? 'danger' : 'neutral' }), _jsx(Count, { label: "Credits by agents", value: data?.today.credits ?? 0, note: "today" })] }))), draws('agents') &&
|
|
383
|
+
!loading &&
|
|
384
|
+
(clients.length > 0 ? (_jsxs(Table.Container, { children: [_jsx(Table.Title, { as: "h3", id: "mcp-clients", children: "Connected clients" }), _jsxs(Table.Subtitle, { as: "p", id: "mcp-clients-subtitle", children: [plural(clients.length, 'client'), " with a live grant on your workspace."] }), _jsx(DataTable, { "aria-labelledby": "mcp-clients", "aria-describedby": "mcp-clients-subtitle", data: clients, columns: clientColumns })] })) : (_jsx(PanelEmpty, { icon: PlugIcon, heading: "No client connected", description: "Connect Claude Code, Codex, Cursor, VS Code or any MCP client to your workspace, and it appears here on its first call.", action: {
|
|
385
|
+
label: 'Set up a client',
|
|
386
|
+
onClick: () => navigate(routes.access),
|
|
387
|
+
} }))), draws('runs') && !loading && (_jsx(Box, { children: tasks.length > 0 ? (_jsxs(Table.Container, { children: [_jsx(Table.Title, { as: "h3", id: "mcp-runs", children: "Running now" }), _jsx(Table.Subtitle, { as: "p", id: "mcp-runs-subtitle", children: "A tool call that outlives its request. Open one to watch its output, cancel it, or answer it when it is waiting on you." }), _jsx(DataTable, { "aria-labelledby": "mcp-runs", "aria-describedby": "mcp-runs-subtitle", data: tasks, columns: taskColumns })] })) : (_jsx(PanelEmpty, { icon: PlayIcon, heading: "Nothing is running", description: "A tool call that outlives its request becomes a task you can watch, cancel and answer. Ask a client for one \u2014 an agent that runs a long cell \u2014 and it appears here while it runs." })) })), draws('sandboxes') &&
|
|
388
|
+
!loading &&
|
|
389
|
+
(sandboxes.length > 0 ? (_jsxs(Table.Container, { children: [_jsx(Table.Title, { as: "h3", id: "mcp-sandboxes", children: "Sandboxes bound" }), _jsx(Table.Subtitle, { as: "p", id: "mcp-sandboxes-subtitle", children: "The sessions your agents execute in. Terminating one ends its open work." }), _jsx(DataTable, { "aria-labelledby": "mcp-sandboxes", "aria-describedby": "mcp-sandboxes-subtitle", data: sandboxes, columns: sandboxColumns })] })) : (_jsx(PanelEmpty, { icon: StackIcon, heading: "No sandbox bound", description: "An agent that launches a sandbox keeps it for the session; it appears here with its provider, its capabilities and what it is doing." }))), draws('calls') &&
|
|
390
|
+
!loading &&
|
|
391
|
+
(calls.length > 0 ? (_jsxs(Table.Container, { children: [_jsx(Table.Title, { as: "h3", id: "mcp-calls", children: "Recent calls" }), _jsx(Table.Subtitle, { as: "p", id: "mcp-calls-subtitle", children: "The last calls as they landed. Every one of them has an audit row that outlives this page." }), _jsx(Table.Actions, { children: _jsxs(Box, { sx: { display: 'flex', gap: 2, alignItems: 'center' }, children: [_jsxs(Select, { size: "small", "aria-label": "Filter by client", value: callClient, onChange: event => setCallClient(event.currentTarget.value), children: [_jsx(Select.Option, { value: "", children: "Every client" }), clients.map(client => (_jsx(Select.Option, { value: client.clientId, children: client.clientName || client.clientId }, client.clientId)))] }), _jsxs(Select, { size: "small", "aria-label": "Filter by tool", value: callTool, onChange: event => setCallTool(event.currentTarget.value), children: [_jsx(Select.Option, { value: "", children: "Every tool" }), callTools.map(tool => (_jsx(Select.Option, { value: tool, children: tool }, tool)))] }), _jsxs(Select, { size: "small", "aria-label": "Filter by outcome", value: callOutcome, onChange: event => setCallOutcome(event.currentTarget.value), children: [_jsx(Select.Option, { value: "", children: "Every outcome" }), _jsx(Select.Option, { value: "ok", children: "Succeeded" }), _jsx(Select.Option, { value: "error", children: "Failed" }), _jsx(Select.Option, { value: "refused", children: "Refused" })] })] }) }), filteredCalls.length > 0 ? (_jsx(DataTable, { "aria-labelledby": "mcp-calls", "aria-describedby": "mcp-calls-subtitle", data: filteredCalls, columns: callColumns })) : (_jsx(Box, { sx: {
|
|
392
|
+
p: 4,
|
|
393
|
+
textAlign: 'center',
|
|
394
|
+
color: 'fg.muted',
|
|
395
|
+
fontSize: 1,
|
|
396
|
+
}, children: "No call matches these filters." }))] })) : (_jsx(PanelEmpty, { icon: ChecklistIcon, heading: "No call yet", description: "Ask your agent to list your notebooks. The call, its decision and its outcome land here and in the audit log.", action: {
|
|
397
|
+
label: 'Open the audit log',
|
|
398
|
+
onClick: () => navigate(routes.audit),
|
|
399
|
+
} }))), !loading && (_jsxs(Box, { sx: {
|
|
400
|
+
display: 'flex',
|
|
401
|
+
gap: 3,
|
|
402
|
+
alignItems: 'center',
|
|
403
|
+
flexWrap: 'wrap',
|
|
404
|
+
}, children: [_jsx(Button, { size: "small", leadingVisual: TelescopeIcon, onClick: () => navigate(routes.observability), children: "Observability" }), _jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: ["Refreshed ", timeAgo(data?.at) || 'just now', ", and again every ten seconds."] })] })), disconnecting && (_jsx(Dialog, { title: "Disconnect this client?", onClose: () => setDisconnecting(null), returnFocusRef: returnFocusRef, footerButtons: [
|
|
405
|
+
{
|
|
406
|
+
buttonType: 'default',
|
|
407
|
+
content: 'Keep it',
|
|
408
|
+
onClick: () => setDisconnecting(null),
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
buttonType: 'danger',
|
|
412
|
+
content: 'Disconnect',
|
|
413
|
+
onClick: confirmDisconnect,
|
|
414
|
+
disabled: disconnect.isPending,
|
|
415
|
+
},
|
|
416
|
+
], children: _jsxs(Text, { sx: { fontSize: 1 }, children: [disconnecting.clientName || disconnecting.clientId, " loses its grant at once. Its next call is refused; an access token it still holds dies with its own short expiry. Nothing it already did is undone."] }) })), terminating && (_jsx(Dialog, { title: "Terminate this sandbox?", onClose: () => setTerminating(null), returnFocusRef: returnFocusRef, footerButtons: [
|
|
417
|
+
{
|
|
418
|
+
buttonType: 'default',
|
|
419
|
+
content: 'Keep it',
|
|
420
|
+
onClick: () => setTerminating(null),
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
buttonType: 'danger',
|
|
424
|
+
content: 'Terminate',
|
|
425
|
+
onClick: confirmTerminate,
|
|
426
|
+
disabled: terminate.isPending,
|
|
427
|
+
},
|
|
428
|
+
], children: _jsxs(Text, { sx: { fontSize: 1 }, children: ["The runtime behind ", terminating.uid, " is stopped and its session closed. Work the agent has open there ends as", ' ', _jsx("code", { children: "SANDBOX_LOST" }), "; anything already written to a notebook stays."] }) })), sandboxSharingUrl(runtimesUrl, sharing?.runtimeName) && (_jsx(ShareAccessDialog, { isOpen: true, requestUrl: sandboxSharingUrl(runtimesUrl, sharing?.runtimeName), resourceLabel: "Sandbox", resourceName: sharing?.alias || sharing?.uid, resourceDescription: "Who else may look at this sandbox, change it, or run code on it. Sharing ends when the sandbox does.", onClose: () => setSharing(null) }))] }));
|
|
429
|
+
};
|
|
430
|
+
export default McpDashboard;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Access › MCP: how to connect a client, and what your agents may reach.
|
|
3
|
+
*
|
|
4
|
+
* This is the *setup and access* page, not the dashboard. It answers "how
|
|
5
|
+
* do I point my client at Datalayer" first — the endpoint, and one card per
|
|
6
|
+
* client with the command that writes its configuration — and then, in five
|
|
7
|
+
* summaries that link onward, "and what have they got": the agents
|
|
8
|
+
* connected, the runs, the toolsets, the notebooks and sources shared with
|
|
9
|
+
* an agent, and how the calls are behaving.
|
|
10
|
+
*
|
|
11
|
+
* What is happening *right now* is the dashboard's question, and the line
|
|
12
|
+
* at the top of the page opens it rather than answering it twice.
|
|
13
|
+
*
|
|
14
|
+
* Each card degrades to an explanatory empty state: a card with nothing in
|
|
15
|
+
* it says what would put something there.
|
|
16
|
+
*
|
|
17
|
+
* @module views/mcp/McpHome
|
|
18
|
+
*/
|
|
19
|
+
import type { JSX } from 'react';
|
|
20
|
+
import { type McpRoutes } from './types';
|
|
21
|
+
export interface McpHomeProps {
|
|
22
|
+
/** Where this application puts the surfaces this view links to. */
|
|
23
|
+
routes: McpRoutes;
|
|
24
|
+
/** Where the per-client manuals live; each client appends its own name. */
|
|
25
|
+
clientDocsBase?: string;
|
|
26
|
+
showTitle?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to draw the summary cards beneath the setup.
|
|
29
|
+
*
|
|
30
|
+
* Off where they have a page of their own. This page answers "how do I
|
|
31
|
+
* connect one", and six cards about what connected agents are *doing* sat
|
|
32
|
+
* under that question answering a different one — a reader looking for a
|
|
33
|
+
* command scrolled past them, and a reader looking for the numbers had to
|
|
34
|
+
* know they were filed under Access.
|
|
35
|
+
*/
|
|
36
|
+
showSummaries?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to draw the setup half — the endpoint and the per-client cards.
|
|
39
|
+
*
|
|
40
|
+
* Off where only the summaries are wanted, which is how the MCP overview
|
|
41
|
+
* mounts this: the two halves answer different questions and now live on
|
|
42
|
+
* different tabs, and one component drawing either keeps the wording and
|
|
43
|
+
* the data of each in one place rather than two that drift.
|
|
44
|
+
*/
|
|
45
|
+
showSetup?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Open a documentation page beside this view rather than navigating to it.
|
|
48
|
+
*
|
|
49
|
+
* A client's "Configuration and authorization" opens the panel the
|
|
50
|
+
* application has rather than navigating: reading how to configure Cursor
|
|
51
|
+
* should not mean losing the endpoint, the other clients and the command
|
|
52
|
+
* that were on screen — the page you are reading about is the page you
|
|
53
|
+
* just left.
|
|
54
|
+
*
|
|
55
|
+
* Required, and a callback rather than the store itself: this view knows a
|
|
56
|
+
* documentation *path* and nothing about how an application shows one. An
|
|
57
|
+
* optional one would mean a second behaviour nobody chose, kept alive by
|
|
58
|
+
* whichever caller forgot to pass it.
|
|
59
|
+
*/
|
|
60
|
+
onOpenDocs: (path: string) => void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The clients the documentation carries a page for, in the order it lists
|
|
64
|
+
* them, with the name `datalayer mcp setup` takes.
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
67
|
+
* The command that writes a client's configuration.
|
|
68
|
+
*
|
|
69
|
+
* One function rather than the string written wherever it is shown. It is
|
|
70
|
+
* shown in two places that must not disagree — the Access view and the
|
|
71
|
+
* documentation page for each client — and a command a reader copies from
|
|
72
|
+
* the documentation that differs by a word from the one the interface shows
|
|
73
|
+
* is worse than either alone: it is two answers to "what do I run", and no
|
|
74
|
+
* way to tell which is current.
|
|
75
|
+
*/
|
|
76
|
+
export declare const mcpSetupCommand: (client: string) => string;
|
|
77
|
+
export declare const MCP_CLIENTS: {
|
|
78
|
+
name: string;
|
|
79
|
+
setup: string;
|
|
80
|
+
}[];
|
|
81
|
+
/**
|
|
82
|
+
* A line of text with the button that copies it.
|
|
83
|
+
*
|
|
84
|
+
* Exported so the documentation shows a command the same way this view
|
|
85
|
+
* does: a reader who has seen one and then the other should not have to
|
|
86
|
+
* work out whether they are the same affordance.
|
|
87
|
+
*/
|
|
88
|
+
export declare const Copyable: ({ text }: {
|
|
89
|
+
text: string;
|
|
90
|
+
}) => JSX.Element;
|
|
91
|
+
export declare const McpHome: ({ routes, clientDocsBase, showTitle, showSummaries, showSetup, onOpenDocs, }: McpHomeProps) => JSX.Element;
|
|
92
|
+
export default McpHome;
|