@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,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
const snakeToCamelKey = (key) => key.replace(/_([a-zA-Z0-9])/g, (_, character) => character.toUpperCase());
|
|
6
|
+
const camelToSnakeKey = (key) => key.replace(/([A-Z])/g, '_$1').toLowerCase();
|
|
7
|
+
const convertObject = (value, keyConverter, valueConverter) => {
|
|
8
|
+
const converted = {};
|
|
9
|
+
for (const [key, item] of Object.entries(value)) {
|
|
10
|
+
const convertedKey = keyConverter(key);
|
|
11
|
+
if (Object.hasOwn(converted, convertedKey)) {
|
|
12
|
+
throw new Error(`Contents field collision: ${key} -> ${convertedKey}`);
|
|
13
|
+
}
|
|
14
|
+
converted[convertedKey] = valueConverter(item);
|
|
15
|
+
}
|
|
16
|
+
return converted;
|
|
17
|
+
};
|
|
18
|
+
/** Recursively convert suffixless Python/API snake-case fields to camel case. */
|
|
19
|
+
export const contentsToCamelCase = (value) => {
|
|
20
|
+
if (Array.isArray(value)) {
|
|
21
|
+
return value.map(contentsToCamelCase);
|
|
22
|
+
}
|
|
23
|
+
if (value !== null && typeof value === 'object') {
|
|
24
|
+
return convertObject(value, snakeToCamelKey, contentsToCamelCase);
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
};
|
|
28
|
+
/** Recursively convert camel-case Contents client values to API snake case. */
|
|
29
|
+
export const contentsToSnakeCase = (value) => {
|
|
30
|
+
if (Array.isArray(value)) {
|
|
31
|
+
return value.map(contentsToSnakeCase);
|
|
32
|
+
}
|
|
33
|
+
if (value !== null && typeof value === 'object') {
|
|
34
|
+
return convertObject(value, camelToSnakeKey, contentsToSnakeCase);
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CatalogSource, ContentSource } from '../../api/contents';
|
|
2
|
+
/**
|
|
3
|
+
* What each content source is called where a person reads it.
|
|
4
|
+
*
|
|
5
|
+
* Keyed by the wire field, which is still `kind`: the contract names it that,
|
|
6
|
+
* and renaming a stored field is a migration rather than a vocabulary choice.
|
|
7
|
+
* Everything above the wire says content source.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CONTENT_SOURCE_LABELS: Record<ContentSource['kind'], string>;
|
|
10
|
+
export declare const contentSourceLabel: (kind: ContentSource["kind"]) => string;
|
|
11
|
+
export declare const contentSourceEffectiveRole: (item: CatalogSource) => string;
|
|
12
|
+
export declare const canViewContentSource: (item: CatalogSource) => boolean;
|
|
13
|
+
export declare const canUpdateContentSource: (item: CatalogSource) => boolean;
|
|
14
|
+
export declare const canExecuteContentSource: (item: CatalogSource) => boolean;
|
|
15
|
+
/** Sharing mutations are owner-only in the v1 Contents service contract. */
|
|
16
|
+
export declare const canShareContentSource: (item: CatalogSource) => boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* What each content source is called where a person reads it.
|
|
7
|
+
*
|
|
8
|
+
* Keyed by the wire field, which is still `kind`: the contract names it that,
|
|
9
|
+
* and renaming a stored field is a migration rather than a vocabulary choice.
|
|
10
|
+
* Everything above the wire says content source.
|
|
11
|
+
*/
|
|
12
|
+
export const CONTENT_SOURCE_LABELS = {
|
|
13
|
+
files: 'Home Folder',
|
|
14
|
+
dataset: 'Dataset',
|
|
15
|
+
volume: 'Volume',
|
|
16
|
+
'cloud-storage': 'Cloud Storage',
|
|
17
|
+
datasource: 'Datasource',
|
|
18
|
+
'data-server': 'Dataserver',
|
|
19
|
+
mcp: 'MCP',
|
|
20
|
+
environment: 'Environment',
|
|
21
|
+
};
|
|
22
|
+
export const contentSourceLabel = (kind) => CONTENT_SOURCE_LABELS[kind];
|
|
23
|
+
export const contentSourceEffectiveRole = (item) => {
|
|
24
|
+
if (item.permissions.isOwner) {
|
|
25
|
+
return 'Owner';
|
|
26
|
+
}
|
|
27
|
+
const level = item.permissions.effectiveAccessLevel;
|
|
28
|
+
return level ? `${level[0].toUpperCase()}${level.slice(1)}` : 'No access';
|
|
29
|
+
};
|
|
30
|
+
export const canViewContentSource = (item) => item.permissions.view;
|
|
31
|
+
export const canUpdateContentSource = (item) => item.permissions.update;
|
|
32
|
+
export const canExecuteContentSource = (item) => item.permissions.execute;
|
|
33
|
+
/** Sharing mutations are owner-only in the v1 Contents service contract. */
|
|
34
|
+
export const canShareContentSource = (item) => item.source.kind !== 'files' && item.permissions.isOwner;
|
package/lib/models/index.d.ts
CHANGED
|
@@ -36,7 +36,6 @@ export * from './ContactIAMProvider';
|
|
|
36
36
|
export * from './ContactTags';
|
|
37
37
|
export * from './Credits';
|
|
38
38
|
export * from './CreditsDTO';
|
|
39
|
-
export * from './Datasource';
|
|
40
39
|
export * from './Dean';
|
|
41
40
|
export * from './Errors';
|
|
42
41
|
export * from './GrowthKPI';
|
|
@@ -50,6 +49,10 @@ export * from './Inbound';
|
|
|
50
49
|
export * from './Instructor';
|
|
51
50
|
export * from './Invite';
|
|
52
51
|
export * from './LandingRoles';
|
|
52
|
+
export * from './McpAuditEvent';
|
|
53
|
+
export * from './McpBinding';
|
|
54
|
+
export * from './McpPolicy';
|
|
55
|
+
export * from './McpTask';
|
|
53
56
|
export * from './Member';
|
|
54
57
|
export * from './Organization';
|
|
55
58
|
export * from './OrganizationMember';
|
|
@@ -68,6 +71,7 @@ export * from './TeamMember';
|
|
|
68
71
|
export * from './URN';
|
|
69
72
|
export * from './Usage';
|
|
70
73
|
export * from './User';
|
|
74
|
+
export * from './StartedBy';
|
|
71
75
|
export * from './UserDTO';
|
|
72
76
|
export * from './UserEvent';
|
|
73
77
|
export * from './UserOnboarding';
|
package/lib/models/index.js
CHANGED
|
@@ -40,7 +40,6 @@ export * from './ContactIAMProvider.js';
|
|
|
40
40
|
export * from './ContactTags.js';
|
|
41
41
|
export * from './Credits.js';
|
|
42
42
|
export * from './CreditsDTO.js';
|
|
43
|
-
export * from './Datasource.js';
|
|
44
43
|
export * from './Dean.js';
|
|
45
44
|
export * from './Errors.js';
|
|
46
45
|
export * from './GrowthKPI.js';
|
|
@@ -54,6 +53,10 @@ export * from './Inbound.js';
|
|
|
54
53
|
export * from './Instructor.js';
|
|
55
54
|
export * from './Invite.js';
|
|
56
55
|
export * from './LandingRoles.js';
|
|
56
|
+
export * from './McpAuditEvent.js';
|
|
57
|
+
export * from './McpBinding.js';
|
|
58
|
+
export * from './McpPolicy.js';
|
|
59
|
+
export * from './McpTask.js';
|
|
57
60
|
export * from './Member.js';
|
|
58
61
|
export * from './Organization.js';
|
|
59
62
|
export * from './OrganizationMember.js';
|
|
@@ -72,6 +75,7 @@ export * from './TeamMember.js';
|
|
|
72
75
|
export * from './URN.js';
|
|
73
76
|
export * from './Usage.js';
|
|
74
77
|
export * from './User.js';
|
|
78
|
+
export * from './StartedBy.js';
|
|
75
79
|
export * from './UserDTO.js';
|
|
76
80
|
export * from './UserEvent.js';
|
|
77
81
|
export * from './UserOnboarding.js';
|
|
@@ -15,10 +15,9 @@ export const NavigationLink = forwardRef(({ to, children, replace = false, state
|
|
|
15
15
|
if (onClick) {
|
|
16
16
|
onClick(e);
|
|
17
17
|
}
|
|
18
|
-
// If not prevented, navigate
|
|
18
|
+
// If not prevented, navigate — or let a modifier click open a new tab.
|
|
19
19
|
if (!e.defaultPrevented) {
|
|
20
|
-
e
|
|
21
|
-
navigate(to, e, true, { replace, state });
|
|
20
|
+
navigate(to, e, { replace, state });
|
|
22
21
|
}
|
|
23
22
|
}, [to, replace, state, navigate, onClick]);
|
|
24
23
|
return (_jsx("a", { ref: ref, href: to, onClick: handleClick, ...props, children: children }));
|
|
@@ -16,6 +16,10 @@ export const PUBLIC_PATH_PREFIXES = [
|
|
|
16
16
|
'/about',
|
|
17
17
|
'/agents',
|
|
18
18
|
'/agentspecs',
|
|
19
|
+
// Where AWS Marketplace sends a customer who just subscribed, and the
|
|
20
|
+
// mailed link that confirms the account: reached signed out, and a 401 on
|
|
21
|
+
// them must not bounce the visitor to the sign-in page.
|
|
22
|
+
'/aws/marketplace',
|
|
19
23
|
'/blog',
|
|
20
24
|
'/careers',
|
|
21
25
|
'/community',
|
package/lib/state/index.d.ts
CHANGED
package/lib/state/index.js
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a session leaves in the browser, forgotten when the session ends.
|
|
3
|
+
*
|
|
4
|
+
* Signing out used to reset the query cache and nothing else. The current
|
|
5
|
+
* space, the selected principal and the billing entity are persisted — in
|
|
6
|
+
* cookies the next page load restores, and in local storage — and they
|
|
7
|
+
* survived it: the next person to sign in on the browser opened on the
|
|
8
|
+
* previous one's space, under the previous one's principal.
|
|
9
|
+
*
|
|
10
|
+
* Two kinds of state, forgotten two ways:
|
|
11
|
+
*
|
|
12
|
+
* - what is persisted is removed **by name**, whether or not the module that
|
|
13
|
+
* wrote it was loaded in this page — a store nobody imported still left its
|
|
14
|
+
* key behind;
|
|
15
|
+
* - what is only in memory is reset by the store that holds it, which
|
|
16
|
+
* registers how. Nothing here imports a store, so no import cycle can form.
|
|
17
|
+
*
|
|
18
|
+
* And a guard for the session that never ended — the tab closed without
|
|
19
|
+
* signing out: the browser remembers whose state it holds, and the next person
|
|
20
|
+
* to sign in forgets it first.
|
|
21
|
+
*
|
|
22
|
+
* @module state/sessionEnd
|
|
23
|
+
*/
|
|
24
|
+
/** Cookies a session writes. */
|
|
25
|
+
export declare const SESSION_COOKIES: readonly string[];
|
|
26
|
+
/** `localStorage` keys a session writes. */
|
|
27
|
+
export declare const SESSION_LOCAL_STORAGE_KEYS: readonly string[];
|
|
28
|
+
/** Whose state the browser holds: the uid of the person it belongs to. */
|
|
29
|
+
export declare const SESSION_OWNER_KEY = "datalayer-session-owner";
|
|
30
|
+
/** What a module keeps for a session. */
|
|
31
|
+
export type SessionStateRegistration = {
|
|
32
|
+
/** Reset what the module holds in memory. */
|
|
33
|
+
forget?: () => void;
|
|
34
|
+
cookies?: readonly string[];
|
|
35
|
+
localStorageKeys?: readonly string[];
|
|
36
|
+
sessionStorageKeys?: readonly string[];
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Say what a module keeps for a session, so the end of the session forgets it.
|
|
40
|
+
*
|
|
41
|
+
* @returns A function that withdraws the registration.
|
|
42
|
+
*/
|
|
43
|
+
export declare const registerSessionState: (registration: SessionStateRegistration) => (() => void);
|
|
44
|
+
/** Forget everything a session left in this browser. */
|
|
45
|
+
export declare const forgetSessionState: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Claim the browser's session state for the person signing in.
|
|
48
|
+
*
|
|
49
|
+
* When it holds somebody else's — a session that ended without signing out —
|
|
50
|
+
* it is forgotten first. Somebody else's is known by the owner the browser
|
|
51
|
+
* remembers or, before it remembered one, by a personal principal naming
|
|
52
|
+
* another person. The state of an anonymous visitor belongs to nobody and is
|
|
53
|
+
* kept: whoever started as a visitor keeps what they started.
|
|
54
|
+
*/
|
|
55
|
+
export declare const claimSessionState: (userUid: string | null | undefined) => void;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* What a session leaves in the browser, forgotten when the session ends.
|
|
7
|
+
*
|
|
8
|
+
* Signing out used to reset the query cache and nothing else. The current
|
|
9
|
+
* space, the selected principal and the billing entity are persisted — in
|
|
10
|
+
* cookies the next page load restores, and in local storage — and they
|
|
11
|
+
* survived it: the next person to sign in on the browser opened on the
|
|
12
|
+
* previous one's space, under the previous one's principal.
|
|
13
|
+
*
|
|
14
|
+
* Two kinds of state, forgotten two ways:
|
|
15
|
+
*
|
|
16
|
+
* - what is persisted is removed **by name**, whether or not the module that
|
|
17
|
+
* wrote it was loaded in this page — a store nobody imported still left its
|
|
18
|
+
* key behind;
|
|
19
|
+
* - what is only in memory is reset by the store that holds it, which
|
|
20
|
+
* registers how. Nothing here imports a store, so no import cycle can form.
|
|
21
|
+
*
|
|
22
|
+
* And a guard for the session that never ended — the tab closed without
|
|
23
|
+
* signing out: the browser remembers whose state it holds, and the next person
|
|
24
|
+
* to sign in forgets it first.
|
|
25
|
+
*
|
|
26
|
+
* @module state/sessionEnd
|
|
27
|
+
*/
|
|
28
|
+
/** Cookies a session writes. */
|
|
29
|
+
export const SESSION_COOKIES = [
|
|
30
|
+
'datalayer-space-context',
|
|
31
|
+
'datalayer-principal-context',
|
|
32
|
+
'datalayer-billing-entity-uid',
|
|
33
|
+
'otel_sql_history',
|
|
34
|
+
];
|
|
35
|
+
/** `localStorage` keys a session writes. */
|
|
36
|
+
export const SESSION_LOCAL_STORAGE_KEYS = [
|
|
37
|
+
'datalayer-principal',
|
|
38
|
+
'datalayer-billing-entity',
|
|
39
|
+
'datalayer-simple-auth',
|
|
40
|
+
];
|
|
41
|
+
/** Whose state the browser holds: the uid of the person it belongs to. */
|
|
42
|
+
export const SESSION_OWNER_KEY = 'datalayer-session-owner';
|
|
43
|
+
const registrations = new Set();
|
|
44
|
+
/**
|
|
45
|
+
* Say what a module keeps for a session, so the end of the session forgets it.
|
|
46
|
+
*
|
|
47
|
+
* @returns A function that withdraws the registration.
|
|
48
|
+
*/
|
|
49
|
+
export const registerSessionState = (registration) => {
|
|
50
|
+
registrations.add(registration);
|
|
51
|
+
return () => {
|
|
52
|
+
registrations.delete(registration);
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
const storageOf = (kind) => {
|
|
56
|
+
try {
|
|
57
|
+
return typeof window === 'undefined' ? undefined : window[kind];
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// A browser that refuses its storage has nothing in it to forget.
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const removeFrom = (storage, key) => {
|
|
65
|
+
try {
|
|
66
|
+
storage?.removeItem(key);
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
// Nothing to forget.
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const deleteCookie = (name) => {
|
|
73
|
+
if (typeof document === 'undefined') {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
document.cookie = `${name}=; path=/; max-age=0; SameSite=Lax`;
|
|
77
|
+
};
|
|
78
|
+
const readCookie = (name) => {
|
|
79
|
+
if (typeof document === 'undefined') {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
const prefix = `${name}=`;
|
|
83
|
+
const entry = document.cookie
|
|
84
|
+
.split(';')
|
|
85
|
+
.map(part => part.trim())
|
|
86
|
+
.find(part => part.startsWith(prefix));
|
|
87
|
+
return entry ? entry.slice(prefix.length) : undefined;
|
|
88
|
+
};
|
|
89
|
+
/** Forget everything a session left in this browser. */
|
|
90
|
+
export const forgetSessionState = () => {
|
|
91
|
+
const cookies = new Set(SESSION_COOKIES);
|
|
92
|
+
const local = new Set([
|
|
93
|
+
...SESSION_LOCAL_STORAGE_KEYS,
|
|
94
|
+
SESSION_OWNER_KEY,
|
|
95
|
+
]);
|
|
96
|
+
const session = new Set();
|
|
97
|
+
for (const registration of registrations) {
|
|
98
|
+
try {
|
|
99
|
+
registration.forget?.();
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
console.warn('A session state could not be reset.', error);
|
|
103
|
+
}
|
|
104
|
+
registration.cookies?.forEach(name => cookies.add(name));
|
|
105
|
+
registration.localStorageKeys?.forEach(key => local.add(key));
|
|
106
|
+
registration.sessionStorageKeys?.forEach(key => session.add(key));
|
|
107
|
+
}
|
|
108
|
+
cookies.forEach(deleteCookie);
|
|
109
|
+
const localStorage = storageOf('localStorage');
|
|
110
|
+
local.forEach(key => removeFrom(localStorage, key));
|
|
111
|
+
const sessionStorage = storageOf('sessionStorage');
|
|
112
|
+
session.forEach(key => removeFrom(sessionStorage, key));
|
|
113
|
+
};
|
|
114
|
+
/** The personal principal the principal cookie names, when it names one. */
|
|
115
|
+
const personalPrincipalInCookie = () => {
|
|
116
|
+
const raw = readCookie('datalayer-principal-context');
|
|
117
|
+
if (!raw) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
const parsed = JSON.parse(decodeURIComponent(raw));
|
|
122
|
+
return parsed?.selectedPrincipalKind === 'personal'
|
|
123
|
+
? String(parsed?.selectedPrincipalUid ?? '').trim() || undefined
|
|
124
|
+
: undefined;
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Claim the browser's session state for the person signing in.
|
|
132
|
+
*
|
|
133
|
+
* When it holds somebody else's — a session that ended without signing out —
|
|
134
|
+
* it is forgotten first. Somebody else's is known by the owner the browser
|
|
135
|
+
* remembers or, before it remembered one, by a personal principal naming
|
|
136
|
+
* another person. The state of an anonymous visitor belongs to nobody and is
|
|
137
|
+
* kept: whoever started as a visitor keeps what they started.
|
|
138
|
+
*/
|
|
139
|
+
export const claimSessionState = (userUid) => {
|
|
140
|
+
const uid = String(userUid ?? '').trim();
|
|
141
|
+
if (!uid) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const localStorage = storageOf('localStorage');
|
|
145
|
+
let owner = null;
|
|
146
|
+
try {
|
|
147
|
+
owner = localStorage?.getItem(SESSION_OWNER_KEY) ?? null;
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
owner = null;
|
|
151
|
+
}
|
|
152
|
+
const principal = personalPrincipalInCookie();
|
|
153
|
+
if ((owner && owner !== uid) || (!owner && principal && principal !== uid)) {
|
|
154
|
+
forgetSessionState();
|
|
155
|
+
}
|
|
156
|
+
try {
|
|
157
|
+
localStorage?.setItem(SESSION_OWNER_KEY, uid);
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
// Nothing to remember it in.
|
|
161
|
+
}
|
|
162
|
+
};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { IDatalayerCoreConfig } from '../../config/Configuration';
|
|
2
|
+
/**
|
|
3
|
+
* What the page itself stated, as opposed to what this module defaults to.
|
|
4
|
+
*
|
|
5
|
+
* The two cannot be told apart once merged, and they do not carry the same
|
|
6
|
+
* weight: a value written into the page describes the deployment that served
|
|
7
|
+
* it, while a default is only a guess. A consumer that reconciles this
|
|
8
|
+
* configuration with another source — the Jupyter server extension, say —
|
|
9
|
+
* needs to know which keys were actually stated, or it will let a stale
|
|
10
|
+
* answer from elsewhere override a deliberate one from here.
|
|
11
|
+
*/
|
|
12
|
+
export declare const pageConfiguration: Partial<IDatalayerCoreConfig>;
|
|
2
13
|
export type DatalayerCoreState = {
|
|
3
14
|
tab: number;
|
|
4
15
|
getIntTab: () => number;
|
|
@@ -23,14 +34,11 @@ export declare const coreStore: import("zustand").StoreApi<DatalayerCoreState>;
|
|
|
23
34
|
export declare function useCoreStore(): DatalayerCoreState;
|
|
24
35
|
export declare function useCoreStore<T>(selector: (state: DatalayerCoreState) => T): T;
|
|
25
36
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* Prefers `otelInUrl` when set, otherwise falls back to `otelUrl`. This allows
|
|
29
|
-
* local development to fetch telemetry from a remote (e.g. production) OTEL
|
|
30
|
-
* service even when the local runtime exports telemetry to a different endpoint.
|
|
37
|
+
* The OTEL base URL used to *consume* (read/query) telemetry.
|
|
31
38
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
39
|
+
* One address, `otelUrl`. A second one existed so local development could read
|
|
40
|
+
* from a remote service while exporting elsewhere; pointing `otelUrl` at that
|
|
41
|
+
* remote does the same thing without two fields that disagree.
|
|
34
42
|
*/
|
|
35
43
|
export declare const getOtelConsumeUrl: () => string;
|
|
36
44
|
export default useCoreStore;
|
|
@@ -16,19 +16,17 @@ let initialConfiguration = {
|
|
|
16
16
|
loadConfigurationFromServer: true,
|
|
17
17
|
jupyterServerless: false,
|
|
18
18
|
iamUrl: 'https://prod1.datalayer.run',
|
|
19
|
+
contentsUrl: 'https://r1.datalayer.run',
|
|
19
20
|
managerUrl: 'https://prod1.datalayer.run',
|
|
20
21
|
runtimesUrl: 'https://r1.datalayer.run',
|
|
21
|
-
schedulerUrl: 'https://
|
|
22
|
+
schedulerUrl: 'https://r1.datalayer.run',
|
|
22
23
|
libraryUrl: 'https://prod1.datalayer.run',
|
|
23
24
|
spacerUrl: 'https://prod1.datalayer.run',
|
|
24
|
-
aiAgentsUrl: 'https://
|
|
25
|
-
aiInferenceUrl: 'https://
|
|
25
|
+
aiAgentsUrl: 'https://r1.datalayer.run',
|
|
26
|
+
aiInferenceUrl: 'https://r1.datalayer.run',
|
|
26
27
|
jupyterMcpServerUrl: 'https://mcp.datalayer.run/mcp',
|
|
27
28
|
otelUrl: 'https://prod1.datalayer.run',
|
|
28
29
|
// Defaults to prod so telemetry is consumed from the production OTEL service
|
|
29
|
-
// even when runtimes export elsewhere (see `getOtelConsumeUrl` and the
|
|
30
|
-
// `DATALAYER_OTEL_IN_URL` env var). Override to '' to consume from `otelUrl`.
|
|
31
|
-
otelInUrl: 'https://prod1.datalayer.run',
|
|
32
30
|
growthUrl: 'https://prod1.datalayer.run',
|
|
33
31
|
inboundsUrl: 'https://prod1.datalayer.run',
|
|
34
32
|
successUrl: 'https://prod1.datalayer.run',
|
|
@@ -52,12 +50,24 @@ let initialConfiguration = {
|
|
|
52
50
|
privacyUrl: 'https://datalayer.ai/privacy',
|
|
53
51
|
},
|
|
54
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* What the page itself stated, as opposed to what this module defaults to.
|
|
55
|
+
*
|
|
56
|
+
* The two cannot be told apart once merged, and they do not carry the same
|
|
57
|
+
* weight: a value written into the page describes the deployment that served
|
|
58
|
+
* it, while a default is only a guess. A consumer that reconciles this
|
|
59
|
+
* configuration with another source — the Jupyter server extension, say —
|
|
60
|
+
* needs to know which keys were actually stated, or it will let a stale
|
|
61
|
+
* answer from elsewhere override a deliberate one from here.
|
|
62
|
+
*/
|
|
63
|
+
export const pageConfiguration = {};
|
|
55
64
|
// Try loading initial state from datalayer-config-data element
|
|
56
65
|
try {
|
|
57
66
|
if (typeof document !== 'undefined') {
|
|
58
67
|
const rawConfig = document.getElementById('datalayer-config-data');
|
|
59
68
|
if (rawConfig?.innerText) {
|
|
60
69
|
const htmlOverridingConfiguration = JSON.parse(rawConfig?.innerText || '{}');
|
|
70
|
+
Object.assign(pageConfiguration, htmlOverridingConfiguration);
|
|
61
71
|
if (htmlOverridingConfiguration.loadConfigurationFromServer != undefined) {
|
|
62
72
|
loadConfigurationFromServer =
|
|
63
73
|
htmlOverridingConfiguration.loadConfigurationFromServer;
|
|
@@ -103,17 +113,11 @@ export function useCoreStore(selector) {
|
|
|
103
113
|
return useStore(coreStore, selector);
|
|
104
114
|
}
|
|
105
115
|
/**
|
|
106
|
-
*
|
|
116
|
+
* The OTEL base URL used to *consume* (read/query) telemetry.
|
|
107
117
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* Mirrors the `DATALAYER_OTEL_IN_URL` (consume) / `DATALAYER_OTEL_URL` (export)
|
|
113
|
-
* split on the backend/build side.
|
|
118
|
+
* One address, `otelUrl`. A second one existed so local development could read
|
|
119
|
+
* from a remote service while exporting elsewhere; pointing `otelUrl` at that
|
|
120
|
+
* remote does the same thing without two fields that disagree.
|
|
114
121
|
*/
|
|
115
|
-
export const getOtelConsumeUrl = () =>
|
|
116
|
-
const cfg = coreStore.getState().configuration;
|
|
117
|
-
return cfg.otelInUrl || cfg.otelUrl;
|
|
118
|
-
};
|
|
122
|
+
export const getOtelConsumeUrl = () => coreStore.getState().configuration.otelUrl;
|
|
119
123
|
export default useCoreStore;
|
|
@@ -63,7 +63,7 @@ export type IAMState = IIAMState & {
|
|
|
63
63
|
setExternalToken: (externalToken: string) => void;
|
|
64
64
|
setVersion: (version: string) => void;
|
|
65
65
|
/**
|
|
66
|
-
* Set the
|
|
66
|
+
* Set the `token` and the `user`.
|
|
67
67
|
*
|
|
68
68
|
* The user detail will be automatically retrieve
|
|
69
69
|
* to avoid inconsistency.
|
|
@@ -6,11 +6,13 @@ import { Poll } from '@lumino/polling';
|
|
|
6
6
|
import { useStore } from 'zustand';
|
|
7
7
|
import { createStore } from 'zustand/vanilla';
|
|
8
8
|
import { ANONYMOUS_USER_TOKEN, ANONYMOUS_USER, asUser, IAMProvidersSpecs, } from '../../models/index.js';
|
|
9
|
+
import { availableCredits } from '../../models/Credits.js';
|
|
9
10
|
import { getStoredToken, getStoredUser, loadRefreshTokenFromCookie, storeToken, storeUser, } from '../storage/index.js';
|
|
10
11
|
import { requestDatalayerAPI, } from '../../api/DatalayerApi.js';
|
|
11
12
|
import { getCookie, setCookie, deleteCookie } from '../../utils/index.js';
|
|
12
13
|
import { coreStore } from './CoreState.js';
|
|
13
14
|
import { profileStore } from './ProfileState.js';
|
|
15
|
+
import { claimSessionState, forgetSessionState } from '../sessionEnd.js';
|
|
14
16
|
/**
|
|
15
17
|
* Limit to warn about low credits in milliseconds.
|
|
16
18
|
*/
|
|
@@ -68,6 +70,9 @@ export const iamStore = createStore((set, get) => {
|
|
|
68
70
|
storeUser();
|
|
69
71
|
storeToken();
|
|
70
72
|
profileStore.getState().clearProfile();
|
|
73
|
+
// Everything else the session left in the browser goes with it: the
|
|
74
|
+
// current space, the principal, the billing entity, what apps registered.
|
|
75
|
+
forgetSessionState();
|
|
71
76
|
set({
|
|
72
77
|
credits: undefined,
|
|
73
78
|
creditsReservations: [],
|
|
@@ -130,12 +135,11 @@ export const iamStore = createStore((set, get) => {
|
|
|
130
135
|
: undefined,
|
|
131
136
|
});
|
|
132
137
|
const { credits, reservations: creditsReservations = [] } = creditsRaw;
|
|
133
|
-
let available = credits.quota !== null
|
|
134
|
-
? credits.quota - credits.credits
|
|
135
|
-
: credits.credits;
|
|
136
|
-
available -= creditsReservations.reduce((consumed, reservation) => consumed + reservation.credits, 0);
|
|
137
138
|
set({
|
|
138
|
-
credits: {
|
|
139
|
+
credits: {
|
|
140
|
+
...credits,
|
|
141
|
+
available: availableCredits(credits, creditsReservations),
|
|
142
|
+
},
|
|
139
143
|
creditsReservations: creditsReservations,
|
|
140
144
|
});
|
|
141
145
|
}
|
|
@@ -179,6 +183,8 @@ export const iamStore = createStore((set, get) => {
|
|
|
179
183
|
token,
|
|
180
184
|
});
|
|
181
185
|
const user = asUser(data.profile);
|
|
186
|
+
// State another person left in this browser is not this person's.
|
|
187
|
+
claimSessionState(user?.id ?? user?.uid);
|
|
182
188
|
storeUser(user);
|
|
183
189
|
storeToken(token);
|
|
184
190
|
set(() => ({ user, token }));
|
|
@@ -201,6 +207,7 @@ export const iamStore = createStore((set, get) => {
|
|
|
201
207
|
return { externalToken };
|
|
202
208
|
}),
|
|
203
209
|
setLogin: (user, token) => set((state) => {
|
|
210
|
+
claimSessionState(user?.id ?? user?.uid);
|
|
204
211
|
storeUser(user);
|
|
205
212
|
storeToken(token);
|
|
206
213
|
// The profile store is what the surfaces (user menu, sidebars,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { createStore } from 'zustand/vanilla';
|
|
6
6
|
import { useStore } from 'zustand';
|
|
7
|
+
import { registerSessionState } from '../sessionEnd.js';
|
|
7
8
|
/**
|
|
8
9
|
* Name of the cookie holding the space last selected by the user.
|
|
9
10
|
*
|
|
@@ -136,6 +137,17 @@ export const layoutStore = createStore((set, get) => ({
|
|
|
136
137
|
setScreencapture: (screenCapture) => set((state) => ({ screenCapture })),
|
|
137
138
|
reset: () => set((state) => ({ bootstrapped: false })),
|
|
138
139
|
}));
|
|
140
|
+
// The current space, organization, team and item are the session's own:
|
|
141
|
+
// forgotten when it ends, cookie included.
|
|
142
|
+
registerSessionState({
|
|
143
|
+
forget: () => {
|
|
144
|
+
const state = layoutStore.getState();
|
|
145
|
+
state.updateLayoutSpace(undefined);
|
|
146
|
+
state.updateLayoutOrganization(undefined);
|
|
147
|
+
state.updateLayoutTeam(undefined);
|
|
148
|
+
state.setItem(undefined);
|
|
149
|
+
},
|
|
150
|
+
});
|
|
139
151
|
export function useLayoutStore(selector) {
|
|
140
152
|
return useStore(layoutStore, selector);
|
|
141
153
|
}
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
3
|
* Distributed under the terms of the Modified BSD License.
|
|
4
4
|
*/
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
-
* Distributed under the terms of the Modified BSD License.
|
|
8
|
-
*/
|
|
9
5
|
/**
|
|
10
6
|
* ProfileState — the one place the authenticated user's profile lives.
|
|
11
7
|
*
|
|
@@ -38,6 +34,7 @@ const userToProfile = (user) => user
|
|
|
38
34
|
avatarUrl: user.avatarUrl,
|
|
39
35
|
avatarIcon: user.avatarIcon,
|
|
40
36
|
banner: user.banner,
|
|
37
|
+
showOrbits: user.showOrbits,
|
|
41
38
|
origin: user.origin,
|
|
42
39
|
roles: user.roles,
|
|
43
40
|
}
|