@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,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canonical orchestration model: what one agent says to another about
|
|
3
|
+
* work it is delegating, supervising, steering, recovering or stopping.
|
|
4
|
+
*
|
|
5
|
+
* Every type here is generated from the pydantic models in
|
|
6
|
+
* `datalayer_core/orchestration`, which are the source of truth
|
|
7
|
+
* (PLAN_ORCHESTRATOR.md, 19.8), and from the control plane's OpenAPI
|
|
8
|
+
* document for the answers it wraps them in and the operations it serves.
|
|
9
|
+
* Regenerate with `npm run generate:orchestration`;
|
|
10
|
+
* `npm run check:orchestration-generated` is the gate that fails when the
|
|
11
|
+
* checked-in file is not what the models and the document say. Do not edit
|
|
12
|
+
* `generated.ts` by hand.
|
|
13
|
+
*
|
|
14
|
+
* The wire is camel case, so nothing here converts anything: unlike the MCP
|
|
15
|
+
* and Contents clients, which speak a snake case wire and camel case in the
|
|
16
|
+
* browser, an orchestration document is the same in both places.
|
|
17
|
+
*
|
|
18
|
+
* `client` is the control plane's twelve commands and two reads, every path
|
|
19
|
+
* taken from the generated operations; `events` is the subscription that
|
|
20
|
+
* resumes after a dropped connection, and the user channel's tree
|
|
21
|
+
* announcement; `measures` is how delegated work is doing, read from the
|
|
22
|
+
* OTEL service's orchestration dashboard.
|
|
23
|
+
*
|
|
24
|
+
* @module api/orchestration
|
|
25
|
+
*/
|
|
26
|
+
export * from './generated';
|
|
27
|
+
export * from './lifecycle';
|
|
28
|
+
export * from './client';
|
|
29
|
+
export * from './events';
|
|
30
|
+
export * from './measures';
|
|
@@ -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
|
+
* The canonical orchestration model: what one agent says to another about
|
|
7
|
+
* work it is delegating, supervising, steering, recovering or stopping.
|
|
8
|
+
*
|
|
9
|
+
* Every type here is generated from the pydantic models in
|
|
10
|
+
* `datalayer_core/orchestration`, which are the source of truth
|
|
11
|
+
* (PLAN_ORCHESTRATOR.md, 19.8), and from the control plane's OpenAPI
|
|
12
|
+
* document for the answers it wraps them in and the operations it serves.
|
|
13
|
+
* Regenerate with `npm run generate:orchestration`;
|
|
14
|
+
* `npm run check:orchestration-generated` is the gate that fails when the
|
|
15
|
+
* checked-in file is not what the models and the document say. Do not edit
|
|
16
|
+
* `generated.ts` by hand.
|
|
17
|
+
*
|
|
18
|
+
* The wire is camel case, so nothing here converts anything: unlike the MCP
|
|
19
|
+
* and Contents clients, which speak a snake case wire and camel case in the
|
|
20
|
+
* browser, an orchestration document is the same in both places.
|
|
21
|
+
*
|
|
22
|
+
* `client` is the control plane's twelve commands and two reads, every path
|
|
23
|
+
* taken from the generated operations; `events` is the subscription that
|
|
24
|
+
* resumes after a dropped connection, and the user channel's tree
|
|
25
|
+
* announcement; `measures` is how delegated work is doing, read from the
|
|
26
|
+
* OTEL service's orchestration dashboard.
|
|
27
|
+
*
|
|
28
|
+
* @module api/orchestration
|
|
29
|
+
*/
|
|
30
|
+
export * from './generated.js';
|
|
31
|
+
export * from './lifecycle.js';
|
|
32
|
+
export * from './client.js';
|
|
33
|
+
export * from './events.js';
|
|
34
|
+
export * from './measures.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canonical execution lifecycle (PLAN_ORCHESTRATOR.md, section 6.1, O0-02).
|
|
3
|
+
*
|
|
4
|
+
* The states and the moves between them are not written here: they are
|
|
5
|
+
* generated from `datalayer_core/orchestration/lifecycle.py`, which is the
|
|
6
|
+
* source of truth, and this module is the function that reads them. A
|
|
7
|
+
* mirror that restated the table would be a second place for it to be
|
|
8
|
+
* wrong, and the whole point of one state machine is that there is one.
|
|
9
|
+
*
|
|
10
|
+
* A browser observes; it does not decide. This is here so that a view can
|
|
11
|
+
* tell whether a control it is about to enable would be refused — a cancel
|
|
12
|
+
* button on a completed execution — without asking the control plane and
|
|
13
|
+
* without inventing an answer.
|
|
14
|
+
*
|
|
15
|
+
* @module api/orchestration/lifecycle
|
|
16
|
+
*/
|
|
17
|
+
import { type ExecutionState, type LifecycleEvent, type LifecycleMoves } from './generated';
|
|
18
|
+
/** A move the lifecycle does not allow, refused rather than performed. */
|
|
19
|
+
export declare class InvalidTransitionError extends Error {
|
|
20
|
+
readonly current: ExecutionState;
|
|
21
|
+
readonly event: LifecycleEvent;
|
|
22
|
+
constructor(current: ExecutionState, event: LifecycleEvent);
|
|
23
|
+
}
|
|
24
|
+
/** The state of an execution that has been created and nothing more. */
|
|
25
|
+
export declare const INITIAL_STATE: ExecutionState;
|
|
26
|
+
/** The states from which nothing more happens. */
|
|
27
|
+
export declare const TERMINAL_STATES: ReadonlySet<ExecutionState>;
|
|
28
|
+
/** Whether nothing more happens from this state. */
|
|
29
|
+
export declare const isTerminal: (state: ExecutionState) => boolean;
|
|
30
|
+
/** Every event this state accepts, and where each one leads. */
|
|
31
|
+
export declare const movesFrom: (state: ExecutionState) => LifecycleMoves;
|
|
32
|
+
/** Whether the event applies to the state, without moving anything. */
|
|
33
|
+
export declare const canTransition: (current: ExecutionState, event: LifecycleEvent) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The state this event leads to, or a refusal.
|
|
36
|
+
*
|
|
37
|
+
* @throws InvalidTransitionError - When the lifecycle does not allow the move.
|
|
38
|
+
*/
|
|
39
|
+
export declare const transition: (current: ExecutionState, event: LifecycleEvent) => ExecutionState;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The canonical execution lifecycle (PLAN_ORCHESTRATOR.md, section 6.1, O0-02).
|
|
7
|
+
*
|
|
8
|
+
* The states and the moves between them are not written here: they are
|
|
9
|
+
* generated from `datalayer_core/orchestration/lifecycle.py`, which is the
|
|
10
|
+
* source of truth, and this module is the function that reads them. A
|
|
11
|
+
* mirror that restated the table would be a second place for it to be
|
|
12
|
+
* wrong, and the whole point of one state machine is that there is one.
|
|
13
|
+
*
|
|
14
|
+
* A browser observes; it does not decide. This is here so that a view can
|
|
15
|
+
* tell whether a control it is about to enable would be refused — a cancel
|
|
16
|
+
* button on a completed execution — without asking the control plane and
|
|
17
|
+
* without inventing an answer.
|
|
18
|
+
*
|
|
19
|
+
* @module api/orchestration/lifecycle
|
|
20
|
+
*/
|
|
21
|
+
import { ORCHESTRATION_LIFECYCLE, } from './generated.js';
|
|
22
|
+
/** A move the lifecycle does not allow, refused rather than performed. */
|
|
23
|
+
export class InvalidTransitionError extends Error {
|
|
24
|
+
current;
|
|
25
|
+
event;
|
|
26
|
+
constructor(current, event) {
|
|
27
|
+
const reason = isTerminal(current)
|
|
28
|
+
? 'it is terminal'
|
|
29
|
+
: 'that event does not apply there';
|
|
30
|
+
super(`An execution in '${current}' cannot take '${event}': ${reason}.`);
|
|
31
|
+
this.name = 'InvalidTransitionError';
|
|
32
|
+
this.current = current;
|
|
33
|
+
this.event = event;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** The state of an execution that has been created and nothing more. */
|
|
37
|
+
export const INITIAL_STATE = ORCHESTRATION_LIFECYCLE.initial;
|
|
38
|
+
/** The states from which nothing more happens. */
|
|
39
|
+
export const TERMINAL_STATES = new Set(ORCHESTRATION_LIFECYCLE.terminal);
|
|
40
|
+
/** Whether nothing more happens from this state. */
|
|
41
|
+
export const isTerminal = (state) => TERMINAL_STATES.has(state);
|
|
42
|
+
/** Every event this state accepts, and where each one leads. */
|
|
43
|
+
export const movesFrom = (state) => ORCHESTRATION_LIFECYCLE.transitions[state];
|
|
44
|
+
/** Whether the event applies to the state, without moving anything. */
|
|
45
|
+
export const canTransition = (current, event) => movesFrom(current)[event] !== undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The state this event leads to, or a refusal.
|
|
48
|
+
*
|
|
49
|
+
* @throws InvalidTransitionError - When the lifecycle does not allow the move.
|
|
50
|
+
*/
|
|
51
|
+
export const transition = (current, event) => {
|
|
52
|
+
const next = movesFrom(current)[event];
|
|
53
|
+
if (next === undefined) {
|
|
54
|
+
throw new InvalidTransitionError(current, event);
|
|
55
|
+
}
|
|
56
|
+
return next;
|
|
57
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type DashboardData, type DashboardDataOptions } from '../otel/dashboards';
|
|
2
|
+
/** The built-in dashboard the measures are read from. */
|
|
3
|
+
export declare const ORCHESTRATION_DASHBOARD = "orchestration";
|
|
4
|
+
/** The panels each measure is read from, by the dashboard's ids. */
|
|
5
|
+
export declare const ORCHESTRATION_PANELS: {
|
|
6
|
+
readonly afterDisconnect: "orchestration-executions-settled-by-state-where-recovery-disconnected";
|
|
7
|
+
readonly afterWorkerLost: "orchestration-executions-settled-by-state-where-recovery-worker_lost";
|
|
8
|
+
readonly delegations: "orchestration-delegations-by-outcome";
|
|
9
|
+
readonly artifacts: "orchestration-artifacts-by-outcome";
|
|
10
|
+
readonly acceptance: "orchestration-acceptance_seconds-by-protocol";
|
|
11
|
+
readonly firstWorkerEvent: "orchestration-first_worker_event_seconds-by-protocol";
|
|
12
|
+
readonly conformancePassed: "orchestration-conformance-scenarios-by-binding-where-outcome-passed";
|
|
13
|
+
readonly conformanceFailed: "orchestration-conformance-scenarios-by-binding-where-outcome-failed";
|
|
14
|
+
};
|
|
15
|
+
/** A part of a whole, and the rate when there is a whole to divide by. */
|
|
16
|
+
export interface Share {
|
|
17
|
+
part: number;
|
|
18
|
+
of: number;
|
|
19
|
+
/** `null` when nothing was counted, which is not the same as none. */
|
|
20
|
+
rate: number | null;
|
|
21
|
+
}
|
|
22
|
+
export interface OrchestrationMeasures {
|
|
23
|
+
/** Executions that lost sight of their worker, and how many completed. */
|
|
24
|
+
completedAfterDisconnect: Share;
|
|
25
|
+
/** Executions whose worker was lost, and how many completed anyway. */
|
|
26
|
+
completedAfterWorkerLost: Share;
|
|
27
|
+
/** Delegations, and how many repeated a command already received. */
|
|
28
|
+
duplicateDelegations: Share;
|
|
29
|
+
/** Artifacts a commit settled, and how many another attempt superseded. */
|
|
30
|
+
supersededArtifacts: Share;
|
|
31
|
+
/** Mean seconds from an execution's creation to its acceptance, by protocol. */
|
|
32
|
+
acceptanceSeconds: Record<string, number>;
|
|
33
|
+
/** Mean seconds from an execution's creation to its worker's first milestone, by protocol. */
|
|
34
|
+
firstWorkerEventSeconds: Record<string, number>;
|
|
35
|
+
/** Conformance scenarios run against each binding, and how many passed. */
|
|
36
|
+
conformance: Record<string, Share>;
|
|
37
|
+
/** The panels the service could not answer, by id, and why. */
|
|
38
|
+
unanswered: Record<string, string>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The six measures, from the dashboard's answer.
|
|
42
|
+
*
|
|
43
|
+
* @param data - The orchestration dashboard, as `getDashboardData` returns it.
|
|
44
|
+
* @returns The measures, with the panels that did not answer named.
|
|
45
|
+
*/
|
|
46
|
+
export declare const orchestrationMeasures: (data: DashboardData) => OrchestrationMeasures;
|
|
47
|
+
/**
|
|
48
|
+
* The six measures for the caller's account, or the one named.
|
|
49
|
+
*
|
|
50
|
+
* @param token - Authentication token.
|
|
51
|
+
* @param options - The window and the account to read as.
|
|
52
|
+
* @param otelUrl - The OTEL service.
|
|
53
|
+
* @returns The measures.
|
|
54
|
+
*/
|
|
55
|
+
export declare const fetchOrchestrationMeasures: (token: string, options?: DashboardDataOptions, otelUrl?: string) => Promise<OrchestrationMeasures>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* How delegated work is doing, read from the OTEL service's orchestration
|
|
11
|
+
* dashboard.
|
|
12
|
+
*
|
|
13
|
+
* Six measures: the share of executions that completed after losing sight
|
|
14
|
+
* of their worker, the share of delegations that were repeats and of
|
|
15
|
+
* artifacts that were superseded, the share that completed when the worker
|
|
16
|
+
* itself was lost, how long workers take to accept work and to report
|
|
17
|
+
* anything, and the share of the conformance scenarios each binding passes.
|
|
18
|
+
*
|
|
19
|
+
* The execution store records them wherever executions are held — the
|
|
20
|
+
* agents service, the durable service — under the account the executions
|
|
21
|
+
* belong to, and the service computes each panel from the series as they were
|
|
22
|
+
* exported. Nothing here adds metric points up: the panels arrive summarised,
|
|
23
|
+
* and this module only divides one panel's labels by another's. The panel ids
|
|
24
|
+
* are the dashboard's own, which a contract test in the OTEL service holds to
|
|
25
|
+
* the ones named here.
|
|
26
|
+
*
|
|
27
|
+
* @module api/orchestration/measures
|
|
28
|
+
*/
|
|
29
|
+
import { DEFAULT_SERVICE_URLS } from '../constants.js';
|
|
30
|
+
import { getDashboardData, } from '../otel/dashboards.js';
|
|
31
|
+
/** The built-in dashboard the measures are read from. */
|
|
32
|
+
export const ORCHESTRATION_DASHBOARD = 'orchestration';
|
|
33
|
+
/** The panels each measure is read from, by the dashboard's ids. */
|
|
34
|
+
export const ORCHESTRATION_PANELS = {
|
|
35
|
+
afterDisconnect: 'orchestration-executions-settled-by-state-where-recovery-disconnected',
|
|
36
|
+
afterWorkerLost: 'orchestration-executions-settled-by-state-where-recovery-worker_lost',
|
|
37
|
+
delegations: 'orchestration-delegations-by-outcome',
|
|
38
|
+
artifacts: 'orchestration-artifacts-by-outcome',
|
|
39
|
+
acceptance: 'orchestration-acceptance_seconds-by-protocol',
|
|
40
|
+
firstWorkerEvent: 'orchestration-first_worker_event_seconds-by-protocol',
|
|
41
|
+
conformancePassed: 'orchestration-conformance-scenarios-by-binding-where-outcome-passed',
|
|
42
|
+
conformanceFailed: 'orchestration-conformance-scenarios-by-binding-where-outcome-failed',
|
|
43
|
+
};
|
|
44
|
+
const share = (part, of) => ({
|
|
45
|
+
part,
|
|
46
|
+
of,
|
|
47
|
+
rate: of > 0 ? part / of : null,
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* The six measures, from the dashboard's answer.
|
|
51
|
+
*
|
|
52
|
+
* @param data - The orchestration dashboard, as `getDashboardData` returns it.
|
|
53
|
+
* @returns The measures, with the panels that did not answer named.
|
|
54
|
+
*/
|
|
55
|
+
export const orchestrationMeasures = (data) => {
|
|
56
|
+
const panels = new Map(data.panels.map(panel => [panel.id, panel]));
|
|
57
|
+
const unanswered = {};
|
|
58
|
+
const byLabel = (id) => {
|
|
59
|
+
const panel = panels.get(id);
|
|
60
|
+
if (!panel || panel.error) {
|
|
61
|
+
unanswered[id] = panel?.error ?? 'The dashboard has no such panel.';
|
|
62
|
+
return {};
|
|
63
|
+
}
|
|
64
|
+
return Object.fromEntries(panel.series
|
|
65
|
+
.filter(entry => entry.summary !== null)
|
|
66
|
+
.map(entry => [entry.label, entry.summary]));
|
|
67
|
+
};
|
|
68
|
+
const total = (values) => Object.values(values).reduce((sum, value) => sum + value, 0);
|
|
69
|
+
const afterDisconnect = byLabel(ORCHESTRATION_PANELS.afterDisconnect);
|
|
70
|
+
const afterWorkerLost = byLabel(ORCHESTRATION_PANELS.afterWorkerLost);
|
|
71
|
+
const delegations = byLabel(ORCHESTRATION_PANELS.delegations);
|
|
72
|
+
const artifacts = byLabel(ORCHESTRATION_PANELS.artifacts);
|
|
73
|
+
const passed = byLabel(ORCHESTRATION_PANELS.conformancePassed);
|
|
74
|
+
const failed = byLabel(ORCHESTRATION_PANELS.conformanceFailed);
|
|
75
|
+
const conformance = {};
|
|
76
|
+
for (const binding of new Set([...Object.keys(passed), ...Object.keys(failed)])) {
|
|
77
|
+
const ok = passed[binding] ?? 0;
|
|
78
|
+
conformance[binding] = share(ok, ok + (failed[binding] ?? 0));
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
completedAfterDisconnect: share(afterDisconnect.completed ?? 0, total(afterDisconnect)),
|
|
82
|
+
completedAfterWorkerLost: share(afterWorkerLost.completed ?? 0, total(afterWorkerLost)),
|
|
83
|
+
duplicateDelegations: share(delegations.duplicate ?? 0, total(delegations)),
|
|
84
|
+
supersededArtifacts: share(artifacts.superseded ?? 0, total(artifacts)),
|
|
85
|
+
acceptanceSeconds: byLabel(ORCHESTRATION_PANELS.acceptance),
|
|
86
|
+
firstWorkerEventSeconds: byLabel(ORCHESTRATION_PANELS.firstWorkerEvent),
|
|
87
|
+
conformance,
|
|
88
|
+
unanswered,
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* The six measures for the caller's account, or the one named.
|
|
93
|
+
*
|
|
94
|
+
* @param token - Authentication token.
|
|
95
|
+
* @param options - The window and the account to read as.
|
|
96
|
+
* @param otelUrl - The OTEL service.
|
|
97
|
+
* @returns The measures.
|
|
98
|
+
*/
|
|
99
|
+
export const fetchOrchestrationMeasures = async (token, options = {}, otelUrl = DEFAULT_SERVICE_URLS.OTEL) => orchestrationMeasures(await getDashboardData(token, ORCHESTRATION_DASHBOARD, options, otelUrl));
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** What one export of a series added, for a chart. */
|
|
2
|
+
export interface DashboardPoint {
|
|
3
|
+
/** Unix nanoseconds, which a JavaScript number holds only approximately. */
|
|
4
|
+
t: number;
|
|
5
|
+
v: number;
|
|
6
|
+
}
|
|
7
|
+
/** One label value of a panel: its series combined one way. */
|
|
8
|
+
export interface DashboardSeries {
|
|
9
|
+
label: string;
|
|
10
|
+
/** `null` when there was nothing to divide by, as for a duration never measured. */
|
|
11
|
+
summary: number | null;
|
|
12
|
+
/** How many series (processes, attribute sets) the summary combines. */
|
|
13
|
+
series: number;
|
|
14
|
+
points: DashboardPoint[];
|
|
15
|
+
}
|
|
16
|
+
/** One panel and its answer. */
|
|
17
|
+
export interface DashboardPanelData {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
metric: string;
|
|
21
|
+
by: string | null;
|
|
22
|
+
where: Record<string, string>;
|
|
23
|
+
agg: string;
|
|
24
|
+
kind: string;
|
|
25
|
+
series: DashboardSeries[];
|
|
26
|
+
/** The limit cut the points a chart draws; the summaries are whole. */
|
|
27
|
+
points_truncated?: boolean;
|
|
28
|
+
/** Why the service could not answer this panel; the others still answer. */
|
|
29
|
+
error?: string;
|
|
30
|
+
}
|
|
31
|
+
/** A dashboard's every panel, answered under one account. */
|
|
32
|
+
export interface DashboardData {
|
|
33
|
+
success: boolean;
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
account_uid: string;
|
|
37
|
+
panels: DashboardPanelData[];
|
|
38
|
+
}
|
|
39
|
+
export interface DashboardDataOptions {
|
|
40
|
+
/** The window opens here; all of the retained history without it. */
|
|
41
|
+
since?: Date;
|
|
42
|
+
/** The window closes here; now without it. */
|
|
43
|
+
until?: Date;
|
|
44
|
+
/** Read as this organization or team rather than the caller. */
|
|
45
|
+
accountUid?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Every panel of one dashboard, answered under the caller's account scope.
|
|
49
|
+
*
|
|
50
|
+
* @param token - Authentication token.
|
|
51
|
+
* @param dashboardId - A built-in dashboard's id, or one the account saved.
|
|
52
|
+
* @param options - The window and the account to read as.
|
|
53
|
+
* @param baseUrl - The OTEL service.
|
|
54
|
+
* @returns The panels and their summaries.
|
|
55
|
+
*/
|
|
56
|
+
export declare const getDashboardData: (token: string, dashboardId: string, options?: DashboardDataOptions, baseUrl?: string) => Promise<DashboardData>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* OTEL dashboards, read under an account.
|
|
11
|
+
*
|
|
12
|
+
* A panel's numbers come back computed by the OTEL service, which reads
|
|
13
|
+
* each series the way it was exported: a running total's increase over the
|
|
14
|
+
* window, a level's latest reading, a duration's total over its count.
|
|
15
|
+
* Services export counters as running totals, so adding raw metric points up
|
|
16
|
+
* counts every earlier report again; a view reads these summaries instead.
|
|
17
|
+
*
|
|
18
|
+
* @module api/otel/dashboards
|
|
19
|
+
*/
|
|
20
|
+
import { requestDatalayerAPI } from '../DatalayerApi.js';
|
|
21
|
+
import { API_BASE_PATHS, DEFAULT_SERVICE_URLS } from '../constants.js';
|
|
22
|
+
import { validateToken } from '../utils/validation.js';
|
|
23
|
+
/** A date as the unix nanoseconds the service takes, spelled exactly. */
|
|
24
|
+
const nanoseconds = (date) => `${Math.floor(date.getTime())}000000`;
|
|
25
|
+
/**
|
|
26
|
+
* Every panel of one dashboard, answered under the caller's account scope.
|
|
27
|
+
*
|
|
28
|
+
* @param token - Authentication token.
|
|
29
|
+
* @param dashboardId - A built-in dashboard's id, or one the account saved.
|
|
30
|
+
* @param options - The window and the account to read as.
|
|
31
|
+
* @param baseUrl - The OTEL service.
|
|
32
|
+
* @returns The panels and their summaries.
|
|
33
|
+
*/
|
|
34
|
+
export const getDashboardData = async (token, dashboardId, options = {}, baseUrl = DEFAULT_SERVICE_URLS.OTEL) => {
|
|
35
|
+
validateToken(token);
|
|
36
|
+
const params = new URLSearchParams();
|
|
37
|
+
if (options.since)
|
|
38
|
+
params.set('start', nanoseconds(options.since));
|
|
39
|
+
if (options.until)
|
|
40
|
+
params.set('end', nanoseconds(options.until));
|
|
41
|
+
if (options.accountUid)
|
|
42
|
+
params.set('account_uid', options.accountUid);
|
|
43
|
+
const queryString = params.toString();
|
|
44
|
+
const url = `${baseUrl}${API_BASE_PATHS.OTEL}/dashboards/${encodeURIComponent(dashboardId)}/data${queryString ? `?${queryString}` : ''}`;
|
|
45
|
+
return requestDatalayerAPI({
|
|
46
|
+
url,
|
|
47
|
+
method: 'GET',
|
|
48
|
+
token,
|
|
49
|
+
});
|
|
50
|
+
};
|
package/lib/api/otel/index.d.ts
CHANGED
package/lib/api/otel/index.js
CHANGED
|
@@ -13,6 +13,22 @@ export declare const listMetrics: (token: string, options?: {
|
|
|
13
13
|
serviceName?: string;
|
|
14
14
|
limit?: number;
|
|
15
15
|
}, baseUrl?: string) => Promise<ListMetricsResponse>;
|
|
16
|
+
/** One metric the OTEL service holds points of. */
|
|
17
|
+
export interface MetricName {
|
|
18
|
+
metric_name: string;
|
|
19
|
+
metric_type?: string;
|
|
20
|
+
metric_unit?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The metrics the OTEL service holds points of, under the caller's account.
|
|
24
|
+
*
|
|
25
|
+
* @param token - Authentication token
|
|
26
|
+
* @param baseUrl - Base URL for the OTEL service
|
|
27
|
+
* @returns Promise resolving to the distinct metric names
|
|
28
|
+
*/
|
|
29
|
+
export declare const listMetricNames: (token: string, baseUrl?: string) => Promise<{
|
|
30
|
+
data: MetricName[];
|
|
31
|
+
}>;
|
|
16
32
|
/**
|
|
17
33
|
* Query metric data points with filters.
|
|
18
34
|
*
|
package/lib/api/otel/metrics.js
CHANGED
|
@@ -35,6 +35,21 @@ export const listMetrics = async (token, options = {}, baseUrl = DEFAULT_SERVICE
|
|
|
35
35
|
token,
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* The metrics the OTEL service holds points of, under the caller's account.
|
|
40
|
+
*
|
|
41
|
+
* @param token - Authentication token
|
|
42
|
+
* @param baseUrl - Base URL for the OTEL service
|
|
43
|
+
* @returns Promise resolving to the distinct metric names
|
|
44
|
+
*/
|
|
45
|
+
export const listMetricNames = async (token, baseUrl = DEFAULT_SERVICE_URLS.OTEL) => {
|
|
46
|
+
validateToken(token);
|
|
47
|
+
return requestDatalayerAPI({
|
|
48
|
+
url: `${baseUrl}${API_BASE_PATHS.OTEL}/metrics/names`,
|
|
49
|
+
method: 'GET',
|
|
50
|
+
token,
|
|
51
|
+
});
|
|
52
|
+
};
|
|
38
53
|
/**
|
|
39
54
|
* Query metric data points with filters.
|
|
40
55
|
*
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Scheduler API, one function per endpoint this UI uses.
|
|
3
|
+
*
|
|
4
|
+
* Paths mirror `datalayer_scheduler/api/v1/endpoints/schedules.py`. Only
|
|
5
|
+
* the routes a schedule's own management needs are wrapped here — the
|
|
6
|
+
* notebook-run reading and reporting routes `views/schedules/Schedules.tsx`
|
|
7
|
+
* already reaches directly stay as they are.
|
|
8
|
+
*
|
|
9
|
+
* @module api/scheduler/client
|
|
10
|
+
*/
|
|
11
|
+
import { type SchedulerClientOptions } from './request';
|
|
12
|
+
import type { ScheduleListResponse, ScheduleResponse, ScheduleRunListResponse, UpdateScheduleRequest, UpsertScheduleRequest } from './types';
|
|
13
|
+
/** Every schedule the caller owns, `notebook` and `evalset` alike. */
|
|
14
|
+
export declare const listSchedules: (options: SchedulerClientOptions, query?: {
|
|
15
|
+
includeDisabled?: boolean;
|
|
16
|
+
}) => Promise<ScheduleListResponse>;
|
|
17
|
+
/** One schedule. */
|
|
18
|
+
export declare const getSchedule: (options: SchedulerClientOptions, scheduleUid: string) => Promise<ScheduleResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Create the one schedule a target has, or replace it (BENCHMARK.md, B2-16):
|
|
21
|
+
* a schedule is unique per owner and target, so upserting is how a person
|
|
22
|
+
* changes an `evalset` schedule's cron or configuration too.
|
|
23
|
+
*/
|
|
24
|
+
export declare const upsertSchedule: (options: SchedulerClientOptions, body: UpsertScheduleRequest) => Promise<ScheduleResponse>;
|
|
25
|
+
/** Change a schedule's cron expression, preset or enabled flag. */
|
|
26
|
+
export declare const updateSchedule: (options: SchedulerClientOptions, scheduleUid: string, body: UpdateScheduleRequest) => Promise<ScheduleResponse>;
|
|
27
|
+
/** Turn a schedule off, without losing its cron and configuration. */
|
|
28
|
+
export declare const disableSchedule: (options: SchedulerClientOptions, scheduleUid: string) => Promise<ScheduleResponse>;
|
|
29
|
+
/** The runs of one schedule, newest first. */
|
|
30
|
+
export declare const listScheduleRuns: (options: SchedulerClientOptions, scheduleUid: string) => Promise<ScheduleRunListResponse>;
|
|
31
|
+
/** Every run of every schedule the caller owns, newest first. */
|
|
32
|
+
export declare const listAllScheduleRuns: (options: SchedulerClientOptions) => Promise<ScheduleRunListResponse>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The Scheduler API, one function per endpoint this UI uses.
|
|
11
|
+
*
|
|
12
|
+
* Paths mirror `datalayer_scheduler/api/v1/endpoints/schedules.py`. Only
|
|
13
|
+
* the routes a schedule's own management needs are wrapped here — the
|
|
14
|
+
* notebook-run reading and reporting routes `views/schedules/Schedules.tsx`
|
|
15
|
+
* already reaches directly stay as they are.
|
|
16
|
+
*
|
|
17
|
+
* @module api/scheduler/client
|
|
18
|
+
*/
|
|
19
|
+
import { schedulerRequest, scheduleSegment, } from './request.js';
|
|
20
|
+
/** Every schedule the caller owns, `notebook` and `evalset` alike. */
|
|
21
|
+
export const listSchedules = (options, query = {}) => schedulerRequest(options, '/schedules', {
|
|
22
|
+
query: { includeDisabled: query.includeDisabled },
|
|
23
|
+
});
|
|
24
|
+
/** One schedule. */
|
|
25
|
+
export const getSchedule = (options, scheduleUid) => schedulerRequest(options, `/schedules/${scheduleSegment(scheduleUid)}`);
|
|
26
|
+
/**
|
|
27
|
+
* Create the one schedule a target has, or replace it (BENCHMARK.md, B2-16):
|
|
28
|
+
* a schedule is unique per owner and target, so upserting is how a person
|
|
29
|
+
* changes an `evalset` schedule's cron or configuration too.
|
|
30
|
+
*/
|
|
31
|
+
export const upsertSchedule = (options, body) => schedulerRequest(options, '/schedules', {
|
|
32
|
+
method: 'POST',
|
|
33
|
+
body,
|
|
34
|
+
});
|
|
35
|
+
/** Change a schedule's cron expression, preset or enabled flag. */
|
|
36
|
+
export const updateSchedule = (options, scheduleUid, body) => schedulerRequest(options, `/schedules/${scheduleSegment(scheduleUid)}`, { method: 'PUT', body });
|
|
37
|
+
/** Turn a schedule off, without losing its cron and configuration. */
|
|
38
|
+
export const disableSchedule = (options, scheduleUid) => schedulerRequest(options, `/schedules/${scheduleSegment(scheduleUid)}/disable`, { method: 'POST' });
|
|
39
|
+
/** The runs of one schedule, newest first. */
|
|
40
|
+
export const listScheduleRuns = (options, scheduleUid) => schedulerRequest(options, `/schedules/${scheduleSegment(scheduleUid)}/runs`);
|
|
41
|
+
/** Every run of every schedule the caller owns, newest first. */
|
|
42
|
+
export const listAllScheduleRuns = (options) => schedulerRequest(options, '/schedules/runs');
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
7
|
+
* Distributed under the terms of the Modified BSD License.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The Scheduler API: what runs on a cron, and what it produced.
|
|
11
|
+
*
|
|
12
|
+
* @module api/scheduler
|
|
13
|
+
*/
|
|
14
|
+
export * from './types.js';
|
|
15
|
+
export * from './request.js';
|
|
16
|
+
export * from './client.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** What every Scheduler call needs to know. */
|
|
2
|
+
export interface SchedulerClientOptions {
|
|
3
|
+
/** The Scheduler service origin, e.g. `https://prod1.datalayer.run`. */
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
/** The caller's IAM token. */
|
|
6
|
+
token?: string;
|
|
7
|
+
}
|
|
8
|
+
export type SchedulerQuery = Record<string, string | number | boolean | undefined | null>;
|
|
9
|
+
export interface SchedulerRequestInit {
|
|
10
|
+
method?: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
|
|
11
|
+
body?: unknown;
|
|
12
|
+
query?: SchedulerQuery;
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
}
|
|
15
|
+
/** The Scheduler origin, with no trailing slash. */
|
|
16
|
+
export declare const schedulerOrigin: (baseUrl?: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* A full URL under `/api/scheduler/v1`, with the query merged in. Empty,
|
|
19
|
+
* null and undefined values are left out.
|
|
20
|
+
*/
|
|
21
|
+
export declare const schedulerUrl: (options: SchedulerClientOptions, path: string, query?: SchedulerQuery) => string;
|
|
22
|
+
/**
|
|
23
|
+
* One request to the Scheduler service, `path` relative to
|
|
24
|
+
* `/api/scheduler/v1`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const schedulerRequest: <T>(options: SchedulerClientOptions, path: string, init?: SchedulerRequestInit) => Promise<T>;
|
|
27
|
+
/** A path segment, encoded once. */
|
|
28
|
+
export declare const scheduleSegment: (value: string) => string;
|