@datalayer/core 1.1.66 → 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 (210) hide show
  1. package/README.md +41 -18
  2. package/lib/api/constants.d.ts +1 -1
  3. package/lib/api/constants.js +1 -1
  4. package/lib/api/contents/attachments.js +3 -7
  5. package/lib/api/contents/datasets.d.ts +48 -0
  6. package/lib/api/contents/datasets.js +44 -7
  7. package/lib/api/contents/runtimeMounts.js +1 -1
  8. package/lib/api/contents/sandboxUid.d.ts +13 -45
  9. package/lib/api/contents/sandboxUid.js +14 -65
  10. package/lib/api/evals/client.d.ts +402 -0
  11. package/lib/api/evals/client.js +359 -0
  12. package/lib/api/evals/index.d.ts +10 -0
  13. package/lib/api/evals/index.js +18 -0
  14. package/lib/api/evals/request.d.ts +43 -0
  15. package/lib/api/evals/request.js +67 -0
  16. package/lib/api/evals/status.d.ts +27 -0
  17. package/lib/api/evals/status.js +122 -0
  18. package/lib/api/evals/types.d.ts +1335 -0
  19. package/lib/api/evals/types.js +5 -0
  20. package/lib/api/iam/connectedAgents.d.ts +29 -0
  21. package/lib/api/iam/connectedAgents.js +35 -0
  22. package/lib/api/iam/identityProviders.d.ts +76 -0
  23. package/lib/api/iam/identityProviders.js +187 -0
  24. package/lib/api/iam/index.d.ts +1 -0
  25. package/lib/api/iam/index.js +1 -0
  26. package/lib/api/iam/mcpPolicy.d.ts +102 -1
  27. package/lib/api/iam/mcpPolicy.js +38 -2
  28. package/lib/api/iam/profile.d.ts +17 -1
  29. package/lib/api/iam/profile.js +27 -0
  30. package/lib/api/iam/scimTokens.d.ts +79 -0
  31. package/lib/api/iam/scimTokens.js +141 -0
  32. package/lib/api/iam/secrets.js +9 -21
  33. package/lib/api/iam/trials.d.ts +38 -0
  34. package/lib/api/iam/trials.js +66 -0
  35. package/lib/api/index.d.ts +4 -0
  36. package/lib/api/index.js +4 -0
  37. package/lib/api/mcp/observability.d.ts +25 -9
  38. package/lib/api/mcp/observability.js +63 -50
  39. package/lib/api/orchestration/client.d.ts +53 -0
  40. package/lib/api/orchestration/client.js +105 -0
  41. package/lib/api/orchestration/events.d.ts +88 -0
  42. package/lib/api/orchestration/events.js +245 -0
  43. package/lib/api/orchestration/generated.d.ts +693 -0
  44. package/lib/api/orchestration/generated.js +687 -0
  45. package/lib/api/orchestration/index.d.ts +30 -0
  46. package/lib/api/orchestration/index.js +34 -0
  47. package/lib/api/orchestration/lifecycle.d.ts +39 -0
  48. package/lib/api/orchestration/lifecycle.js +57 -0
  49. package/lib/api/orchestration/measures.d.ts +55 -0
  50. package/lib/api/orchestration/measures.js +99 -0
  51. package/lib/api/otel/dashboards.d.ts +56 -0
  52. package/lib/api/otel/dashboards.js +50 -0
  53. package/lib/api/otel/index.d.ts +1 -0
  54. package/lib/api/otel/index.js +1 -0
  55. package/lib/api/otel/metrics.d.ts +16 -0
  56. package/lib/api/otel/metrics.js +15 -0
  57. package/lib/api/scheduler/client.d.ts +32 -0
  58. package/lib/api/scheduler/client.js +42 -0
  59. package/lib/api/scheduler/index.d.ts +8 -0
  60. package/lib/api/scheduler/index.js +16 -0
  61. package/lib/api/scheduler/request.d.ts +28 -0
  62. package/lib/api/scheduler/request.js +50 -0
  63. package/lib/api/scheduler/types.d.ts +88 -0
  64. package/lib/api/scheduler/types.js +5 -0
  65. package/lib/api/spacer/comments.d.ts +97 -0
  66. package/lib/api/spacer/comments.js +45 -0
  67. package/lib/api/spacer/index.d.ts +9 -0
  68. package/lib/api/spacer/index.js +17 -0
  69. package/lib/api/spacer/notebooks.d.ts +33 -0
  70. package/lib/api/spacer/notebooks.js +39 -0
  71. package/lib/api/spacer/request.d.ts +25 -0
  72. package/lib/api/spacer/request.js +46 -0
  73. package/lib/api/spacer/spaces.d.ts +68 -0
  74. package/lib/api/spacer/spaces.js +45 -0
  75. package/lib/api/utils/validation.d.ts +4 -4
  76. package/lib/api/utils/validation.js +10 -7
  77. package/lib/client/constants.d.ts +1 -0
  78. package/lib/client/constants.js +1 -0
  79. package/lib/components/animation/AnimatedText.d.ts +1 -44
  80. package/lib/components/animation/AnimatedText.js +6 -122
  81. package/lib/components/anonymous/AnonymousKeyExpired.d.ts +56 -0
  82. package/lib/components/anonymous/AnonymousKeyExpired.js +96 -0
  83. package/lib/components/anonymous/AnonymousKeyTimer.d.ts +63 -0
  84. package/lib/components/anonymous/AnonymousKeyTimer.js +140 -0
  85. package/lib/components/anonymous/index.d.ts +7 -0
  86. package/lib/components/anonymous/index.js +15 -0
  87. package/lib/components/avatars/UserAvatar.d.ts +7 -1
  88. package/lib/components/avatars/UserAvatar.js +15 -1
  89. package/lib/components/billing/BillingEntitySelect.d.ts +6 -0
  90. package/lib/components/billing/BillingEntitySelect.js +49 -10
  91. package/lib/components/billing/eligibility.d.ts +22 -0
  92. package/lib/components/billing/eligibility.js +27 -0
  93. package/lib/components/billing/index.d.ts +1 -0
  94. package/lib/components/billing/index.js +1 -0
  95. package/lib/components/collaboration/LiveEditorCollaborators.d.ts +5 -0
  96. package/lib/components/collaboration/LiveEditorCollaborators.js +3 -1
  97. package/lib/components/display/DatalayerBox.d.ts +2 -3
  98. package/lib/components/display/DatalayerBox.js +1 -1
  99. package/lib/components/display/NavLink.js +3 -2
  100. package/lib/components/labels/StatusLabels.d.ts +2 -10
  101. package/lib/components/labels/StatusLabels.js +2 -26
  102. package/lib/components/principal/PrincipalAppearance.d.ts +21 -42
  103. package/lib/components/principal/PrincipalAppearance.js +232 -174
  104. package/lib/components/principal/PrincipalAvatar.d.ts +8 -1
  105. package/lib/components/principal/PrincipalAvatar.js +2 -2
  106. package/lib/components/principal/PrincipalDetailsOverlay.d.ts +8 -1
  107. package/lib/components/principal/PrincipalDetailsOverlay.js +2 -2
  108. package/lib/components/screencapture/Screencapture.js +46 -3
  109. package/lib/components/sharing/ShareAccessComponent.d.ts +45 -4
  110. package/lib/components/sharing/ShareAccessComponent.js +110 -78
  111. package/lib/components/sharing/SharingEditor.d.ts +5 -1
  112. package/lib/components/sharing/SharingEditor.js +9 -4
  113. package/lib/components/sharing/index.d.ts +1 -0
  114. package/lib/components/sharing/index.js +1 -0
  115. package/lib/components/sharing/sandboxSharing.d.ts +26 -0
  116. package/lib/components/sharing/sandboxSharing.js +41 -0
  117. package/lib/components/spaces/SpaceDetailsOverlay.d.ts +39 -0
  118. package/lib/components/spaces/SpaceDetailsOverlay.js +80 -0
  119. package/lib/components/spaces/SpaceDisplay.d.ts +38 -0
  120. package/lib/components/spaces/SpaceDisplay.js +92 -0
  121. package/lib/components/spaces/index.d.ts +4 -0
  122. package/lib/components/spaces/index.js +7 -0
  123. package/lib/components/spaces/spaceDisplayModel.d.ts +93 -0
  124. package/lib/components/spaces/spaceDisplayModel.js +170 -0
  125. package/lib/hooks/cacheConverters.d.ts +0 -7
  126. package/lib/hooks/cacheConverters.js +0 -25
  127. package/lib/hooks/index.d.ts +1 -0
  128. package/lib/hooks/index.js +1 -0
  129. package/lib/hooks/useBillingEntityStore.js +3 -0
  130. package/lib/hooks/useCache.d.ts +168 -25
  131. package/lib/hooks/useCache.js +1424 -307
  132. package/lib/hooks/useContents.d.ts +22 -1
  133. package/lib/hooks/useContents.js +90 -21
  134. package/lib/hooks/useMcp.d.ts +87 -1
  135. package/lib/hooks/useMcp.js +247 -12
  136. package/lib/hooks/useNavigate.d.ts +41 -3
  137. package/lib/hooks/useNavigate.js +106 -52
  138. package/lib/hooks/usePrincipalCacheStore.js +3 -0
  139. package/lib/hooks/usePrincipalStore.js +3 -0
  140. package/lib/hooks/useSpaceCacheStore.d.ts +50 -0
  141. package/lib/hooks/useSpaceCacheStore.js +85 -0
  142. package/lib/models/CreditsDTO.d.ts +6 -5
  143. package/lib/models/CreditsDTO.js +7 -5
  144. package/lib/models/McpBinding.d.ts +6 -0
  145. package/lib/models/Organization.d.ts +69 -0
  146. package/lib/models/Organization.js +96 -0
  147. package/lib/models/Secret.d.ts +1 -2
  148. package/lib/models/Secret.js +2 -18
  149. package/lib/models/StartedBy.d.ts +34 -0
  150. package/lib/models/StartedBy.js +36 -0
  151. package/lib/models/Team.d.ts +2 -0
  152. package/lib/models/Team.js +2 -0
  153. package/lib/models/User.d.ts +4 -0
  154. package/lib/models/User.js +3 -0
  155. package/lib/models/UserSettings.d.ts +13 -0
  156. package/lib/models/UserSettings.js +9 -0
  157. package/lib/models/contents/__fixtures__/v1-contracts.json +158 -30
  158. package/lib/navigation/components.js +2 -3
  159. package/lib/routes/publicPaths.js +4 -0
  160. package/lib/state/index.d.ts +1 -0
  161. package/lib/state/index.js +1 -0
  162. package/lib/state/sessionEnd.d.ts +55 -0
  163. package/lib/state/sessionEnd.js +162 -0
  164. package/lib/state/substates/CoreState.js +3 -3
  165. package/lib/state/substates/IAMState.js +7 -0
  166. package/lib/state/substates/LayoutState.js +12 -0
  167. package/lib/state/substates/ProfileState.d.ts +1 -0
  168. package/lib/state/substates/ProfileState.js +1 -0
  169. package/lib/utils/Lazy.d.ts +20 -0
  170. package/lib/utils/Lazy.js +32 -6
  171. package/lib/utils/Screencapture.js +3 -0
  172. package/lib/utils/WithSuspense.d.ts +11 -1
  173. package/lib/utils/WithSuspense.js +11 -1
  174. package/lib/views/mcp/AdmittedClients.d.ts +44 -0
  175. package/lib/views/mcp/AdmittedClients.js +59 -0
  176. package/lib/views/mcp/ApprovalQueue.d.ts +66 -0
  177. package/lib/views/mcp/ApprovalQueue.js +95 -0
  178. package/lib/views/mcp/ConnectedAgents.js +38 -3
  179. package/lib/views/mcp/EnterpriseConsole.d.ts +1 -1
  180. package/lib/views/mcp/EnterpriseConsole.js +23 -1
  181. package/lib/views/mcp/IdentityProviders.d.ts +33 -0
  182. package/lib/views/mcp/IdentityProviders.js +299 -0
  183. package/lib/views/mcp/McpDashboard.js +90 -7
  184. package/lib/views/mcp/McpObservability.d.ts +30 -1
  185. package/lib/views/mcp/McpObservability.js +105 -19
  186. package/lib/views/mcp/NotebookRuns.d.ts +39 -0
  187. package/lib/views/mcp/NotebookRuns.js +44 -0
  188. package/lib/views/mcp/OrganizationPolicy.js +2 -1
  189. package/lib/views/mcp/PersonalPolicy.js +2 -1
  190. package/lib/views/mcp/PolicyForm.d.ts +17 -1
  191. package/lib/views/mcp/PolicyForm.js +25 -3
  192. package/lib/views/mcp/PolicyHistory.d.ts +13 -0
  193. package/lib/views/mcp/PolicyHistory.js +14 -1
  194. package/lib/views/mcp/RunDetail.d.ts +87 -0
  195. package/lib/views/mcp/RunDetail.js +186 -0
  196. package/lib/views/mcp/ScimProvisioning.d.ts +54 -0
  197. package/lib/views/mcp/ScimProvisioning.js +173 -0
  198. package/lib/views/mcp/TeamPolicies.js +66 -5
  199. package/lib/views/mcp/ToolAccess.d.ts +60 -0
  200. package/lib/views/mcp/ToolAccess.js +101 -0
  201. package/lib/views/mcp/TraceTimeline.d.ts +81 -0
  202. package/lib/views/mcp/TraceTimeline.js +132 -0
  203. package/lib/views/mcp/index.d.ts +5 -0
  204. package/lib/views/mcp/index.js +5 -0
  205. package/lib/views/otel/simpleAuthStore.js +3 -0
  206. package/lib/views/secrets/SecretEdit.js +3 -2
  207. package/lib/views/secrets/SecretNew.js +5 -1
  208. package/package.json +269 -264
  209. package/scripts/generate-mcp-types.py +1 -1
  210. package/scripts/generate-orchestration-types.py +920 -0
@@ -7,39 +7,165 @@
7
7
  "name": "User Folder",
8
8
  "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
9
9
  "principal_kind": "user",
10
- "configuration": {"kind": "files", "owning_user_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "storage_backend_id": "users", "quota_policy": "standard", "versioning_policy": "retained"},
10
+ "configuration": {
11
+ "kind": "files",
12
+ "owning_user_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
13
+ "storage_backend_id": "users",
14
+ "quota_policy": "standard",
15
+ "versioning_policy": "retained"
16
+ },
11
17
  "capabilities": ["browse", "transfer", "mount"],
12
18
  "status": "ready",
13
19
  "created_at": "2026-08-24T12:00:00Z",
14
20
  "updated_at": "2026-08-24T12:00:00Z"
15
21
  },
16
22
  {
17
- "contract_version": "v1", "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "dataset", "name": "Dataset", "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "principal_kind": "user",
18
- "configuration": {"kind": "dataset", "tags": ["curated"], "publication_eligible": true}, "capabilities": ["browse", "materialize"], "status": "ready", "created_at": "2026-08-24T12:00:00Z", "updated_at": "2026-08-24T12:00:00Z"
23
+ "contract_version": "v1",
24
+ "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
25
+ "kind": "dataset",
26
+ "name": "Dataset",
27
+ "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
28
+ "principal_kind": "user",
29
+ "configuration": {
30
+ "kind": "dataset",
31
+ "tags": ["curated"],
32
+ "publication_eligible": true
33
+ },
34
+ "capabilities": ["browse", "materialize"],
35
+ "status": "ready",
36
+ "created_at": "2026-08-24T12:00:00Z",
37
+ "updated_at": "2026-08-24T12:00:00Z"
19
38
  },
20
39
  {
21
- "contract_version": "v1", "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "volume", "name": "Volume", "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "principal_kind": "user",
22
- "configuration": {"kind": "volume", "capacity_bytes": 1073741824, "scope": "user", "backing_resource_id": "pvc-1", "default_mount_path": "/home/jovyan/data", "access_modes": ["ro", "rw"], "concurrent_readers": true, "concurrent_writers": false}, "capabilities": ["browse", "mount"], "status": "ready", "created_at": "2026-08-24T12:00:00Z", "updated_at": "2026-08-24T12:00:00Z"
40
+ "contract_version": "v1",
41
+ "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
42
+ "kind": "volume",
43
+ "name": "Volume",
44
+ "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
45
+ "principal_kind": "user",
46
+ "configuration": {
47
+ "kind": "volume",
48
+ "capacity_bytes": 1073741824,
49
+ "scope": "user",
50
+ "backing_resource_id": "pvc-1",
51
+ "default_mount_path": "/home/datalayer/data",
52
+ "access_modes": ["ro", "rw"],
53
+ "concurrent_readers": true,
54
+ "concurrent_writers": false
55
+ },
56
+ "capabilities": ["browse", "mount"],
57
+ "status": "ready",
58
+ "created_at": "2026-08-24T12:00:00Z",
59
+ "updated_at": "2026-08-24T12:00:00Z"
23
60
  },
24
61
  {
25
- "contract_version": "v1", "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "cloud-storage", "name": "S3", "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "principal_kind": "user",
26
- "configuration": {"kind": "cloud-storage", "provider": "s3", "bucket_or_container": "research", "prefix": "inputs/", "region": "eu-west-1", "access_preference": "automatic"}, "capabilities": ["browse", "transfer"], "status": "ready", "created_at": "2026-08-24T12:00:00Z", "updated_at": "2026-08-24T12:00:00Z"
62
+ "contract_version": "v1",
63
+ "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
64
+ "kind": "cloud-storage",
65
+ "name": "S3",
66
+ "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
67
+ "principal_kind": "user",
68
+ "configuration": {
69
+ "kind": "cloud-storage",
70
+ "provider": "s3",
71
+ "bucket_or_container": "research",
72
+ "prefix": "inputs/",
73
+ "region": "eu-west-1",
74
+ "access_preference": "automatic"
75
+ },
76
+ "capabilities": ["browse", "transfer"],
77
+ "status": "ready",
78
+ "created_at": "2026-08-24T12:00:00Z",
79
+ "updated_at": "2026-08-24T12:00:00Z"
27
80
  },
28
81
  {
29
- "contract_version": "v1", "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "datasource", "name": "Warehouse", "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "principal_kind": "user",
30
- "configuration": {"kind": "datasource", "connector_type": "sql", "endpoint": "duckdb://", "credential_uid": "01HZY7WQ8XKJ4M2N5P6R7S8T9V", "database_or_project": "analytics", "allowed_operations": ["select"], "default_row_limit": 10000}, "capabilities": ["query"], "status": "ready", "created_at": "2026-08-24T12:00:00Z", "updated_at": "2026-08-24T12:00:00Z"
82
+ "contract_version": "v1",
83
+ "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
84
+ "kind": "datasource",
85
+ "name": "Warehouse",
86
+ "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
87
+ "principal_kind": "user",
88
+ "configuration": {
89
+ "kind": "datasource",
90
+ "connector_type": "sql",
91
+ "endpoint": "duckdb://",
92
+ "credential_uid": "01HZY7WQ8XKJ4M2N5P6R7S8T9V",
93
+ "database_or_project": "analytics",
94
+ "allowed_operations": ["select"],
95
+ "default_row_limit": 10000
96
+ },
97
+ "capabilities": ["query"],
98
+ "status": "ready",
99
+ "created_at": "2026-08-24T12:00:00Z",
100
+ "updated_at": "2026-08-24T12:00:00Z"
31
101
  },
32
102
  {
33
- "contract_version": "v1", "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "data-server", "name": "Private gateway", "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "principal_kind": "organization",
34
- "configuration": {"kind": "data-server", "registration_identity": "gateway-1", "mtls_issuer": "datalayer-contents-ca", "connectors": [{"connector_type": "sql", "operations": ["select"], "policy_version": "v1"}], "policy_version": "v1"}, "capabilities": ["query"], "status": "ready", "created_at": "2026-08-24T12:00:00Z", "updated_at": "2026-08-24T12:00:00Z"
103
+ "contract_version": "v1",
104
+ "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
105
+ "kind": "data-server",
106
+ "name": "Private gateway",
107
+ "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
108
+ "principal_kind": "organization",
109
+ "configuration": {
110
+ "kind": "data-server",
111
+ "registration_identity": "gateway-1",
112
+ "mtls_issuer": "datalayer-contents-ca",
113
+ "connectors": [
114
+ {
115
+ "connector_type": "sql",
116
+ "operations": ["select"],
117
+ "policy_version": "v1"
118
+ }
119
+ ],
120
+ "policy_version": "v1"
121
+ },
122
+ "capabilities": ["query"],
123
+ "status": "ready",
124
+ "created_at": "2026-08-24T12:00:00Z",
125
+ "updated_at": "2026-08-24T12:00:00Z"
35
126
  },
36
127
  {
37
- "contract_version": "v1", "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "mcp", "name": "Earthdata", "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "principal_kind": "team",
38
- "configuration": {"kind": "mcp", "transport": "streamable-http", "endpoint": "https://example.test/mcp", "allowed_tools": ["search_earthdata"], "allowed_domains": ["earthdata.nasa.gov"], "allowed_destinations": ["home-folder:///acquisitions/"], "approval_policy": "explicit", "destination_policy": "home-folder-only", "max_result_bytes": 67108864}, "capabilities": ["browse", "transfer"], "status": "ready", "created_at": "2026-08-24T12:00:00Z", "updated_at": "2026-08-24T12:00:00Z"
128
+ "contract_version": "v1",
129
+ "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
130
+ "kind": "mcp",
131
+ "name": "Earthdata",
132
+ "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
133
+ "principal_kind": "team",
134
+ "configuration": {
135
+ "kind": "mcp",
136
+ "transport": "streamable-http",
137
+ "endpoint": "https://example.test/mcp",
138
+ "allowed_tools": ["search_earthdata"],
139
+ "allowed_domains": ["earthdata.nasa.gov"],
140
+ "allowed_destinations": ["home-folder:///acquisitions/"],
141
+ "approval_policy": "explicit",
142
+ "destination_policy": "home-folder-only",
143
+ "max_result_bytes": 67108864
144
+ },
145
+ "capabilities": ["browse", "transfer"],
146
+ "status": "ready",
147
+ "created_at": "2026-08-24T12:00:00Z",
148
+ "updated_at": "2026-08-24T12:00:00Z"
39
149
  },
40
150
  {
41
- "contract_version": "v1", "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "kind": "environment", "name": "Environment content", "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "principal_kind": "organization",
42
- "configuration": {"kind": "environment", "environment_uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "build_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ", "runtime_content_uids": [], "resolved_provider_paths": {}, "build_entries": []}, "capabilities": ["materialize"], "status": "ready", "created_at": "2026-08-24T12:00:00Z", "updated_at": "2026-08-24T12:00:00Z"
151
+ "contract_version": "v1",
152
+ "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
153
+ "kind": "environment",
154
+ "name": "Environment content",
155
+ "principal_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
156
+ "principal_kind": "organization",
157
+ "configuration": {
158
+ "kind": "environment",
159
+ "environment_uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
160
+ "build_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
161
+ "runtime_content_uids": [],
162
+ "resolved_provider_paths": {},
163
+ "build_entries": []
164
+ },
165
+ "capabilities": ["materialize"],
166
+ "status": "ready",
167
+ "created_at": "2026-08-24T12:00:00Z",
168
+ "updated_at": "2026-08-24T12:00:00Z"
43
169
  }
44
170
  ],
45
171
  "attachment_manifest": {
@@ -47,20 +173,22 @@
47
173
  "sandbox_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
48
174
  "sandbox_provider": "daytona",
49
175
  "generated_at": "2026-08-24T12:00:00Z",
50
- "attachments": [{
51
- "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
52
- "source_uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
53
- "sandbox_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
54
- "sandbox_provider": "daytona",
55
- "mode": "ro",
56
- "mount_path": "/home/daytona/data",
57
- "delivery": "materialize",
58
- "required": true,
59
- "capabilities": ["browse", "materialize"],
60
- "status": "ready",
61
- "limits": {"bytes": 1073741824},
62
- "created_at": "2026-08-24T12:00:00Z",
63
- "cleanup_policy": "remove-materialization"
64
- }]
176
+ "attachments": [
177
+ {
178
+ "uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
179
+ "source_uid": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
180
+ "sandbox_uid": "01BX5ZZKBKACTAV9WEVGEMMVRZ",
181
+ "sandbox_provider": "daytona",
182
+ "mode": "ro",
183
+ "mount_path": "/home/daytona/data",
184
+ "delivery": "materialize",
185
+ "required": true,
186
+ "capabilities": ["browse", "materialize"],
187
+ "status": "ready",
188
+ "limits": { "bytes": 1073741824 },
189
+ "created_at": "2026-08-24T12:00:00Z",
190
+ "cleanup_policy": "remove-materialization"
191
+ }
192
+ ]
65
193
  }
66
194
  }
@@ -15,10 +15,9 @@ export const NavigationLink = forwardRef(({ to, children, replace = false, state
15
15
  if (onClick) {
16
16
  onClick(e);
17
17
  }
18
- // If not prevented, navigate
18
+ // If not prevented, navigate — or let a modifier click open a new tab.
19
19
  if (!e.defaultPrevented) {
20
- e.preventDefault();
21
- navigate(to, e, true, { replace, state });
20
+ navigate(to, e, { replace, state });
22
21
  }
23
22
  }, [to, replace, state, navigate, onClick]);
24
23
  return (_jsx("a", { ref: ref, href: to, onClick: handleClick, ...props, children: children }));
@@ -16,6 +16,10 @@ export const PUBLIC_PATH_PREFIXES = [
16
16
  '/about',
17
17
  '/agents',
18
18
  '/agentspecs',
19
+ // Where AWS Marketplace sends a customer who just subscribed, and the
20
+ // mailed link that confirms the account: reached signed out, and a 401 on
21
+ // them must not bounce the visitor to the sign-in page.
22
+ '/aws/marketplace',
19
23
  '/blog',
20
24
  '/careers',
21
25
  '/community',
@@ -1,3 +1,4 @@
1
1
  export * from './storage';
2
2
  export * from './State';
3
3
  export * from './substates';
4
+ export * from './sessionEnd';
@@ -5,3 +5,4 @@
5
5
  export * from './storage/index.js';
6
6
  export * from './State.js';
7
7
  export * from './substates/index.js';
8
+ export * from './sessionEnd.js';
@@ -0,0 +1,55 @@
1
+ /**
2
+ * What a session leaves in the browser, forgotten when the session ends.
3
+ *
4
+ * Signing out used to reset the query cache and nothing else. The current
5
+ * space, the selected principal and the billing entity are persisted — in
6
+ * cookies the next page load restores, and in local storage — and they
7
+ * survived it: the next person to sign in on the browser opened on the
8
+ * previous one's space, under the previous one's principal.
9
+ *
10
+ * Two kinds of state, forgotten two ways:
11
+ *
12
+ * - what is persisted is removed **by name**, whether or not the module that
13
+ * wrote it was loaded in this page — a store nobody imported still left its
14
+ * key behind;
15
+ * - what is only in memory is reset by the store that holds it, which
16
+ * registers how. Nothing here imports a store, so no import cycle can form.
17
+ *
18
+ * And a guard for the session that never ended — the tab closed without
19
+ * signing out: the browser remembers whose state it holds, and the next person
20
+ * to sign in forgets it first.
21
+ *
22
+ * @module state/sessionEnd
23
+ */
24
+ /** Cookies a session writes. */
25
+ export declare const SESSION_COOKIES: readonly string[];
26
+ /** `localStorage` keys a session writes. */
27
+ export declare const SESSION_LOCAL_STORAGE_KEYS: readonly string[];
28
+ /** Whose state the browser holds: the uid of the person it belongs to. */
29
+ export declare const SESSION_OWNER_KEY = "datalayer-session-owner";
30
+ /** What a module keeps for a session. */
31
+ export type SessionStateRegistration = {
32
+ /** Reset what the module holds in memory. */
33
+ forget?: () => void;
34
+ cookies?: readonly string[];
35
+ localStorageKeys?: readonly string[];
36
+ sessionStorageKeys?: readonly string[];
37
+ };
38
+ /**
39
+ * Say what a module keeps for a session, so the end of the session forgets it.
40
+ *
41
+ * @returns A function that withdraws the registration.
42
+ */
43
+ export declare const registerSessionState: (registration: SessionStateRegistration) => (() => void);
44
+ /** Forget everything a session left in this browser. */
45
+ export declare const forgetSessionState: () => void;
46
+ /**
47
+ * Claim the browser's session state for the person signing in.
48
+ *
49
+ * When it holds somebody else's — a session that ended without signing out —
50
+ * it is forgotten first. Somebody else's is known by the owner the browser
51
+ * remembers or, before it remembered one, by a personal principal naming
52
+ * another person. The state of an anonymous visitor belongs to nobody and is
53
+ * kept: whoever started as a visitor keeps what they started.
54
+ */
55
+ export declare const claimSessionState: (userUid: string | null | undefined) => void;
@@ -0,0 +1,162 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ /**
6
+ * What a session leaves in the browser, forgotten when the session ends.
7
+ *
8
+ * Signing out used to reset the query cache and nothing else. The current
9
+ * space, the selected principal and the billing entity are persisted — in
10
+ * cookies the next page load restores, and in local storage — and they
11
+ * survived it: the next person to sign in on the browser opened on the
12
+ * previous one's space, under the previous one's principal.
13
+ *
14
+ * Two kinds of state, forgotten two ways:
15
+ *
16
+ * - what is persisted is removed **by name**, whether or not the module that
17
+ * wrote it was loaded in this page — a store nobody imported still left its
18
+ * key behind;
19
+ * - what is only in memory is reset by the store that holds it, which
20
+ * registers how. Nothing here imports a store, so no import cycle can form.
21
+ *
22
+ * And a guard for the session that never ended — the tab closed without
23
+ * signing out: the browser remembers whose state it holds, and the next person
24
+ * to sign in forgets it first.
25
+ *
26
+ * @module state/sessionEnd
27
+ */
28
+ /** Cookies a session writes. */
29
+ export const SESSION_COOKIES = [
30
+ 'datalayer-space-context',
31
+ 'datalayer-principal-context',
32
+ 'datalayer-billing-entity-uid',
33
+ 'otel_sql_history',
34
+ ];
35
+ /** `localStorage` keys a session writes. */
36
+ export const SESSION_LOCAL_STORAGE_KEYS = [
37
+ 'datalayer-principal',
38
+ 'datalayer-billing-entity',
39
+ 'datalayer-simple-auth',
40
+ ];
41
+ /** Whose state the browser holds: the uid of the person it belongs to. */
42
+ export const SESSION_OWNER_KEY = 'datalayer-session-owner';
43
+ const registrations = new Set();
44
+ /**
45
+ * Say what a module keeps for a session, so the end of the session forgets it.
46
+ *
47
+ * @returns A function that withdraws the registration.
48
+ */
49
+ export const registerSessionState = (registration) => {
50
+ registrations.add(registration);
51
+ return () => {
52
+ registrations.delete(registration);
53
+ };
54
+ };
55
+ const storageOf = (kind) => {
56
+ try {
57
+ return typeof window === 'undefined' ? undefined : window[kind];
58
+ }
59
+ catch {
60
+ // A browser that refuses its storage has nothing in it to forget.
61
+ return undefined;
62
+ }
63
+ };
64
+ const removeFrom = (storage, key) => {
65
+ try {
66
+ storage?.removeItem(key);
67
+ }
68
+ catch {
69
+ // Nothing to forget.
70
+ }
71
+ };
72
+ const deleteCookie = (name) => {
73
+ if (typeof document === 'undefined') {
74
+ return;
75
+ }
76
+ document.cookie = `${name}=; path=/; max-age=0; SameSite=Lax`;
77
+ };
78
+ const readCookie = (name) => {
79
+ if (typeof document === 'undefined') {
80
+ return undefined;
81
+ }
82
+ const prefix = `${name}=`;
83
+ const entry = document.cookie
84
+ .split(';')
85
+ .map(part => part.trim())
86
+ .find(part => part.startsWith(prefix));
87
+ return entry ? entry.slice(prefix.length) : undefined;
88
+ };
89
+ /** Forget everything a session left in this browser. */
90
+ export const forgetSessionState = () => {
91
+ const cookies = new Set(SESSION_COOKIES);
92
+ const local = new Set([
93
+ ...SESSION_LOCAL_STORAGE_KEYS,
94
+ SESSION_OWNER_KEY,
95
+ ]);
96
+ const session = new Set();
97
+ for (const registration of registrations) {
98
+ try {
99
+ registration.forget?.();
100
+ }
101
+ catch (error) {
102
+ console.warn('A session state could not be reset.', error);
103
+ }
104
+ registration.cookies?.forEach(name => cookies.add(name));
105
+ registration.localStorageKeys?.forEach(key => local.add(key));
106
+ registration.sessionStorageKeys?.forEach(key => session.add(key));
107
+ }
108
+ cookies.forEach(deleteCookie);
109
+ const localStorage = storageOf('localStorage');
110
+ local.forEach(key => removeFrom(localStorage, key));
111
+ const sessionStorage = storageOf('sessionStorage');
112
+ session.forEach(key => removeFrom(sessionStorage, key));
113
+ };
114
+ /** The personal principal the principal cookie names, when it names one. */
115
+ const personalPrincipalInCookie = () => {
116
+ const raw = readCookie('datalayer-principal-context');
117
+ if (!raw) {
118
+ return undefined;
119
+ }
120
+ try {
121
+ const parsed = JSON.parse(decodeURIComponent(raw));
122
+ return parsed?.selectedPrincipalKind === 'personal'
123
+ ? String(parsed?.selectedPrincipalUid ?? '').trim() || undefined
124
+ : undefined;
125
+ }
126
+ catch {
127
+ return undefined;
128
+ }
129
+ };
130
+ /**
131
+ * Claim the browser's session state for the person signing in.
132
+ *
133
+ * When it holds somebody else's — a session that ended without signing out —
134
+ * it is forgotten first. Somebody else's is known by the owner the browser
135
+ * remembers or, before it remembered one, by a personal principal naming
136
+ * another person. The state of an anonymous visitor belongs to nobody and is
137
+ * kept: whoever started as a visitor keeps what they started.
138
+ */
139
+ export const claimSessionState = (userUid) => {
140
+ const uid = String(userUid ?? '').trim();
141
+ if (!uid) {
142
+ return;
143
+ }
144
+ const localStorage = storageOf('localStorage');
145
+ let owner = null;
146
+ try {
147
+ owner = localStorage?.getItem(SESSION_OWNER_KEY) ?? null;
148
+ }
149
+ catch {
150
+ owner = null;
151
+ }
152
+ const principal = personalPrincipalInCookie();
153
+ if ((owner && owner !== uid) || (!owner && principal && principal !== uid)) {
154
+ forgetSessionState();
155
+ }
156
+ try {
157
+ localStorage?.setItem(SESSION_OWNER_KEY, uid);
158
+ }
159
+ catch {
160
+ // Nothing to remember it in.
161
+ }
162
+ };
@@ -19,11 +19,11 @@ let initialConfiguration = {
19
19
  contentsUrl: 'https://r1.datalayer.run',
20
20
  managerUrl: 'https://prod1.datalayer.run',
21
21
  runtimesUrl: 'https://r1.datalayer.run',
22
- schedulerUrl: 'https://prod1.datalayer.run',
22
+ schedulerUrl: 'https://r1.datalayer.run',
23
23
  libraryUrl: 'https://prod1.datalayer.run',
24
24
  spacerUrl: 'https://prod1.datalayer.run',
25
- aiAgentsUrl: 'https://prod1.datalayer.run',
26
- aiInferenceUrl: 'https://prod1.datalayer.run',
25
+ aiAgentsUrl: 'https://r1.datalayer.run',
26
+ aiInferenceUrl: 'https://r1.datalayer.run',
27
27
  jupyterMcpServerUrl: 'https://mcp.datalayer.run/mcp',
28
28
  otelUrl: 'https://prod1.datalayer.run',
29
29
  // Defaults to prod so telemetry is consumed from the production OTEL service
@@ -12,6 +12,7 @@ import { requestDatalayerAPI, } from '../../api/DatalayerApi.js';
12
12
  import { getCookie, setCookie, deleteCookie } from '../../utils/index.js';
13
13
  import { coreStore } from './CoreState.js';
14
14
  import { profileStore } from './ProfileState.js';
15
+ import { claimSessionState, forgetSessionState } from '../sessionEnd.js';
15
16
  /**
16
17
  * Limit to warn about low credits in milliseconds.
17
18
  */
@@ -69,6 +70,9 @@ export const iamStore = createStore((set, get) => {
69
70
  storeUser();
70
71
  storeToken();
71
72
  profileStore.getState().clearProfile();
73
+ // Everything else the session left in the browser goes with it: the
74
+ // current space, the principal, the billing entity, what apps registered.
75
+ forgetSessionState();
72
76
  set({
73
77
  credits: undefined,
74
78
  creditsReservations: [],
@@ -179,6 +183,8 @@ export const iamStore = createStore((set, get) => {
179
183
  token,
180
184
  });
181
185
  const user = asUser(data.profile);
186
+ // State another person left in this browser is not this person's.
187
+ claimSessionState(user?.id ?? user?.uid);
182
188
  storeUser(user);
183
189
  storeToken(token);
184
190
  set(() => ({ user, token }));
@@ -201,6 +207,7 @@ export const iamStore = createStore((set, get) => {
201
207
  return { externalToken };
202
208
  }),
203
209
  setLogin: (user, token) => set((state) => {
210
+ claimSessionState(user?.id ?? user?.uid);
204
211
  storeUser(user);
205
212
  storeToken(token);
206
213
  // The profile store is what the surfaces (user menu, sidebars,
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { createStore } from 'zustand/vanilla';
6
6
  import { useStore } from 'zustand';
7
+ import { registerSessionState } from '../sessionEnd.js';
7
8
  /**
8
9
  * Name of the cookie holding the space last selected by the user.
9
10
  *
@@ -136,6 +137,17 @@ export const layoutStore = createStore((set, get) => ({
136
137
  setScreencapture: (screenCapture) => set((state) => ({ screenCapture })),
137
138
  reset: () => set((state) => ({ bootstrapped: false })),
138
139
  }));
140
+ // The current space, organization, team and item are the session's own:
141
+ // forgotten when it ends, cookie included.
142
+ registerSessionState({
143
+ forget: () => {
144
+ const state = layoutStore.getState();
145
+ state.updateLayoutSpace(undefined);
146
+ state.updateLayoutOrganization(undefined);
147
+ state.updateLayoutTeam(undefined);
148
+ state.setItem(undefined);
149
+ },
150
+ });
139
151
  export function useLayoutStore(selector) {
140
152
  return useStore(layoutStore, selector);
141
153
  }
@@ -12,6 +12,7 @@ export type IProfile = {
12
12
  avatarUrl?: string;
13
13
  avatarIcon?: string;
14
14
  banner?: string;
15
+ showOrbits?: boolean;
15
16
  origin?: string;
16
17
  roles?: string[];
17
18
  };
@@ -34,6 +34,7 @@ const userToProfile = (user) => user
34
34
  avatarUrl: user.avatarUrl,
35
35
  avatarIcon: user.avatarIcon,
36
36
  banner: user.banner,
37
+ showOrbits: user.showOrbits,
37
38
  origin: user.origin,
38
39
  roles: user.roles,
39
40
  }
@@ -2,6 +2,26 @@ import { ComponentType } from 'react';
2
2
  export type PreloadableComponent<T extends ComponentType<any>> = T & {
3
3
  preload: () => Promise<void>;
4
4
  };
5
+ /**
6
+ * `React.lazy`, with a `preload()` that fetches the module ahead of the
7
+ * first render.
8
+ *
9
+ * Two rules keep it honest:
10
+ *
11
+ * - **One fetch.** `preload()` and React's own first render share a single
12
+ * call to `factory`. They used to call it separately, so a component that
13
+ * was preloaded and then rendered imported its module twice.
14
+ * - **One element type per mounted instance.** The component renders the
15
+ * loaded module directly when it was already loaded at mount — no fallback
16
+ * flash — and the lazy wrapper otherwise, and it keeps that choice for its
17
+ * lifetime. It used to switch from the wrapper to the loaded module on any
18
+ * render after `preload()` resolved, and React remounts on a change of
19
+ * element type: a component preloaded after it had mounted lost its state
20
+ * and ran its effects again on its next render.
21
+ *
22
+ * A failed fetch is forgotten, so the next `preload()` tries again rather
23
+ * than replaying the failure.
24
+ */
5
25
  export declare function lazyWithPreload<T extends ComponentType<any>>(factory: () => Promise<{
6
26
  default: T;
7
27
  }>): PreloadableComponent<T>;
package/lib/utils/Lazy.js CHANGED
@@ -2,22 +2,48 @@
2
2
  * Copyright (c) 2023-2025 Datalayer, Inc.
3
3
  * Distributed under the terms of the Modified BSD License.
4
4
  */
5
- import { createElement, forwardRef, lazy as reactLazy, } from 'react';
5
+ import { createElement, forwardRef, lazy as reactLazy, useState, } from 'react';
6
+ /**
7
+ * `React.lazy`, with a `preload()` that fetches the module ahead of the
8
+ * first render.
9
+ *
10
+ * Two rules keep it honest:
11
+ *
12
+ * - **One fetch.** `preload()` and React's own first render share a single
13
+ * call to `factory`. They used to call it separately, so a component that
14
+ * was preloaded and then rendered imported its module twice.
15
+ * - **One element type per mounted instance.** The component renders the
16
+ * loaded module directly when it was already loaded at mount — no fallback
17
+ * flash — and the lazy wrapper otherwise, and it keeps that choice for its
18
+ * lifetime. It used to switch from the wrapper to the loaded module on any
19
+ * render after `preload()` resolved, and React remounts on a change of
20
+ * element type: a component preloaded after it had mounted lost its state
21
+ * and ran its effects again on its next render.
22
+ *
23
+ * A failed fetch is forgotten, so the next `preload()` tries again rather
24
+ * than replaying the failure.
25
+ */
6
26
  export function lazyWithPreload(factory) {
7
- const LazyComponent = reactLazy(factory);
8
27
  let factoryPromise;
9
28
  let LoadedComponent;
10
- const Component = forwardRef(function LazyWithPreload(props, ref) {
11
- return createElement(LoadedComponent ?? LazyComponent, Object.assign(ref ? { ref } : {}, props));
12
- });
13
- Component.preload = () => {
29
+ const load = () => {
14
30
  if (!factoryPromise) {
15
31
  factoryPromise = factory().then(module => {
16
32
  LoadedComponent = module.default;
33
+ return module;
34
+ }, error => {
35
+ factoryPromise = undefined;
36
+ throw error;
17
37
  });
18
38
  }
19
39
  return factoryPromise;
20
40
  };
41
+ const LazyComponent = reactLazy(load);
42
+ const Component = forwardRef(function LazyWithPreload(props, ref) {
43
+ const [Resolved] = useState(() => LoadedComponent ?? LazyComponent);
44
+ return createElement(Resolved, Object.assign(ref ? { ref } : {}, props));
45
+ });
46
+ Component.preload = () => load().then(() => undefined);
21
47
  return Component;
22
48
  }
23
49
  export default lazyWithPreload;