@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
@@ -1,3 +1,12 @@
1
+ /**
2
+ * UserAvatar – Single source of truth for rendering a user's avatar.
3
+ *
4
+ * When a real (non-Gravatar) avatar URL is available it renders a
5
+ * {@link DLAvatar}. Otherwise it falls back to a themed, colormoded
6
+ * {@link AlienIcon} placeholder so every consumer (profile, sidebar,
7
+ * principal overlay, …) shares the same default look.
8
+ */
9
+ import type { JSX } from 'react';
1
10
  /**
2
11
  * Returns `true` when the given URL points to a real user avatar (i.e. not a
3
12
  * Gravatar default placeholder).
@@ -6,6 +15,12 @@ export declare function hasRealAvatar(url?: string): boolean;
6
15
  export type UserAvatarProps = {
7
16
  avatarUrl?: string;
8
17
  avatarIcon?: string;
18
+ /**
19
+ * A literal emoji, checked before `avatarIcon`/`avatarUrl` — an agent's
20
+ * face is its emoji, not a photograph or a chosen icon standing in for
21
+ * one.
22
+ */
23
+ avatarEmoji?: string;
9
24
  /** Avatar edge length in pixels. Defaults to 100. */
10
25
  size?: number;
11
26
  /** Render with rounded square corners instead of a circle. Defaults to true. */
@@ -26,5 +41,5 @@ export type UserAvatarProps = {
26
41
  ring?: boolean;
27
42
  className?: string;
28
43
  };
29
- export declare const UserAvatar: ({ avatarUrl, avatarIcon, size, square, iconSize, fallbackBackground, fallbackForeground, ring, className, }: UserAvatarProps) => JSX.Element;
44
+ export declare const UserAvatar: ({ avatarUrl, avatarIcon, avatarEmoji, size, square, iconSize, fallbackBackground, fallbackForeground, ring, className, }: UserAvatarProps) => JSX.Element;
30
45
  export default UserAvatar;
@@ -1,16 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
- /**
7
- * UserAvatar – Single source of truth for rendering a user's avatar.
8
- *
9
- * When a real (non-Gravatar) avatar URL is available it renders a
10
- * {@link DLAvatar}. Otherwise it falls back to a themed, colormoded
11
- * {@link AlienIcon} placeholder so every consumer (profile, sidebar,
12
- * principal overlay, …) shares the same default look.
13
- */
14
2
  import { AlienIcon } from '@datalayer/icons-react';
15
3
  import { Box, useColorPalette } from '@datalayer/primer-addons';
16
4
  import { DLAvatar } from './DLAvatar.js';
@@ -28,7 +16,7 @@ export function hasRealAvatar(url) {
28
16
  }
29
17
  return true;
30
18
  }
31
- export const UserAvatar = ({ avatarUrl, avatarIcon, size = 100, square = true, iconSize, fallbackBackground, fallbackForeground, ring = false, className, }) => {
19
+ export const UserAvatar = ({ avatarUrl, avatarIcon, avatarEmoji, size = 100, square = true, iconSize, fallbackBackground, fallbackForeground, ring = false, className, }) => {
32
20
  const palette = useColorPalette();
33
21
  /*
34
22
  * The ring, as a shadow rather than a border.
@@ -40,6 +28,20 @@ export const UserAvatar = ({ avatarUrl, avatarIcon, size = 100, square = true, i
40
28
  const ringSx = ring
41
29
  ? { boxShadow: '0 0 0 1px var(--borderColor-default, currentColor)' }
42
30
  : undefined;
31
+ if (avatarEmoji) {
32
+ return (_jsx(Box, { role: "img", "aria-label": avatarEmoji, className: className, sx: {
33
+ width: size,
34
+ height: size,
35
+ borderRadius: square ? 2 : '50%',
36
+ display: 'flex',
37
+ alignItems: 'center',
38
+ justifyContent: 'center',
39
+ bg: fallbackBackground || 'canvas.default',
40
+ fontSize: Math.round(size * 0.5),
41
+ lineHeight: 1,
42
+ ...ringSx,
43
+ }, children: avatarEmoji }));
44
+ }
43
45
  const SelectedIcon = getPrincipalAvatarIcon(avatarIcon);
44
46
  if (SelectedIcon) {
45
47
  return (_jsx(Box, { className: className, sx: {
@@ -4,5 +4,5 @@ type IUserProfileAvatarProps = {
4
4
  size?: number;
5
5
  onClick?: React.MouseEventHandler<any>;
6
6
  };
7
- export declare const UserProfileAvatar: ({ onClick, user, size, }: IUserProfileAvatarProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const UserProfileAvatar: ({ onClick, user, size, }: IUserProfileAvatarProps) => import("react").JSX.Element;
8
8
  export default UserProfileAvatar;
@@ -1,2 +1,2 @@
1
- export declare const NoAutomationBanner: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const NoAutomationBanner: () => import("react").JSX.Element;
2
2
  export default NoAutomationBanner;
@@ -1,3 +1,13 @@
1
+ /**
2
+ * BillingEntitySelect — self-contained dropdown that lets the user pick a
3
+ * billing entity (personal, organization, or eligible team) for runs that
4
+ * consume wallet credits.
5
+ *
6
+ * Encapsulates eligibility merge logic and account-detail fetching. Callers
7
+ * only need to provide a value/onChange pair and optionally observe the full
8
+ * resolved account via `onSelectedAccountChange`.
9
+ */
10
+ import type { JSX } from 'react';
1
11
  export type BillingEntityType = 'user' | 'organization' | 'team';
2
12
  export type BillingEntity = {
3
13
  accountUid: string;
@@ -7,6 +17,12 @@ export type BillingEntity = {
7
17
  planName: string;
8
18
  isEligible: boolean;
9
19
  isPaidPlan: boolean;
20
+ /**
21
+ * Billed through the AWS Marketplace: an organization created from an AWS
22
+ * subscription, or one of its teams. Work started under it is metered and
23
+ * reaches the AWS bill; work started under any other entry never does.
24
+ */
25
+ isAwsBilled: boolean;
10
26
  sourceOrganizationUid?: string;
11
27
  sourceOrganizationHandle?: string;
12
28
  teamHandle?: string;
@@ -1,21 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
- /*
7
- * Copyright (c) 2023-2026 Datalayer, Inc.
8
- * Distributed under the terms of the Modified BSD License.
9
- */
10
- /**
11
- * BillingEntitySelect — self-contained dropdown that lets the user pick a
12
- * billing entity (personal, organization, or eligible team) for runs that
13
- * consume wallet credits.
14
- *
15
- * Encapsulates eligibility merge logic and account-detail fetching. Callers
16
- * only need to provide a value/onChange pair and optionally observe the full
17
- * resolved account via `onSelectedAccountChange`.
18
- */
19
2
  import { useCallback, useEffect, useMemo, useRef, Fragment } from 'react';
20
3
  import { ActionList, ActionMenu, Button, FormControl, Label, Spinner, Text, } from '@primer/react';
21
4
  import { OrganizationIcon, PeopleIcon, PersonIcon, } from '@primer/octicons-react';
@@ -23,6 +6,7 @@ import { Box } from '@datalayer/primer-addons';
23
6
  import { useCache } from '../../hooks/useCache.js';
24
7
  import { useSelectedPrincipal } from '../../hooks/useSelectedPrincipal.js';
25
8
  import { useIAMStore } from '../../state/index.js';
9
+ import { isBillingEntityEligible } from './eligibility.js';
26
10
  const PLAN_FREE_TERMS = ['free', 'starter'];
27
11
  const PLAN_PRO_TERMS = ['pro', 'paid', 'team', 'enterprise', 'business'];
28
12
  const BILLING_ENTITY_COOKIE = 'datalayer-billing-entity-uid';
@@ -41,6 +25,19 @@ function writeBillingEntityCookie(value) {
41
25
  `${BILLING_ENTITY_COOKIE}=${encodeURIComponent(value)};` +
42
26
  ` path=/; max-age=${BILLING_ENTITY_COOKIE_MAX_AGE}; SameSite=Lax`;
43
27
  }
28
+ const AWS_ORIGIN_PREFIX = 'urn:dla:iam:ext::aws:';
29
+ const AWS_BILLING_PROVIDER = 'aws-marketplace';
30
+ /** Whether an origin URN names an AWS Marketplace subscription. */
31
+ const isAwsOriginUrn = (origin) => String(origin ?? '')
32
+ .trim()
33
+ .toLowerCase()
34
+ .startsWith(AWS_ORIGIN_PREFIX);
35
+ /** Whether IAM names the AWS Marketplace as who bills an account. */
36
+ const isAwsBillingProvider = (provider) => String(provider ?? '')
37
+ .trim()
38
+ .toLowerCase() === AWS_BILLING_PROVIDER;
39
+ /** The label beside an entry billed through the AWS Marketplace. */
40
+ const AwsBilledLabel = () => (_jsx(Label, { size: "small", variant: "accent", title: "Billed through AWS Marketplace: work started here is reported to AWS", children: "AWS" }));
44
41
  const planContains = (value, terms) => terms.some(term => value.includes(term));
45
42
  export function resolveBillingPlanTier(value) {
46
43
  const normalized = String(value ?? '').toLowerCase();
@@ -74,6 +71,8 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
74
71
  String(entry.account_handle || '').trim() ||
75
72
  String(entry.account_uid || '').trim(),
76
73
  planName: String(entry?.subscription?.plan_name || entry?.plan?.plan_name || '').trim(),
74
+ isAwsBilled: isAwsBillingProvider(entry?.billing_provider) ||
75
+ isAwsBillingProvider(entry?.plan?.billing_provider),
77
76
  })), [eligibleAccountsRaw]);
78
77
  const personalAccountUid = String(user?.id || '');
79
78
  const allContextAccounts = useMemo(() => {
@@ -85,6 +84,7 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
85
84
  accountHandle: String(user?.handle || '').trim(),
86
85
  accountName: String(user?.handle || '').trim() || personalAccountUid,
87
86
  planName: '',
87
+ isAwsBilled: false,
88
88
  });
89
89
  }
90
90
  for (const organization of (userOrganizationsQuery.data || [])) {
@@ -101,6 +101,8 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
101
101
  planName: String(organization?.subscription?.plan_name ||
102
102
  organization?.plan_name ||
103
103
  '').trim(),
104
+ isAwsBilled: Boolean(organization?.awsMarketplace) ||
105
+ isAwsOriginUrn(organization?.origin ?? organization?.origin_s),
104
106
  });
105
107
  }
106
108
  return Array.from(accountMap.values());
@@ -134,6 +136,11 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
134
136
  accountMap.set(a.accountUid, a);
135
137
  const merged = Array.from(accountMap.values());
136
138
  const mergedByUid = new Map(merged.map(a => [a.accountUid, a]));
139
+ // Either list may say it: the organizations carry their origin, and IAM
140
+ // names the billing provider on each eligible entry.
141
+ const awsBilledUids = new Set([...allContextAccounts, ...eligibleAccounts]
142
+ .filter(a => a.isAwsBilled)
143
+ .map(a => a.accountUid));
137
144
  return merged.map(account => {
138
145
  const eligible = eligibleAccountByUid.get(account.accountUid);
139
146
  const details = detailsByUid.get(account.accountUid);
@@ -149,15 +156,22 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
149
156
  details?.wallet_balance ??
150
157
  0));
151
158
  const hasPositiveWallet = Number.isFinite(walletBalance) && walletBalance > 0;
152
- const isEligible = accountType === 'team'
153
- ? hasPositiveWallet
154
- : typeof details?.is_eligible === 'boolean'
155
- ? details.is_eligible ||
156
- (accountType === 'user' && hasPositiveWallet)
157
- : Boolean(eligible);
158
159
  const sourceOrganizationUid = accountType === 'team'
159
160
  ? String(details?.plan_source_account_uid || '').trim() || undefined
160
161
  : undefined;
162
+ // A team inherits it from the organization that pays for it.
163
+ const isAwsBilled = awsBilledUids.has(account.accountUid) ||
164
+ Boolean(sourceOrganizationUid && awsBilledUids.has(sourceOrganizationUid)) ||
165
+ isAwsBillingProvider(details?.subscription?.billing_provider);
166
+ const isEligible = isBillingEntityEligible({
167
+ accountType,
168
+ iamEligible: typeof details?.is_eligible === 'boolean'
169
+ ? details.is_eligible
170
+ : undefined,
171
+ isAwsBilled,
172
+ hasPositiveWallet,
173
+ listedEligible: Boolean(eligible),
174
+ });
161
175
  const sourceOrgDetails = sourceOrganizationUid
162
176
  ? detailsByUid.get(sourceOrganizationUid)
163
177
  : undefined;
@@ -177,6 +191,7 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
177
191
  planName,
178
192
  isEligible,
179
193
  isPaidPlan: resolveBillingPlanTier(planName || 'free') === 'pro',
194
+ isAwsBilled,
180
195
  sourceOrganizationUid,
181
196
  sourceOrganizationHandle,
182
197
  teamHandle: accountType === 'team' ? accountHandle : undefined,
@@ -324,7 +339,7 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
324
339
  ? 'Organization'
325
340
  : selectedAccount.accountType === 'team'
326
341
  ? 'Team'
327
- : 'User', children: selectedAccount.accountType === 'organization' ? (_jsx(OrganizationIcon, { size: 12 })) : selectedAccount.accountType === 'team' ? (_jsx(PeopleIcon, { size: 12 })) : (_jsx(PersonIcon, { size: 12 })) }), _jsx(Label, { size: "small", variant: selectedAccount.isPaidPlan ? 'success' : 'attention', children: formatBillingEntityPlanLabel(selectedAccount.planName) })] })] })) : !hasEligibleAccount ? (emptyMessage) : ('Select a billing entity') }) }), _jsxs(ActionMenu.Overlay, { width: "large", children: [_jsx(Box, { sx: { p: 2 }, children: _jsx(Box, { sx: {
342
+ : 'User', children: selectedAccount.accountType === 'organization' ? (_jsx(OrganizationIcon, { size: 12 })) : selectedAccount.accountType === 'team' ? (_jsx(PeopleIcon, { size: 12 })) : (_jsx(PersonIcon, { size: 12 })) }), selectedAccount.isAwsBilled ? _jsx(AwsBilledLabel, {}) : null, _jsx(Label, { size: "small", variant: selectedAccount.isPaidPlan ? 'success' : 'attention', children: formatBillingEntityPlanLabel(selectedAccount.planName) })] })] })) : !hasEligibleAccount ? (emptyMessage) : ('Select a billing entity') }) }), _jsxs(ActionMenu.Overlay, { width: "large", children: [_jsx(Box, { sx: { p: 2 }, children: _jsxs(Box, { sx: {
328
343
  borderRadius: 2,
329
344
  border: '1px solid',
330
345
  borderColor: 'border.default',
@@ -332,7 +347,12 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
332
347
  color: 'fg.muted',
333
348
  px: 3,
334
349
  py: 2,
335
- }, children: _jsx(Text, { sx: { fontSize: 1, lineHeight: 1.5 }, children: flashMessage }) }) }), _jsx(ActionList, { selectionVariant: "single", children: isLoading ? (_jsx(ActionList.Item, { disabled: true, children: _jsxs(Box, { sx: {
350
+ }, children: [_jsx(Text, { sx: { fontSize: 1, lineHeight: 1.5 }, children: flashMessage }), accounts.some(account => account.isAwsBilled) ? (_jsx(Text, { sx: {
351
+ display: 'block',
352
+ fontSize: 1,
353
+ lineHeight: 1.5,
354
+ mt: 2,
355
+ }, children: "Entries marked AWS are billed through AWS Marketplace: only work started under them is reported to AWS. Work started under any other entry is charged to the credits of that account and never reaches the AWS bill." })) : null] }) }), _jsx(ActionList, { selectionVariant: "single", children: isLoading ? (_jsx(ActionList.Item, { disabled: true, children: _jsxs(Box, { sx: {
336
356
  display: 'inline-flex',
337
357
  alignItems: 'center',
338
358
  gap: 2,
@@ -374,9 +394,11 @@ export function BillingEntitySelect({ value, onChange, onSelectedAccountChange,
374
394
  ? 'Organization'
375
395
  : account.accountType === 'team'
376
396
  ? 'Team'
377
- : 'User', children: account.accountType === 'organization' ? (_jsx(OrganizationIcon, { size: 12 })) : account.accountType === 'team' ? (_jsx(PeopleIcon, { size: 12 })) : (_jsx(PersonIcon, { size: 12 })) }), !account.isEligible &&
397
+ : 'User', children: account.accountType === 'organization' ? (_jsx(OrganizationIcon, { size: 12 })) : account.accountType === 'team' ? (_jsx(PeopleIcon, { size: 12 })) : (_jsx(PersonIcon, { size: 12 })) }), account.isAwsBilled ? _jsx(AwsBilledLabel, {}) : null, !account.isEligible &&
378
398
  account.accountType === 'team' && (_jsx(Label, { size: "small", variant: "attention", children: "No credits" })), _jsx(Label, { size: "small", variant: account.isPaidPlan ? 'success' : 'attention', children: formatBillingEntityPlanLabel(account.planName) })] })] }), _jsx(ActionList.Description, { variant: "block", children: account.isEligible
379
- ? 'Eligible'
399
+ ? account.isAwsBilled
400
+ ? 'Eligible — billed through AWS Marketplace'
401
+ : 'Eligible'
380
402
  : account.accountType === 'team'
381
403
  ? 'Not eligible — no team credits allocated'
382
404
  : 'Not eligible — activate a plan or add credits to use this account' })] })] }, account.accountUid));
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Whether work may be started under a billing entity: the rule the launch
3
+ * picker enables an entry by.
4
+ *
5
+ * IAM answers `is_eligible` from what its reservation door would accept, for
6
+ * every kind of account. For an entity AWS does not pay for, that door reads
7
+ * the entity's own wallet and asks no plan — so credits in the wallet make it
8
+ * eligible, personal, organization or team, on a paid plan or none. That is
9
+ * said here as well as in IAM, so an IAM that still asked organizations for a
10
+ * paid plan does not grey out an organization with credits to spend. An
11
+ * entity AWS pays for has no wallet: IAM alone decides it, from the
12
+ * subscription.
13
+ */
14
+ export declare function isBillingEntityEligible({ accountType, iamEligible, isAwsBilled, hasPositiveWallet, listedEligible, }: {
15
+ accountType: string;
16
+ /** `is_eligible` from IAM's account details, when it answered one. */
17
+ iamEligible?: boolean;
18
+ isAwsBilled: boolean;
19
+ hasPositiveWallet: boolean;
20
+ /** Whether IAM's eligible-accounts listing named the entity. */
21
+ listedEligible: boolean;
22
+ }): boolean;
@@ -0,0 +1,27 @@
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
+ * Whether work may be started under a billing entity: the rule the launch
11
+ * picker enables an entry by.
12
+ *
13
+ * IAM answers `is_eligible` from what its reservation door would accept, for
14
+ * every kind of account. For an entity AWS does not pay for, that door reads
15
+ * the entity's own wallet and asks no plan — so credits in the wallet make it
16
+ * eligible, personal, organization or team, on a paid plan or none. That is
17
+ * said here as well as in IAM, so an IAM that still asked organizations for a
18
+ * paid plan does not grey out an organization with credits to spend. An
19
+ * entity AWS pays for has no wallet: IAM alone decides it, from the
20
+ * subscription.
21
+ */
22
+ export function isBillingEntityEligible({ accountType, iamEligible, isAwsBilled, hasPositiveWallet, listedEligible, }) {
23
+ if (typeof iamEligible === 'boolean') {
24
+ return iamEligible || (!isAwsBilled && hasPositiveWallet);
25
+ }
26
+ return accountType === 'team' ? hasPositiveWallet : listedEligible;
27
+ }
@@ -1 +1,2 @@
1
1
  export * from './BillingEntitySelect';
2
+ export * from './eligibility';
@@ -2,8 +2,5 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- /*
6
- * Copyright (c) 2023-2026 Datalayer, Inc.
7
- * Distributed under the terms of the Modified BSD License.
8
- */
9
5
  export * from './BillingEntitySelect.js';
6
+ export * from './eligibility.js';
@@ -4,5 +4,5 @@ type IDownloadCSVButtonProps = {
4
4
  fileName: string;
5
5
  variant?: VariantType;
6
6
  };
7
- export declare const DownloadCSVButton: ({ data, fileName, variant, }: IDownloadCSVButtonProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const DownloadCSVButton: ({ data, fileName, variant, }: IDownloadCSVButtonProps) => import("react").JSX.Element;
8
8
  export default DownloadCSVButton;
@@ -5,5 +5,5 @@ type IDownloadJsonButtonProps = {
5
5
  extension?: string;
6
6
  variant?: VariantType;
7
7
  };
8
- export declare const DownloadJsonButton: ({ data, fileName, variant, extension, }: IDownloadJsonButtonProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const DownloadJsonButton: ({ data, fileName, variant, extension, }: IDownloadJsonButtonProps) => import("react").JSX.Element;
9
9
  export default DownloadJsonButton;
@@ -1,3 +1,4 @@
1
+ import type { JSX } from 'react';
1
2
  import { type ElementType } from 'react';
2
3
  type ILongActionButtonProps = {
3
4
  /**
@@ -1,8 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
2
  import { useCallback, useState } from 'react';
7
3
  import { IconButton, Spinner } from '@primer/react';
8
4
  /**
@@ -1,3 +1,4 @@
1
+ import type { JSX } from 'react';
1
2
  import type { VariantType } from './VariantType';
2
3
  interface IUploadBaseButtonProps {
3
4
  /**
@@ -1,8 +1,4 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
2
  import { useCallback, useMemo, useRef } from 'react';
7
3
  import { Button, IconButton } from '@primer/react';
8
4
  import { UploadIcon } from '@primer/octicons-react';
@@ -50,4 +50,4 @@ export type StripeCheckoutProps = {
50
50
  /**
51
51
  * Stripe checkout.
52
52
  */
53
- export declare function StripeCheckout({ checkoutPortal, appearance, accountUid, showStatusUsageSummary, onCheckoutSuccess, }: StripeCheckoutProps): import("react/jsx-runtime").JSX.Element;
53
+ export declare function StripeCheckout({ checkoutPortal, appearance, accountUid, showStatusUsageSummary, onCheckoutSuccess, }: StripeCheckoutProps): import("react").JSX.Element;
@@ -1,11 +1,40 @@
1
+ /**
2
+ * The faces on a shared document: who is here now, and who belongs here.
3
+ *
4
+ * One avatar stack for every surface that names collaborators — the cards of
5
+ * the home page, the headers of the notebook and document editors, in the
6
+ * web application and in JupyterLab alike. Two sources feed it, both
7
+ * optional and freely combined:
8
+ *
9
+ * - `awareness`: the presence channel of a collaborative editor. The stack
10
+ * follows it live — people appear as they join and leave as they go.
11
+ * - `collaborators`: what is known without a room, the owner and the granted
12
+ * of an item. They fill the stack when there is no presence, and complete
13
+ * it when there is.
14
+ *
15
+ * Every face uses the shared principal avatar rules: a selected icon wins,
16
+ * then a connected-account picture, then the standard personal fallback.
17
+ *
18
+ * @module components/collaboration/LiveEditorCollaborators
19
+ */
20
+ import type { JSX } from 'react';
1
21
  export type LiveCollaborator = {
2
22
  /** Stable identity — a user uid, or the awareness client id. */
3
23
  id: string;
4
24
  name: string;
5
25
  avatarUrl?: string;
6
26
  avatarIcon?: string;
27
+ /**
28
+ * A literal emoji, for a face this platform draws rather than a person's
29
+ * own — an agent's — checked before `avatarUrl`/`avatarIcon`.
30
+ */
31
+ avatarEmoji?: string;
7
32
  /** Cursor color of the presence, worn by the initials disc. */
8
33
  color?: string;
34
+ /** The platform uid, when the face is a real account — for its profile. */
35
+ uid?: string;
36
+ /** The account handle, when known — the address of the profile page. */
37
+ handle?: string;
9
38
  };
10
39
  /**
11
40
  * The slice of a Yjs-style awareness this component reads. Structural, so
@@ -26,6 +55,13 @@ export type LiveEditorCollaboratorsProps = {
26
55
  size?: number;
27
56
  /** How many faces at most; the stack keeps the first ones. */
28
57
  max?: number;
58
+ /**
59
+ * Show a face's profile some other way than through the router of this
60
+ * subtree — for the editors embedded under a router of their own, which hand
61
+ * the route to the view that has the routes. See
62
+ * {@link PrincipalDetailsOverlayProps.onNavigate}.
63
+ */
64
+ onNavigate?: (path: string) => void;
29
65
  };
30
66
  export declare function LiveEditorCollaborators(props: LiveEditorCollaboratorsProps): JSX.Element | null;
31
67
  export default LiveEditorCollaborators;
@@ -1,34 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /*
3
- * Copyright (c) 2023-2025 Datalayer, Inc.
4
- * Distributed under the terms of the Modified BSD License.
5
- */
6
- /*
7
- * Copyright (c) 2023-2026 Datalayer, Inc.
8
- * Distributed under the terms of the Modified BSD License.
9
- */
10
- /**
11
- * The faces on a shared document: who is here now, and who belongs here.
12
- *
13
- * One avatar stack for every surface that names collaborators — the cards of
14
- * the home page, the headers of the notebook and document editors, in the
15
- * web application and in JupyterLab alike. Two sources feed it, both
16
- * optional and freely combined:
17
- *
18
- * - `awareness`: the presence channel of a collaborative editor. The stack
19
- * follows it live — people appear as they join and leave as they go.
20
- * - `collaborators`: what is known without a room, the owner and the granted
21
- * of an item. They fill the stack when there is no presence, and complete
22
- * it when there is.
23
- *
24
- * Every face uses the shared principal avatar rules: a selected icon wins,
25
- * then a connected-account picture, then the standard personal fallback.
26
- *
27
- * @module components/collaboration/LiveEditorCollaborators
28
- */
29
2
  import { useEffect, useMemo, useState } from 'react';
30
3
  import { AvatarStack } from '@primer/react';
31
4
  import { PrincipalAvatar } from '../principal/PrincipalAvatar.js';
5
+ import { PrincipalHoverCard } from '../principal/PrincipalHoverCard.js';
32
6
  /** The `user` field of an awareness state, in its several spellings. */
33
7
  function collaboratorOfState(clientId, state) {
34
8
  const user = state?.user;
@@ -51,16 +25,46 @@ function collaboratorOfState(clientId, state) {
51
25
  if (user.anonymous === true || /^anonymous(\s|$)/i.test(name)) {
52
26
  return undefined;
53
27
  }
28
+ const uid = user.uid ?? user.id ?? undefined;
29
+ // The room writes the uid into `username` as often as it writes a handle;
30
+ // only take it for the handle when it is not just the uid under another
31
+ // name, or the profile link would carry a uid where a handle belongs.
32
+ const username = user.username && String(user.username) !== String(uid ?? '')
33
+ ? user.username
34
+ : undefined;
54
35
  return {
55
- id: String(user.uid ?? user.id ?? user.username ?? clientId),
36
+ id: String(uid ?? user.username ?? clientId),
56
37
  name,
57
38
  avatarUrl: user.avatar_url || user.avatarUrl || undefined,
58
39
  avatarIcon: user.avatar_icon_s || user.avatarIcon || undefined,
59
- color: user.color || undefined
40
+ avatarEmoji: user.avatar_emoji_s || user.avatarEmoji || undefined,
41
+ color: user.color || undefined,
42
+ uid: uid ? String(uid) : undefined,
43
+ handle: user.handle || username || undefined,
44
+ };
45
+ }
46
+ /**
47
+ * Fold a second sighting of a person into the first, keeping the fuller of
48
+ * the two. The name that wins is the one belonging to the record that also
49
+ * carries a uid — the identity a profile is named by, "Eric Charles" over
50
+ * the room's cursor label "eric" — and every other field is taken wherever it
51
+ * is present. The cursor color of the live presence, seen first, is kept.
52
+ */
53
+ function mergeCollaborators(known, incoming) {
54
+ const incomingNameWins = !!incoming.uid && !known.uid && incoming.name.trim().length > 0;
55
+ return {
56
+ id: known.id,
57
+ name: incomingNameWins ? incoming.name : known.name,
58
+ uid: known.uid || incoming.uid,
59
+ handle: known.handle || incoming.handle,
60
+ avatarUrl: known.avatarUrl || incoming.avatarUrl,
61
+ avatarIcon: known.avatarIcon || incoming.avatarIcon,
62
+ avatarEmoji: known.avatarEmoji || incoming.avatarEmoji,
63
+ color: known.color || incoming.color,
60
64
  };
61
65
  }
62
66
  export function LiveEditorCollaborators(props) {
63
- const { awareness, collaborators = [], max = 5, size = 24 } = props;
67
+ const { awareness, collaborators = [], max = 5, size = 24, onNavigate, } = props;
64
68
  const [present, setPresent] = useState([]);
65
69
  useEffect(() => {
66
70
  if (!awareness) {
@@ -85,31 +89,57 @@ export function LiveEditorCollaborators(props) {
85
89
  };
86
90
  }, [awareness]);
87
91
  const faces = useMemo(() => {
88
- // Who is here leads; who merely belongs completes. Folded by id and
89
- // then by name: the same person often arrives twice — once under their
90
- // platform uid, once under the identity the room gave them.
91
- const merged = new Map();
92
- const byName = new Map();
93
- for (const collaborator of [...present, ...collaborators]) {
94
- const nameKey = collaborator.name.trim().toLowerCase();
95
- const key = merged.has(collaborator.id)
96
- ? collaborator.id
97
- : (byName.get(nameKey) ?? collaborator.id);
98
- const known = merged.get(key);
99
- if (!known) {
100
- merged.set(key, collaborator);
101
- byName.set(nameKey, key);
92
+ // Who is here leads; who merely belongs completes. One person, though,
93
+ // arrives more than once and never quite the same: the room knows them by
94
+ // their handle and a cursor name ("eric"), the grants by their uid and
95
+ // their full name ("Eric Charles"). Neither their id nor their name is
96
+ // shared, so a fold on either alone leaves two faces of one person — and
97
+ // two faces means two hover cards over the one avatar. So they are folded
98
+ // on ANY identity they have in common — uid, handle, name, or id — and the
99
+ // fuller of the two records is the one that survives.
100
+ const list = [];
101
+ const indexByToken = new Map();
102
+ const tokensOf = (person) => {
103
+ const tokens = [];
104
+ if (person.uid) {
105
+ tokens.push(`uid:${person.uid}`);
102
106
  }
103
- else if ((!known.avatarIcon && collaborator.avatarIcon) ||
104
- (!known.avatarUrl && collaborator.avatarUrl)) {
105
- merged.set(key, {
106
- ...known,
107
- avatarIcon: known.avatarIcon || collaborator.avatarIcon,
108
- avatarUrl: known.avatarUrl || collaborator.avatarUrl,
109
- });
107
+ if (person.handle) {
108
+ tokens.push(`handle:${person.handle.trim().toLowerCase()}`);
109
+ }
110
+ const nameKey = person.name.trim().toLowerCase();
111
+ if (nameKey) {
112
+ tokens.push(`name:${nameKey}`);
113
+ }
114
+ tokens.push(`id:${person.id}`);
115
+ return tokens;
116
+ };
117
+ for (const person of [...present, ...collaborators]) {
118
+ const tokens = tokensOf(person);
119
+ let index = -1;
120
+ for (const token of tokens) {
121
+ const found = indexByToken.get(token);
122
+ if (found !== undefined) {
123
+ index = found;
124
+ break;
125
+ }
126
+ }
127
+ if (index === -1) {
128
+ index = list.length;
129
+ list.push({ ...person });
130
+ }
131
+ else {
132
+ list[index] = mergeCollaborators(list[index], person);
133
+ }
134
+ // Every identity this person carries now points at their one face, so
135
+ // the next record that shares any of them folds in rather than doubling.
136
+ for (const token of [...tokens, ...tokensOf(list[index])]) {
137
+ if (!indexByToken.has(token)) {
138
+ indexByToken.set(token, index);
139
+ }
110
140
  }
111
141
  }
112
- return Array.from(merged.values()).slice(0, max);
142
+ return list.slice(0, max);
113
143
  }, [collaborators, max, present]);
114
144
  if (!faces.length) {
115
145
  return null;
@@ -124,6 +154,11 @@ export function LiveEditorCollaborators(props) {
124
154
  * opens back over the space it came from — empty by construction, since
125
155
  * the stack was collapsed there a moment before.
126
156
  */
127
- _jsx(AvatarStack, { alignRight: true, size: size, children: faces.map(face => (_jsx(PrincipalAvatar, { kind: "personal", size: size, alt: face.name, avatarUrl: face.avatarUrl, avatarIcon: face.avatarIcon, square: false }, face.id))) }));
157
+ _jsx(AvatarStack, { alignRight: true, size: size, children: faces.map(face => (_jsx(PrincipalHoverCard
158
+ // A key that does not flip as the room's awareness churns: the same
159
+ // person arrives now under their uid, now under a client id, and a
160
+ // key that followed that would unmount the hover card mid-open and
161
+ // leak its overlay. Their identity, not their arrival, names them.
162
+ , { kind: "personal", uid: face.uid, handle: face.handle, displayName: face.name, name: face.name, avatarUrl: face.avatarUrl, avatarIcon: face.avatarIcon, avatarEmoji: face.avatarEmoji, onNavigate: onNavigate, children: _jsx(PrincipalAvatar, { kind: "personal", size: size, alt: face.name, avatarUrl: face.avatarUrl, avatarIcon: face.avatarIcon, avatarEmoji: face.avatarEmoji, square: false }) }, face.uid || face.handle || face.name.trim().toLowerCase()))) }));
128
163
  }
129
164
  export default LiveEditorCollaborators;