@datalayer/core 1.0.24 → 1.1.41

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 (364) hide show
  1. package/README.md +35 -24
  2. package/lib/api/constants.d.ts +3 -0
  3. package/lib/api/constants.js +3 -0
  4. package/lib/api/index.d.ts +0 -8
  5. package/lib/api/index.js +0 -8
  6. package/lib/cli-login.js +167 -0
  7. package/lib/client/base.d.ts +0 -3
  8. package/lib/client/base.js +0 -2
  9. package/lib/client/index.d.ts +10 -98
  10. package/lib/client/index.js +12 -21
  11. package/lib/components/avatars/UserAvatar.d.ts +16 -0
  12. package/lib/components/avatars/UserAvatar.js +47 -0
  13. package/lib/components/avatars/index.d.ts +1 -0
  14. package/lib/components/avatars/index.js +1 -0
  15. package/lib/components/billing/BillableAccountSelect.js +4 -0
  16. package/lib/components/billing/index.js +4 -0
  17. package/lib/components/checkout/StripeCheckout.js +48 -2
  18. package/lib/components/context/index.d.ts +0 -1
  19. package/lib/components/context/index.js +0 -1
  20. package/lib/components/display/DisplayHandle.d.ts +12 -0
  21. package/lib/components/display/DisplayHandle.js +11 -0
  22. package/lib/components/display/LiveRelativeTime.d.ts +1 -10
  23. package/lib/components/display/LiveRelativeTime.js +5 -16
  24. package/lib/components/display/index.d.ts +1 -0
  25. package/lib/components/display/index.js +1 -0
  26. package/lib/components/flashes/index.d.ts +0 -1
  27. package/lib/components/flashes/index.js +0 -1
  28. package/lib/components/index.d.ts +2 -0
  29. package/lib/components/index.js +2 -0
  30. package/lib/components/principal/Principal.d.ts +7 -0
  31. package/lib/components/principal/Principal.js +153 -16
  32. package/lib/components/principal/PrincipalAvatar.d.ts +1 -1
  33. package/lib/components/principal/PrincipalAvatar.js +4 -28
  34. package/lib/components/principal/PrincipalBadge.js +4 -4
  35. package/lib/components/principal/PrincipalDetailsOverlay.d.ts +4 -2
  36. package/lib/components/principal/PrincipalDetailsOverlay.js +27 -7
  37. package/lib/components/principal/PrincipalSwitcherMenu.js +76 -39
  38. package/lib/components/progress/index.d.ts +0 -1
  39. package/lib/components/progress/index.js +0 -1
  40. package/lib/components/sharing/ShareAccessComponent.d.ts +3 -2
  41. package/lib/components/sharing/ShareAccessComponent.js +180 -133
  42. package/lib/components/sharing/SharingEditor.js +4 -0
  43. package/lib/components/snippets/index.d.ts +1 -1
  44. package/lib/components/snippets/index.js +1 -1
  45. package/lib/components/students/StudentResultCircle.d.ts +21 -0
  46. package/lib/components/students/StudentResultCircle.js +59 -0
  47. package/lib/components/students/index.d.ts +1 -1
  48. package/lib/components/students/index.js +1 -1
  49. package/lib/components/time/LiveRelativeTime.d.ts +14 -0
  50. package/lib/components/time/LiveRelativeTime.js +43 -0
  51. package/lib/components/time/index.d.ts +1 -0
  52. package/lib/components/time/index.js +9 -0
  53. package/lib/components/timeline/Timeline.d.ts +20 -0
  54. package/lib/components/timeline/Timeline.js +90 -0
  55. package/lib/components/timeline/index.d.ts +1 -0
  56. package/lib/components/timeline/index.js +9 -0
  57. package/lib/components/tokens/index.d.ts +1 -1
  58. package/lib/components/tokens/index.js +1 -1
  59. package/lib/components/toolbars/index.d.ts +1 -3
  60. package/lib/components/toolbars/index.js +1 -3
  61. package/lib/hooks/cacheConverters.d.ts +21 -0
  62. package/lib/hooks/cacheConverters.js +110 -0
  63. package/lib/hooks/index.d.ts +0 -2
  64. package/lib/hooks/index.js +0 -2
  65. package/lib/hooks/useCache.d.ts +65 -36
  66. package/lib/hooks/useCache.js +424 -65
  67. package/lib/hooks/useDatalayer.js +3 -1
  68. package/lib/hooks/useIAM.js +1 -3
  69. package/lib/hooks/useLocationHandles.d.ts +3 -1
  70. package/lib/hooks/useLocationHandles.js +2 -1
  71. package/lib/hooks/usePrincipalStore.d.ts +2 -2
  72. package/lib/hooks/usePrincipalStore.js +97 -14
  73. package/lib/hooks/useProjectStore.d.ts +1 -1
  74. package/lib/hooks/useSelectedPrincipal.js +1 -1
  75. package/lib/hooks/useUser.js +19 -2
  76. package/lib/index.d.ts +1 -6
  77. package/lib/index.js +1 -13
  78. package/lib/main.js +3 -3
  79. package/lib/mocks/index.js +1 -1
  80. package/lib/mocks/models/index.d.ts +0 -1
  81. package/lib/mocks/models/index.js +0 -1
  82. package/lib/models/Datasource.d.ts +2 -2
  83. package/lib/models/IAM.d.ts +1 -1
  84. package/lib/models/IAMToken.d.ts +1 -1
  85. package/lib/models/School.d.ts +12 -3
  86. package/lib/models/Secret.d.ts +2 -2
  87. package/lib/models/Student.d.ts +13 -3
  88. package/lib/models/Usage.d.ts +11 -1
  89. package/lib/models/UserDTO.d.ts +2 -2
  90. package/lib/models/index.d.ts +0 -30
  91. package/lib/models/index.js +0 -30
  92. package/lib/routes/index.d.ts +1 -0
  93. package/lib/routes/index.js +1 -0
  94. package/lib/routes/publicPaths.d.ts +23 -0
  95. package/lib/routes/publicPaths.js +74 -0
  96. package/lib/state/State.d.ts +0 -12
  97. package/lib/state/State.js +0 -12
  98. package/lib/state/substates/CoreState.js +1 -1
  99. package/lib/state/substates/LayoutState.d.ts +12 -1
  100. package/lib/state/substates/index.d.ts +0 -7
  101. package/lib/state/substates/index.js +0 -7
  102. package/lib/utils/Date.d.ts +7 -0
  103. package/lib/utils/Date.js +43 -10
  104. package/lib/utils/Handles.js +3 -1
  105. package/lib/utils/index.d.ts +1 -1
  106. package/lib/utils/index.js +1 -1
  107. package/lib/views/api-keys/APIKeyEdit.d.ts +8 -0
  108. package/lib/views/{iam-tokens/IAMTokenEdit.js → api-keys/APIKeyEdit.js} +31 -31
  109. package/lib/views/api-keys/APIKeyNew.d.ts +8 -0
  110. package/lib/views/api-keys/APIKeyNew.js +143 -0
  111. package/lib/views/api-keys/APIKeys.d.ts +12 -0
  112. package/lib/views/api-keys/APIKeys.js +128 -0
  113. package/lib/views/api-keys/APIKeysStandalone.d.ts +2 -0
  114. package/lib/views/api-keys/APIKeysStandalone.js +117 -0
  115. package/lib/views/api-keys/index.d.ts +3 -0
  116. package/lib/{mocks/jupyter → views/api-keys}/index.js +3 -1
  117. package/lib/views/datasources/DatasourceDetail.d.ts +1 -1
  118. package/lib/views/datasources/DatasourceNew.d.ts +1 -1
  119. package/lib/views/datasources/Datasources.d.ts +1 -1
  120. package/lib/views/datasources/Datasources.js +12 -3
  121. package/lib/views/iam/SignInSimple.d.ts +37 -1
  122. package/lib/views/iam/SignInSimple.js +110 -12
  123. package/package.json +5 -3
  124. package/lib/App.css +0 -47
  125. package/lib/App.d.ts +0 -3
  126. package/lib/App.js +0 -21
  127. package/lib/api/runtimes/checkpoints.d.ts +0 -122
  128. package/lib/api/runtimes/checkpoints.js +0 -118
  129. package/lib/api/runtimes/environments.d.ts +0 -9
  130. package/lib/api/runtimes/environments.js +0 -29
  131. package/lib/api/runtimes/healthz.d.ts +0 -15
  132. package/lib/api/runtimes/healthz.js +0 -44
  133. package/lib/api/runtimes/index.d.ts +0 -12
  134. package/lib/api/runtimes/index.js +0 -16
  135. package/lib/api/runtimes/runtimes.d.ts +0 -138
  136. package/lib/api/runtimes/runtimes.js +0 -230
  137. package/lib/api/runtimes/snapshots.d.ts +0 -38
  138. package/lib/api/runtimes/snapshots.js +0 -82
  139. package/lib/api/spacer/documents.d.ts +0 -12
  140. package/lib/api/spacer/documents.js +0 -43
  141. package/lib/api/spacer/healthz.d.ts +0 -15
  142. package/lib/api/spacer/healthz.js +0 -44
  143. package/lib/api/spacer/index.d.ts +0 -15
  144. package/lib/api/spacer/index.js +0 -19
  145. package/lib/api/spacer/items.d.ts +0 -25
  146. package/lib/api/spacer/items.js +0 -55
  147. package/lib/api/spacer/lexicals.d.ts +0 -34
  148. package/lib/api/spacer/lexicals.js +0 -89
  149. package/lib/api/spacer/notebooks.d.ts +0 -34
  150. package/lib/api/spacer/notebooks.js +0 -89
  151. package/lib/api/spacer/spaces.d.ts +0 -84
  152. package/lib/api/spacer/spaces.js +0 -170
  153. package/lib/api/spacer/users.d.ts +0 -9
  154. package/lib/api/spacer/users.js +0 -29
  155. package/lib/client/mixins/RuntimesMixin.d.ts +0 -93
  156. package/lib/client/mixins/RuntimesMixin.js +0 -229
  157. package/lib/client/mixins/SpacerMixin.d.ts +0 -210
  158. package/lib/client/mixins/SpacerMixin.js +0 -615
  159. package/lib/client/utils/spacerUtils.d.ts +0 -18
  160. package/lib/client/utils/spacerUtils.js +0 -32
  161. package/lib/collaboration/DatalayerCollaboration.d.ts +0 -13
  162. package/lib/collaboration/DatalayerCollaboration.js +0 -28
  163. package/lib/collaboration/DatalayerCollaborationProvider.d.ts +0 -60
  164. package/lib/collaboration/DatalayerCollaborationProvider.js +0 -163
  165. package/lib/collaboration/index.d.ts +0 -2
  166. package/lib/collaboration/index.js +0 -6
  167. package/lib/components/context/SpaceSelect.d.ts +0 -2
  168. package/lib/components/context/SpaceSelect.js +0 -42
  169. package/lib/components/flashes/FlashDisclaimer.d.ts +0 -2
  170. package/lib/components/flashes/FlashDisclaimer.js +0 -17
  171. package/lib/components/icons/ArtifactIcon.d.ts +0 -10
  172. package/lib/components/icons/ArtifactIcon.js +0 -58
  173. package/lib/components/icons/index.d.ts +0 -1
  174. package/lib/components/icons/index.js +0 -5
  175. package/lib/components/nbgrader/NbGradesDetails.d.ts +0 -5
  176. package/lib/components/nbgrader/NbGradesDetails.js +0 -14
  177. package/lib/components/nbgrader/index.d.ts +0 -1
  178. package/lib/components/nbgrader/index.js +0 -5
  179. package/lib/components/progress/CreditsIndicator.d.ts +0 -33
  180. package/lib/components/progress/CreditsIndicator.js +0 -23
  181. package/lib/components/runtimes/RuntimeCellVariables.d.ts +0 -39
  182. package/lib/components/runtimes/RuntimeCellVariables.js +0 -172
  183. package/lib/components/runtimes/RuntimeCellVariablesDialog.d.ts +0 -37
  184. package/lib/components/runtimes/RuntimeCellVariablesDialog.js +0 -101
  185. package/lib/components/runtimes/RuntimeLauncherDialog.d.ts +0 -57
  186. package/lib/components/runtimes/RuntimeLauncherDialog.js +0 -275
  187. package/lib/components/runtimes/RuntimePickerBase.d.ts +0 -69
  188. package/lib/components/runtimes/RuntimePickerBase.js +0 -122
  189. package/lib/components/runtimes/RuntimePickerCell.d.ts +0 -34
  190. package/lib/components/runtimes/RuntimePickerCell.js +0 -104
  191. package/lib/components/runtimes/RuntimePickerNotebook.d.ts +0 -42
  192. package/lib/components/runtimes/RuntimePickerNotebook.js +0 -232
  193. package/lib/components/runtimes/RuntimeReservationControl.d.ts +0 -47
  194. package/lib/components/runtimes/RuntimeReservationControl.js +0 -42
  195. package/lib/components/runtimes/RuntimeSimplePicker.d.ts +0 -38
  196. package/lib/components/runtimes/RuntimeSimplePicker.js +0 -155
  197. package/lib/components/runtimes/RuntimeTransfer.d.ts +0 -16
  198. package/lib/components/runtimes/RuntimeTransfer.js +0 -5
  199. package/lib/components/runtimes/RuntimeUtils.d.ts +0 -17
  200. package/lib/components/runtimes/RuntimeUtils.js +0 -178
  201. package/lib/components/runtimes/RuntimeVariables.d.ts +0 -38
  202. package/lib/components/runtimes/RuntimeVariables.js +0 -75
  203. package/lib/components/runtimes/index.d.ts +0 -11
  204. package/lib/components/runtimes/index.js +0 -15
  205. package/lib/components/snapshots/SandboxSnapshotMenu.d.ts +0 -33
  206. package/lib/components/snapshots/SandboxSnapshotMenu.js +0 -169
  207. package/lib/components/snapshots/index.d.ts +0 -1
  208. package/lib/components/snapshots/index.js +0 -5
  209. package/lib/components/snippets/SnippetDialog.d.ts +0 -42
  210. package/lib/components/snippets/SnippetDialog.js +0 -42
  211. package/lib/components/students/StudentItemStatus.d.ts +0 -7
  212. package/lib/components/students/StudentItemStatus.js +0 -66
  213. package/lib/components/tokens/SpaceVariantToken.d.ts +0 -5
  214. package/lib/components/tokens/SpaceVariantToken.js +0 -23
  215. package/lib/components/toolbars/AssignmentEditorToolbar.d.ts +0 -4
  216. package/lib/components/toolbars/AssignmentEditorToolbar.js +0 -18
  217. package/lib/components/toolbars/DocumentEditorToolbar.d.ts +0 -2
  218. package/lib/components/toolbars/DocumentEditorToolbar.js +0 -12
  219. package/lib/components/toolbars/NotebookEditorToolbar.d.ts +0 -29
  220. package/lib/components/toolbars/NotebookEditorToolbar.js +0 -30
  221. package/lib/examples/CellExample.d.ts +0 -6
  222. package/lib/examples/CellExample.js +0 -20
  223. package/lib/examples/NotebookExample.d.ts +0 -6
  224. package/lib/examples/NotebookExample.js +0 -19
  225. package/lib/examples/lexical-theme.css +0 -436
  226. package/lib/examples/notebooks/IPyWidgetsExample.ipynb.json +0 -101
  227. package/lib/examples/notebooks/IPyWidgetsExampleWithState.ipynb.json +0 -112
  228. package/lib/examples/notebooks/Lite.ipynb.json +0 -128
  229. package/lib/examples/notebooks/Matplotlib.ipynb.json +0 -137
  230. package/lib/examples/notebooks/NotebookExample1.ipynb.json +0 -126
  231. package/lib/examples/notebooks/NotebookExample2.ipynb.json +0 -48
  232. package/lib/examples/notebooks/NotebookOutputs.ipynb.json +0 -49
  233. package/lib/examples/notebooks/NotebookToCExample.ipynb.json +0 -102
  234. package/lib/examples/notebooks/PyGWalker.ipynb.json +0 -55
  235. package/lib/hooks/useCellOutputshot.d.ts +0 -4
  236. package/lib/hooks/useCellOutputshot.js +0 -25
  237. package/lib/hooks/useProjects.d.ts +0 -628
  238. package/lib/hooks/useProjects.js +0 -190
  239. package/lib/hooks/useRuntimes.d.ts +0 -5
  240. package/lib/hooks/useRuntimes.js +0 -34
  241. package/lib/mocks/models/CourseMock.d.ts +0 -6
  242. package/lib/mocks/models/CourseMock.js +0 -29
  243. package/lib/mocks/models/SpaceMock.d.ts +0 -6
  244. package/lib/mocks/models/SpaceMock.js +0 -25
  245. package/lib/models/Assignment.d.ts +0 -7
  246. package/lib/models/Assignment.js +0 -5
  247. package/lib/models/Cell.d.ts +0 -8
  248. package/lib/models/Cell.js +0 -5
  249. package/lib/models/CodeBlock.d.ts +0 -10
  250. package/lib/models/CodeBlock.js +0 -5
  251. package/lib/models/CodeSandboxSnapshot.d.ts +0 -92
  252. package/lib/models/CodeSandboxSnapshot.js +0 -13
  253. package/lib/models/CodeSandboxSnapshotDTO.d.ts +0 -173
  254. package/lib/models/CodeSandboxSnapshotDTO.js +0 -139
  255. package/lib/models/CodefeedBlocks.d.ts +0 -7
  256. package/lib/models/CodefeedBlocks.js +0 -5
  257. package/lib/models/Content.d.ts +0 -5
  258. package/lib/models/Content.js +0 -5
  259. package/lib/models/Course.d.ts +0 -17
  260. package/lib/models/Course.js +0 -5
  261. package/lib/models/Dataset.d.ts +0 -16
  262. package/lib/models/Dataset.js +0 -5
  263. package/lib/models/Document.d.ts +0 -8
  264. package/lib/models/Document.js +0 -5
  265. package/lib/models/Environment.d.ts +0 -86
  266. package/lib/models/Environment.js +0 -5
  267. package/lib/models/EnvironmentDTO.d.ts +0 -125
  268. package/lib/models/EnvironmentDTO.js +0 -88
  269. package/lib/models/Exercise.d.ts +0 -16
  270. package/lib/models/Exercise.js +0 -5
  271. package/lib/models/Item.d.ts +0 -20
  272. package/lib/models/Item.js +0 -5
  273. package/lib/models/ItemDTO.d.ts +0 -74
  274. package/lib/models/ItemDTO.js +0 -186
  275. package/lib/models/ItemType.d.ts +0 -2
  276. package/lib/models/ItemType.js +0 -5
  277. package/lib/models/Lesson.d.ts +0 -5
  278. package/lib/models/Lesson.js +0 -5
  279. package/lib/models/LexicalDTO.d.ts +0 -155
  280. package/lib/models/LexicalDTO.js +0 -157
  281. package/lib/models/Library.d.ts +0 -10
  282. package/lib/models/Library.js +0 -5
  283. package/lib/models/Notebook.d.ts +0 -11
  284. package/lib/models/Notebook.js +0 -5
  285. package/lib/models/NotebookDTO.d.ts +0 -96
  286. package/lib/models/NotebookDTO.js +0 -153
  287. package/lib/models/Page.d.ts +0 -41
  288. package/lib/models/Page.js +0 -25
  289. package/lib/models/PageTag.d.ts +0 -19
  290. package/lib/models/PageTag.js +0 -94
  291. package/lib/models/ProjectDTO.d.ts +0 -89
  292. package/lib/models/ProjectDTO.js +0 -131
  293. package/lib/models/Runtime.d.ts +0 -123
  294. package/lib/models/Runtime.js +0 -18
  295. package/lib/models/RuntimeDTO.d.ts +0 -191
  296. package/lib/models/RuntimeDTO.js +0 -204
  297. package/lib/models/Space.d.ts +0 -35
  298. package/lib/models/Space.js +0 -66
  299. package/lib/models/SpaceDTO.d.ts +0 -334
  300. package/lib/models/SpaceDTO.js +0 -244
  301. package/lib/models/SpaceItem.d.ts +0 -10
  302. package/lib/models/SpaceItem.js +0 -5
  303. package/lib/models/SpaceMember.d.ts +0 -6
  304. package/lib/models/SpaceMember.js +0 -5
  305. package/lib/models/StudentItem.d.ts +0 -21
  306. package/lib/models/StudentItem.js +0 -5
  307. package/lib/services/DatalayerServiceManager.d.ts +0 -22
  308. package/lib/services/DatalayerServiceManager.js +0 -69
  309. package/lib/services/index.d.ts +0 -4
  310. package/lib/services/index.js +0 -7
  311. package/lib/services/reconnectToRuntime.d.ts +0 -32
  312. package/lib/services/reconnectToRuntime.js +0 -59
  313. package/lib/state/substates/CellState.d.ts +0 -12
  314. package/lib/state/substates/CellState.js +0 -22
  315. package/lib/state/substates/DocumentState.d.ts +0 -10
  316. package/lib/state/substates/DocumentState.js +0 -14
  317. package/lib/state/substates/GradeState.d.ts +0 -10
  318. package/lib/state/substates/GradeState.js +0 -14
  319. package/lib/state/substates/JupyterLabState.d.ts +0 -16
  320. package/lib/state/substates/JupyterLabState.js +0 -17
  321. package/lib/state/substates/NbformatState.d.ts +0 -13
  322. package/lib/state/substates/NbformatState.js +0 -16
  323. package/lib/state/substates/RuntimesState.d.ts +0 -79
  324. package/lib/state/substates/RuntimesState.js +0 -180
  325. package/lib/state/substates/SpaceState.d.ts +0 -11
  326. package/lib/state/substates/SpaceState.js +0 -16
  327. package/lib/stateful/index.d.ts +0 -2
  328. package/lib/stateful/index.js +0 -6
  329. package/lib/stateful/jupyter/exec/Python.d.ts +0 -5
  330. package/lib/stateful/jupyter/exec/Python.js +0 -100
  331. package/lib/stateful/jupyter/exec/Snippets.d.ts +0 -105
  332. package/lib/stateful/jupyter/exec/Snippets.js +0 -101
  333. package/lib/stateful/jupyter/exec/index.d.ts +0 -2
  334. package/lib/stateful/jupyter/exec/index.js +0 -6
  335. package/lib/stateful/jupyter/index.d.ts +0 -2
  336. package/lib/stateful/jupyter/index.js +0 -6
  337. package/lib/stateful/jupyter/kernelsHandler.d.ts +0 -8
  338. package/lib/stateful/jupyter/kernelsHandler.js +0 -39
  339. package/lib/stateful/runtimes/actions.d.ts +0 -102
  340. package/lib/stateful/runtimes/actions.js +0 -249
  341. package/lib/stateful/runtimes/apis.d.ts +0 -273
  342. package/lib/stateful/runtimes/apis.js +0 -5
  343. package/lib/stateful/runtimes/index.d.ts +0 -5
  344. package/lib/stateful/runtimes/index.js +0 -9
  345. package/lib/stateful/runtimes/settings.d.ts +0 -15
  346. package/lib/stateful/runtimes/settings.js +0 -31
  347. package/lib/stateful/runtimes/snapshots.d.ts +0 -25
  348. package/lib/stateful/runtimes/snapshots.js +0 -150
  349. package/lib/stateful/runtimes/utils.d.ts +0 -7
  350. package/lib/stateful/runtimes/utils.js +0 -14
  351. package/lib/utils/Cells.d.ts +0 -2
  352. package/lib/utils/Cells.js +0 -28
  353. package/lib/views/iam-tokens/IAMTokenEdit.d.ts +0 -6
  354. package/lib/views/iam-tokens/IAMTokenNew.d.ts +0 -8
  355. package/lib/views/iam-tokens/IAMTokenNew.js +0 -118
  356. package/lib/views/iam-tokens/IAMTokens.d.ts +0 -12
  357. package/lib/views/iam-tokens/IAMTokens.js +0 -87
  358. package/lib/views/iam-tokens/Tokens.d.ts +0 -2
  359. package/lib/views/iam-tokens/Tokens.js +0 -85
  360. package/lib/views/iam-tokens/index.d.ts +0 -3
  361. package/lib/views/iam-tokens/index.js +0 -7
  362. /package/lib/{mocks/jupyter/index.d.ts → cli-login.d.ts} +0 -0
  363. /package/lib/utils/{logger.d.ts → Logger.d.ts} +0 -0
  364. /package/lib/utils/{logger.js → Logger.js} +0 -0
package/README.md CHANGED
@@ -93,12 +93,16 @@ if client.authenticate():
93
93
 
94
94
  ### 2. Execute Code in a Runtime
95
95
 
96
- Use context managers to create runtimes and ensure proper resource cleanup:
96
+ > **Note:** Runtime creation and code execution have moved to the
97
+ > [`agent-runtimes`](https://github.com/datalayer/agent-runtimes) package. Use its
98
+ > `RuntimeClient` (and the `@datalayer` decorator) for runtime workloads. The
99
+ > `datalayer-core` `DatalayerClient` now focuses on account/platform operations
100
+ > (authentication, secrets, API keys, usage, profile).
97
101
 
98
102
  ```python
99
- from datalayer_core import DatalayerClient
103
+ from agent_runtimes.client import RuntimeClient
100
104
 
101
- client = DatalayerClient()
105
+ client = RuntimeClient()
102
106
 
103
107
  # Execute code in a managed runtime
104
108
  with client.create_runtime() as runtime:
@@ -118,7 +122,7 @@ datalayer runtime list
118
122
  datalayer runtime create ai-env --given-name my-runtime-123
119
123
 
120
124
  # Execute a script in a runtime
121
- datalayer runtime exec my-script.py --runtime <runtime-id>
125
+ datalayer runtime exec my-script.py --agent <agent-id>
122
126
 
123
127
  # Create a snapshot from a runtime but do not terminate the runtime
124
128
  datalayer snapshots create <pod-name> my-snapshot 'AI work!' False
@@ -151,17 +155,38 @@ datalayer usage team-allocate-member --team-uid <team_uid> --member-uid <member_
151
155
  datalayer usage team-revoke-member --team-uid <team_uid> --member-uid <member_uid> --amount 5
152
156
  ```
153
157
 
158
+ ### 5. Evals CLI (Multi-Agentspec)
159
+
160
+ Use comma-separated agentspec ids to create one experiment per agentspec variant:
161
+
162
+ ```bash
163
+ # Creates one experiment per agentspec in the list
164
+ agent-runtimes evals experiments create my-exp \
165
+ --evalset-id <evalset_id> \
166
+ --agent-spec-ids example-evals,example-evals-nocodemode,example-custom
167
+ ```
168
+
169
+ Generate a comparison report:
170
+
171
+ ```bash
172
+ agent-runtimes evals report <evalset_id> --run-limit 50 --export
173
+ ```
174
+
175
+ How to interpret grouped comparisons in the report:
176
+
177
+ - `Within-Agentspec Pairwise Latest-Pass Deltas`: compares experiments using the same agentspec id.
178
+ - `Cross-Agentspec Pairwise Latest-Pass Deltas`: compares experiments using different agentspec ids.
179
+ - Pairwise sections compute all combinations for the selected experiments, not just two agentspecs.
180
+
154
181
  ## Examples
155
182
 
156
183
  ### Python Examples
157
184
 
158
185
  For comprehensive Python usage examples, see the [`examples/`](https://github.com/datalayer/core/tree/main/examples) directory which includes:
159
186
 
160
- - **FastAPI + scikit-learn**: Web application with ML models
161
- - **Streamlit + scikit-learn**: Interactive data science apps
162
- - **PyTorch GPU workloads**: High-performance computing examples
163
- - **Decorator patterns**: Remote function execution with `@datalayer`
164
- - **And more**: Complete examples with documentation and setup instructions
187
+ - **OpenTelemetry observability**: Traces and metrics instrumentation with a visualization UI
188
+
189
+ The framework and client examples (**FastAPI + scikit-learn**, **Streamlit + scikit-learn**, **PyTorch GPU workloads**, **`@datalayer` decorator patterns**, and **Next.js**) have moved to the [Agent Runtimes examples](https://github.com/datalayer/agent-runtimes/tree/main/examples).
165
190
 
166
191
  ### TypeScript/React Examples
167
192
 
@@ -189,21 +214,7 @@ Available at http://localhost:3000/:
189
214
 
190
215
  ### Next.js Application Example
191
216
 
192
- A complete Next.js application demonstrating platform integration:
193
-
194
- ```bash
195
- cd examples/nextjj
196
- npm install
197
- npm run dev
198
- ```
199
-
200
- Features:
201
-
202
- - Token authentication with Datalayer IAM
203
- - Browse and create notebooks from your workspace
204
- - Select compute environments for execution
205
- - Interactive notebook viewer with real-time outputs
206
- - Clean, responsive UI with GitHub Primer components
217
+ The Next.js application example has moved to the [Agent Runtimes examples](https://github.com/datalayer/agent-runtimes/tree/main/examples/nextjs).
207
218
 
208
219
  ## Platform Integration
209
220
 
@@ -6,6 +6,7 @@ export declare const API_BASE_PATHS: {
6
6
  readonly IAM: "/api/iam/v1";
7
7
  readonly OTEL: "/api/otel/v1";
8
8
  readonly RUNTIMES: "/api/runtimes/v1";
9
+ readonly SCHEDULER: "/api/scheduler/v1";
9
10
  readonly SPACER: "/api/spacer/v1";
10
11
  };
11
12
  /**
@@ -20,6 +21,8 @@ export declare const DEFAULT_SERVICE_URLS: {
20
21
  readonly OTEL: "https://prod1.datalayer.run";
21
22
  /** Default URL for Runtimes service */
22
23
  readonly RUNTIMES: "https://r1.datalayer.run";
24
+ /** Default URL for Scheduler (cron schedules and runs) service */
25
+ readonly SCHEDULER: "https://prod1.datalayer.run";
23
26
  /** Default URL for Spacer (workspaces and collaboration) service */
24
27
  readonly SPACER: "https://prod1.datalayer.run";
25
28
  };
@@ -10,6 +10,7 @@ export const API_BASE_PATHS = {
10
10
  IAM: '/api/iam/v1',
11
11
  OTEL: '/api/otel/v1',
12
12
  RUNTIMES: '/api/runtimes/v1',
13
+ SCHEDULER: '/api/scheduler/v1',
13
14
  SPACER: '/api/spacer/v1',
14
15
  };
15
16
  /**
@@ -24,6 +25,8 @@ export const DEFAULT_SERVICE_URLS = {
24
25
  OTEL: 'https://prod1.datalayer.run',
25
26
  /** Default URL for Runtimes service */
26
27
  RUNTIMES: 'https://r1.datalayer.run',
28
+ /** Default URL for Scheduler (cron schedules and runs) service */
29
+ SCHEDULER: 'https://prod1.datalayer.run',
27
30
  /** Default URL for Spacer (workspaces and collaboration) service */
28
31
  SPACER: 'https://prod1.datalayer.run',
29
32
  };
@@ -10,12 +10,4 @@ export { requestDatalayerAPI, RunResponseError, NetworkError, } from './Datalaye
10
10
  export type { IRequestDatalayerAPIOptions } from './DatalayerApi';
11
11
  export * as iam from './iam';
12
12
  export * as otel from './otel';
13
- export * as runtimes from './runtimes';
14
- export * as spacer from './spacer';
15
- /**
16
- * @deprecated Please import directly from '@datalayer/core/stateful' instead.
17
- * This module provides backward compatibility for the moved apiv1 modules.
18
- */
19
- export * from '../stateful/jupyter';
20
- export * from '../stateful/runtimes';
21
13
  export * from '../api/DatalayerApi';
package/lib/api/index.js CHANGED
@@ -15,12 +15,4 @@ export { requestDatalayerAPI, RunResponseError, NetworkError, } from './Datalaye
15
15
  // Domain-organized API exports
16
16
  export * as iam from './iam/index.js';
17
17
  export * as otel from './otel/index.js';
18
- export * as runtimes from './runtimes/index.js';
19
- export * as spacer from './spacer/index.js';
20
- /**
21
- * @deprecated Please import directly from '@datalayer/core/stateful' instead.
22
- * This module provides backward compatibility for the moved apiv1 modules.
23
- */
24
- export * from '../stateful/jupyter/index.js';
25
- export * from '../stateful/runtimes/index.js';
26
18
  export * from '../api/DatalayerApi.js';
@@ -0,0 +1,167 @@
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
+ import { useCallback, useEffect, useState } from 'react';
7
+ import { createRoot } from 'react-dom/client';
8
+ import { Box, Button, Spinner, Text } from '@primer/react';
9
+ import { ShieldLockIcon } from '@primer/octicons-react';
10
+ import { DatalayerThemeProvider, themeConfigs, createThemeStore, } from '@datalayer/primer-addons';
11
+ import { SvgLinesLogo, SvgUsecasesHero } from '@datalayer/design';
12
+ import { AppearanceControlsWithStore } from '@datalayer/primer-addons/lib/components/appearance';
13
+ import { ConfettiSuccess } from './components/confetti/index.js';
14
+ import { formatFriendlyHandle } from './utils/Handles.js';
15
+ import { SignInSimple } from './views/iam/SignInSimple.js';
16
+ const DATALAYER_IAM_USER_KEY = '@datalayer/iam:user';
17
+ const DATALAYER_IAM_TOKEN_KEY = '@datalayer/iam:token';
18
+ const useCliThemeStore = createThemeStore('datalayer-core-cli-theme-v2', {
19
+ colorMode: 'dark',
20
+ theme: 'matrix',
21
+ });
22
+ const readStoredAuth = () => {
23
+ const token = window.localStorage.getItem(DATALAYER_IAM_TOKEN_KEY) || '';
24
+ const rawUser = window.localStorage.getItem(DATALAYER_IAM_USER_KEY) || '';
25
+ if (!token || !rawUser) {
26
+ return null;
27
+ }
28
+ try {
29
+ const user = JSON.parse(rawUser);
30
+ const userHandle = String(user?.handle || user?.handle_s || '').trim();
31
+ if (!userHandle) {
32
+ return null;
33
+ }
34
+ return { token, userHandle };
35
+ }
36
+ catch {
37
+ return null;
38
+ }
39
+ };
40
+ function SignInCLIApp() {
41
+ const [state, setState] = useState('checking');
42
+ const [message, setMessage] = useState('');
43
+ const [closeHelp, setCloseHelp] = useState('');
44
+ const { colorMode, theme: themeVariant } = useCliThemeStore();
45
+ const cfg = themeConfigs[themeVariant];
46
+ const handleCloseWindow = useCallback(() => {
47
+ setCloseHelp('');
48
+ // Browsers allow window.close() only for windows/tabs opened by script.
49
+ window.close();
50
+ setTimeout(() => {
51
+ if (!document.hidden) {
52
+ try {
53
+ // Some browsers require a same-tab self-target before closing.
54
+ window.open('', '_self');
55
+ window.close();
56
+ }
57
+ catch {
58
+ // Ignore and show manual-close help below.
59
+ }
60
+ }
61
+ if (!document.hidden) {
62
+ setCloseHelp('Authentication is complete. Your browser blocked auto-close for this tab, so you can safely close it manually.');
63
+ }
64
+ }, 150);
65
+ }, []);
66
+ const finalizeCliAuthentication = useCallback(async () => {
67
+ const auth = readStoredAuth();
68
+ if (!auth) {
69
+ setState('signin');
70
+ return;
71
+ }
72
+ const response = await fetch('/', {
73
+ method: 'POST',
74
+ headers: { 'Content-Type': 'application/json' },
75
+ body: JSON.stringify({
76
+ user_handle: auth.userHandle,
77
+ token: auth.token,
78
+ }),
79
+ });
80
+ if (!response.ok) {
81
+ const text = await response.text();
82
+ throw new Error(text || 'Failed to finalize CLI authentication.');
83
+ }
84
+ setMessage(`Successfully logged in as ${formatFriendlyHandle(auth.userHandle)}.`);
85
+ setState('success');
86
+ }, []);
87
+ useEffect(() => {
88
+ finalizeCliAuthentication().catch((error) => {
89
+ setMessage(error instanceof Error ? error.message : 'Authentication failed.');
90
+ setState('signin');
91
+ });
92
+ }, [finalizeCliAuthentication]);
93
+ const renderLayout = (content) => (_jsx(DatalayerThemeProvider, { colorMode: colorMode, theme: cfg.primerTheme, themeStyles: cfg.themeStyles, children: _jsxs(Box, { sx: {
94
+ minHeight: '100vh',
95
+ bg: 'canvas.default',
96
+ color: 'fg.default',
97
+ position: 'relative',
98
+ }, children: [_jsx(Box, { sx: {
99
+ position: 'fixed',
100
+ top: 0,
101
+ right: 0,
102
+ zIndex: 20,
103
+ p: 3,
104
+ display: 'flex',
105
+ justifyContent: 'flex-end',
106
+ }, children: _jsx(AppearanceControlsWithStore, { useStore: useCliThemeStore }) }), content] }) }));
107
+ if (state === 'checking') {
108
+ return renderLayout(_jsx(Box, { sx: {
109
+ display: 'flex',
110
+ alignItems: 'center',
111
+ justifyContent: 'center',
112
+ minHeight: '100vh',
113
+ }, children: _jsx(Spinner, {}) }));
114
+ }
115
+ if (state === 'success') {
116
+ return renderLayout(_jsxs(Box, { sx: {
117
+ minHeight: '100vh',
118
+ display: 'flex',
119
+ alignItems: 'center',
120
+ justifyContent: 'center',
121
+ px: 3,
122
+ position: 'relative',
123
+ overflow: 'hidden',
124
+ }, children: [_jsx(Box, { sx: {
125
+ position: 'absolute',
126
+ inset: 0,
127
+ opacity: 0.45,
128
+ pointerEvents: 'none',
129
+ }, children: _jsx(SvgUsecasesHero, {}) }), _jsx(Box, { sx: {
130
+ position: 'absolute',
131
+ inset: 0,
132
+ pointerEvents: 'none',
133
+ zIndex: 2,
134
+ }, children: _jsx(ConfettiSuccess, {}) }), _jsxs(Box, { sx: {
135
+ position: 'relative',
136
+ zIndex: 3,
137
+ textAlign: 'center',
138
+ maxWidth: 560,
139
+ p: 4,
140
+ borderRadius: 2,
141
+ border: '1px solid',
142
+ borderColor: 'border.default',
143
+ bg: 'canvas.default',
144
+ }, children: [_jsx(Box, { sx: { display: 'flex', justifyContent: 'center', mb: 3 }, children: _jsx(Box, { sx: { width: 210 }, children: _jsx(SvgLinesLogo, { height: 32 }) }) }), _jsx(Text, { as: "h2", sx: { display: 'block', fontSize: 3, fontWeight: 600, mb: 2 }, children: message || 'Successfully logged in.' }), _jsx(Text, { as: "p", sx: { color: 'fg.muted', mb: 3 }, children: "You can close this window." }), closeHelp && (_jsx(Text, { as: "p", sx: { color: 'fg.accent', mb: 3 }, children: closeHelp })), _jsx(Box, { sx: { display: 'flex', justifyContent: 'center' }, children: _jsx(Button, { onClick: handleCloseWindow, children: "Close this window" }) })] })] }));
145
+ }
146
+ return renderLayout(_jsx(SignInSimple, { name: "Datalayer CLI", description: "Sign in to continue in your CLI session.", icon: _jsx(ShieldLockIcon, { size: 24 }), github: true, google: true, linkedin: true, signUp: true, apiKey: false, socialSignInNavigationTarget: null, onSignIn: async (token, handle) => {
147
+ window.localStorage.setItem(DATALAYER_IAM_TOKEN_KEY, token);
148
+ window.localStorage.setItem(DATALAYER_IAM_USER_KEY, JSON.stringify({
149
+ handle,
150
+ displayName: handle,
151
+ uid: '',
152
+ firstName: '',
153
+ lastName: '',
154
+ email: '',
155
+ }));
156
+ try {
157
+ await finalizeCliAuthentication();
158
+ }
159
+ catch (error) {
160
+ setMessage(error instanceof Error ? error.message : 'Authentication failed.');
161
+ }
162
+ } }));
163
+ }
164
+ const rootElement = document.getElementById('root');
165
+ if (rootElement) {
166
+ createRoot(rootElement).render(_jsx(SignInCLIApp, {}));
167
+ }
@@ -1,4 +1,3 @@
1
- import { EnvironmentDTO } from '../models/EnvironmentDTO';
2
1
  import { AuthenticationManager } from './auth';
3
2
  import type { TokenStorage } from './auth/types';
4
3
  /** Handlers for Client method lifecycle events. */
@@ -35,8 +34,6 @@ export declare class DatalayerClientBase {
35
34
  readonly spacerRunUrl: string;
36
35
  /** Authentication token */
37
36
  token?: string;
38
- /** Environments */
39
- readonly environments: EnvironmentDTO[];
40
37
  /** Method lifecycle handlers */
41
38
  readonly handlers?: ClientHandlers;
42
39
  /** Authentication manager */
@@ -18,8 +18,6 @@ export class DatalayerClientBase {
18
18
  spacerRunUrl;
19
19
  /** Authentication token */
20
20
  token;
21
- /** Environments */
22
- environments = [];
23
21
  /** Method lifecycle handlers */
24
22
  handlers;
25
23
  /** Authentication manager */
@@ -17,41 +17,31 @@
17
17
  import { DatalayerClientBase, type DatalayerClientConfig, type ClientHandlers } from './base';
18
18
  import type { UserDTO } from './../models/UserDTO';
19
19
  import type { CreditsDTO } from '../models/CreditsDTO';
20
- import type { EnvironmentDTO } from '../models/EnvironmentDTO';
21
- import type { RuntimeDTO } from '../models/RuntimeDTO';
22
- import type { CodeSandboxSnapshotDTO } from '../models/CodeSandboxSnapshotDTO';
23
- import type { SpaceDTO } from '../models/SpaceDTO';
24
- import type { NotebookDTO } from '../models/NotebookDTO';
25
- import type { LexicalDTO } from '../models/LexicalDTO';
26
20
  import type { HealthCheck } from '../models/HealthCheck';
27
21
  import type { SecretDTO } from '../models/Secret';
28
22
  import type { CreateSecretRequest, UpdateSecretRequest } from '../models/Secret';
29
- import type { ProjectDTO } from '../models/ProjectDTO';
30
- import type { ProjectDefaultItems } from '../models/ProjectDTO';
31
- import type { UpdateSpaceRequest } from '../models/SpaceDTO';
32
23
  import type { DatasourceDTO } from '../models/Datasource';
33
24
  import type { CreateDatasourceRequest, UpdateDatasourceRequest } from '../models/Datasource';
34
- declare const DatalayerClientWithMixins: typeof DatalayerClientBase;
25
+ declare const DatalayerCoreClientWithMixins: typeof DatalayerClientBase;
35
26
  /**
36
- * Main Datalayer Client providing unified access to all platform services.
37
- * Uses TypeScript mixins to provide a flat, discoverable API.
27
+ * Core Datalayer Client providing access to identity, plans and account
28
+ * services (IAM). Runtime and workspace/content features are provided by
29
+ * `AgentRuntimesClient` in `@datalayer/agent-runtimes`, which extends this
30
+ * class.
38
31
  *
39
32
  * @example
40
33
  * ```typescript
41
- * const client = new DatalayerClient({
34
+ * const client = new DatalayerCoreClient({
42
35
  * token: 'your-token'
43
36
  * });
44
37
  *
45
38
  * const user = await client.whoami();
46
- * const runtime = await client.createRuntime({
47
- * environment_name: 'ai-agents-env',
48
- * credits_limit: 100
49
- * });
39
+ * const credits = await client.getCredits();
50
40
  * ```
51
41
  */
52
- export declare class DatalayerClient extends DatalayerClientWithMixins {
42
+ export declare class DatalayerCoreClient extends DatalayerCoreClientWithMixins {
53
43
  /**
54
- * Create a DatalayerClient instance.
44
+ * Create a DatalayerCoreClient instance.
55
45
  *
56
46
  * @param config - Client configuration options
57
47
  */
@@ -61,23 +51,8 @@ export type { DatalayerClientConfig, ClientHandlers };
61
51
  export { DatalayerClientBase };
62
52
  export { UserDTO as User } from './../models/UserDTO';
63
53
  export type { UserJSON, UserData } from './../models/UserDTO';
64
- export { RuntimeDTO as Runtime } from '../models/RuntimeDTO';
65
- export type { RuntimeJSON, RuntimeData, CreateRuntimeRequest, CreateRuntimeResponse, ListRuntimesResponse, } from '../models/RuntimeDTO';
66
- export { EnvironmentDTO as Environment } from '../models/EnvironmentDTO';
67
- export type { EnvironmentJSON, EnvironmentData, ListEnvironmentsResponse, } from '../models/EnvironmentDTO';
68
- export { CodeSandboxSnapshotDTO as Snapshot } from '../models/CodeSandboxSnapshotDTO';
69
- export type { CodeSandboxSnapshotJSON, CodeSandboxSnapshotData, CreateCodeSandboxSnapshotRequest, CreateCodeSandboxSnapshotResponse, GetCodeSandboxSnapshotResponse, ListCodeSandboxSnapshotsResponse, } from '../models/CodeSandboxSnapshotDTO';
70
- export { SpaceDTO as Space } from '../models/SpaceDTO';
71
- export type { SpaceJSON, SpaceData, SpaceItem, CreateSpaceRequest, CreateSpaceResponse, SpacesForUserResponse, CollaborationSessionResponse, DeleteSpaceItemResponse, GetSpaceItemResponse, GetSpaceItemsResponse, CreateNotebookRequest, CreateNotebookResponse, GetNotebookResponse, UpdateNotebookRequest, UpdateNotebookResponse, UpdateSpaceRequest, GetSpaceResponse, UpdateSpaceResponse, DeleteSpaceResponse, GetSpaceDefaultItemsResponse, GetSpacesByTypeResponse, } from '../models/SpaceDTO';
72
- export { ProjectDTO as Project } from '../models/ProjectDTO';
73
- export type { ProjectJSON, ProjectDefaultItems } from '../models/ProjectDTO';
74
- export { NotebookDTO as Notebook } from '../models/NotebookDTO';
75
- export type { NotebookJSON, NotebookData } from '../models/NotebookDTO';
76
- export { LexicalDTO } from '../models/LexicalDTO';
77
- export type { LexicalJSON, LexicalData, CreateLexicalRequest, CreateLexicalResponse, GetLexicalResponse, UpdateLexicalRequest, UpdateLexicalResponse, } from '../models/LexicalDTO';
78
54
  export { CreditsDTO as Credits } from '../models/CreditsDTO';
79
55
  export type { CreditsInfo, CreditReservation, CreditsResponse, } from '../models/CreditsDTO';
80
- export { ItemDTO as Item } from '../models/ItemDTO';
81
56
  export { HealthCheck } from '../models/HealthCheck';
82
57
  export type { HealthCheckJSON } from '../models/HealthCheck';
83
58
  export { SecretDTO as Secret } from './../models/Secret';
@@ -88,62 +63,40 @@ export type { LoginRequest, LoginResponse, UserMeResponse, MembershipsResponse,
88
63
  export type { HealthzPingResponse } from '../models/Common';
89
64
  export { AuthenticationManager } from './auth/AuthenticationManager';
90
65
  export type { IUser, IBaseUser } from '../models/User';
91
- export type { ICell } from '../models/Cell';
92
66
  export type { IDatasource, IDatasourceVariant } from '../models/Datasource';
93
67
  export type { ICredits, ICreditsReservation } from '../models/Credits';
94
- export type { ISpaceItem } from '../models/SpaceItem';
95
68
  export type { ISurvey } from '../models/Survey';
96
- export type { ISpace, IBaseSpace, IAnySpace, ISpaceVariant, } from '../models/Space';
97
69
  export type { IBaseTeam, IAnyTeam } from '../models/Team';
98
70
  export type { IOrganization, IAnyOrganization, IBaseOrganization, } from '../models/Organization';
99
- export type { IRuntimeModel, IRuntimePod, IRuntimeType, IRuntimeLocation, IRuntimeCapabilities, } from '../models/Runtime';
100
- export type { ICodeSandboxSnapshot } from '../models/CodeSandboxSnapshot';
101
- export type { IDatalayerEnvironment, IResources, ISnippet, } from '../models/Environment';
102
71
  export type { IRole } from '../models/Role';
103
- export type { IAssignment } from '../models/Assignment';
104
72
  export type { IContact } from '../models/Contact';
105
- export type { ICourse } from '../models/Course';
106
73
  export type { IOrganizationMember } from '../models/OrganizationMember';
107
- export type { IPage, PageTheme, PageVariant } from '../models/Page';
108
- export type { PageTagName } from '../models/PageTag';
109
74
  export type { ISecret, ISecretVariant } from '../models/Secret';
110
75
  export type { IIAMToken, IIAMTokenVariant } from '../models/IAMToken';
111
- export type { IDocument, IBaseDocument } from '../models/Document';
112
- export type { IEnvironment } from '../models/Environment';
113
- export type { IExercise, ICode, IHelp } from '../models/Exercise';
114
76
  export type { IInvite } from '../models/Invite';
115
- export type { ILesson } from '../models/Lesson';
116
- export type { INotebook, IBaseNotebook } from '../models/Notebook';
117
77
  export type { ISchool } from '../models/School';
118
78
  export type { ITeam } from '../models/Team';
119
79
  export type { TeamMember } from '../models/TeamMember';
120
80
  export type { IUserOnboarding, IClient, IOnboardingPosition, IOnboardingTours, ITour, ITourStatus, } from '../models/UserOnboarding';
121
81
  export type { IUserSettings } from '../models/UserSettings';
122
- export type { IDataset } from '../models/Dataset';
123
82
  export type { IUsage } from '../models/Usage';
124
- export type { IItem } from '../models/Item';
125
- export type { IItemType } from '../models/ItemType';
126
83
  export type { Member } from '../models/Member';
127
84
  export type { Profile } from '../models/Profile';
128
- export type { SpaceMember } from '../models/SpaceMember';
129
85
  export type { IContactEvent } from '../models/ContactEvent';
130
86
  export type { IContactIAMProvider } from '../models/ContactIAMProvider';
131
- export type { IStudentItem } from '../models/StudentItem';
132
87
  export type { Instructor } from '../models/Instructor';
133
88
  export type { IStudent } from '../models/Student';
134
89
  export type { IDean } from '../models/Dean';
135
90
  export type { IUserEvent } from '../models/UserEvent';
136
91
  export type { IIAMProviderLinked } from '../models/IAMProviderLinked';
137
- export type { IContent } from '../models/Content';
138
92
  export type { AuthResult, TokenValidationResult, AuthOptions, TokenStorage, } from './auth/types';
139
- export type { IRuntimeOptions, IMultiServiceManager, IRemoteServicesManager, IEnvironmentsManager, IRemoteRuntimesManager, } from '../stateful/runtimes/apis';
140
93
  export type { IDatalayerCoreConfig, IRuntimesConfiguration, } from '../config/Configuration';
141
94
  export type { IIAMProviderName } from '../models/IAMProvidersSpecs';
142
95
  export type { NavigationLinkProps } from '../navigation/components';
143
96
  export { ItemTypes } from './constants';
144
97
  export type { ItemType } from './constants';
145
98
  export * from './auth';
146
- export interface DatalayerClient {
99
+ export interface DatalayerCoreClient {
147
100
  getToken(): string | undefined;
148
101
  setToken(token: string): Promise<void>;
149
102
  whoami(): Promise<UserDTO>;
@@ -163,46 +116,5 @@ export interface DatalayerClient {
163
116
  getDatasource(datasourceId: string): Promise<DatasourceDTO>;
164
117
  updateDatasource(datasourceId: string, updates: UpdateDatasourceRequest): Promise<DatasourceDTO>;
165
118
  deleteDatasource(datasourceId: string): Promise<void>;
166
- listEnvironments(): Promise<EnvironmentDTO[]>;
167
- ensureRuntime(environmentName?: string, creditsLimit?: number, waitForReady?: boolean, maxWaitTime?: number, reuseExisting?: boolean, snapshotId?: string): Promise<RuntimeDTO>;
168
- createRuntime(environmentName: string, type: 'notebook' | 'terminal' | 'job', givenName: string, minutesLimit: number, fromSnapshotId?: string): Promise<RuntimeDTO>;
169
- listRuntimes(): Promise<RuntimeDTO[]>;
170
- getRuntime(podName: string): Promise<RuntimeDTO>;
171
- deleteRuntime(podName: string): Promise<void>;
172
- terminateAllRuntimes(): Promise<PromiseSettledResult<void>[]>;
173
- createSnapshot(podName: string, name: string, description: string, stop?: boolean): Promise<CodeSandboxSnapshotDTO>;
174
- listSnapshots(): Promise<CodeSandboxSnapshotDTO[]>;
175
- getSnapshot(id: string): Promise<CodeSandboxSnapshotDTO>;
176
- deleteSnapshot(id: string): Promise<void>;
177
- checkRuntimesHealth(): Promise<HealthCheck>;
178
- getMySpaces(): Promise<SpaceDTO[]>;
179
- createSpace(name: string, description: string, variant: string, spaceHandle: string, organizationId: string, seedSpaceId: string, isPublic: boolean): Promise<SpaceDTO>;
180
- createNotebook(spaceId: string, name: string, description: string, file?: File | Blob): Promise<NotebookDTO>;
181
- getNotebook(id: string): Promise<NotebookDTO>;
182
- updateNotebook(id: string, name?: string, description?: string): Promise<NotebookDTO>;
183
- createLexical(spaceId: string, name: string, description: string, file?: File | Blob): Promise<LexicalDTO>;
184
- getLexical(id: string): Promise<LexicalDTO>;
185
- updateLexical(id: string, name?: string, description?: string): Promise<LexicalDTO>;
186
- getSpaceItems(spaceId: string): Promise<(NotebookDTO | LexicalDTO)[]>;
187
- getSpaceItem(itemId: string): Promise<NotebookDTO | LexicalDTO>;
188
- deleteSpaceItem(itemId: string): Promise<void>;
189
- getCollaborationSessionId(documentId: string): Promise<string>;
190
- getContent(itemId: string): Promise<any>;
191
- checkSpacerHealth(): Promise<HealthCheck>;
192
- getSpace(uid: string): Promise<SpaceDTO>;
193
- updateSpace(uid: string, data: UpdateSpaceRequest): Promise<SpaceDTO>;
194
- updateUserSpace(uid: string, userId: string, data: UpdateSpaceRequest): Promise<SpaceDTO>;
195
- deleteSpace(uid: string): Promise<void>;
196
- makeSpacePublic(uid: string): Promise<SpaceDTO>;
197
- makeSpacePrivate(uid: string): Promise<SpaceDTO>;
198
- exportSpace(uid: string): Promise<any>;
199
- cloneNotebook(id: string): Promise<NotebookDTO>;
200
- cloneLexical(id: string): Promise<LexicalDTO>;
201
- getProjects(): Promise<ProjectDTO[]>;
202
- getProject(uid: string): Promise<ProjectDTO>;
203
- createProject(name: string, description?: string): Promise<ProjectDTO>;
204
- updateProject(uid: string, data: UpdateSpaceRequest): Promise<ProjectDTO>;
205
- renameProject(uid: string, newName: string, description?: string): Promise<ProjectDTO>;
206
- getProjectDefaultItems(uid: string): Promise<ProjectDefaultItems>;
207
119
  calculateCreditsFromMinutes(minutes: number, burningRate: number): number;
208
120
  }
@@ -20,8 +20,6 @@
20
20
  */
21
21
  import { DatalayerClientBase, } from './base.js';
22
22
  import { IAMMixin } from './mixins/IAMMixin.js';
23
- import { RuntimesMixin } from './mixins/RuntimesMixin.js';
24
- import { SpacerMixin } from './mixins/SpacerMixin.js';
25
23
  /**
26
24
  * Helper function to compose mixins in a more readable way.
27
25
  * Applies mixins in the order provided.
@@ -32,28 +30,29 @@ import { SpacerMixin } from './mixins/SpacerMixin.js';
32
30
  function composeMixins(...mixins) {
33
31
  return mixins.reduce((base, mixin) => mixin(base), DatalayerClientBase);
34
32
  }
35
- // Apply mixins to the base class using the helper
36
- const DatalayerClientWithMixins = composeMixins(IAMMixin, RuntimesMixin, SpacerMixin);
33
+ // Apply the IAM mixin to the base class. Runtime and content (Spacer) features
34
+ // live in @datalayer/agent-runtimes, which composes AgentRuntimesClient on top
35
+ // of this core client.
36
+ const DatalayerCoreClientWithMixins = composeMixins(IAMMixin);
37
37
  /**
38
- * Main Datalayer Client providing unified access to all platform services.
39
- * Uses TypeScript mixins to provide a flat, discoverable API.
38
+ * Core Datalayer Client providing access to identity, plans and account
39
+ * services (IAM). Runtime and workspace/content features are provided by
40
+ * `AgentRuntimesClient` in `@datalayer/agent-runtimes`, which extends this
41
+ * class.
40
42
  *
41
43
  * @example
42
44
  * ```typescript
43
- * const client = new DatalayerClient({
45
+ * const client = new DatalayerCoreClient({
44
46
  * token: 'your-token'
45
47
  * });
46
48
  *
47
49
  * const user = await client.whoami();
48
- * const runtime = await client.createRuntime({
49
- * environment_name: 'ai-agents-env',
50
- * credits_limit: 100
51
- * });
50
+ * const credits = await client.getCredits();
52
51
  * ```
53
52
  */
54
- export class DatalayerClient extends DatalayerClientWithMixins {
53
+ export class DatalayerCoreClient extends DatalayerCoreClientWithMixins {
55
54
  /**
56
- * Create a DatalayerClient instance.
55
+ * Create a DatalayerCoreClient instance.
57
56
  *
58
57
  * @param config - Client configuration options
59
58
  */
@@ -66,15 +65,7 @@ export class DatalayerClient extends DatalayerClientWithMixins {
66
65
  export { DatalayerClientBase };
67
66
  // Export models for use by consumers
68
67
  export { UserDTO as User } from './../models/UserDTO.js';
69
- export { RuntimeDTO as Runtime } from '../models/RuntimeDTO.js';
70
- export { EnvironmentDTO as Environment } from '../models/EnvironmentDTO.js';
71
- export { CodeSandboxSnapshotDTO as Snapshot } from '../models/CodeSandboxSnapshotDTO.js';
72
- export { SpaceDTO as Space } from '../models/SpaceDTO.js';
73
- export { ProjectDTO as Project } from '../models/ProjectDTO.js';
74
- export { NotebookDTO as Notebook } from '../models/NotebookDTO.js';
75
- export { LexicalDTO } from '../models/LexicalDTO.js';
76
68
  export { CreditsDTO as Credits } from '../models/CreditsDTO.js';
77
- export { ItemDTO as Item } from '../models/ItemDTO.js';
78
69
  export { HealthCheck } from '../models/HealthCheck.js';
79
70
  export { SecretDTO as Secret } from './../models/Secret.js';
80
71
  export { DatasourceDTO as Datasource } from './../models/Datasource.js';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Returns `true` when the given URL points to a real user avatar (i.e. not a
3
+ * Gravatar default placeholder).
4
+ */
5
+ export declare function hasRealAvatar(url?: string): boolean;
6
+ export type UserAvatarProps = {
7
+ avatarUrl?: string;
8
+ /** Avatar edge length in pixels. Defaults to 100. */
9
+ size?: number;
10
+ /** Render with rounded square corners instead of a circle. Defaults to true. */
11
+ square?: boolean;
12
+ /** Fallback icon size. Defaults to ~48% of `size`. */
13
+ iconSize?: number;
14
+ };
15
+ export declare const UserAvatar: ({ avatarUrl, size, square, iconSize, }: UserAvatarProps) => JSX.Element;
16
+ export default UserAvatar;