@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,70 @@
|
|
|
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
|
+
* What every gateway client shares: where the REST routes are, and how a
|
|
11
|
+
* wire document becomes a model.
|
|
12
|
+
*
|
|
13
|
+
* The configured URL is the MCP resource — `https://mcp.datalayer.run/mcp`,
|
|
14
|
+
* the address an agent connects to and the audience a token names. The
|
|
15
|
+
* REST routes live on the same host under `/api/mcp/v1`, so the resource
|
|
16
|
+
* path is taken off before a route is appended.
|
|
17
|
+
*
|
|
18
|
+
* Wire documents are snake case and the models camel case, as with
|
|
19
|
+
* Contents, with one difference: a task's `result` and an audit row's
|
|
20
|
+
* `redactedArguments` are a tool's own — their keys are the tool's
|
|
21
|
+
* argument and output names and must survive as typed — so the envelope is
|
|
22
|
+
* converted around them, never through them.
|
|
23
|
+
*
|
|
24
|
+
* @module api/mcp/gateway
|
|
25
|
+
*/
|
|
26
|
+
import { API_BASE_PATHS, DEFAULT_SERVICE_URLS } from '../constants.js';
|
|
27
|
+
import { contentsToCamelCase, contentsToSnakeCase } from '../../models/contents/index.js';
|
|
28
|
+
/** The host and scheme of the gateway, without the `/mcp` resource path. */
|
|
29
|
+
export const mcpGatewayOrigin = (mcpServerUrl = DEFAULT_SERVICE_URLS.JUPYTER_MCP_SERVER) => {
|
|
30
|
+
const trimmed = mcpServerUrl.replace(/\/+$/, '');
|
|
31
|
+
return trimmed.endsWith('/mcp') ? trimmed.slice(0, -'/mcp'.length) : trimmed;
|
|
32
|
+
};
|
|
33
|
+
/** A REST route of the gateway, with its query string. */
|
|
34
|
+
export const mcpUrl = (mcpServerUrl, suffix, query = {}) => {
|
|
35
|
+
const parameters = new URLSearchParams();
|
|
36
|
+
for (const [key, value] of Object.entries(query)) {
|
|
37
|
+
if (value !== undefined && value !== null && value !== '') {
|
|
38
|
+
parameters.set(key, String(value));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const search = parameters.toString();
|
|
42
|
+
return `${mcpGatewayOrigin(mcpServerUrl)}${API_BASE_PATHS.MCP}${suffix}${search ? `?${search}` : ''}`;
|
|
43
|
+
};
|
|
44
|
+
/** A route outside the versioned API: `/api/mcp/version`, `/api/mcp/healthz`. */
|
|
45
|
+
export const mcpServiceUrl = (mcpServerUrl, suffix) => `${mcpGatewayOrigin(mcpServerUrl)}/api/mcp${suffix}`;
|
|
46
|
+
/** The fields whose keys belong to a tool, not to the contract. */
|
|
47
|
+
const PRESERVED_FIELDS = new Set(['result', 'redacted_arguments', 'client_info', 'input', 'output']);
|
|
48
|
+
const isObject = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
49
|
+
const camelKey = (key) => key.replace(/_([a-zA-Z0-9])/g, (_, character) => character.toUpperCase());
|
|
50
|
+
/**
|
|
51
|
+
* A wire document as a model: snake case to camel case through the envelope,
|
|
52
|
+
* the preserved fields carried as they came.
|
|
53
|
+
*/
|
|
54
|
+
export const fromWire = (value) => {
|
|
55
|
+
if (Array.isArray(value)) {
|
|
56
|
+
return value.map(item => fromWire(item));
|
|
57
|
+
}
|
|
58
|
+
if (!isObject(value)) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
const converted = {};
|
|
62
|
+
for (const [key, item] of Object.entries(value)) {
|
|
63
|
+
converted[camelKey(key)] = PRESERVED_FIELDS.has(key) ? item : fromWire(item);
|
|
64
|
+
}
|
|
65
|
+
return converted;
|
|
66
|
+
};
|
|
67
|
+
/** A request body as the gateway reads it. */
|
|
68
|
+
export const toWire = (value) => contentsToSnakeCase(value);
|
|
69
|
+
/** For the few answers with no tool-owned field, the Contents converter as is. */
|
|
70
|
+
export const fromWireStrict = (value) => contentsToCamelCase(value);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface HTTPValidationError {
|
|
2
|
+
detail?: Array<ValidationError>;
|
|
3
|
+
}
|
|
4
|
+
export interface ValidationError {
|
|
5
|
+
loc: Array<string | number>;
|
|
6
|
+
msg: string;
|
|
7
|
+
type: string;
|
|
8
|
+
input?: unknown;
|
|
9
|
+
ctx?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/** One REST route the gateway declares. */
|
|
12
|
+
export interface McpGatewayRoute {
|
|
13
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
14
|
+
path: string;
|
|
15
|
+
operationId: string;
|
|
16
|
+
parameters: Array<{
|
|
17
|
+
name: string;
|
|
18
|
+
in: string;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
/** The gateway version the routes were read from: 0.0.1. */
|
|
22
|
+
export declare const MCP_GATEWAY_ROUTES: ReadonlyArray<McpGatewayRoute>;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/** The gateway version the routes were read from: 0.0.1. */
|
|
6
|
+
export const MCP_GATEWAY_ROUTES = [
|
|
7
|
+
{
|
|
8
|
+
method: 'GET',
|
|
9
|
+
path: '/.well-known/mcp-server',
|
|
10
|
+
operationId: 'server_card_endpoint__well_known_mcp_server_get',
|
|
11
|
+
parameters: [],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
method: 'GET',
|
|
15
|
+
path: '/.well-known/oauth-protected-resource',
|
|
16
|
+
operationId: 'protected_resource_metadata_endpoint__well_known_oauth_protected_resource_get',
|
|
17
|
+
parameters: [],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
method: 'GET',
|
|
21
|
+
path: '/.well-known/oauth-protected-resource/mcp',
|
|
22
|
+
operationId: 'protected_resource_metadata_endpoint__well_known_oauth_protected_resource_mcp_get',
|
|
23
|
+
parameters: [],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
method: 'GET',
|
|
27
|
+
path: '/api/mcp/healthz',
|
|
28
|
+
operationId: 'healthz_endpoint_api_mcp_healthz_get',
|
|
29
|
+
parameters: [],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
method: 'GET',
|
|
33
|
+
path: '/api/mcp/readyz',
|
|
34
|
+
operationId: 'readyz_endpoint_api_mcp_readyz_get',
|
|
35
|
+
parameters: [],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
method: 'GET',
|
|
39
|
+
path: '/api/mcp/v1/activity',
|
|
40
|
+
operationId: 'activity_endpoint_api_mcp_v1_activity_get',
|
|
41
|
+
parameters: [{ name: 'org', in: 'query' }],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
method: 'GET',
|
|
45
|
+
path: '/api/mcp/v1/alerts',
|
|
46
|
+
operationId: 'alerts_endpoint_api_mcp_v1_alerts_get',
|
|
47
|
+
parameters: [
|
|
48
|
+
{ name: 'org', in: 'query' },
|
|
49
|
+
{ name: 'scope', in: 'query' },
|
|
50
|
+
{ name: 'unacknowledged', in: 'query' },
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
method: 'POST',
|
|
55
|
+
path: '/api/mcp/v1/alerts/test',
|
|
56
|
+
operationId: 'test_alert_rule_endpoint_api_mcp_v1_alerts_test_post',
|
|
57
|
+
parameters: [],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
method: 'POST',
|
|
61
|
+
path: '/api/mcp/v1/alerts/{alert_uid}/acknowledge',
|
|
62
|
+
operationId: 'acknowledge_alert_endpoint_api_mcp_v1_alerts__alert_uid__acknowledge_post',
|
|
63
|
+
parameters: [{ name: 'alert_uid', in: 'path' }],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
method: 'GET',
|
|
67
|
+
path: '/api/mcp/v1/audit',
|
|
68
|
+
operationId: 'audit_endpoint_api_mcp_v1_audit_get',
|
|
69
|
+
parameters: [
|
|
70
|
+
{ name: 'org', in: 'query' },
|
|
71
|
+
{ name: 'team', in: 'query' },
|
|
72
|
+
{ name: 'user', in: 'query' },
|
|
73
|
+
{ name: 'client', in: 'query' },
|
|
74
|
+
{ name: 'agent', in: 'query' },
|
|
75
|
+
{ name: 'tool', in: 'query' },
|
|
76
|
+
{ name: 'method', in: 'query' },
|
|
77
|
+
{ name: 'decision', in: 'query' },
|
|
78
|
+
{ name: 'outcome', in: 'query' },
|
|
79
|
+
{ name: 'notebook', in: 'query' },
|
|
80
|
+
{ name: 'source', in: 'query' },
|
|
81
|
+
{ name: 'task', in: 'query' },
|
|
82
|
+
{ name: 'since', in: 'query' },
|
|
83
|
+
{ name: 'until', in: 'query' },
|
|
84
|
+
{ name: 'cursor', in: 'query' },
|
|
85
|
+
{ name: 'limit', in: 'query' },
|
|
86
|
+
{ name: 'export', in: 'query' },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
method: 'GET',
|
|
91
|
+
path: '/api/mcp/v1/audit/forwarding',
|
|
92
|
+
operationId: 'audit_forwarding_endpoint_api_mcp_v1_audit_forwarding_get',
|
|
93
|
+
parameters: [{ name: 'org', in: 'query' }],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
method: 'GET',
|
|
97
|
+
path: '/api/mcp/v1/bindings',
|
|
98
|
+
operationId: 'list_bindings_endpoint_api_mcp_v1_bindings_get',
|
|
99
|
+
parameters: [{ name: 'kind', in: 'query' }],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
method: 'DELETE',
|
|
103
|
+
path: '/api/mcp/v1/bindings/{binding_uid}',
|
|
104
|
+
operationId: 'delete_binding_endpoint_api_mcp_v1_bindings__binding_uid__delete',
|
|
105
|
+
parameters: [{ name: 'binding_uid', in: 'path' }],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
method: 'GET',
|
|
109
|
+
path: '/api/mcp/v1/notebooks/{notebook_uid}/tasks',
|
|
110
|
+
operationId: 'list_notebook_tasks_endpoint_api_mcp_v1_notebooks__notebook_uid__tasks_get',
|
|
111
|
+
parameters: [
|
|
112
|
+
{ name: 'notebook_uid', in: 'path' },
|
|
113
|
+
{ name: 'cursor', in: 'query' },
|
|
114
|
+
{ name: 'limit', in: 'query' },
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
method: 'GET',
|
|
119
|
+
path: '/api/mcp/v1/operations/jobs',
|
|
120
|
+
operationId: 'operations_jobs_endpoint_api_mcp_v1_operations_jobs_get',
|
|
121
|
+
parameters: [],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
method: 'POST',
|
|
125
|
+
path: '/api/mcp/v1/operations/runtime-ended',
|
|
126
|
+
operationId: 'runtime_ended_endpoint_api_mcp_v1_operations_runtime_ended_post',
|
|
127
|
+
parameters: [],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
method: 'GET',
|
|
131
|
+
path: '/api/mcp/v1/operations/workers',
|
|
132
|
+
operationId: 'operations_workers_endpoint_api_mcp_v1_operations_workers_get',
|
|
133
|
+
parameters: [],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
method: 'GET',
|
|
137
|
+
path: '/api/mcp/v1/operations/workflows',
|
|
138
|
+
operationId: 'workflows_operations_endpoint_api_mcp_v1_operations_workflows_get',
|
|
139
|
+
parameters: [],
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
method: 'GET',
|
|
143
|
+
path: '/api/mcp/v1/organizations/{org_uid}/overview',
|
|
144
|
+
operationId: 'organization_overview_endpoint_api_mcp_v1_organizations__org_uid__overview_get',
|
|
145
|
+
parameters: [
|
|
146
|
+
{ name: 'org_uid', in: 'path' },
|
|
147
|
+
{ name: 'team', in: 'query' },
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
method: 'GET',
|
|
152
|
+
path: '/api/mcp/v1/organizations/{org_uid}/usage',
|
|
153
|
+
operationId: 'organization_usage_endpoint_api_mcp_v1_organizations__org_uid__usage_get',
|
|
154
|
+
parameters: [
|
|
155
|
+
{ name: 'org_uid', in: 'path' },
|
|
156
|
+
{ name: 'team', in: 'query' },
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
method: 'GET',
|
|
161
|
+
path: '/api/mcp/v1/policy',
|
|
162
|
+
operationId: 'policy_endpoint_api_mcp_v1_policy_get',
|
|
163
|
+
parameters: [
|
|
164
|
+
{ name: 'agent', in: 'query' },
|
|
165
|
+
{ name: 'org', in: 'query' },
|
|
166
|
+
{ name: 'team', in: 'query' },
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
method: 'GET',
|
|
171
|
+
path: '/api/mcp/v1/tasks',
|
|
172
|
+
operationId: 'list_tasks_endpoint_api_mcp_v1_tasks_get',
|
|
173
|
+
parameters: [
|
|
174
|
+
{ name: 'notebook', in: 'query' },
|
|
175
|
+
{ name: 'sandbox', in: 'query' },
|
|
176
|
+
{ name: 'agent', in: 'query' },
|
|
177
|
+
{ name: 'status', in: 'query' },
|
|
178
|
+
{ name: 'org', in: 'query' },
|
|
179
|
+
{ name: 'cursor', in: 'query' },
|
|
180
|
+
{ name: 'limit', in: 'query' },
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
method: 'DELETE',
|
|
185
|
+
path: '/api/mcp/v1/tasks/{task_uid}',
|
|
186
|
+
operationId: 'cancel_task_endpoint_api_mcp_v1_tasks__task_uid__delete',
|
|
187
|
+
parameters: [{ name: 'task_uid', in: 'path' }],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
method: 'GET',
|
|
191
|
+
path: '/api/mcp/v1/tasks/{task_uid}',
|
|
192
|
+
operationId: 'get_task_endpoint_api_mcp_v1_tasks__task_uid__get',
|
|
193
|
+
parameters: [{ name: 'task_uid', in: 'path' }],
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
method: 'GET',
|
|
197
|
+
path: '/api/mcp/v1/tasks/{task_uid}/events',
|
|
198
|
+
operationId: 'task_events_endpoint_api_mcp_v1_tasks__task_uid__events_get',
|
|
199
|
+
parameters: [{ name: 'task_uid', in: 'path' }],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
method: 'POST',
|
|
203
|
+
path: '/api/mcp/v1/tasks/{task_uid}/input',
|
|
204
|
+
operationId: 'answer_task_endpoint_api_mcp_v1_tasks__task_uid__input_post',
|
|
205
|
+
parameters: [{ name: 'task_uid', in: 'path' }],
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
method: 'GET',
|
|
209
|
+
path: '/api/mcp/version',
|
|
210
|
+
operationId: 'version_endpoint_api_mcp_version_get',
|
|
211
|
+
parameters: [],
|
|
212
|
+
},
|
|
213
|
+
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Jupyter MCP Server's REST API: tasks, bindings, audit, activity,
|
|
3
|
+
* policy and operations. The MCP endpoint itself is not here — an agent
|
|
4
|
+
* speaks JSON-RPC to it; a browser reads what the agents did.
|
|
5
|
+
*
|
|
6
|
+
* @module api/mcp
|
|
7
|
+
*/
|
|
8
|
+
export * from './generated';
|
|
9
|
+
export * from './gateway';
|
|
10
|
+
export * from './tasks';
|
|
11
|
+
export * from './bindings';
|
|
12
|
+
export * from './audit';
|
|
13
|
+
export * from './activity';
|
|
14
|
+
export * from './organizations';
|
|
15
|
+
export * from './policy';
|
|
16
|
+
export * from './operations';
|
|
17
|
+
export * from './observability';
|
|
@@ -0,0 +1,25 @@
|
|
|
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 Jupyter MCP Server's REST API: tasks, bindings, audit, activity,
|
|
11
|
+
* policy and operations. The MCP endpoint itself is not here — an agent
|
|
12
|
+
* speaks JSON-RPC to it; a browser reads what the agents did.
|
|
13
|
+
*
|
|
14
|
+
* @module api/mcp
|
|
15
|
+
*/
|
|
16
|
+
export * from './generated.js';
|
|
17
|
+
export * from './gateway.js';
|
|
18
|
+
export * from './tasks.js';
|
|
19
|
+
export * from './bindings.js';
|
|
20
|
+
export * from './audit.js';
|
|
21
|
+
export * from './activity.js';
|
|
22
|
+
export * from './organizations.js';
|
|
23
|
+
export * from './policy.js';
|
|
24
|
+
export * from './operations.js';
|
|
25
|
+
export * from './observability.js';
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { type DashboardData } from '../otel/dashboards';
|
|
2
|
+
import type { OtelLog, OtelSpan } from '../otel/types';
|
|
3
|
+
import type { McpTask } from '../../models/McpTask';
|
|
4
|
+
/**
|
|
5
|
+
* The `service.name` the gateway exports under, and the one its workers use.
|
|
6
|
+
*
|
|
7
|
+
* The bare service name, like every other Datalayer service (`contents`,
|
|
8
|
+
* `iam`, `runtimes`): `instrument(app, name)` is what sets it. A worker is a
|
|
9
|
+
* process of its own and is filed separately, so a worker's last lines stay
|
|
10
|
+
* queryable after the process is gone.
|
|
11
|
+
*/
|
|
12
|
+
export declare const MCP_GATEWAY_SERVICE_NAME = "jupyter-mcp-server";
|
|
13
|
+
/** The `service.name` a worker's relayed output is filed under. */
|
|
14
|
+
export declare const MCP_WORKER_SERVICE_NAME = "jupyter-mcp-worker";
|
|
15
|
+
/**
|
|
16
|
+
* The `service.name` the durable execution service exports under.
|
|
17
|
+
*
|
|
18
|
+
* The `durable.*` metrics come from there, not from the gateway. Querying
|
|
19
|
+
* them against the gateway would be well formed, would be answered
|
|
20
|
+
* truthfully with nothing, and would render a legitimate-looking zero — the
|
|
21
|
+
* same failure that had three panels querying `mcp.forwarded` and
|
|
22
|
+
* `mcp.sandbox_lost`. `serviceNameFor` exists so the question is answered
|
|
23
|
+
* once rather than at each call site.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MCP_DURABLE_SERVICE_NAME = "datalayer-durable";
|
|
26
|
+
/**
|
|
27
|
+
* Which service emits a metric.
|
|
28
|
+
*
|
|
29
|
+
* A metric's service is a property of the metric, not of the caller. Reading
|
|
30
|
+
* it from here is what keeps a new panel from inheriting whichever constant
|
|
31
|
+
* happened to be in scope where it was written.
|
|
32
|
+
*/
|
|
33
|
+
export declare const serviceNameFor: (metric: McpMetricName) => string;
|
|
34
|
+
/** The metric catalog `telemetry.py` owns; no ad-hoc counters. */
|
|
35
|
+
export declare const MCP_METRIC_CATALOG: readonly ["mcp.calls", "mcp.call.duration", "mcp.refusals", "mcp.limit.unenforced", "mcp.forwards", "mcp.workers", "mcp.worker_start_seconds", "mcp.bindings", "mcp.sandbox.lost", "mcp.tasks", "mcp.task.duration", "durable.step.duration", "durable.queue.wait", "durable.recoveries", "sandbox.launch_seconds", "mcp.audit.writes", "mcp.audit.write_failures", "mcp.dependency.duration", "mcp.dependency.timeouts", "mcp.dependency.ready", "mcp.readiness.failures", "mcp.audit.deleted", "mcp.jobs", "mcp.job.duration"];
|
|
36
|
+
export type McpMetricName = (typeof MCP_METRIC_CATALOG)[number];
|
|
37
|
+
/** The four SLIs, and the catalog metric each is read from. */
|
|
38
|
+
export declare const MCP_SLI_METRICS: {
|
|
39
|
+
readonly availability: "mcp.calls";
|
|
40
|
+
readonly latency: "mcp.call.duration";
|
|
41
|
+
readonly taskSuccess: "mcp.tasks";
|
|
42
|
+
readonly sandboxLaunch: "sandbox.launch_seconds";
|
|
43
|
+
};
|
|
44
|
+
/** The OTEL service's built-in dashboard the four SLIs are read from. */
|
|
45
|
+
export declare const MCP_SERVICE_LEVELS_DASHBOARD = "mcp-service-levels";
|
|
46
|
+
/**
|
|
47
|
+
* Its panels, by the ids the OTEL service gives them. A contract test there
|
|
48
|
+
* holds them, so a panel renamed on the service fails a test rather than
|
|
49
|
+
* reading here as nothing measured.
|
|
50
|
+
*/
|
|
51
|
+
export declare const MCP_SERVICE_LEVEL_PANELS: {
|
|
52
|
+
readonly callsByOutcome: "mcp-calls-by-outcome";
|
|
53
|
+
readonly callDurationP95: "mcp-call-duration-p95";
|
|
54
|
+
readonly tasksByStatus: "mcp-tasks-by-status";
|
|
55
|
+
readonly sandboxLaunchP95: "sandbox-launch_seconds-by-provider-p95";
|
|
56
|
+
readonly sandboxLaunches: "sandbox-launch_seconds-by-provider-count";
|
|
57
|
+
};
|
|
58
|
+
export interface McpMetricsFilters {
|
|
59
|
+
/** The `client_id` of one agent: read from spans, not from metrics. */
|
|
60
|
+
agent?: string;
|
|
61
|
+
org?: string;
|
|
62
|
+
/** ISO 8601; the reading starts there. */
|
|
63
|
+
since?: string;
|
|
64
|
+
limit?: number;
|
|
65
|
+
}
|
|
66
|
+
export interface McpSliSummary {
|
|
67
|
+
/** Share of calls that were neither 5xx nor `-32001`; `null` with no call. */
|
|
68
|
+
availability: number | null;
|
|
69
|
+
/** p95 of the synchronous tools' call duration, in milliseconds. */
|
|
70
|
+
p95CallDurationMs: number | null;
|
|
71
|
+
/** `completed` over terminal tasks. */
|
|
72
|
+
taskSuccessRate: number | null;
|
|
73
|
+
/** p95 sandbox launch, in seconds, by provider. */
|
|
74
|
+
p95SandboxLaunchSeconds: Record<string, number>;
|
|
75
|
+
/** How many calls, tasks and launches the numbers rest on. */
|
|
76
|
+
samples: {
|
|
77
|
+
calls: number;
|
|
78
|
+
tasks: number;
|
|
79
|
+
launches: number;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export interface McpMetricsSnapshot {
|
|
83
|
+
filters: McpMetricsFilters;
|
|
84
|
+
/** The catalog metrics the OTEL service holds points of, in catalog order. */
|
|
85
|
+
reporting: McpMetricName[];
|
|
86
|
+
/** The `mcp.request` spans a per-agent or per-organization reading rests on. */
|
|
87
|
+
spans: OtelSpan[];
|
|
88
|
+
slis: McpSliSummary;
|
|
89
|
+
readAt: string;
|
|
90
|
+
}
|
|
91
|
+
/** The nearest-rank percentile of a sample; `null` for an empty one. */
|
|
92
|
+
export declare const percentile: (values: number[], fraction: number) => number | null;
|
|
93
|
+
/**
|
|
94
|
+
* The SLIs from the service levels dashboard — the platform-wide reading.
|
|
95
|
+
*
|
|
96
|
+
* Its panels arrive summarised: calls and tasks as how much each counter grew
|
|
97
|
+
* over the window, the two p95s from their histograms' buckets. The call
|
|
98
|
+
* duration is recorded in seconds and shown in milliseconds. A panel with
|
|
99
|
+
* nothing in it reads as not measured, never as a zero.
|
|
100
|
+
*/
|
|
101
|
+
export declare const summarizeServiceLevels: (data: DashboardData) => McpSliSummary;
|
|
102
|
+
/**
|
|
103
|
+
* The SLIs over `mcp.request` spans — the per-agent or per-organization
|
|
104
|
+
* reading, since metrics carry neither label.
|
|
105
|
+
*/
|
|
106
|
+
export declare const summarizeRequestSpans: (spans: OtelSpan[], filters?: McpMetricsFilters) => McpSliSummary;
|
|
107
|
+
/** The four SLIs and the catalog, for everyone or for one agent or organization. */
|
|
108
|
+
export declare const fetchMcpMetrics: (token: string, filters?: McpMetricsFilters, otelUrl?: string) => Promise<McpMetricsSnapshot>;
|
|
109
|
+
/** A span with its children, as a tree reads. */
|
|
110
|
+
export interface McpSpanNode {
|
|
111
|
+
span: OtelSpan;
|
|
112
|
+
children: McpSpanNode[];
|
|
113
|
+
}
|
|
114
|
+
/** The spans of a trace as a tree, roots first, siblings by start time. */
|
|
115
|
+
export declare const spanTree: (spans: OtelSpan[]) => McpSpanNode[];
|
|
116
|
+
export interface McpRunTrace {
|
|
117
|
+
taskUid: string;
|
|
118
|
+
traceId: string;
|
|
119
|
+
spans: OtelSpan[];
|
|
120
|
+
tree: McpSpanNode[];
|
|
121
|
+
}
|
|
122
|
+
/** "Show me this run": the spans of the task's trace. A task without one has none yet. */
|
|
123
|
+
export declare const fetchRunTrace: (token: string, task: Pick<McpTask, "uid" | "traceId">, otelUrl?: string) => Promise<McpRunTrace>;
|
|
124
|
+
/**
|
|
125
|
+
* The spans of one trace, named directly.
|
|
126
|
+
*
|
|
127
|
+
* A synchronous call has no task — it finished inside its own request — but
|
|
128
|
+
* it does carry a trace, which is what the audit row records and what
|
|
129
|
+
* "show me this call" means before durable execution exists.
|
|
130
|
+
*/
|
|
131
|
+
export declare const fetchTraceSpans: (token: string, traceId: string, otelUrl?: string) => Promise<McpRunTrace>;
|
|
132
|
+
export interface McpRunLogs {
|
|
133
|
+
taskUid: string;
|
|
134
|
+
traceId: string;
|
|
135
|
+
records: OtelLog[];
|
|
136
|
+
}
|
|
137
|
+
/** The log lines of a run, gateway and worker alike, by the trace they carry. */
|
|
138
|
+
export declare const fetchMcpLogs: (token: string, task: Pick<McpTask, "uid" | "traceId">, options?: {
|
|
139
|
+
limit?: number;
|
|
140
|
+
severity?: string;
|
|
141
|
+
}, otelUrl?: string) => Promise<McpRunLogs>;
|