@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.
Files changed (496) hide show
  1. package/README.md +41 -18
  2. package/lib/api/DatalayerApi.d.ts +42 -1
  3. package/lib/api/DatalayerApi.js +90 -3
  4. package/lib/api/constants.d.ts +19 -1
  5. package/lib/api/constants.js +19 -1
  6. package/lib/api/contents/attachments.d.ts +9 -0
  7. package/lib/api/contents/attachments.js +39 -0
  8. package/lib/api/contents/bridges.d.ts +22 -0
  9. package/lib/api/contents/bridges.js +79 -0
  10. package/lib/api/contents/capabilities.d.ts +11 -0
  11. package/lib/api/contents/capabilities.js +21 -0
  12. package/lib/api/contents/cloudStorage.d.ts +31 -0
  13. package/lib/api/contents/cloudStorage.js +89 -0
  14. package/lib/api/contents/dataservers.d.ts +37 -0
  15. package/lib/api/contents/dataservers.js +121 -0
  16. package/lib/api/contents/datasets.d.ts +63 -0
  17. package/lib/api/contents/datasets.js +82 -0
  18. package/lib/api/contents/datasources.d.ts +70 -0
  19. package/lib/api/contents/datasources.js +149 -0
  20. package/lib/api/contents/generated.d.ts +1070 -0
  21. package/lib/api/contents/index.d.ts +16 -0
  22. package/lib/api/contents/index.js +20 -0
  23. package/lib/api/contents/mcp.d.ts +46 -0
  24. package/lib/api/contents/mcp.js +157 -0
  25. package/lib/api/contents/objects.d.ts +31 -0
  26. package/lib/api/contents/objects.js +88 -0
  27. package/lib/api/contents/operations.d.ts +3 -0
  28. package/lib/api/contents/operations.js +19 -0
  29. package/lib/api/contents/runtimeMounts.d.ts +40 -0
  30. package/lib/api/contents/runtimeMounts.js +59 -0
  31. package/lib/api/contents/sandboxUid.d.ts +21 -0
  32. package/lib/api/contents/sandboxUid.js +27 -0
  33. package/lib/api/contents/sources.d.ts +19 -0
  34. package/lib/api/contents/sources.js +119 -0
  35. package/lib/api/contents/sync.d.ts +18 -0
  36. package/lib/api/contents/sync.js +69 -0
  37. package/lib/api/contents/transfers.d.ts +38 -0
  38. package/lib/api/contents/transfers.js +123 -0
  39. package/lib/api/evals/client.d.ts +402 -0
  40. package/lib/api/evals/client.js +359 -0
  41. package/lib/api/evals/index.d.ts +10 -0
  42. package/lib/api/evals/index.js +18 -0
  43. package/lib/api/evals/request.d.ts +43 -0
  44. package/lib/api/evals/request.js +67 -0
  45. package/lib/api/evals/status.d.ts +27 -0
  46. package/lib/api/evals/status.js +122 -0
  47. package/lib/api/evals/types.d.ts +1335 -0
  48. package/lib/api/evals/types.js +5 -0
  49. package/lib/api/iam/connectedAgents.d.ts +68 -0
  50. package/lib/api/iam/connectedAgents.js +87 -0
  51. package/lib/api/iam/identityProviders.d.ts +76 -0
  52. package/lib/api/iam/identityProviders.js +187 -0
  53. package/lib/api/iam/index.d.ts +3 -1
  54. package/lib/api/iam/index.js +3 -1
  55. package/lib/api/iam/mcpAlertRules.d.ts +51 -0
  56. package/lib/api/iam/mcpAlertRules.js +198 -0
  57. package/lib/api/iam/mcpAuditSettings.d.ts +46 -0
  58. package/lib/api/iam/mcpAuditSettings.js +120 -0
  59. package/lib/api/iam/mcpPolicy.d.ts +181 -0
  60. package/lib/api/iam/mcpPolicy.js +168 -0
  61. package/lib/api/iam/organizationTeams.d.ts +13 -0
  62. package/lib/api/iam/organizationTeams.js +43 -0
  63. package/lib/api/iam/profile.d.ts +17 -1
  64. package/lib/api/iam/profile.js +27 -0
  65. package/lib/api/iam/scimTokens.d.ts +79 -0
  66. package/lib/api/iam/scimTokens.js +141 -0
  67. package/lib/api/iam/secrets.js +9 -21
  68. package/lib/api/iam/serviceAgents.d.ts +68 -0
  69. package/lib/api/iam/serviceAgents.js +119 -0
  70. package/lib/api/iam/trials.d.ts +38 -0
  71. package/lib/api/iam/trials.js +66 -0
  72. package/lib/api/index.d.ts +8 -1
  73. package/lib/api/index.js +7 -1
  74. package/lib/api/mcp/activity.d.ts +37 -0
  75. package/lib/api/mcp/activity.js +26 -0
  76. package/lib/api/mcp/alerts.d.ts +25 -0
  77. package/lib/api/mcp/alerts.js +51 -0
  78. package/lib/api/mcp/audit.d.ts +29 -0
  79. package/lib/api/mcp/audit.js +55 -0
  80. package/lib/api/mcp/bindings.d.ts +18 -0
  81. package/lib/api/mcp/bindings.js +42 -0
  82. package/lib/api/mcp/forwarding.d.ts +25 -0
  83. package/lib/api/mcp/forwarding.js +46 -0
  84. package/lib/api/mcp/gateway.d.ts +16 -0
  85. package/lib/api/mcp/gateway.js +70 -0
  86. package/lib/api/mcp/generated.d.ts +22 -0
  87. package/lib/api/mcp/generated.js +213 -0
  88. package/lib/api/mcp/index.d.ts +17 -0
  89. package/lib/api/mcp/index.js +25 -0
  90. package/lib/api/mcp/observability.d.ts +141 -0
  91. package/lib/api/mcp/observability.js +267 -0
  92. package/lib/api/mcp/operations.d.ts +83 -0
  93. package/lib/api/mcp/operations.js +50 -0
  94. package/lib/api/mcp/organizations.d.ts +102 -0
  95. package/lib/api/mcp/organizations.js +46 -0
  96. package/lib/api/mcp/policy.d.ts +9 -0
  97. package/lib/api/mcp/policy.js +23 -0
  98. package/lib/api/mcp/tasks.d.ts +49 -0
  99. package/lib/api/mcp/tasks.js +147 -0
  100. package/lib/api/orchestration/client.d.ts +53 -0
  101. package/lib/api/orchestration/client.js +105 -0
  102. package/lib/api/orchestration/events.d.ts +88 -0
  103. package/lib/api/orchestration/events.js +245 -0
  104. package/lib/api/orchestration/generated.d.ts +693 -0
  105. package/lib/api/orchestration/generated.js +687 -0
  106. package/lib/api/orchestration/index.d.ts +30 -0
  107. package/lib/api/orchestration/index.js +34 -0
  108. package/lib/api/orchestration/lifecycle.d.ts +39 -0
  109. package/lib/api/orchestration/lifecycle.js +57 -0
  110. package/lib/api/orchestration/measures.d.ts +55 -0
  111. package/lib/api/orchestration/measures.js +99 -0
  112. package/lib/api/otel/dashboards.d.ts +56 -0
  113. package/lib/api/otel/dashboards.js +50 -0
  114. package/lib/api/otel/index.d.ts +1 -0
  115. package/lib/api/otel/index.js +1 -0
  116. package/lib/api/otel/metrics.d.ts +16 -0
  117. package/lib/api/otel/metrics.js +15 -0
  118. package/lib/api/scheduler/client.d.ts +32 -0
  119. package/lib/api/scheduler/client.js +42 -0
  120. package/lib/api/scheduler/index.d.ts +8 -0
  121. package/lib/api/scheduler/index.js +16 -0
  122. package/lib/api/scheduler/request.d.ts +28 -0
  123. package/lib/api/scheduler/request.js +50 -0
  124. package/lib/api/scheduler/types.d.ts +88 -0
  125. package/lib/api/scheduler/types.js +5 -0
  126. package/lib/api/spacer/comments.d.ts +97 -0
  127. package/lib/api/spacer/comments.js +45 -0
  128. package/lib/api/spacer/index.d.ts +9 -0
  129. package/lib/api/spacer/index.js +17 -0
  130. package/lib/api/spacer/notebooks.d.ts +33 -0
  131. package/lib/api/spacer/notebooks.js +39 -0
  132. package/lib/api/spacer/request.d.ts +25 -0
  133. package/lib/api/spacer/request.js +46 -0
  134. package/lib/api/spacer/spaces.d.ts +68 -0
  135. package/lib/api/spacer/spaces.js +45 -0
  136. package/lib/api/utils/validation.d.ts +4 -4
  137. package/lib/api/utils/validation.js +10 -7
  138. package/lib/client/auth/index.js +0 -5
  139. package/lib/client/auth/storage.js +0 -5
  140. package/lib/client/auth/strategies.js +0 -5
  141. package/lib/client/base.d.ts +6 -0
  142. package/lib/client/base.js +8 -0
  143. package/lib/client/constants.d.ts +1 -0
  144. package/lib/client/constants.js +1 -0
  145. package/lib/client/index.d.ts +0 -10
  146. package/lib/client/index.js +2 -2
  147. package/lib/client/mixins/ContentsMixin.d.ts +71 -0
  148. package/lib/client/mixins/ContentsMixin.js +157 -0
  149. package/lib/client/mixins/IAMMixin.d.ts +0 -31
  150. package/lib/client/mixins/IAMMixin.js +0 -58
  151. package/lib/components/animation/AnimatedText.d.ts +2 -44
  152. package/lib/components/animation/AnimatedText.js +6 -126
  153. package/lib/components/anonymous/AnonymousKeyExpired.d.ts +56 -0
  154. package/lib/components/anonymous/AnonymousKeyExpired.js +96 -0
  155. package/lib/components/anonymous/AnonymousKeyTimer.d.ts +63 -0
  156. package/lib/components/anonymous/AnonymousKeyTimer.js +140 -0
  157. package/lib/components/anonymous/index.d.ts +7 -0
  158. package/lib/components/anonymous/index.js +15 -0
  159. package/lib/components/auth/SigInAPIKey.d.ts +1 -0
  160. package/lib/components/auth/SigInAPIKey.js +0 -6
  161. package/lib/components/auth/SignIn.d.ts +1 -0
  162. package/lib/components/auth/SignIn.js +0 -4
  163. package/lib/components/auth/SignIn.stories.d.ts +2 -2
  164. package/lib/components/avatars/BoringAvatar.d.ts +1 -1
  165. package/lib/components/avatars/BoringAvatar.stories.d.ts +1 -1
  166. package/lib/components/avatars/DLAvatar.d.ts +1 -1
  167. package/lib/components/avatars/DLAvatar.js +0 -4
  168. package/lib/components/avatars/UserAvatar.d.ts +16 -1
  169. package/lib/components/avatars/UserAvatar.js +15 -13
  170. package/lib/components/avatars/UserProfileAvatar.d.ts +1 -1
  171. package/lib/components/banners/NoAutomationBanner.d.ts +1 -1
  172. package/lib/components/billing/BillingEntitySelect.d.ts +16 -0
  173. package/lib/components/billing/BillingEntitySelect.js +49 -27
  174. package/lib/components/billing/eligibility.d.ts +22 -0
  175. package/lib/components/billing/eligibility.js +27 -0
  176. package/lib/components/billing/index.d.ts +1 -0
  177. package/lib/components/billing/index.js +1 -4
  178. package/lib/components/buttons/DownloadCSVButton.d.ts +1 -1
  179. package/lib/components/buttons/DownloadJsonButton.d.ts +1 -1
  180. package/lib/components/buttons/LongActionButton.d.ts +1 -0
  181. package/lib/components/buttons/LongActionButton.js +0 -4
  182. package/lib/components/buttons/UploadButton.d.ts +1 -0
  183. package/lib/components/buttons/UploadButton.js +0 -4
  184. package/lib/components/checkout/StripeCheckout.d.ts +1 -1
  185. package/lib/components/collaboration/LiveEditorCollaborators.d.ts +36 -0
  186. package/lib/components/collaboration/LiveEditorCollaborators.js +88 -53
  187. package/lib/components/collaboration/index.js +0 -4
  188. package/lib/components/confetti/ConfettiSuccess.d.ts +1 -1
  189. package/lib/components/contents/ContentSourceCard.d.ts +8 -0
  190. package/lib/components/contents/ContentSourceCard.js +23 -0
  191. package/lib/components/contents/HomeFolderObjectsBrowser.d.ts +10 -0
  192. package/lib/components/contents/HomeFolderObjectsBrowser.js +148 -0
  193. package/lib/components/contents/index.d.ts +2 -0
  194. package/lib/components/contents/index.js +6 -0
  195. package/lib/components/context/OrganizationSelect.d.ts +1 -1
  196. package/lib/components/display/AvatarSkeleton.d.ts +1 -1
  197. package/lib/components/display/BusyDots.d.ts +1 -1
  198. package/lib/components/display/CenteredSpinner.d.ts +1 -1
  199. package/lib/components/display/CodePreview.d.ts +1 -1
  200. package/lib/components/display/DatalayerBox.d.ts +7 -3
  201. package/lib/components/display/DatalayerBox.js +7 -7
  202. package/lib/components/display/HorizontalCenter.d.ts +1 -1
  203. package/lib/components/display/JupyterDialog.d.ts +1 -0
  204. package/lib/components/display/JupyterDialog.js +1 -7
  205. package/lib/components/display/Markdown.d.ts +1 -0
  206. package/lib/components/display/NavLink.js +3 -2
  207. package/lib/components/display/NotebookSkeleton.d.ts +1 -1
  208. package/lib/components/display/Placeholder.d.ts +1 -1
  209. package/lib/components/display/ToTopBranded.d.ts +1 -1
  210. package/lib/components/echarts/EChartsReact.d.ts +1 -1
  211. package/lib/components/flashes/FlashClosable.d.ts +1 -0
  212. package/lib/components/flashes/FlashClosable.js +0 -4
  213. package/lib/components/flashes/FlashGuest.d.ts +1 -1
  214. package/lib/components/flashes/FlashSurveys.d.ts +1 -1
  215. package/lib/components/flashes/FlashUnauthorized.d.ts +1 -0
  216. package/lib/components/flashes/FlashUnauthorized.js +0 -6
  217. package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
  218. package/lib/components/iam/ExternalTokenSilentLogin.d.ts +1 -1
  219. package/lib/components/index.d.ts +2 -0
  220. package/lib/components/index.js +2 -0
  221. package/lib/components/labels/StatusLabels.d.ts +2 -9
  222. package/lib/components/labels/StatusLabels.js +2 -26
  223. package/lib/components/labels/VisibilityLabel.d.ts +1 -1
  224. package/lib/components/landings/StepBlock.d.ts +1 -1
  225. package/lib/components/mcp/ClientBadge.d.ts +41 -0
  226. package/lib/components/mcp/ClientBadge.js +33 -0
  227. package/lib/components/mcp/McpErrorBlankslate.d.ts +21 -0
  228. package/lib/components/mcp/McpErrorBlankslate.js +17 -0
  229. package/lib/components/mcp/ScopeList.d.ts +28 -0
  230. package/lib/components/mcp/ScopeList.js +14 -0
  231. package/lib/components/mcp/index.d.ts +10 -0
  232. package/lib/components/mcp/index.js +18 -0
  233. package/lib/components/navbar/NavigationVisbilityObserver.d.ts +2 -1
  234. package/lib/components/navbar/SubdomainNavBar.d.ts +10 -5
  235. package/lib/components/navbar/SubdomainNavBar.js +2 -1
  236. package/lib/components/notebooks/JupyterNotebook.d.ts +1 -1
  237. package/lib/components/notebooks/JupyterNotebookToolbar.d.ts +1 -1
  238. package/lib/components/principal/PrincipalAppearance.d.ts +22 -42
  239. package/lib/components/principal/PrincipalAppearance.js +232 -182
  240. package/lib/components/principal/PrincipalAvatar.d.ts +9 -1
  241. package/lib/components/principal/PrincipalAvatar.js +18 -10
  242. package/lib/components/principal/PrincipalBadge.d.ts +1 -1
  243. package/lib/components/principal/PrincipalBanner.d.ts +1 -1
  244. package/lib/components/principal/PrincipalDetailsOverlay.d.ts +38 -1
  245. package/lib/components/principal/PrincipalDetailsOverlay.js +64 -33
  246. package/lib/components/principal/PrincipalHoverCard.d.ts +31 -0
  247. package/lib/components/principal/PrincipalHoverCard.js +52 -0
  248. package/lib/components/principal/PrincipalSwitcherMenu.d.ts +1 -0
  249. package/lib/components/principal/PrincipalSwitcherMenu.js +5 -14
  250. package/lib/components/principal/index.d.ts +2 -1
  251. package/lib/components/principal/index.js +2 -1
  252. package/lib/components/progress/ConsumptionBar.d.ts +1 -0
  253. package/lib/components/progress/ConsumptionBar.js +0 -4
  254. package/lib/components/progress/ProgressRing.d.ts +1 -0
  255. package/lib/components/progress/SpinnerBar.d.ts +1 -1
  256. package/lib/components/progress/Timer.d.ts +1 -0
  257. package/lib/components/progress/Timer.js +0 -4
  258. package/lib/components/screencapture/Screencapture.js +46 -3
  259. package/lib/components/screencapture/ScreencaptureButton.d.ts +1 -1
  260. package/lib/components/sharing/ShareAccessComponent.d.ts +58 -3
  261. package/lib/components/sharing/ShareAccessComponent.js +143 -98
  262. package/lib/components/sharing/SharingEditor.d.ts +21 -0
  263. package/lib/components/sharing/SharingEditor.js +9 -28
  264. package/lib/components/sharing/index.d.ts +1 -0
  265. package/lib/components/sharing/index.js +1 -0
  266. package/lib/components/sharing/sandboxSharing.d.ts +26 -0
  267. package/lib/components/sharing/sandboxSharing.js +41 -0
  268. package/lib/components/spaces/SpaceDetailsOverlay.d.ts +39 -0
  269. package/lib/components/spaces/SpaceDetailsOverlay.js +80 -0
  270. package/lib/components/spaces/SpaceDisplay.d.ts +38 -0
  271. package/lib/components/spaces/SpaceDisplay.js +92 -0
  272. package/lib/components/spaces/index.d.ts +4 -0
  273. package/lib/components/spaces/index.js +7 -0
  274. package/lib/components/spaces/spaceDisplayModel.d.ts +93 -0
  275. package/lib/components/spaces/spaceDisplayModel.js +170 -0
  276. package/lib/components/sparklines/Sparklines.js +3 -4
  277. package/lib/components/sparklines/index.js +0 -4
  278. package/lib/components/storage/ContentsBrowser.d.ts +25 -1
  279. package/lib/components/storage/ContentsBrowser.js +145 -52
  280. package/lib/components/storage/ContentsBrowserMock.d.ts +3 -0
  281. package/lib/components/storage/ContentsBrowserMock.js +75 -0
  282. package/lib/components/storage/ContentsItems.d.ts +2 -1
  283. package/lib/components/storage/ContentsItems.js +0 -4
  284. package/lib/components/storage/ContentsTable.d.ts +50 -0
  285. package/lib/components/storage/ContentsTable.js +134 -0
  286. package/lib/components/storage/HomeFolderDrive.d.ts +71 -0
  287. package/lib/components/storage/HomeFolderDrive.js +248 -0
  288. package/lib/components/storage/index.d.ts +2 -0
  289. package/lib/components/storage/index.js +2 -0
  290. package/lib/components/students/StudentItemStatus.d.ts +1 -1
  291. package/lib/components/students/StudentResultCircle.d.ts +1 -1
  292. package/lib/components/subnav/SubNav.d.ts +5 -5
  293. package/lib/components/subnav/SubNav.js +11 -9
  294. package/lib/components/tables/DataTable.d.ts +1 -1
  295. package/lib/components/text-reveal/TextRevealAnimation.d.ts +2 -2
  296. package/lib/components/text-reveal/useTextRevealAnimationLines.d.ts +1 -1
  297. package/lib/components/time/LiveRelativeTime.d.ts +1 -0
  298. package/lib/components/time/LiveRelativeTime.js +0 -8
  299. package/lib/components/time/index.js +0 -4
  300. package/lib/components/timeline/Timeline.d.ts +1 -1
  301. package/lib/components/timeline/index.js +0 -4
  302. package/lib/components/users/PeerIndicator.d.ts +1 -0
  303. package/lib/components/users/PeerIndicator.js +0 -4
  304. package/lib/config/Configuration.d.ts +15 -17
  305. package/lib/config/Configuration.js +7 -0
  306. package/lib/hooks/cacheConverters.d.ts +0 -7
  307. package/lib/hooks/cacheConverters.js +0 -25
  308. package/lib/hooks/index.d.ts +3 -0
  309. package/lib/hooks/index.js +3 -0
  310. package/lib/hooks/layouts/LayoutBackdrop.d.ts +1 -1
  311. package/lib/hooks/layouts/LayoutScreencapture.d.ts +1 -1
  312. package/lib/hooks/useBackdrop.d.ts +1 -1
  313. package/lib/hooks/useBackdropJupyterLab.d.ts +3 -2
  314. package/lib/hooks/useBackdropJupyterLab.js +0 -4
  315. package/lib/hooks/useBillingEntityStore.js +3 -0
  316. package/lib/hooks/useCache.d.ts +478 -130
  317. package/lib/hooks/useCache.js +1580 -676
  318. package/lib/hooks/useContainsFocus.d.ts +1 -1
  319. package/lib/hooks/useContents.d.ts +334 -0
  320. package/lib/hooks/useContents.js +1033 -0
  321. package/lib/hooks/useFocusTrap.d.ts +4 -4
  322. package/lib/hooks/useFocusTrap.js +1 -1
  323. package/lib/hooks/useMcp.d.ts +315 -0
  324. package/lib/hooks/useMcp.js +891 -0
  325. package/lib/hooks/useMobile.js +0 -5
  326. package/lib/hooks/useNavigate.d.ts +41 -3
  327. package/lib/hooks/useNavigate.js +106 -52
  328. package/lib/hooks/usePrincipalCacheStore.js +3 -0
  329. package/lib/hooks/usePrincipalStore.js +3 -0
  330. package/lib/hooks/useProjectStore.d.ts +3 -3
  331. package/lib/hooks/useProjectStore.js +4 -4
  332. package/lib/hooks/useRef.d.ts +1 -1
  333. package/lib/hooks/useRef.js +3 -0
  334. package/lib/hooks/useScreencapture.d.ts +2 -1
  335. package/lib/hooks/useScreencapture.js +0 -4
  336. package/lib/hooks/useSpaceCacheStore.d.ts +50 -0
  337. package/lib/hooks/useSpaceCacheStore.js +85 -0
  338. package/lib/hooks/useToast.js +0 -4
  339. package/lib/hooks/useVisibilityObserver.d.ts +1 -1
  340. package/lib/index.d.ts +4 -1
  341. package/lib/index.js +3 -1
  342. package/lib/mocks/components/FlashMock.d.ts +1 -1
  343. package/lib/mocks/views/ActionMenuMock.d.ts +1 -1
  344. package/lib/mocks/views/ChartMock.d.ts +1 -1
  345. package/lib/mocks/views/DashboardMock.d.ts +1 -1
  346. package/lib/mocks/views/FormMock.d.ts +1 -1
  347. package/lib/mocks/views/TableMock.d.ts +1 -1
  348. package/lib/mocks/views/WipMock.d.ts +1 -1
  349. package/lib/models/Credits.d.ts +16 -0
  350. package/lib/models/Credits.js +22 -0
  351. package/lib/models/CreditsDTO.d.ts +6 -5
  352. package/lib/models/CreditsDTO.js +7 -5
  353. package/lib/models/McpAuditEvent.d.ts +52 -0
  354. package/lib/models/McpAuditEvent.js +5 -0
  355. package/lib/models/McpBinding.d.ts +57 -0
  356. package/lib/models/McpBinding.js +5 -0
  357. package/lib/models/McpPolicy.d.ts +77 -0
  358. package/lib/models/McpPolicy.js +5 -0
  359. package/lib/models/McpTask.d.ts +94 -0
  360. package/lib/models/McpTask.js +7 -0
  361. package/lib/models/Organization.d.ts +69 -0
  362. package/lib/models/Organization.js +96 -0
  363. package/lib/models/Secret.d.ts +1 -2
  364. package/lib/models/Secret.js +2 -18
  365. package/lib/models/StartedBy.d.ts +91 -0
  366. package/lib/models/StartedBy.js +117 -0
  367. package/lib/models/Team.d.ts +2 -0
  368. package/lib/models/Team.js +2 -0
  369. package/lib/models/User.d.ts +4 -0
  370. package/lib/models/User.js +3 -0
  371. package/lib/models/UserDTO.js +4 -2
  372. package/lib/models/UserSettings.d.ts +13 -0
  373. package/lib/models/UserSettings.js +9 -0
  374. package/lib/models/contents/__fixtures__/solr-codec.json +57 -0
  375. package/lib/models/contents/__fixtures__/v1-contracts.json +194 -0
  376. package/lib/models/contents/fieldCase.d.ts +8 -0
  377. package/lib/models/contents/fieldCase.js +37 -0
  378. package/lib/models/contents/index.d.ts +2 -0
  379. package/lib/models/contents/index.js +6 -0
  380. package/lib/models/contents/permissions.d.ts +16 -0
  381. package/lib/models/contents/permissions.js +34 -0
  382. package/lib/models/index.d.ts +5 -1
  383. package/lib/models/index.js +5 -1
  384. package/lib/navigation/components.js +2 -3
  385. package/lib/routes/publicPaths.js +4 -0
  386. package/lib/state/index.d.ts +1 -0
  387. package/lib/state/index.js +1 -0
  388. package/lib/state/sessionEnd.d.ts +55 -0
  389. package/lib/state/sessionEnd.js +162 -0
  390. package/lib/state/substates/CoreState.d.ts +15 -7
  391. package/lib/state/substates/CoreState.js +21 -17
  392. package/lib/state/substates/IAMState.d.ts +1 -1
  393. package/lib/state/substates/IAMState.js +12 -5
  394. package/lib/state/substates/LayoutState.js +12 -0
  395. package/lib/state/substates/ProfileState.d.ts +1 -0
  396. package/lib/state/substates/ProfileState.js +1 -4
  397. package/lib/state/substates/index.d.ts +0 -1
  398. package/lib/state/substates/index.js +0 -1
  399. package/lib/utils/Jwt.d.ts +26 -0
  400. package/lib/utils/Jwt.js +37 -0
  401. package/lib/utils/Lazy.d.ts +20 -0
  402. package/lib/utils/Lazy.js +32 -6
  403. package/lib/utils/Screencapture.js +3 -0
  404. package/lib/utils/WithSuspense.d.ts +11 -1
  405. package/lib/utils/WithSuspense.js +11 -1
  406. package/lib/views/api-keys/APIKeyEdit.d.ts +1 -1
  407. package/lib/views/api-keys/APIKeyNew.d.ts +1 -1
  408. package/lib/views/api-keys/APIKeys.d.ts +1 -1
  409. package/lib/views/api-keys/APIKeys.js +30 -4
  410. package/lib/views/api-keys/APIKeysStandalone.d.ts +5 -1
  411. package/lib/views/api-keys/APIKeysStandalone.js +2 -2
  412. package/lib/views/datasources/DatasourceDetail.d.ts +12 -5
  413. package/lib/views/datasources/DatasourceDetail.js +80 -110
  414. package/lib/views/datasources/DatasourceNew.d.ts +14 -8
  415. package/lib/views/datasources/DatasourceNew.js +129 -118
  416. package/lib/views/datasources/Datasources.d.ts +39 -7
  417. package/lib/views/datasources/Datasources.js +95 -40
  418. package/lib/views/datasources/DatasourcesMock.d.ts +3 -0
  419. package/lib/views/datasources/DatasourcesMock.js +57 -0
  420. package/lib/views/iam/SignInSimple.d.ts +12 -0
  421. package/lib/views/iam/SignInSimple.js +4 -4
  422. package/lib/views/index.d.ts +1 -0
  423. package/lib/views/index.js +1 -0
  424. package/lib/views/mcp/AdmittedClients.d.ts +44 -0
  425. package/lib/views/mcp/AdmittedClients.js +59 -0
  426. package/lib/views/mcp/AlertDestinations.d.ts +34 -0
  427. package/lib/views/mcp/AlertDestinations.js +75 -0
  428. package/lib/views/mcp/AlertRules.d.ts +32 -0
  429. package/lib/views/mcp/AlertRules.js +245 -0
  430. package/lib/views/mcp/ApprovalQueue.d.ts +66 -0
  431. package/lib/views/mcp/ApprovalQueue.js +95 -0
  432. package/lib/views/mcp/AuditLog.d.ts +42 -0
  433. package/lib/views/mcp/AuditLog.js +144 -0
  434. package/lib/views/mcp/ConnectedAgents.d.ts +34 -0
  435. package/lib/views/mcp/ConnectedAgents.js +135 -0
  436. package/lib/views/mcp/EnterpriseConsole.d.ts +74 -0
  437. package/lib/views/mcp/EnterpriseConsole.js +195 -0
  438. package/lib/views/mcp/IdentityProviders.d.ts +33 -0
  439. package/lib/views/mcp/IdentityProviders.js +299 -0
  440. package/lib/views/mcp/McpDashboard.d.ts +50 -0
  441. package/lib/views/mcp/McpDashboard.js +430 -0
  442. package/lib/views/mcp/McpHome.d.ts +92 -0
  443. package/lib/views/mcp/McpHome.js +153 -0
  444. package/lib/views/mcp/McpObservability.d.ts +79 -0
  445. package/lib/views/mcp/McpObservability.js +236 -0
  446. package/lib/views/mcp/NotebookRuns.d.ts +39 -0
  447. package/lib/views/mcp/NotebookRuns.js +44 -0
  448. package/lib/views/mcp/OrganizationPolicy.d.ts +45 -0
  449. package/lib/views/mcp/OrganizationPolicy.js +108 -0
  450. package/lib/views/mcp/OrganizationUsage.d.ts +69 -0
  451. package/lib/views/mcp/OrganizationUsage.js +113 -0
  452. package/lib/views/mcp/PersonalPolicy.d.ts +54 -0
  453. package/lib/views/mcp/PersonalPolicy.js +126 -0
  454. package/lib/views/mcp/Policies.d.ts +53 -0
  455. package/lib/views/mcp/Policies.js +210 -0
  456. package/lib/views/mcp/PolicyForm.d.ts +83 -0
  457. package/lib/views/mcp/PolicyForm.js +113 -0
  458. package/lib/views/mcp/PolicyHistory.d.ts +58 -0
  459. package/lib/views/mcp/PolicyHistory.js +75 -0
  460. package/lib/views/mcp/RunDetail.d.ts +87 -0
  461. package/lib/views/mcp/RunDetail.js +186 -0
  462. package/lib/views/mcp/ScimProvisioning.d.ts +54 -0
  463. package/lib/views/mcp/ScimProvisioning.js +173 -0
  464. package/lib/views/mcp/ServiceAgents.d.ts +46 -0
  465. package/lib/views/mcp/ServiceAgents.js +194 -0
  466. package/lib/views/mcp/TeamPolicies.d.ts +33 -0
  467. package/lib/views/mcp/TeamPolicies.js +159 -0
  468. package/lib/views/mcp/ToolAccess.d.ts +60 -0
  469. package/lib/views/mcp/ToolAccess.js +101 -0
  470. package/lib/views/mcp/TraceTimeline.d.ts +81 -0
  471. package/lib/views/mcp/TraceTimeline.js +132 -0
  472. package/lib/views/mcp/format.d.ts +25 -0
  473. package/lib/views/mcp/format.js +77 -0
  474. package/lib/views/mcp/index.d.ts +34 -0
  475. package/lib/views/mcp/index.js +42 -0
  476. package/lib/views/mcp/types.d.ts +66 -0
  477. package/lib/views/mcp/types.js +5 -0
  478. package/lib/views/otel/simpleAuthStore.js +3 -0
  479. package/lib/views/secrets/SecretEdit.d.ts +5 -1
  480. package/lib/views/secrets/SecretEdit.js +5 -4
  481. package/lib/views/secrets/SecretNew.d.ts +11 -1
  482. package/lib/views/secrets/SecretNew.js +7 -3
  483. package/lib/views/secrets/Secrets.d.ts +12 -1
  484. package/lib/views/secrets/Secrets.js +2 -2
  485. package/package.json +269 -260
  486. package/scripts/generate-contents-types.py +169 -0
  487. package/scripts/generate-mcp-types.py +233 -0
  488. package/scripts/generate-orchestration-types.py +920 -0
  489. package/lib/api/iam/datasources.d.ts +0 -86
  490. package/lib/api/iam/datasources.js +0 -185
  491. package/lib/components/toolbars/index.d.ts +0 -1
  492. package/lib/models/Datasource.d.ts +0 -181
  493. package/lib/models/Datasource.js +0 -154
  494. package/lib/state/substates/DatasourceState.d.ts +0 -11
  495. package/lib/state/substates/DatasourceState.js +0 -16
  496. /package/lib/{components/toolbars/index.js → api/contents/generated.js} +0 -0
@@ -9,3 +9,25 @@
9
9
  * TODO what is a good LOW_CREDITS bar? - A better way would be to set it from a server settings or a cloud config.
10
10
  */
11
11
  export const LOW_CREDITS = 3;
12
+ /**
13
+ * The credits an account can still spend.
14
+ *
15
+ * `credits` means one of two things depending on whether a quota is set: what
16
+ * is left, or what has been consumed against the quota. IAM omits `quota`
17
+ * entirely for an account without one, so an absent quota is read the same as
18
+ * an explicit `null` — testing only against `null` let `undefined` take the
19
+ * quota branch and produced `NaN`, which then travelled silently into every
20
+ * reader of this number.
21
+ *
22
+ * Outstanding reservations are already committed, so they are subtracted:
23
+ * what is returned is what a new reservation may still claim.
24
+ */
25
+ export const availableCredits = (credits, reservations = []) => {
26
+ const quota = credits.quota;
27
+ const balance = typeof quota === 'number' ? quota - credits.credits : credits.credits;
28
+ if (!Number.isFinite(balance)) {
29
+ return 0;
30
+ }
31
+ const reserved = reservations.reduce((consumed, reservation) => consumed + (Number.isFinite(reservation.credits) ? reservation.credits : 0), 0);
32
+ return Math.max(0, balance - reserved);
33
+ };
@@ -21,7 +21,7 @@ export interface CreditReservation {
21
21
  resource: string;
22
22
  /** Last update timestamp */
23
23
  last_update: string;
24
- /** Burning rate (credits per hour) for this reservation */
24
+ /** Burning rate (credits per second) for this reservation */
25
25
  burning_rate: number;
26
26
  /** Start date of the reservation */
27
27
  start_date: string;
@@ -81,7 +81,8 @@ export declare class CreditsDTO {
81
81
  */
82
82
  get netAvailable(): number;
83
83
  /**
84
- * Get runtime reservations (reservations that start with 'runtime-').
84
+ * Get runtime reservations: the ones held for a runtime, which a
85
+ * reservation names by the runtime's uid.
85
86
  */
86
87
  get runtimeReservations(): CreditReservation[];
87
88
  /**
@@ -91,7 +92,7 @@ export declare class CreditsDTO {
91
92
  /**
92
93
  * Calculate maximum runtime in minutes based on environment burning rate.
93
94
  *
94
- * @param burningRate - Credits consumed per hour
95
+ * @param burningRate - Credits consumed per second
95
96
  * @returns Maximum runtime in minutes
96
97
  */
97
98
  calculateMaxRuntimeMinutes(burningRate: number): number;
@@ -99,7 +100,7 @@ export declare class CreditsDTO {
99
100
  * Calculate credits needed for runtime duration.
100
101
  *
101
102
  * @param minutes - Runtime duration in minutes
102
- * @param burningRate - Credits consumed per hour
103
+ * @param burningRate - Credits consumed per second
103
104
  * @returns Credits needed
104
105
  */
105
106
  calculateCreditsFromMinutes(minutes: number, burningRate: number): number;
@@ -107,7 +108,7 @@ export declare class CreditsDTO {
107
108
  * Check if user has enough credits for runtime.
108
109
  *
109
110
  * @param minutes - Runtime duration in minutes
110
- * @param burningRate - Credits consumed per hour
111
+ * @param burningRate - Credits consumed per second
111
112
  * @returns True if user has enough credits
112
113
  */
113
114
  hasEnoughCreditsForRuntime(minutes: number, burningRate: number): boolean;
@@ -7,6 +7,7 @@
7
7
  *
8
8
  * @module models/CreditsDTO
9
9
  */
10
+ import { isSandboxUid } from '../api/contents/sandboxUid.js';
10
11
  import { validateJSON } from '../api/utils/validation.js';
11
12
  /**
12
13
  * Credits model representing user's available credits and usage.
@@ -67,10 +68,11 @@ export class CreditsDTO {
67
68
  return Math.max(0, this.available - this.totalReserved);
68
69
  }
69
70
  /**
70
- * Get runtime reservations (reservations that start with 'runtime-').
71
+ * Get runtime reservations: the ones held for a runtime, which a
72
+ * reservation names by the runtime's uid.
71
73
  */
72
74
  get runtimeReservations() {
73
- return this._reservations.filter(r => r.id.startsWith('runtime-'));
75
+ return this._reservations.filter(r => isSandboxUid(r.resource) || isSandboxUid(r.id));
74
76
  }
75
77
  /**
76
78
  * Check if there are any active runtime reservations.
@@ -81,7 +83,7 @@ export class CreditsDTO {
81
83
  /**
82
84
  * Calculate maximum runtime in minutes based on environment burning rate.
83
85
  *
84
- * @param burningRate - Credits consumed per hour
86
+ * @param burningRate - Credits consumed per second
85
87
  * @returns Maximum runtime in minutes
86
88
  */
87
89
  calculateMaxRuntimeMinutes(burningRate) {
@@ -94,7 +96,7 @@ export class CreditsDTO {
94
96
  * Calculate credits needed for runtime duration.
95
97
  *
96
98
  * @param minutes - Runtime duration in minutes
97
- * @param burningRate - Credits consumed per hour
99
+ * @param burningRate - Credits consumed per second
98
100
  * @returns Credits needed
99
101
  */
100
102
  calculateCreditsFromMinutes(minutes, burningRate) {
@@ -105,7 +107,7 @@ export class CreditsDTO {
105
107
  * Check if user has enough credits for runtime.
106
108
  *
107
109
  * @param minutes - Runtime duration in minutes
108
- * @param burningRate - Credits consumed per hour
110
+ * @param burningRate - Credits consumed per second
109
111
  * @returns True if user has enough credits
110
112
  */
111
113
  hasEnoughCreditsForRuntime(minutes, burningRate) {
@@ -0,0 +1,52 @@
1
+ /**
2
+ * An audit row of the Jupyter MCP Server: one call or one decision, written
3
+ * by the gateway for every request, append-only in `mcp-audit`.
4
+ *
5
+ * Audit answers *who did what, and was it allowed*. It is not telemetry: a
6
+ * row carries the trace id so one trace joins both trails, and never an
7
+ * argument in clear — arguments are hashed and redacted with the Contents
8
+ * rules before they reach the row.
9
+ *
10
+ * @module models/McpAuditEvent
11
+ */
12
+ export type McpAuditDecision = 'allowed' | 'refused';
13
+ export type McpAuditOutcome = 'ok' | 'error' | 'is_error';
14
+ export interface McpClientInfo {
15
+ name?: string;
16
+ version?: string;
17
+ [key: string]: unknown;
18
+ }
19
+ export interface McpAuditEvent {
20
+ uid: string;
21
+ at: string;
22
+ orgUid?: string | null;
23
+ teamUid?: string | null;
24
+ userUid: string;
25
+ clientId?: string | null;
26
+ agentUid?: string | null;
27
+ /** The delegation chain (RFC 8693 `act`), outermost first. */
28
+ act?: string[];
29
+ /** The JSON-RPC method, or the REST route for a gateway API call. */
30
+ method: string;
31
+ tool?: string | null;
32
+ itemUid?: string | null;
33
+ sourceUid?: string | null;
34
+ cellId?: string | null;
35
+ argumentsHash?: string | null;
36
+ redactedArguments?: Record<string, unknown> | null;
37
+ decision: McpAuditDecision;
38
+ /** Names the rule and, once policy has layers, the layer that decided. */
39
+ refusalReason?: string | null;
40
+ outcome?: McpAuditOutcome | null;
41
+ durationMs?: number | null;
42
+ taskId?: string | null;
43
+ traceId?: string | null;
44
+ replica?: string | null;
45
+ protocolVersion?: string | null;
46
+ clientInfo?: McpClientInfo | null;
47
+ }
48
+ export interface McpAuditEventList {
49
+ items: McpAuditEvent[];
50
+ nextCursor?: string | null;
51
+ }
52
+ export type McpAuditExportFormat = 'jsonl' | 'csv';
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export {};
@@ -0,0 +1,57 @@
1
+ /**
2
+ * A binding of the Jupyter MCP Server: a handle an agent holds on a
3
+ * notebook (`nb_…`), a toolset (`ts_…`) or a sandbox (`sb_…`).
4
+ *
5
+ * The sandbox binding *is* the session: one per (user, client) unless a
6
+ * client holds several on purpose. A notebook binding names the sandbox its
7
+ * cells execute on. Bindings live in `mcp-gateway`, expire with the item or
8
+ * the reservation they follow, and are refreshed on use.
9
+ *
10
+ * @module models/McpBinding
11
+ */
12
+ export type McpBindingKind = 'notebook' | 'toolset' | 'sandbox';
13
+ /** What the gateway does when the sandbox behind a binding is gone. */
14
+ export type McpBindingOnLost = 'fail' | 'relaunch';
15
+ /** Where a sandbox binding is; `lost` is what `SANDBOX_LOST` reports. */
16
+ export type McpBindingState = 'active' | 'lost' | 'closed' | 'expired';
17
+ export interface McpBinding {
18
+ /** The handle: `nb_…`, `ts_…` or `sb_…`. */
19
+ uid: string;
20
+ kind: McpBindingKind;
21
+ userUid: string;
22
+ clientId?: string | null;
23
+ agentUid?: string | null;
24
+ orgUid?: string | null;
25
+ alias?: string | null;
26
+ /** The Spacer notebook, for a `notebook` binding. */
27
+ itemUid?: string | null;
28
+ /** The Contents source and session, for a `toolset` binding. */
29
+ sourceUid?: string | null;
30
+ sessionUid?: string | null;
31
+ /** The runtime, for a `sandbox` binding. */
32
+ sandboxUid?: string | null;
33
+ /**
34
+ * What Runtimes and the Operator know the sandbox by, which is **not** the
35
+ * handle. Sharing is addressed by this name; sending the handle instead is
36
+ * a `403` that reads as "you are not the owner".
37
+ */
38
+ runtimeName?: string | null;
39
+ sandboxProvider?: string | null;
40
+ /** What the runtime reported it can do. */
41
+ capabilities?: string[];
42
+ onLost?: McpBindingOnLost;
43
+ /** The gateway replica whose worker holds the connection. */
44
+ workerReplica?: string | null;
45
+ /** The owner's uid when the sandbox is shared with the caller through its ACL. */
46
+ sharedFrom?: string | null;
47
+ /** For a notebook binding: the sandbox its cells execute on. */
48
+ sandboxBindingUid?: string | null;
49
+ state?: McpBindingState;
50
+ createdAt: string;
51
+ lastUsedAt?: string | null;
52
+ expiresAt?: string | null;
53
+ }
54
+ export interface McpBindingList {
55
+ items: McpBinding[];
56
+ nextCursor?: string | null;
57
+ }
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export {};
@@ -0,0 +1,77 @@
1
+ /**
2
+ * The MCP policy: what an agent *may do*.
3
+ *
4
+ * Policy is layered and each layer only narrows: platform ∩ organization ∩
5
+ * team for an organization-scope token, platform ∩ personal for a
6
+ * personal-scope one. The organization's and the person's layers are IAM
7
+ * settings; the gateway answers the **effective** policy for a token with,
8
+ * per rule, which layer decided — what the Policies page renders as
9
+ * "Datalayer default", "required by your organization" or "you asked".
10
+ *
11
+ * Until milestone 3 adds the layers, `GET /api/mcp/v1/policy` answers the
12
+ * platform defaults from `tool_policy.py` and the token's scopes.
13
+ *
14
+ * @module models/McpPolicy
15
+ */
16
+ export type McpPolicyLayer = 'platform' | 'organization' | 'team' | 'personal';
17
+ /** The Contents approval vocabulary. */
18
+ export type McpApprovalPolicy = 'explicit' | 'auto-allowlisted' | 'never';
19
+ export type McpPolicyScope = 'personal' | 'organization';
20
+ /** One rule of the effective policy, and the layer that decided it. */
21
+ export interface McpPolicyRule {
22
+ /** The rule's name in the organization policy vocabulary, e.g. `tool_denylist`. */
23
+ name: string;
24
+ value: unknown;
25
+ decidedBy: McpPolicyLayer;
26
+ /** Why, when the gateway has a sentence for it. */
27
+ reason?: string | null;
28
+ }
29
+ /** What one tool needs, and what happens before it runs. */
30
+ export interface McpToolRule {
31
+ tool: string;
32
+ scope: string;
33
+ access?: 'read' | 'write' | 'execute';
34
+ approval?: McpApprovalPolicy;
35
+ allowed: boolean;
36
+ decidedBy: McpPolicyLayer;
37
+ }
38
+ /** The effective policy for one token, redacted to what its holder may see. */
39
+ export interface McpEffectivePolicy {
40
+ scope: McpPolicyScope;
41
+ orgUid?: string | null;
42
+ teamUid?: string | null;
43
+ /** The agent the policy was evaluated for, when previewing as one. */
44
+ clientId?: string | null;
45
+ /** The scopes the token carries; the ceiling over every tool rule. */
46
+ scopes: string[];
47
+ rules: McpPolicyRule[];
48
+ tools: McpToolRule[];
49
+ evaluatedAt?: string;
50
+ }
51
+ /**
52
+ * The organization (or team) MCP policy as IAM keeps it, versioned and
53
+ * audited. Every field is optional: an absent rule narrows nothing.
54
+ */
55
+ export interface McpOrganizationPolicy {
56
+ version?: number;
57
+ /** CIMD URLs, client ids or software ids; fails closed. */
58
+ allowedClients?: string[];
59
+ requireDpop?: boolean;
60
+ requireOrgSso?: boolean;
61
+ maxScopes?: string[];
62
+ toolAllowlist?: string[];
63
+ toolDenylist?: string[];
64
+ /** Per tool, or per annotation (`destructiveHint`, `readOnlyHint`). */
65
+ approvalPolicy?: Record<string, McpApprovalPolicy>;
66
+ allowedEnvironments?: string[];
67
+ allowedProviders?: string[];
68
+ maxGpu?: number;
69
+ maxReservationMinutes?: number;
70
+ creditsPerDay?: number;
71
+ callsPerMinute?: number;
72
+ sessionMaxHours?: number;
73
+ updatedAt?: string;
74
+ updatedBy?: string;
75
+ }
76
+ /** A person's rules for the agents acting for them outside any organization. */
77
+ export type McpPersonalPolicy = Pick<McpOrganizationPolicy, 'version' | 'approvalPolicy' | 'creditsPerDay' | 'toolDenylist' | 'allowedEnvironments' | 'sessionMaxHours' | 'updatedAt'>;
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export {};
@@ -0,0 +1,94 @@
1
+ /**
2
+ * A task of the Jupyter MCP Server: one tool call that outlives the request
3
+ * that started it.
4
+ *
5
+ * The `uid` is the MCP `taskId`. A task is submitted by an agent, runs in
6
+ * the sandbox its session is bound to, and is reachable by anyone allowed to
7
+ * see the notebook it touched — from another device, forty minutes later.
8
+ * The gateway keeps the portable projection in `mcp-tasks`; the workflow
9
+ * engine owns claims and recovery, which is why there are no lease fields.
10
+ *
11
+ * Snake case on the wire, camel case here, exactly as Contents does.
12
+ *
13
+ * @module models/McpTask
14
+ */
15
+ /** Where a task has got to; the MCP task status vocabulary. */
16
+ export type McpTaskStatus = 'working' | 'input_required' | 'completed' | 'failed' | 'cancelled';
17
+ /** The engine a task's workflow runs on. */
18
+ export type McpWorkflowEngine = 'temporal' | 'dbos';
19
+ /** A tool result small enough to travel with the task. */
20
+ export interface McpCallToolResult {
21
+ content?: Array<Record<string, unknown>>;
22
+ structuredContent?: Record<string, unknown>;
23
+ isError?: boolean;
24
+ [key: string]: unknown;
25
+ }
26
+ /** One output of a task, in order; large outputs are references. */
27
+ export interface McpTaskOutput {
28
+ index: number;
29
+ outputType: string;
30
+ mimeType?: string | null;
31
+ /** Inline text under the size limit. */
32
+ text?: string | null;
33
+ /** An object reference for anything larger. */
34
+ reference?: string | null;
35
+ }
36
+ export interface McpTask {
37
+ uid: string;
38
+ status: McpTaskStatus;
39
+ statusMessage?: string | null;
40
+ tool: string;
41
+ notebookUid?: string | null;
42
+ cellId?: string | null;
43
+ sandboxUid?: string | null;
44
+ /** A Contents operation, when the task wraps one. */
45
+ operationUid?: string | null;
46
+ /** An attachment, when the task follows its lifecycle without an operation. */
47
+ attachmentUid?: string | null;
48
+ /** A Contents `mcp_approval` or an ai-agents tool approval. */
49
+ approvalUid?: string | null;
50
+ /** The session the task executes in; never empty for an execution task. */
51
+ sandboxBindingUid?: string | null;
52
+ initiatingUser: string;
53
+ initiatingClient?: string | null;
54
+ orgUid?: string | null;
55
+ createdAt: string;
56
+ lastUpdatedAt: string;
57
+ ttlMs?: number | null;
58
+ pollIntervalMs?: number | null;
59
+ /** The `CallToolResult` for small results; a resource URI otherwise. */
60
+ result?: McpCallToolResult | string | null;
61
+ error?: string | null;
62
+ traceId?: string | null;
63
+ workflowEngine?: McpWorkflowEngine | null;
64
+ /** Always the task uid, so a retried start cannot create a second execution. */
65
+ workflowId?: string | null;
66
+ /** The Temporal run id; empty for DBOS. */
67
+ workflowRunId?: string | null;
68
+ queue?: string | null;
69
+ sandboxProvider?: string | null;
70
+ workerReplica?: string | null;
71
+ outputs?: McpTaskOutput[];
72
+ }
73
+ export interface McpTaskList {
74
+ items: McpTask[];
75
+ nextCursor?: string | null;
76
+ }
77
+ /** What `POST /tasks/{uid}/input` carries: the REST face of `tasks/update`. */
78
+ export interface McpTaskInput {
79
+ input: Record<string, unknown>;
80
+ }
81
+ /** A `notifications/tasks` payload, as the SSE stream and the socket carry it. */
82
+ export interface McpTaskEvent {
83
+ /** `status`, `output`, `input_required`, `completed`, `failed`, `cancelled`. */
84
+ event: string;
85
+ taskId: string;
86
+ status?: McpTaskStatus;
87
+ statusMessage?: string | null;
88
+ output?: McpTaskOutput;
89
+ task?: McpTask;
90
+ at?: string;
91
+ }
92
+ /** The statuses from which nothing more happens. */
93
+ export declare const MCP_TERMINAL_TASK_STATUSES: ReadonlySet<McpTaskStatus>;
94
+ export declare const isMcpTaskTerminal: (status: McpTaskStatus) => boolean;
@@ -0,0 +1,7 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ /** The statuses from which nothing more happens. */
6
+ export const MCP_TERMINAL_TASK_STATUSES = new Set(['completed', 'failed', 'cancelled']);
7
+ export const isMcpTaskTerminal = (status) => MCP_TERMINAL_TASK_STATUSES.has(status);
@@ -1,6 +1,19 @@
1
1
  import { ITeam } from './Team';
2
2
  import { ISchool } from './School';
3
3
  import { IOrganizationMember } from './OrganizationMember';
4
+ /**
5
+ * The agreements (AWS calls each a licence) of an AWS Marketplace organization.
6
+ *
7
+ * Read from `aws_licenses_s`, the JSON string IAM keeps on the organization
8
+ * document: a list of `{arn, status, agreement_id, offer_id, first_seen,
9
+ * deprovisioned_at, ended_at}`. Anything that does not parse is dropped
10
+ * rather than thrown on, and every ARN of `licenseArns` the JSON does not
11
+ * name is appended as an `active` agreement — which is what an organization
12
+ * written before the field existed holds, and what is left when the JSON is
13
+ * invalid. The same reading the services make, so the page and the API never
14
+ * disagree about which agreements exist.
15
+ */
16
+ export declare function asAwsMarketplaceLicenses(raw: unknown, licenseArns?: string[]): IAwsMarketplaceLicense[];
4
17
  /**
5
18
  * Convert the raw user object to {@link IOrganization}.
6
19
  *
@@ -9,6 +22,55 @@ import { IOrganizationMember } from './OrganizationMember';
9
22
  */
10
23
  export declare function asOrganization(org: any): IOrganization;
11
24
  export type IAnyOrganization = IOrganization | ISchool;
25
+ /**
26
+ * What an organization created from an AWS Marketplace subscription carries.
27
+ *
28
+ * The subscription status is the one AWS last told us, or `pending` until it
29
+ * does. `pending` no longer locks the organization — usage is postpaid and
30
+ * metered by AWS regardless; only `failed` and `cancelled` lock it read-only,
31
+ * and the API says so on every refused mutation. A subscription may carry
32
+ * several concurrent agreements, each identified by a licence ARN.
33
+ */
34
+ /**
35
+ * Where an agreement stands: `active` while the buyer is entitled under it,
36
+ * `ending` from the moment AWS says it is deprovisioned — the hour AWS gives
37
+ * to report its last usage — and `ended` once that hour has passed.
38
+ */
39
+ export type IAwsMarketplaceLicenseStatus = 'active' | 'ending' | 'ended';
40
+ /** One agreement of an AWS Marketplace subscription; AWS calls it a licence. */
41
+ export type IAwsMarketplaceLicense = {
42
+ /** The licence ARN, which is how AWS names the agreement. */
43
+ arn: string;
44
+ status: IAwsMarketplaceLicenseStatus;
45
+ agreementId?: string;
46
+ offerId?: string;
47
+ /** When the platform first saw the agreement. */
48
+ firstSeen?: Date;
49
+ /** When AWS said the agreement was deprovisioned. */
50
+ deprovisionedAt?: Date;
51
+ /** When the hour to report its last usage ran out. */
52
+ endedAt?: Date;
53
+ };
54
+ export type IOrganizationAwsMarketplace = {
55
+ accountId: string;
56
+ productCode: string;
57
+ /** The AWS customer identifier, when the resolve or a notification gave one. */
58
+ customerIdentifier?: string;
59
+ /** The AWS offer this subscription was bought under, when known. */
60
+ offerId?: string;
61
+ /** Every agreement (licence ARN) seen for this subscription. */
62
+ licenseArns: string[];
63
+ /**
64
+ * Every agreement with its status and dates. An organization may hold
65
+ * several at once, and stays usable while at least one is `active`.
66
+ */
67
+ licenses: IAwsMarketplaceLicense[];
68
+ subscriptionStatus: 'pending' | 'active' | 'failed' | 'cancelling' | 'cancelled' | string;
69
+ freeTrial: boolean;
70
+ dimensions: string[];
71
+ values: string[];
72
+ lastMeteredAt?: Date;
73
+ };
12
74
  export type IBaseOrganization = {
13
75
  id: string;
14
76
  handle: string;
@@ -19,6 +81,13 @@ export type IBaseOrganization = {
19
81
  avatarIcon?: string;
20
82
  banner?: string;
21
83
  public: boolean;
84
+ /**
85
+ * Where the organization came from, as a URN — an AWS Marketplace
86
+ * subscription, say. Absent for a native organization.
87
+ */
88
+ origin?: string;
89
+ /** The subscription, for an organization whose origin is the AWS Marketplace. */
90
+ awsMarketplace?: IOrganizationAwsMarketplace;
22
91
  creationDate: Date;
23
92
  members: IOrganizationMember[];
24
93
  setMembers: (members: IOrganizationMember[]) => void;
@@ -4,6 +4,78 @@
4
4
  */
5
5
  import { asArray } from '../utils/index.js';
6
6
  import { asUser } from './User.js';
7
+ const AWS_LICENSE_STATUSES = [
8
+ 'active',
9
+ 'ending',
10
+ 'ended',
11
+ ];
12
+ function asOptionalDate(value) {
13
+ if (!value) {
14
+ return undefined;
15
+ }
16
+ const date = value instanceof Date ? value : new Date(String(value));
17
+ return Number.isNaN(date.getTime()) ? undefined : date;
18
+ }
19
+ function asOptionalString(value) {
20
+ const text = String(value ?? '').trim();
21
+ return text || undefined;
22
+ }
23
+ /**
24
+ * The agreements (AWS calls each a licence) of an AWS Marketplace organization.
25
+ *
26
+ * Read from `aws_licenses_s`, the JSON string IAM keeps on the organization
27
+ * document: a list of `{arn, status, agreement_id, offer_id, first_seen,
28
+ * deprovisioned_at, ended_at}`. Anything that does not parse is dropped
29
+ * rather than thrown on, and every ARN of `licenseArns` the JSON does not
30
+ * name is appended as an `active` agreement — which is what an organization
31
+ * written before the field existed holds, and what is left when the JSON is
32
+ * invalid. The same reading the services make, so the page and the API never
33
+ * disagree about which agreements exist.
34
+ */
35
+ export function asAwsMarketplaceLicenses(raw, licenseArns = []) {
36
+ let parsed = raw;
37
+ if (typeof raw === 'string') {
38
+ try {
39
+ parsed = raw.trim() ? JSON.parse(raw) : [];
40
+ }
41
+ catch {
42
+ parsed = [];
43
+ }
44
+ }
45
+ const licenses = [];
46
+ const known = new Set();
47
+ for (const entry of Array.isArray(parsed) ? parsed : []) {
48
+ if (!entry || typeof entry !== 'object') {
49
+ continue;
50
+ }
51
+ const record = entry;
52
+ const arn = String(record.arn ?? '').trim();
53
+ if (!arn || known.has(arn)) {
54
+ continue;
55
+ }
56
+ known.add(arn);
57
+ const status = String(record.status ?? '')
58
+ .trim()
59
+ .toLowerCase();
60
+ licenses.push({
61
+ arn,
62
+ status: AWS_LICENSE_STATUSES.includes(status) ? status : 'active',
63
+ agreementId: asOptionalString(record.agreement_id ?? record.agreementId),
64
+ offerId: asOptionalString(record.offer_id ?? record.offerId),
65
+ firstSeen: asOptionalDate(record.first_seen ?? record.firstSeen),
66
+ deprovisionedAt: asOptionalDate(record.deprovisioned_at ?? record.deprovisionedAt),
67
+ endedAt: asOptionalDate(record.ended_at ?? record.endedAt),
68
+ });
69
+ }
70
+ for (const value of licenseArns) {
71
+ const arn = String(value ?? '').trim();
72
+ if (arn && !known.has(arn)) {
73
+ known.add(arn);
74
+ licenses.push({ arn, status: 'active' });
75
+ }
76
+ }
77
+ return licenses;
78
+ }
7
79
  /**
8
80
  * Convert the raw user object to {@link IOrganization}.
9
81
  *
@@ -28,6 +100,30 @@ export function asOrganization(org) {
28
100
  avatarIcon: org.avatar_icon_s ?? org.avatarIcon,
29
101
  banner: org.banner_s ?? org.banner,
30
102
  public: org.public_b,
103
+ // Where the organization came from — a URN such as
104
+ // `urn:dla:iam:ext::aws:<account>/<product>` — or nothing for a native one.
105
+ origin: org.origin_s ?? org.origin ?? undefined,
106
+ awsMarketplace: org.aws_account_id_s
107
+ ? {
108
+ accountId: org.aws_account_id_s,
109
+ productCode: org.aws_product_code_s,
110
+ customerIdentifier: org.aws_customer_identifier_s || undefined,
111
+ offerId: org.aws_offer_identifier_s || undefined,
112
+ // Every agreement (licence ARN) seen for this subscription. A
113
+ // subscription may carry several concurrent agreements.
114
+ licenseArns: asArray(org.aws_license_arns_ss ?? []),
115
+ // The same agreements with what is known of each — status,
116
+ // agreement id, dates — read defensively from the JSON IAM keeps.
117
+ licenses: asAwsMarketplaceLicenses(org.aws_licenses_s, asArray(org.aws_license_arns_ss ?? [])),
118
+ subscriptionStatus: org.aws_subscription_status_s ?? 'pending',
119
+ freeTrial: Boolean(org.aws_free_trial_b),
120
+ dimensions: asArray(org.aws_dimensions_ss ?? []),
121
+ values: asArray(org.aws_values_ss ?? []),
122
+ lastMeteredAt: org.aws_last_metered_ts_dt
123
+ ? new Date(org.aws_last_metered_ts_dt)
124
+ : undefined,
125
+ }
126
+ : undefined,
31
127
  members,
32
128
  teams: [],
33
129
  creationDate: new Date(org.creation_ts_dt),
@@ -140,12 +140,11 @@ export declare class SecretDTO {
140
140
  */
141
141
  constructor(data: SecretData, client: DatalayerCoreClient);
142
142
  private _checkDeleted;
143
- private _decodeValue;
144
143
  get uid(): string;
145
144
  get variant(): ISecretVariant;
146
145
  get name(): string;
147
146
  get description(): string;
148
- /** Returns decoded (plain text) secret value */
147
+ /** The value as its owner wrote it (PLAN_ENVS.md E3-05). */
149
148
  get value(): string;
150
149
  /**
151
150
  * Update this secret.