@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
package/lib/models/Credits.js
CHANGED
|
@@ -9,3 +9,25 @@
|
|
|
9
9
|
* TODO what is a good LOW_CREDITS bar? - A better way would be to set it from a server settings or a cloud config.
|
|
10
10
|
*/
|
|
11
11
|
export const LOW_CREDITS = 3;
|
|
12
|
+
/**
|
|
13
|
+
* The credits an account can still spend.
|
|
14
|
+
*
|
|
15
|
+
* `credits` means one of two things depending on whether a quota is set: what
|
|
16
|
+
* is left, or what has been consumed against the quota. IAM omits `quota`
|
|
17
|
+
* entirely for an account without one, so an absent quota is read the same as
|
|
18
|
+
* an explicit `null` — testing only against `null` let `undefined` take the
|
|
19
|
+
* quota branch and produced `NaN`, which then travelled silently into every
|
|
20
|
+
* reader of this number.
|
|
21
|
+
*
|
|
22
|
+
* Outstanding reservations are already committed, so they are subtracted:
|
|
23
|
+
* what is returned is what a new reservation may still claim.
|
|
24
|
+
*/
|
|
25
|
+
export const availableCredits = (credits, reservations = []) => {
|
|
26
|
+
const quota = credits.quota;
|
|
27
|
+
const balance = typeof quota === 'number' ? quota - credits.credits : credits.credits;
|
|
28
|
+
if (!Number.isFinite(balance)) {
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
const reserved = reservations.reduce((consumed, reservation) => consumed + (Number.isFinite(reservation.credits) ? reservation.credits : 0), 0);
|
|
32
|
+
return Math.max(0, balance - reserved);
|
|
33
|
+
};
|
|
@@ -21,7 +21,7 @@ export interface CreditReservation {
|
|
|
21
21
|
resource: string;
|
|
22
22
|
/** Last update timestamp */
|
|
23
23
|
last_update: string;
|
|
24
|
-
/** Burning rate (credits per
|
|
24
|
+
/** Burning rate (credits per second) for this reservation */
|
|
25
25
|
burning_rate: number;
|
|
26
26
|
/** Start date of the reservation */
|
|
27
27
|
start_date: string;
|
|
@@ -81,7 +81,8 @@ export declare class CreditsDTO {
|
|
|
81
81
|
*/
|
|
82
82
|
get netAvailable(): number;
|
|
83
83
|
/**
|
|
84
|
-
* Get runtime reservations
|
|
84
|
+
* Get runtime reservations: the ones held for a runtime, which a
|
|
85
|
+
* reservation names by the runtime's uid.
|
|
85
86
|
*/
|
|
86
87
|
get runtimeReservations(): CreditReservation[];
|
|
87
88
|
/**
|
|
@@ -91,7 +92,7 @@ export declare class CreditsDTO {
|
|
|
91
92
|
/**
|
|
92
93
|
* Calculate maximum runtime in minutes based on environment burning rate.
|
|
93
94
|
*
|
|
94
|
-
* @param burningRate - Credits consumed per
|
|
95
|
+
* @param burningRate - Credits consumed per second
|
|
95
96
|
* @returns Maximum runtime in minutes
|
|
96
97
|
*/
|
|
97
98
|
calculateMaxRuntimeMinutes(burningRate: number): number;
|
|
@@ -99,7 +100,7 @@ export declare class CreditsDTO {
|
|
|
99
100
|
* Calculate credits needed for runtime duration.
|
|
100
101
|
*
|
|
101
102
|
* @param minutes - Runtime duration in minutes
|
|
102
|
-
* @param burningRate - Credits consumed per
|
|
103
|
+
* @param burningRate - Credits consumed per second
|
|
103
104
|
* @returns Credits needed
|
|
104
105
|
*/
|
|
105
106
|
calculateCreditsFromMinutes(minutes: number, burningRate: number): number;
|
|
@@ -107,7 +108,7 @@ export declare class CreditsDTO {
|
|
|
107
108
|
* Check if user has enough credits for runtime.
|
|
108
109
|
*
|
|
109
110
|
* @param minutes - Runtime duration in minutes
|
|
110
|
-
* @param burningRate - Credits consumed per
|
|
111
|
+
* @param burningRate - Credits consumed per second
|
|
111
112
|
* @returns True if user has enough credits
|
|
112
113
|
*/
|
|
113
114
|
hasEnoughCreditsForRuntime(minutes: number, burningRate: number): boolean;
|
package/lib/models/CreditsDTO.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module models/CreditsDTO
|
|
9
9
|
*/
|
|
10
|
+
import { isSandboxUid } from '../api/contents/sandboxUid.js';
|
|
10
11
|
import { validateJSON } from '../api/utils/validation.js';
|
|
11
12
|
/**
|
|
12
13
|
* Credits model representing user's available credits and usage.
|
|
@@ -67,10 +68,11 @@ export class CreditsDTO {
|
|
|
67
68
|
return Math.max(0, this.available - this.totalReserved);
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
|
-
* Get runtime reservations
|
|
71
|
+
* Get runtime reservations: the ones held for a runtime, which a
|
|
72
|
+
* reservation names by the runtime's uid.
|
|
71
73
|
*/
|
|
72
74
|
get runtimeReservations() {
|
|
73
|
-
return this._reservations.filter(r => r.id
|
|
75
|
+
return this._reservations.filter(r => isSandboxUid(r.resource) || isSandboxUid(r.id));
|
|
74
76
|
}
|
|
75
77
|
/**
|
|
76
78
|
* Check if there are any active runtime reservations.
|
|
@@ -81,7 +83,7 @@ export class CreditsDTO {
|
|
|
81
83
|
/**
|
|
82
84
|
* Calculate maximum runtime in minutes based on environment burning rate.
|
|
83
85
|
*
|
|
84
|
-
* @param burningRate - Credits consumed per
|
|
86
|
+
* @param burningRate - Credits consumed per second
|
|
85
87
|
* @returns Maximum runtime in minutes
|
|
86
88
|
*/
|
|
87
89
|
calculateMaxRuntimeMinutes(burningRate) {
|
|
@@ -94,7 +96,7 @@ export class CreditsDTO {
|
|
|
94
96
|
* Calculate credits needed for runtime duration.
|
|
95
97
|
*
|
|
96
98
|
* @param minutes - Runtime duration in minutes
|
|
97
|
-
* @param burningRate - Credits consumed per
|
|
99
|
+
* @param burningRate - Credits consumed per second
|
|
98
100
|
* @returns Credits needed
|
|
99
101
|
*/
|
|
100
102
|
calculateCreditsFromMinutes(minutes, burningRate) {
|
|
@@ -105,7 +107,7 @@ export class CreditsDTO {
|
|
|
105
107
|
* Check if user has enough credits for runtime.
|
|
106
108
|
*
|
|
107
109
|
* @param minutes - Runtime duration in minutes
|
|
108
|
-
* @param burningRate - Credits consumed per
|
|
110
|
+
* @param burningRate - Credits consumed per second
|
|
109
111
|
* @returns True if user has enough credits
|
|
110
112
|
*/
|
|
111
113
|
hasEnoughCreditsForRuntime(minutes, burningRate) {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An audit row of the Jupyter MCP Server: one call or one decision, written
|
|
3
|
+
* by the gateway for every request, append-only in `mcp-audit`.
|
|
4
|
+
*
|
|
5
|
+
* Audit answers *who did what, and was it allowed*. It is not telemetry: a
|
|
6
|
+
* row carries the trace id so one trace joins both trails, and never an
|
|
7
|
+
* argument in clear — arguments are hashed and redacted with the Contents
|
|
8
|
+
* rules before they reach the row.
|
|
9
|
+
*
|
|
10
|
+
* @module models/McpAuditEvent
|
|
11
|
+
*/
|
|
12
|
+
export type McpAuditDecision = 'allowed' | 'refused';
|
|
13
|
+
export type McpAuditOutcome = 'ok' | 'error' | 'is_error';
|
|
14
|
+
export interface McpClientInfo {
|
|
15
|
+
name?: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface McpAuditEvent {
|
|
20
|
+
uid: string;
|
|
21
|
+
at: string;
|
|
22
|
+
orgUid?: string | null;
|
|
23
|
+
teamUid?: string | null;
|
|
24
|
+
userUid: string;
|
|
25
|
+
clientId?: string | null;
|
|
26
|
+
agentUid?: string | null;
|
|
27
|
+
/** The delegation chain (RFC 8693 `act`), outermost first. */
|
|
28
|
+
act?: string[];
|
|
29
|
+
/** The JSON-RPC method, or the REST route for a gateway API call. */
|
|
30
|
+
method: string;
|
|
31
|
+
tool?: string | null;
|
|
32
|
+
itemUid?: string | null;
|
|
33
|
+
sourceUid?: string | null;
|
|
34
|
+
cellId?: string | null;
|
|
35
|
+
argumentsHash?: string | null;
|
|
36
|
+
redactedArguments?: Record<string, unknown> | null;
|
|
37
|
+
decision: McpAuditDecision;
|
|
38
|
+
/** Names the rule and, once policy has layers, the layer that decided. */
|
|
39
|
+
refusalReason?: string | null;
|
|
40
|
+
outcome?: McpAuditOutcome | null;
|
|
41
|
+
durationMs?: number | null;
|
|
42
|
+
taskId?: string | null;
|
|
43
|
+
traceId?: string | null;
|
|
44
|
+
replica?: string | null;
|
|
45
|
+
protocolVersion?: string | null;
|
|
46
|
+
clientInfo?: McpClientInfo | null;
|
|
47
|
+
}
|
|
48
|
+
export interface McpAuditEventList {
|
|
49
|
+
items: McpAuditEvent[];
|
|
50
|
+
nextCursor?: string | null;
|
|
51
|
+
}
|
|
52
|
+
export type McpAuditExportFormat = 'jsonl' | 'csv';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A binding of the Jupyter MCP Server: a handle an agent holds on a
|
|
3
|
+
* notebook (`nb_…`), a toolset (`ts_…`) or a sandbox (`sb_…`).
|
|
4
|
+
*
|
|
5
|
+
* The sandbox binding *is* the session: one per (user, client) unless a
|
|
6
|
+
* client holds several on purpose. A notebook binding names the sandbox its
|
|
7
|
+
* cells execute on. Bindings live in `mcp-gateway`, expire with the item or
|
|
8
|
+
* the reservation they follow, and are refreshed on use.
|
|
9
|
+
*
|
|
10
|
+
* @module models/McpBinding
|
|
11
|
+
*/
|
|
12
|
+
export type McpBindingKind = 'notebook' | 'toolset' | 'sandbox';
|
|
13
|
+
/** What the gateway does when the sandbox behind a binding is gone. */
|
|
14
|
+
export type McpBindingOnLost = 'fail' | 'relaunch';
|
|
15
|
+
/** Where a sandbox binding is; `lost` is what `SANDBOX_LOST` reports. */
|
|
16
|
+
export type McpBindingState = 'active' | 'lost' | 'closed' | 'expired';
|
|
17
|
+
export interface McpBinding {
|
|
18
|
+
/** The handle: `nb_…`, `ts_…` or `sb_…`. */
|
|
19
|
+
uid: string;
|
|
20
|
+
kind: McpBindingKind;
|
|
21
|
+
userUid: string;
|
|
22
|
+
clientId?: string | null;
|
|
23
|
+
agentUid?: string | null;
|
|
24
|
+
orgUid?: string | null;
|
|
25
|
+
alias?: string | null;
|
|
26
|
+
/** The Spacer notebook, for a `notebook` binding. */
|
|
27
|
+
itemUid?: string | null;
|
|
28
|
+
/** The Contents source and session, for a `toolset` binding. */
|
|
29
|
+
sourceUid?: string | null;
|
|
30
|
+
sessionUid?: string | null;
|
|
31
|
+
/** The runtime, for a `sandbox` binding. */
|
|
32
|
+
sandboxUid?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* What Runtimes and the Operator know the sandbox by, which is **not** the
|
|
35
|
+
* handle. Sharing is addressed by this name; sending the handle instead is
|
|
36
|
+
* a `403` that reads as "you are not the owner".
|
|
37
|
+
*/
|
|
38
|
+
runtimeName?: string | null;
|
|
39
|
+
sandboxProvider?: string | null;
|
|
40
|
+
/** What the runtime reported it can do. */
|
|
41
|
+
capabilities?: string[];
|
|
42
|
+
onLost?: McpBindingOnLost;
|
|
43
|
+
/** The gateway replica whose worker holds the connection. */
|
|
44
|
+
workerReplica?: string | null;
|
|
45
|
+
/** The owner's uid when the sandbox is shared with the caller through its ACL. */
|
|
46
|
+
sharedFrom?: string | null;
|
|
47
|
+
/** For a notebook binding: the sandbox its cells execute on. */
|
|
48
|
+
sandboxBindingUid?: string | null;
|
|
49
|
+
state?: McpBindingState;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
lastUsedAt?: string | null;
|
|
52
|
+
expiresAt?: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface McpBindingList {
|
|
55
|
+
items: McpBinding[];
|
|
56
|
+
nextCursor?: string | null;
|
|
57
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP policy: what an agent *may do*.
|
|
3
|
+
*
|
|
4
|
+
* Policy is layered and each layer only narrows: platform ∩ organization ∩
|
|
5
|
+
* team for an organization-scope token, platform ∩ personal for a
|
|
6
|
+
* personal-scope one. The organization's and the person's layers are IAM
|
|
7
|
+
* settings; the gateway answers the **effective** policy for a token with,
|
|
8
|
+
* per rule, which layer decided — what the Policies page renders as
|
|
9
|
+
* "Datalayer default", "required by your organization" or "you asked".
|
|
10
|
+
*
|
|
11
|
+
* Until milestone 3 adds the layers, `GET /api/mcp/v1/policy` answers the
|
|
12
|
+
* platform defaults from `tool_policy.py` and the token's scopes.
|
|
13
|
+
*
|
|
14
|
+
* @module models/McpPolicy
|
|
15
|
+
*/
|
|
16
|
+
export type McpPolicyLayer = 'platform' | 'organization' | 'team' | 'personal';
|
|
17
|
+
/** The Contents approval vocabulary. */
|
|
18
|
+
export type McpApprovalPolicy = 'explicit' | 'auto-allowlisted' | 'never';
|
|
19
|
+
export type McpPolicyScope = 'personal' | 'organization';
|
|
20
|
+
/** One rule of the effective policy, and the layer that decided it. */
|
|
21
|
+
export interface McpPolicyRule {
|
|
22
|
+
/** The rule's name in the organization policy vocabulary, e.g. `tool_denylist`. */
|
|
23
|
+
name: string;
|
|
24
|
+
value: unknown;
|
|
25
|
+
decidedBy: McpPolicyLayer;
|
|
26
|
+
/** Why, when the gateway has a sentence for it. */
|
|
27
|
+
reason?: string | null;
|
|
28
|
+
}
|
|
29
|
+
/** What one tool needs, and what happens before it runs. */
|
|
30
|
+
export interface McpToolRule {
|
|
31
|
+
tool: string;
|
|
32
|
+
scope: string;
|
|
33
|
+
access?: 'read' | 'write' | 'execute';
|
|
34
|
+
approval?: McpApprovalPolicy;
|
|
35
|
+
allowed: boolean;
|
|
36
|
+
decidedBy: McpPolicyLayer;
|
|
37
|
+
}
|
|
38
|
+
/** The effective policy for one token, redacted to what its holder may see. */
|
|
39
|
+
export interface McpEffectivePolicy {
|
|
40
|
+
scope: McpPolicyScope;
|
|
41
|
+
orgUid?: string | null;
|
|
42
|
+
teamUid?: string | null;
|
|
43
|
+
/** The agent the policy was evaluated for, when previewing as one. */
|
|
44
|
+
clientId?: string | null;
|
|
45
|
+
/** The scopes the token carries; the ceiling over every tool rule. */
|
|
46
|
+
scopes: string[];
|
|
47
|
+
rules: McpPolicyRule[];
|
|
48
|
+
tools: McpToolRule[];
|
|
49
|
+
evaluatedAt?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The organization (or team) MCP policy as IAM keeps it, versioned and
|
|
53
|
+
* audited. Every field is optional: an absent rule narrows nothing.
|
|
54
|
+
*/
|
|
55
|
+
export interface McpOrganizationPolicy {
|
|
56
|
+
version?: number;
|
|
57
|
+
/** CIMD URLs, client ids or software ids; fails closed. */
|
|
58
|
+
allowedClients?: string[];
|
|
59
|
+
requireDpop?: boolean;
|
|
60
|
+
requireOrgSso?: boolean;
|
|
61
|
+
maxScopes?: string[];
|
|
62
|
+
toolAllowlist?: string[];
|
|
63
|
+
toolDenylist?: string[];
|
|
64
|
+
/** Per tool, or per annotation (`destructiveHint`, `readOnlyHint`). */
|
|
65
|
+
approvalPolicy?: Record<string, McpApprovalPolicy>;
|
|
66
|
+
allowedEnvironments?: string[];
|
|
67
|
+
allowedProviders?: string[];
|
|
68
|
+
maxGpu?: number;
|
|
69
|
+
maxReservationMinutes?: number;
|
|
70
|
+
creditsPerDay?: number;
|
|
71
|
+
callsPerMinute?: number;
|
|
72
|
+
sessionMaxHours?: number;
|
|
73
|
+
updatedAt?: string;
|
|
74
|
+
updatedBy?: string;
|
|
75
|
+
}
|
|
76
|
+
/** A person's rules for the agents acting for them outside any organization. */
|
|
77
|
+
export type McpPersonalPolicy = Pick<McpOrganizationPolicy, 'version' | 'approvalPolicy' | 'creditsPerDay' | 'toolDenylist' | 'allowedEnvironments' | 'sessionMaxHours' | 'updatedAt'>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A task of the Jupyter MCP Server: one tool call that outlives the request
|
|
3
|
+
* that started it.
|
|
4
|
+
*
|
|
5
|
+
* The `uid` is the MCP `taskId`. A task is submitted by an agent, runs in
|
|
6
|
+
* the sandbox its session is bound to, and is reachable by anyone allowed to
|
|
7
|
+
* see the notebook it touched — from another device, forty minutes later.
|
|
8
|
+
* The gateway keeps the portable projection in `mcp-tasks`; the workflow
|
|
9
|
+
* engine owns claims and recovery, which is why there are no lease fields.
|
|
10
|
+
*
|
|
11
|
+
* Snake case on the wire, camel case here, exactly as Contents does.
|
|
12
|
+
*
|
|
13
|
+
* @module models/McpTask
|
|
14
|
+
*/
|
|
15
|
+
/** Where a task has got to; the MCP task status vocabulary. */
|
|
16
|
+
export type McpTaskStatus = 'working' | 'input_required' | 'completed' | 'failed' | 'cancelled';
|
|
17
|
+
/** The engine a task's workflow runs on. */
|
|
18
|
+
export type McpWorkflowEngine = 'temporal' | 'dbos';
|
|
19
|
+
/** A tool result small enough to travel with the task. */
|
|
20
|
+
export interface McpCallToolResult {
|
|
21
|
+
content?: Array<Record<string, unknown>>;
|
|
22
|
+
structuredContent?: Record<string, unknown>;
|
|
23
|
+
isError?: boolean;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
/** One output of a task, in order; large outputs are references. */
|
|
27
|
+
export interface McpTaskOutput {
|
|
28
|
+
index: number;
|
|
29
|
+
outputType: string;
|
|
30
|
+
mimeType?: string | null;
|
|
31
|
+
/** Inline text under the size limit. */
|
|
32
|
+
text?: string | null;
|
|
33
|
+
/** An object reference for anything larger. */
|
|
34
|
+
reference?: string | null;
|
|
35
|
+
}
|
|
36
|
+
export interface McpTask {
|
|
37
|
+
uid: string;
|
|
38
|
+
status: McpTaskStatus;
|
|
39
|
+
statusMessage?: string | null;
|
|
40
|
+
tool: string;
|
|
41
|
+
notebookUid?: string | null;
|
|
42
|
+
cellId?: string | null;
|
|
43
|
+
sandboxUid?: string | null;
|
|
44
|
+
/** A Contents operation, when the task wraps one. */
|
|
45
|
+
operationUid?: string | null;
|
|
46
|
+
/** An attachment, when the task follows its lifecycle without an operation. */
|
|
47
|
+
attachmentUid?: string | null;
|
|
48
|
+
/** A Contents `mcp_approval` or an ai-agents tool approval. */
|
|
49
|
+
approvalUid?: string | null;
|
|
50
|
+
/** The session the task executes in; never empty for an execution task. */
|
|
51
|
+
sandboxBindingUid?: string | null;
|
|
52
|
+
initiatingUser: string;
|
|
53
|
+
initiatingClient?: string | null;
|
|
54
|
+
orgUid?: string | null;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
lastUpdatedAt: string;
|
|
57
|
+
ttlMs?: number | null;
|
|
58
|
+
pollIntervalMs?: number | null;
|
|
59
|
+
/** The `CallToolResult` for small results; a resource URI otherwise. */
|
|
60
|
+
result?: McpCallToolResult | string | null;
|
|
61
|
+
error?: string | null;
|
|
62
|
+
traceId?: string | null;
|
|
63
|
+
workflowEngine?: McpWorkflowEngine | null;
|
|
64
|
+
/** Always the task uid, so a retried start cannot create a second execution. */
|
|
65
|
+
workflowId?: string | null;
|
|
66
|
+
/** The Temporal run id; empty for DBOS. */
|
|
67
|
+
workflowRunId?: string | null;
|
|
68
|
+
queue?: string | null;
|
|
69
|
+
sandboxProvider?: string | null;
|
|
70
|
+
workerReplica?: string | null;
|
|
71
|
+
outputs?: McpTaskOutput[];
|
|
72
|
+
}
|
|
73
|
+
export interface McpTaskList {
|
|
74
|
+
items: McpTask[];
|
|
75
|
+
nextCursor?: string | null;
|
|
76
|
+
}
|
|
77
|
+
/** What `POST /tasks/{uid}/input` carries: the REST face of `tasks/update`. */
|
|
78
|
+
export interface McpTaskInput {
|
|
79
|
+
input: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
/** A `notifications/tasks` payload, as the SSE stream and the socket carry it. */
|
|
82
|
+
export interface McpTaskEvent {
|
|
83
|
+
/** `status`, `output`, `input_required`, `completed`, `failed`, `cancelled`. */
|
|
84
|
+
event: string;
|
|
85
|
+
taskId: string;
|
|
86
|
+
status?: McpTaskStatus;
|
|
87
|
+
statusMessage?: string | null;
|
|
88
|
+
output?: McpTaskOutput;
|
|
89
|
+
task?: McpTask;
|
|
90
|
+
at?: string;
|
|
91
|
+
}
|
|
92
|
+
/** The statuses from which nothing more happens. */
|
|
93
|
+
export declare const MCP_TERMINAL_TASK_STATUSES: ReadonlySet<McpTaskStatus>;
|
|
94
|
+
export declare const isMcpTaskTerminal: (status: McpTaskStatus) => boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/** The statuses from which nothing more happens. */
|
|
6
|
+
export const MCP_TERMINAL_TASK_STATUSES = new Set(['completed', 'failed', 'cancelled']);
|
|
7
|
+
export const isMcpTaskTerminal = (status) => MCP_TERMINAL_TASK_STATUSES.has(status);
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { ITeam } from './Team';
|
|
2
2
|
import { ISchool } from './School';
|
|
3
3
|
import { IOrganizationMember } from './OrganizationMember';
|
|
4
|
+
/**
|
|
5
|
+
* The agreements (AWS calls each a licence) of an AWS Marketplace organization.
|
|
6
|
+
*
|
|
7
|
+
* Read from `aws_licenses_s`, the JSON string IAM keeps on the organization
|
|
8
|
+
* document: a list of `{arn, status, agreement_id, offer_id, first_seen,
|
|
9
|
+
* deprovisioned_at, ended_at}`. Anything that does not parse is dropped
|
|
10
|
+
* rather than thrown on, and every ARN of `licenseArns` the JSON does not
|
|
11
|
+
* name is appended as an `active` agreement — which is what an organization
|
|
12
|
+
* written before the field existed holds, and what is left when the JSON is
|
|
13
|
+
* invalid. The same reading the services make, so the page and the API never
|
|
14
|
+
* disagree about which agreements exist.
|
|
15
|
+
*/
|
|
16
|
+
export declare function asAwsMarketplaceLicenses(raw: unknown, licenseArns?: string[]): IAwsMarketplaceLicense[];
|
|
4
17
|
/**
|
|
5
18
|
* Convert the raw user object to {@link IOrganization}.
|
|
6
19
|
*
|
|
@@ -9,6 +22,55 @@ import { IOrganizationMember } from './OrganizationMember';
|
|
|
9
22
|
*/
|
|
10
23
|
export declare function asOrganization(org: any): IOrganization;
|
|
11
24
|
export type IAnyOrganization = IOrganization | ISchool;
|
|
25
|
+
/**
|
|
26
|
+
* What an organization created from an AWS Marketplace subscription carries.
|
|
27
|
+
*
|
|
28
|
+
* The subscription status is the one AWS last told us, or `pending` until it
|
|
29
|
+
* does. `pending` no longer locks the organization — usage is postpaid and
|
|
30
|
+
* metered by AWS regardless; only `failed` and `cancelled` lock it read-only,
|
|
31
|
+
* and the API says so on every refused mutation. A subscription may carry
|
|
32
|
+
* several concurrent agreements, each identified by a licence ARN.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* Where an agreement stands: `active` while the buyer is entitled under it,
|
|
36
|
+
* `ending` from the moment AWS says it is deprovisioned — the hour AWS gives
|
|
37
|
+
* to report its last usage — and `ended` once that hour has passed.
|
|
38
|
+
*/
|
|
39
|
+
export type IAwsMarketplaceLicenseStatus = 'active' | 'ending' | 'ended';
|
|
40
|
+
/** One agreement of an AWS Marketplace subscription; AWS calls it a licence. */
|
|
41
|
+
export type IAwsMarketplaceLicense = {
|
|
42
|
+
/** The licence ARN, which is how AWS names the agreement. */
|
|
43
|
+
arn: string;
|
|
44
|
+
status: IAwsMarketplaceLicenseStatus;
|
|
45
|
+
agreementId?: string;
|
|
46
|
+
offerId?: string;
|
|
47
|
+
/** When the platform first saw the agreement. */
|
|
48
|
+
firstSeen?: Date;
|
|
49
|
+
/** When AWS said the agreement was deprovisioned. */
|
|
50
|
+
deprovisionedAt?: Date;
|
|
51
|
+
/** When the hour to report its last usage ran out. */
|
|
52
|
+
endedAt?: Date;
|
|
53
|
+
};
|
|
54
|
+
export type IOrganizationAwsMarketplace = {
|
|
55
|
+
accountId: string;
|
|
56
|
+
productCode: string;
|
|
57
|
+
/** The AWS customer identifier, when the resolve or a notification gave one. */
|
|
58
|
+
customerIdentifier?: string;
|
|
59
|
+
/** The AWS offer this subscription was bought under, when known. */
|
|
60
|
+
offerId?: string;
|
|
61
|
+
/** Every agreement (licence ARN) seen for this subscription. */
|
|
62
|
+
licenseArns: string[];
|
|
63
|
+
/**
|
|
64
|
+
* Every agreement with its status and dates. An organization may hold
|
|
65
|
+
* several at once, and stays usable while at least one is `active`.
|
|
66
|
+
*/
|
|
67
|
+
licenses: IAwsMarketplaceLicense[];
|
|
68
|
+
subscriptionStatus: 'pending' | 'active' | 'failed' | 'cancelling' | 'cancelled' | string;
|
|
69
|
+
freeTrial: boolean;
|
|
70
|
+
dimensions: string[];
|
|
71
|
+
values: string[];
|
|
72
|
+
lastMeteredAt?: Date;
|
|
73
|
+
};
|
|
12
74
|
export type IBaseOrganization = {
|
|
13
75
|
id: string;
|
|
14
76
|
handle: string;
|
|
@@ -19,6 +81,13 @@ export type IBaseOrganization = {
|
|
|
19
81
|
avatarIcon?: string;
|
|
20
82
|
banner?: string;
|
|
21
83
|
public: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Where the organization came from, as a URN — an AWS Marketplace
|
|
86
|
+
* subscription, say. Absent for a native organization.
|
|
87
|
+
*/
|
|
88
|
+
origin?: string;
|
|
89
|
+
/** The subscription, for an organization whose origin is the AWS Marketplace. */
|
|
90
|
+
awsMarketplace?: IOrganizationAwsMarketplace;
|
|
22
91
|
creationDate: Date;
|
|
23
92
|
members: IOrganizationMember[];
|
|
24
93
|
setMembers: (members: IOrganizationMember[]) => void;
|
|
@@ -4,6 +4,78 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { asArray } from '../utils/index.js';
|
|
6
6
|
import { asUser } from './User.js';
|
|
7
|
+
const AWS_LICENSE_STATUSES = [
|
|
8
|
+
'active',
|
|
9
|
+
'ending',
|
|
10
|
+
'ended',
|
|
11
|
+
];
|
|
12
|
+
function asOptionalDate(value) {
|
|
13
|
+
if (!value) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
const date = value instanceof Date ? value : new Date(String(value));
|
|
17
|
+
return Number.isNaN(date.getTime()) ? undefined : date;
|
|
18
|
+
}
|
|
19
|
+
function asOptionalString(value) {
|
|
20
|
+
const text = String(value ?? '').trim();
|
|
21
|
+
return text || undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The agreements (AWS calls each a licence) of an AWS Marketplace organization.
|
|
25
|
+
*
|
|
26
|
+
* Read from `aws_licenses_s`, the JSON string IAM keeps on the organization
|
|
27
|
+
* document: a list of `{arn, status, agreement_id, offer_id, first_seen,
|
|
28
|
+
* deprovisioned_at, ended_at}`. Anything that does not parse is dropped
|
|
29
|
+
* rather than thrown on, and every ARN of `licenseArns` the JSON does not
|
|
30
|
+
* name is appended as an `active` agreement — which is what an organization
|
|
31
|
+
* written before the field existed holds, and what is left when the JSON is
|
|
32
|
+
* invalid. The same reading the services make, so the page and the API never
|
|
33
|
+
* disagree about which agreements exist.
|
|
34
|
+
*/
|
|
35
|
+
export function asAwsMarketplaceLicenses(raw, licenseArns = []) {
|
|
36
|
+
let parsed = raw;
|
|
37
|
+
if (typeof raw === 'string') {
|
|
38
|
+
try {
|
|
39
|
+
parsed = raw.trim() ? JSON.parse(raw) : [];
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
parsed = [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const licenses = [];
|
|
46
|
+
const known = new Set();
|
|
47
|
+
for (const entry of Array.isArray(parsed) ? parsed : []) {
|
|
48
|
+
if (!entry || typeof entry !== 'object') {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const record = entry;
|
|
52
|
+
const arn = String(record.arn ?? '').trim();
|
|
53
|
+
if (!arn || known.has(arn)) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
known.add(arn);
|
|
57
|
+
const status = String(record.status ?? '')
|
|
58
|
+
.trim()
|
|
59
|
+
.toLowerCase();
|
|
60
|
+
licenses.push({
|
|
61
|
+
arn,
|
|
62
|
+
status: AWS_LICENSE_STATUSES.includes(status) ? status : 'active',
|
|
63
|
+
agreementId: asOptionalString(record.agreement_id ?? record.agreementId),
|
|
64
|
+
offerId: asOptionalString(record.offer_id ?? record.offerId),
|
|
65
|
+
firstSeen: asOptionalDate(record.first_seen ?? record.firstSeen),
|
|
66
|
+
deprovisionedAt: asOptionalDate(record.deprovisioned_at ?? record.deprovisionedAt),
|
|
67
|
+
endedAt: asOptionalDate(record.ended_at ?? record.endedAt),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
for (const value of licenseArns) {
|
|
71
|
+
const arn = String(value ?? '').trim();
|
|
72
|
+
if (arn && !known.has(arn)) {
|
|
73
|
+
known.add(arn);
|
|
74
|
+
licenses.push({ arn, status: 'active' });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return licenses;
|
|
78
|
+
}
|
|
7
79
|
/**
|
|
8
80
|
* Convert the raw user object to {@link IOrganization}.
|
|
9
81
|
*
|
|
@@ -28,6 +100,30 @@ export function asOrganization(org) {
|
|
|
28
100
|
avatarIcon: org.avatar_icon_s ?? org.avatarIcon,
|
|
29
101
|
banner: org.banner_s ?? org.banner,
|
|
30
102
|
public: org.public_b,
|
|
103
|
+
// Where the organization came from — a URN such as
|
|
104
|
+
// `urn:dla:iam:ext::aws:<account>/<product>` — or nothing for a native one.
|
|
105
|
+
origin: org.origin_s ?? org.origin ?? undefined,
|
|
106
|
+
awsMarketplace: org.aws_account_id_s
|
|
107
|
+
? {
|
|
108
|
+
accountId: org.aws_account_id_s,
|
|
109
|
+
productCode: org.aws_product_code_s,
|
|
110
|
+
customerIdentifier: org.aws_customer_identifier_s || undefined,
|
|
111
|
+
offerId: org.aws_offer_identifier_s || undefined,
|
|
112
|
+
// Every agreement (licence ARN) seen for this subscription. A
|
|
113
|
+
// subscription may carry several concurrent agreements.
|
|
114
|
+
licenseArns: asArray(org.aws_license_arns_ss ?? []),
|
|
115
|
+
// The same agreements with what is known of each — status,
|
|
116
|
+
// agreement id, dates — read defensively from the JSON IAM keeps.
|
|
117
|
+
licenses: asAwsMarketplaceLicenses(org.aws_licenses_s, asArray(org.aws_license_arns_ss ?? [])),
|
|
118
|
+
subscriptionStatus: org.aws_subscription_status_s ?? 'pending',
|
|
119
|
+
freeTrial: Boolean(org.aws_free_trial_b),
|
|
120
|
+
dimensions: asArray(org.aws_dimensions_ss ?? []),
|
|
121
|
+
values: asArray(org.aws_values_ss ?? []),
|
|
122
|
+
lastMeteredAt: org.aws_last_metered_ts_dt
|
|
123
|
+
? new Date(org.aws_last_metered_ts_dt)
|
|
124
|
+
: undefined,
|
|
125
|
+
}
|
|
126
|
+
: undefined,
|
|
31
127
|
members,
|
|
32
128
|
teams: [],
|
|
33
129
|
creationDate: new Date(org.creation_ts_dt),
|
package/lib/models/Secret.d.ts
CHANGED
|
@@ -140,12 +140,11 @@ export declare class SecretDTO {
|
|
|
140
140
|
*/
|
|
141
141
|
constructor(data: SecretData, client: DatalayerCoreClient);
|
|
142
142
|
private _checkDeleted;
|
|
143
|
-
private _decodeValue;
|
|
144
143
|
get uid(): string;
|
|
145
144
|
get variant(): ISecretVariant;
|
|
146
145
|
get name(): string;
|
|
147
146
|
get description(): string;
|
|
148
|
-
/**
|
|
147
|
+
/** The value as its owner wrote it (PLAN_ENVS.md E3-05). */
|
|
149
148
|
get value(): string;
|
|
150
149
|
/**
|
|
151
150
|
* Update this secret.
|