@datalayer/core 1.1.66 → 1.2.12

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 (237) hide show
  1. package/README.md +43 -20
  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/authentication.js +6 -4
  21. package/lib/api/iam/connectedAgents.d.ts +29 -0
  22. package/lib/api/iam/connectedAgents.js +35 -0
  23. package/lib/api/iam/healthz.js +2 -2
  24. package/lib/api/iam/identityProviders.d.ts +76 -0
  25. package/lib/api/iam/identityProviders.js +187 -0
  26. package/lib/api/iam/index.d.ts +1 -0
  27. package/lib/api/iam/index.js +1 -0
  28. package/lib/api/iam/mcpPolicy.d.ts +102 -1
  29. package/lib/api/iam/mcpPolicy.js +38 -2
  30. package/lib/api/iam/oauth2.js +18 -12
  31. package/lib/api/iam/profile.d.ts +17 -1
  32. package/lib/api/iam/profile.js +27 -0
  33. package/lib/api/iam/scimTokens.d.ts +79 -0
  34. package/lib/api/iam/scimTokens.js +141 -0
  35. package/lib/api/iam/secrets.js +10 -23
  36. package/lib/api/iam/trials.d.ts +38 -0
  37. package/lib/api/iam/trials.js +66 -0
  38. package/lib/api/index.d.ts +4 -0
  39. package/lib/api/index.js +4 -0
  40. package/lib/api/mcp/observability.d.ts +34 -11
  41. package/lib/api/mcp/observability.js +97 -59
  42. package/lib/api/orchestration/client.d.ts +53 -0
  43. package/lib/api/orchestration/client.js +105 -0
  44. package/lib/api/orchestration/events.d.ts +88 -0
  45. package/lib/api/orchestration/events.js +245 -0
  46. package/lib/api/orchestration/generated.d.ts +693 -0
  47. package/lib/api/orchestration/generated.js +687 -0
  48. package/lib/api/orchestration/index.d.ts +30 -0
  49. package/lib/api/orchestration/index.js +34 -0
  50. package/lib/api/orchestration/lifecycle.d.ts +39 -0
  51. package/lib/api/orchestration/lifecycle.js +57 -0
  52. package/lib/api/orchestration/measures.d.ts +55 -0
  53. package/lib/api/orchestration/measures.js +99 -0
  54. package/lib/api/otel/dashboards.d.ts +56 -0
  55. package/lib/api/otel/dashboards.js +50 -0
  56. package/lib/api/otel/index.d.ts +1 -0
  57. package/lib/api/otel/index.js +1 -0
  58. package/lib/api/otel/metrics.d.ts +16 -0
  59. package/lib/api/otel/metrics.js +15 -0
  60. package/lib/api/scheduler/client.d.ts +32 -0
  61. package/lib/api/scheduler/client.js +42 -0
  62. package/lib/api/scheduler/index.d.ts +8 -0
  63. package/lib/api/scheduler/index.js +16 -0
  64. package/lib/api/scheduler/request.d.ts +28 -0
  65. package/lib/api/scheduler/request.js +50 -0
  66. package/lib/api/scheduler/types.d.ts +88 -0
  67. package/lib/api/scheduler/types.js +5 -0
  68. package/lib/api/spacer/comments.d.ts +97 -0
  69. package/lib/api/spacer/comments.js +45 -0
  70. package/lib/api/spacer/index.d.ts +9 -0
  71. package/lib/api/spacer/index.js +17 -0
  72. package/lib/api/spacer/notebooks.d.ts +33 -0
  73. package/lib/api/spacer/notebooks.js +39 -0
  74. package/lib/api/spacer/request.d.ts +25 -0
  75. package/lib/api/spacer/request.js +46 -0
  76. package/lib/api/spacer/spaces.d.ts +68 -0
  77. package/lib/api/spacer/spaces.js +45 -0
  78. package/lib/api/utils/validation.d.ts +4 -4
  79. package/lib/api/utils/validation.js +10 -7
  80. package/lib/client/auth/strategies.js +1 -1
  81. package/lib/client/constants.d.ts +1 -0
  82. package/lib/client/constants.js +1 -0
  83. package/lib/client/mixins/IAMMixin.js +2 -2
  84. package/lib/components/animation/AnimatedText.d.ts +1 -44
  85. package/lib/components/animation/AnimatedText.js +6 -122
  86. package/lib/components/anonymous/AnonymousKeyExpired.d.ts +56 -0
  87. package/lib/components/anonymous/AnonymousKeyExpired.js +96 -0
  88. package/lib/components/anonymous/AnonymousKeyTimer.d.ts +63 -0
  89. package/lib/components/anonymous/AnonymousKeyTimer.js +140 -0
  90. package/lib/components/anonymous/index.d.ts +7 -0
  91. package/lib/components/anonymous/index.js +15 -0
  92. package/lib/components/avatars/UserAvatar.d.ts +7 -1
  93. package/lib/components/avatars/UserAvatar.js +15 -1
  94. package/lib/components/billing/BillingEntitySelect.d.ts +6 -0
  95. package/lib/components/billing/BillingEntitySelect.js +49 -10
  96. package/lib/components/billing/eligibility.d.ts +22 -0
  97. package/lib/components/billing/eligibility.js +27 -0
  98. package/lib/components/billing/index.d.ts +1 -0
  99. package/lib/components/billing/index.js +1 -0
  100. package/lib/components/checkout/StripeCheckout.d.ts +1 -1
  101. package/lib/components/checkout/StripeCheckout.js +1 -1
  102. package/lib/components/collaboration/LiveEditorCollaborators.d.ts +5 -0
  103. package/lib/components/collaboration/LiveEditorCollaborators.js +3 -1
  104. package/lib/components/display/DatalayerBox.d.ts +2 -3
  105. package/lib/components/display/DatalayerBox.js +1 -1
  106. package/lib/components/display/NavLink.js +3 -2
  107. package/lib/components/display/VisuallyHidden.d.ts +1 -2
  108. package/lib/components/labels/StatusLabels.d.ts +2 -10
  109. package/lib/components/labels/StatusLabels.js +2 -26
  110. package/lib/components/principal/PrincipalAppearance.d.ts +21 -42
  111. package/lib/components/principal/PrincipalAppearance.js +232 -174
  112. package/lib/components/principal/PrincipalAvatar.d.ts +8 -1
  113. package/lib/components/principal/PrincipalAvatar.js +2 -2
  114. package/lib/components/principal/PrincipalDetailsOverlay.d.ts +8 -1
  115. package/lib/components/principal/PrincipalDetailsOverlay.js +2 -2
  116. package/lib/components/screencapture/Screencapture.js +46 -3
  117. package/lib/components/sharing/ShareAccessComponent.d.ts +45 -4
  118. package/lib/components/sharing/ShareAccessComponent.js +110 -78
  119. package/lib/components/sharing/SharingEditor.d.ts +5 -1
  120. package/lib/components/sharing/SharingEditor.js +9 -4
  121. package/lib/components/sharing/index.d.ts +1 -0
  122. package/lib/components/sharing/index.js +1 -0
  123. package/lib/components/sharing/sandboxSharing.d.ts +26 -0
  124. package/lib/components/sharing/sandboxSharing.js +47 -0
  125. package/lib/components/spaces/SpaceDetailsOverlay.d.ts +39 -0
  126. package/lib/components/spaces/SpaceDetailsOverlay.js +80 -0
  127. package/lib/components/spaces/SpaceDisplay.d.ts +38 -0
  128. package/lib/components/spaces/SpaceDisplay.js +92 -0
  129. package/lib/components/spaces/index.d.ts +4 -0
  130. package/lib/components/spaces/index.js +7 -0
  131. package/lib/components/spaces/spaceDisplayModel.d.ts +93 -0
  132. package/lib/components/spaces/spaceDisplayModel.js +170 -0
  133. package/lib/config/Configuration.d.ts +4 -4
  134. package/lib/config/Configuration.js +7 -7
  135. package/lib/config/index.d.ts +1 -0
  136. package/lib/config/index.js +1 -0
  137. package/lib/config/planes.d.ts +45 -0
  138. package/lib/config/planes.js +53 -0
  139. package/lib/hooks/cacheConverters.d.ts +0 -7
  140. package/lib/hooks/cacheConverters.js +0 -25
  141. package/lib/hooks/index.d.ts +1 -0
  142. package/lib/hooks/index.js +1 -0
  143. package/lib/hooks/useBackdrop.d.ts +4 -5
  144. package/lib/hooks/useBillingEntityStore.js +3 -0
  145. package/lib/hooks/useCache.d.ts +197 -44
  146. package/lib/hooks/useCache.js +1586 -494
  147. package/lib/hooks/useContents.d.ts +22 -1
  148. package/lib/hooks/useContents.js +90 -21
  149. package/lib/hooks/useMcp.d.ts +87 -1
  150. package/lib/hooks/useMcp.js +248 -13
  151. package/lib/hooks/useNavigate.d.ts +41 -3
  152. package/lib/hooks/useNavigate.js +116 -52
  153. package/lib/hooks/usePrincipalCacheStore.js +3 -0
  154. package/lib/hooks/usePrincipalStore.js +3 -0
  155. package/lib/hooks/useSpaceCacheStore.d.ts +50 -0
  156. package/lib/hooks/useSpaceCacheStore.js +85 -0
  157. package/lib/hooks/useWindowSize.js +1 -1
  158. package/lib/models/CreditsDTO.d.ts +6 -5
  159. package/lib/models/CreditsDTO.js +7 -5
  160. package/lib/models/IAMProvidersSpecs.d.ts +10 -5
  161. package/lib/models/IAMProvidersSpecs.js +0 -23
  162. package/lib/models/McpBinding.d.ts +6 -0
  163. package/lib/models/Organization.d.ts +69 -0
  164. package/lib/models/Organization.js +96 -0
  165. package/lib/models/Secret.d.ts +1 -2
  166. package/lib/models/Secret.js +2 -18
  167. package/lib/models/StartedBy.d.ts +34 -0
  168. package/lib/models/StartedBy.js +36 -0
  169. package/lib/models/Team.d.ts +2 -0
  170. package/lib/models/Team.js +2 -0
  171. package/lib/models/User.d.ts +4 -0
  172. package/lib/models/User.js +3 -0
  173. package/lib/models/UserSettings.d.ts +13 -0
  174. package/lib/models/UserSettings.js +9 -0
  175. package/lib/models/contents/__fixtures__/v1-contracts.json +158 -30
  176. package/lib/navigation/adapters/react-router.d.ts +1 -1
  177. package/lib/navigation/adapters/react-router.js +3 -0
  178. package/lib/navigation/components.js +2 -3
  179. package/lib/routes/publicPaths.js +4 -0
  180. package/lib/state/index.d.ts +1 -0
  181. package/lib/state/index.js +1 -0
  182. package/lib/state/sessionEnd.d.ts +55 -0
  183. package/lib/state/sessionEnd.js +162 -0
  184. package/lib/state/substates/CoreState.js +3 -16
  185. package/lib/state/substates/IAMState.d.ts +3 -3
  186. package/lib/state/substates/IAMState.js +7 -0
  187. package/lib/state/substates/LayoutState.js +12 -0
  188. package/lib/state/substates/NavigationState.d.ts +82 -0
  189. package/lib/state/substates/NavigationState.js +255 -0
  190. package/lib/state/substates/ProfileState.d.ts +1 -0
  191. package/lib/state/substates/ProfileState.js +1 -0
  192. package/lib/state/substates/index.d.ts +1 -0
  193. package/lib/state/substates/index.js +1 -0
  194. package/lib/utils/Lazy.d.ts +20 -0
  195. package/lib/utils/Lazy.js +32 -6
  196. package/lib/utils/Screencapture.d.ts +15 -0
  197. package/lib/utils/Screencapture.js +26 -20
  198. package/lib/utils/WithSuspense.d.ts +11 -1
  199. package/lib/utils/WithSuspense.js +11 -1
  200. package/lib/views/mcp/AdmittedClients.d.ts +44 -0
  201. package/lib/views/mcp/AdmittedClients.js +59 -0
  202. package/lib/views/mcp/ApprovalQueue.d.ts +66 -0
  203. package/lib/views/mcp/ApprovalQueue.js +95 -0
  204. package/lib/views/mcp/ConnectedAgents.js +38 -3
  205. package/lib/views/mcp/EnterpriseConsole.d.ts +1 -1
  206. package/lib/views/mcp/EnterpriseConsole.js +23 -1
  207. package/lib/views/mcp/IdentityProviders.d.ts +33 -0
  208. package/lib/views/mcp/IdentityProviders.js +299 -0
  209. package/lib/views/mcp/McpDashboard.js +90 -7
  210. package/lib/views/mcp/McpHome.js +1 -1
  211. package/lib/views/mcp/McpObservability.d.ts +30 -1
  212. package/lib/views/mcp/McpObservability.js +105 -19
  213. package/lib/views/mcp/NotebookRuns.d.ts +39 -0
  214. package/lib/views/mcp/NotebookRuns.js +44 -0
  215. package/lib/views/mcp/OrganizationPolicy.js +2 -1
  216. package/lib/views/mcp/PersonalPolicy.js +2 -1
  217. package/lib/views/mcp/PolicyForm.d.ts +17 -1
  218. package/lib/views/mcp/PolicyForm.js +25 -3
  219. package/lib/views/mcp/PolicyHistory.d.ts +13 -0
  220. package/lib/views/mcp/PolicyHistory.js +14 -1
  221. package/lib/views/mcp/RunDetail.d.ts +87 -0
  222. package/lib/views/mcp/RunDetail.js +186 -0
  223. package/lib/views/mcp/ScimProvisioning.d.ts +54 -0
  224. package/lib/views/mcp/ScimProvisioning.js +173 -0
  225. package/lib/views/mcp/TeamPolicies.js +66 -5
  226. package/lib/views/mcp/ToolAccess.d.ts +60 -0
  227. package/lib/views/mcp/ToolAccess.js +101 -0
  228. package/lib/views/mcp/TraceTimeline.d.ts +81 -0
  229. package/lib/views/mcp/TraceTimeline.js +132 -0
  230. package/lib/views/mcp/index.d.ts +5 -0
  231. package/lib/views/mcp/index.js +5 -0
  232. package/lib/views/otel/simpleAuthStore.js +3 -0
  233. package/lib/views/secrets/SecretEdit.js +3 -2
  234. package/lib/views/secrets/SecretNew.js +5 -1
  235. package/package.json +271 -264
  236. package/scripts/generate-mcp-types.py +16 -10
  237. package/scripts/generate-orchestration-types.py +920 -0
package/package.json CHANGED
@@ -1,267 +1,274 @@
1
1
  {
2
- "name": "@datalayer/core",
3
- "version": "1.1.66",
4
- "type": "module",
5
- "workspaces": [
6
- ".",
7
- "examples/*"
8
- ],
9
- "author": {
10
- "name": "Datalayer",
11
- "email": "info@datalayer.io"
12
- },
13
- "keywords": [
14
- "datalayer",
15
- "ai",
16
- "data",
17
- "jupyter",
18
- "react",
19
- "run",
20
- "storybook"
21
- ],
22
- "files": [
23
- "lib/**/*.{css,d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
24
- "style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
25
- "schema/*.json",
26
- "patches/",
27
- "scripts/"
28
- ],
29
- "main": "lib/index.js",
30
- "types": "lib/index.d.ts",
31
- "style": "style/index.css",
32
- "repository": {
33
- "type": "git",
34
- "url": "git+https://github.com/datalayer/core.git"
35
- },
36
- "homepage": "https://github.com/datalayer/core",
37
- "bugs": {
38
- "url": "https://github.com/datalayer/core/issues"
39
- },
40
- "sideEffects": [
41
- "style/*.css",
42
- "style/index.js"
43
- ],
44
- "styleModule": "style/index.js",
45
- "publishConfig": {
46
- "access": "public"
47
- },
48
- "scripts": {
49
- "dev": "vite",
50
- "clean": "rimraf lib dist build tsconfig.tsbuildinfo",
51
- "clean:lib": "rimraf lib tsconfig.tsbuildinfo",
52
- "clean:dist": "rimraf dist",
53
- "clean:cache": "rimraf node_modules/.vite",
54
- "build": "npm run clean && gulp resources-to-lib && tsc -b && vite build && vite build --config vite.cli-login.config.ts",
55
- "build:lib": "npm run clean:lib && gulp resources-to-lib && tsc -b && node scripts/fix-esm-imports.cjs",
56
- "build:cli-login": "vite build --config vite.cli-login.config.ts",
57
- "build:types": "npm run clean:lib && tsc -b",
58
- "generate:contents": "python scripts/generate-contents-types.py",
59
- "check:contents-generated": "python scripts/generate-contents-types.py --check",
60
- "generate:mcp": "python scripts/generate-mcp-types.py",
61
- "check:mcp-generated": "python scripts/generate-mcp-types.py --check",
62
- "build:nextjs": "npm run build --workspace=nextjj-example",
63
- "build:examples": "npm run build:nextjs",
64
- "build:all": "npm run build && npm run build:examples",
65
- "lint": "eslint . --quiet",
66
- "lint:fix": "eslint . --fix",
67
- "lint:all": "npm run lint && npm run lint --workspaces --if-present",
68
- "lint:fix:all": "npm run lint:fix && npm run lint:fix --workspaces --if-present",
69
- "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,json,md}\" \"examples/**/*.{js,jsx,ts,tsx,css,json,md,mjs}\"",
70
- "format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,css,json,md}\" \"examples/**/*.{js,jsx,ts,tsx,css,json,md,mjs}\"",
71
- "format:fix": "npm run format",
72
- "format:all": "npm run format && npm run format --workspaces --if-present",
73
- "format:check:all": "npm run format:check && npm run format:check --workspaces --if-present",
74
- "format:fix:all": "npm run format:all",
75
- "type-check": "tsc --noEmit",
76
- "type-check:all": "npm run type-check && npm run type-check --workspaces --if-present",
77
- "check": "npm run format:check && npm run lint:all && npm run type-check:all",
78
- "check:fix": "npm run format:all && npm run lint:fix && npm run type-check:all",
79
- "preview": "vite preview",
80
- "start": "vite",
81
- "test": "vitest run --project=unit --project=general",
82
- "test:watch": "vitest --project=unit --project=general",
83
- "test:ui": "vitest --ui --project=unit --project=general",
84
- "test:coverage": "vitest run --coverage --project=unit --project=general",
85
- "test:unit": "vitest run --project=unit",
86
- "test:integration": "vitest run --project=integration",
87
- "test:all": "vitest run",
88
- "storybook": "storybook dev -p 6006",
89
- "build-storybook": "storybook build",
90
- "typedoc": "typedoc --options typedoc.json --out docs/docs/typescript_api",
91
- "docs": "make typedoc && make pydoc && cd docs && npm install && npm run build",
92
- "watch:lib": "run-p 'watch:lib:*'",
93
- "watch:lib:res": "gulp resources-to-lib-watch",
94
- "watch:lib:src": "tsc -b -w",
95
- "type-check:watch": "tsc -b -w --noEmit",
96
- "examples": "run-p jupyter:start examples:vite",
97
- "examples:vite": "VITE_DATALAYER_IAM_URL=http://localhost:8888 vite --config vite.examples.config.ts",
98
- "examples:nextjs": "npm run dev --workspace=nextjj-example",
99
- "jupyter:start": "./dev/sh/start-jupyter-server.sh",
100
- "prepare": "husky || true",
101
- "kill": "./dev/sh/kill.sh || true",
102
- "sync:jupyter": "bash scripts/sync-jupyter.sh",
103
- "sync:jupyter:watch": "bash scripts/sync-jupyter.sh --watch",
104
- "create:patches": "bash scripts/create-patches.sh",
105
- "apply:patches": "bash scripts/apply-patches.sh",
106
- "examples:fresh": "npm run clean:cache && npm run examples",
107
- "rebuild:fresh": "npm run create:patches && npm install && npm run build && npm run clean:cache"
108
- },
109
- "dependencies": {
110
- "@datalayer/design": "^1.0.0",
111
- "@datalayer/icons-react": "^1.0.7",
112
- "@datalayer/jupyter-lexical": "^1.0.16",
113
- "@datalayer/jupyter-react": "^2.0.7",
114
- "@datalayer/primer-addons": "^1.0.15",
115
- "@datalayer/primer-rjsf": "^1.0.3",
116
- "@fluentui/react": "^8.125.3",
117
- "@jupyter-widgets/base-manager": "^1.0.12",
118
- "@jupyter-widgets/schema": "^0.5.6",
119
- "@jupyterlab/apputils": "^4.6.0",
120
- "@jupyterlab/cells": "^4.5.0",
121
- "@jupyterlab/codeeditor": "^4.5.0",
122
- "@jupyterlab/coreutils": "^6.0.0",
123
- "@jupyterlab/documentsearch": "^4.5.0",
124
- "@jupyterlab/rendermime": "^4.5.0",
125
- "@jupyterlab/services": "^7.0.0",
126
- "@jupyterlab/translation": "^4.5.0",
127
- "@jupyterlab/ui-components": "^4.5.0",
128
- "@lumino/commands": "^2.3.3",
129
- "@lumino/coreutils": "^2.2.2",
130
- "@lumino/datagrid": "^2.5.3",
131
- "@lumino/disposable": "^2.1.5",
132
- "@lumino/polling": "^2.1.5",
133
- "@lumino/signaling": "^2.1.5",
134
- "@lumino/widgets": "^2.7.3",
135
- "@primer/behaviors": "^1.8.4",
136
- "@primer/brand-primitives": "^0.51.0",
137
- "@primer/css": "^21.5.1",
138
- "@primer/octicons-react": "^19.29.1",
139
- "@primer/primitives": "^10.7.0",
140
- "@primer/react": "^37.31.0",
141
- "@primer/react-brand": "^0.58.0",
142
- "@stripe/react-stripe-js": "6.8.2",
143
- "@stripe/stripe-js": "9.15.0",
144
- "@styled-system/css": "^5.1.5",
145
- "@tailwindcss/vite": "^4.1.13",
146
- "@tanstack/react-query": "^5.90.6",
147
- "@toon-format/toon": "^1.3.0",
148
- "ansi-to-html": "^0.7.2",
149
- "axios": "^1.7.7",
150
- "boring-avatars": "^2.0.1",
151
- "date-fns": "^2.29.3",
152
- "deepmerge": "^4.3.1",
153
- "diff": "^8.0.2",
154
- "echarts": "^5.5.0",
155
- "echarts-for-react": "^3.0.2",
156
- "html2canvas": "^1.4.1",
157
- "jwt-decode": "^2.2.0",
158
- "localforage": "^1.10.0",
159
- "lucide-react": "^0.542.0",
160
- "marked": "^4.0.10",
161
- "mock-socket": "^9.3.1",
162
- "react": "19.2.8",
163
- "react-confetti": "^6.4.0",
164
- "react-dom": "19.2.8",
165
- "react-is": "19.2.8",
166
- "react-toastify": "^11.0.5",
167
- "streamdown": "^1.6.6",
168
- "styled-system": "^5.1.5",
169
- "tailwind-merge": "^3.3.1",
170
- "tailwindcss": "^4.1.13",
171
- "tslib": "^2.8.1",
172
- "tus-js-client": "^4.2.3",
173
- "tw-animate-css": "^1.4.0",
174
- "ulid": "^2.3.0",
175
- "unique-names-generator": "^4.7.1",
176
- "usehooks-ts": "3.1.1",
177
- "uuid": "^13.0.0",
178
- "validator": "^13.7.0",
179
- "zod": "^4.1.13",
180
- "zod-to-json-schema": "^3.25.0",
181
- "zustand": "^4.4.1"
182
- },
183
- "peerDependencies": {
184
- "react-router-dom": "^6.0.0"
185
- },
186
- "peerDependenciesMeta": {
187
- "react-router-dom": {
188
- "optional": true
189
- }
190
- },
191
- "devDependencies": {
192
- "@chromatic-com/storybook": "^4.1.0",
193
- "@eslint/js": "^10.0.1",
194
- "@storybook/addon-a11y": "^9.1.1",
195
- "@storybook/addon-docs": "^9.1.1",
196
- "@storybook/addon-onboarding": "^9.1.1",
197
- "@storybook/addon-vitest": "^9.1.1",
198
- "@storybook/builder-vite": "^9.1.1",
199
- "@storybook/react-vite": "^9.1.1",
200
- "@tailwindcss/postcss": "^4.1.16",
201
- "@types/node": "^20.11.0",
202
- "@types/react": "19.2.18",
203
- "@types/react-dom": "19.2.5",
204
- "@vitejs/plugin-react": "^4.5.2",
205
- "@vitest/browser": "^3.2.4",
206
- "@vitest/coverage-v8": "^3.2.4",
207
- "abort-controller": "^3.0.0",
208
- "autoprefixer": "^10.4.21",
209
- "crypto-browserify": "^3.12.1",
210
- "dotenv": "^17.2.2",
211
- "eslint": "^10.9.1",
212
- "eslint-config-prettier": "^10.1.8",
213
- "eslint-plugin-prettier": "^5.5.6",
214
- "eslint-plugin-react": "^7.37.5",
215
- "eslint-plugin-react-hooks": "^7.1.1",
216
- "eslint-plugin-react-refresh": "^0.5.5",
217
- "eslint-plugin-storybook": "^10.5.10",
218
- "globals": "^16.2.0",
219
- "gulp": "^4.0.2",
220
- "gulp-append-prepend": "^1.0.8",
221
- "gulp-filter": "^6.0.0",
222
- "gulp-watch": "^5.0.1",
223
- "husky": "^9.1.7",
224
- "jsdom": "^26.0.0",
225
- "lint-staged": "^16.1.5",
226
- "npm-run-all": "^4.1.5",
227
- "patch-package": "^8.0.0",
228
- "playwright": "^1.53.2",
229
- "prettier": "^3.6.2",
230
- "react-router-dom": "7.18.3",
231
- "rimraf": "^6.1.3",
232
- "storybook": "^9.1.1",
233
- "typedoc-plugin-markdown": "^4.0.0",
234
- "typescript": "5.9.3",
235
- "typescript-eslint": "^8.34.1",
236
- "vite": "7.3.6",
237
- "vite-plugin-treat-umd-as-commonjs": "^0.1.4",
238
- "vitest": "^3.2.4"
239
- },
240
- "overrides": {
241
- "@microsoft/fast-colors": "5.3.1",
242
- "@microsoft/fast-components": "2.30.6",
243
- "@microsoft/fast-element": "1.13.0",
244
- "@microsoft/fast-foundation": "2.49.6",
245
- "@microsoft/fast-react-wrapper": "0.3.24",
246
- "@microsoft/fast-web-utilities": "5.4.1",
247
- "@microsoft/load-themed-styles": "1.10.295",
248
- "@types/react": "19.2.18",
249
- "@types/react-dom": "19.2.5",
250
- "pyodide": "0.29.4",
251
- "react": "19.2.8",
252
- "react-dom": "19.2.8",
253
- "typescript": "5.9.3"
254
- },
255
- "lint-staged": {
256
- "src/**/*.{js,jsx,ts,tsx}": [
257
- "prettier --write",
258
- "eslint --fix"
2
+ "name": "@datalayer/core",
3
+ "version": "1.2.12",
4
+ "type": "module",
5
+ "workspaces": [
6
+ ".",
7
+ "examples/*"
8
+ ],
9
+ "author": {
10
+ "name": "Datalayer",
11
+ "email": "info@datalayer.io"
12
+ },
13
+ "keywords": [
14
+ "datalayer",
15
+ "ai",
16
+ "data",
17
+ "jupyter",
18
+ "react",
19
+ "run",
20
+ "storybook"
21
+ ],
22
+ "files": [
23
+ "lib/**/*.{css,d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
24
+ "style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
25
+ "schema/*.json",
26
+ "patches/",
27
+ "scripts/"
259
28
  ],
260
- "src/**/*.{css,json,md}": [
261
- "prettier --write"
262
- ]
263
- },
264
- "optionalDependencies": {
265
- "@github/keytar": "^7.10.6"
266
- }
29
+ "main": "lib/index.js",
30
+ "types": "lib/index.d.ts",
31
+ "style": "style/index.css",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/datalayer/core.git"
35
+ },
36
+ "homepage": "https://github.com/datalayer/core",
37
+ "bugs": {
38
+ "url": "https://github.com/datalayer/core/issues"
39
+ },
40
+ "sideEffects": [
41
+ "style/*.css",
42
+ "style/index.js"
43
+ ],
44
+ "styleModule": "style/index.js",
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "scripts": {
49
+ "dev": "vite",
50
+ "clean": "rimraf lib dist build tsconfig.tsbuildinfo",
51
+ "clean:lib": "rimraf lib tsconfig.tsbuildinfo",
52
+ "clean:dist": "rimraf dist",
53
+ "clean:cache": "rimraf node_modules/.vite",
54
+ "build": "npm run clean && gulp resources-to-lib && tsc -b && vite build && vite build --config vite.cli-login.config.ts",
55
+ "build:lib": "npm run clean:lib && gulp resources-to-lib && tsc -b && node scripts/fix-esm-imports.cjs",
56
+ "build:cli-login": "vite build --config vite.cli-login.config.ts",
57
+ "build:types": "npm run clean:lib && tsc -b",
58
+ "generate:contents": "python scripts/generate-contents-types.py",
59
+ "check:contents-generated": "python scripts/generate-contents-types.py --check",
60
+ "generate:mcp": "python scripts/generate-mcp-types.py",
61
+ "check:mcp-generated": "python scripts/generate-mcp-types.py --check",
62
+ "generate:orchestration": "python scripts/generate-orchestration-types.py",
63
+ "check:orchestration-generated": "python scripts/generate-orchestration-types.py --check",
64
+ "build:nextjs": "npm run build --workspace=nextjj-example",
65
+ "build:examples": "npm run build:nextjs",
66
+ "build:all": "npm run build && npm run build:examples",
67
+ "lint": "eslint . --quiet",
68
+ "lint:fix": "eslint . --fix",
69
+ "lint:all": "npm run lint && npm run lint --workspaces --if-present",
70
+ "lint:fix:all": "npm run lint:fix && npm run lint:fix --workspaces --if-present",
71
+ "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,json,md}\" \"examples/**/*.{js,jsx,ts,tsx,css,json,md,mjs}\"",
72
+ "format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,css,json,md}\" \"examples/**/*.{js,jsx,ts,tsx,css,json,md,mjs}\"",
73
+ "format:fix": "npm run format",
74
+ "format:all": "npm run format && npm run format --workspaces --if-present",
75
+ "format:check:all": "npm run format:check && npm run format:check --workspaces --if-present",
76
+ "format:fix:all": "npm run format:all",
77
+ "type-check": "tsc --noEmit",
78
+ "type-check:all": "npm run type-check && npm run type-check --workspaces --if-present",
79
+ "check": "npm run format:check && npm run lint:all && npm run type-check:all",
80
+ "check:fix": "npm run format:all && npm run lint:fix && npm run type-check:all",
81
+ "preview": "vite preview",
82
+ "start": "vite",
83
+ "test": "vitest run --project=unit --project=general",
84
+ "test:watch": "vitest --project=unit --project=general",
85
+ "test:ui": "vitest --ui --project=unit --project=general",
86
+ "test:coverage": "vitest run --coverage --project=unit --project=general",
87
+ "test:unit": "vitest run --project=unit",
88
+ "test:integration": "vitest run --project=integration",
89
+ "test:all": "vitest run",
90
+ "storybook": "storybook dev -p 6006",
91
+ "build-storybook": "storybook build",
92
+ "typedoc": "typedoc --options typedoc.json --out docs/docs/typescript_api",
93
+ "docs": "make typedoc && make pydoc && cd docs && npm install && npm run build",
94
+ "watch:lib": "run-p 'watch:lib:*'",
95
+ "watch:lib:res": "gulp resources-to-lib-watch",
96
+ "watch:lib:src": "tsc -b -w",
97
+ "type-check:watch": "tsc -b -w --noEmit",
98
+ "examples": "run-p jupyter:start examples:vite",
99
+ "examples:vite": "VITE_DATALAYER_IAM_URL=http://localhost:8888 vite --config vite.examples.config.ts",
100
+ "examples:nextjs": "npm run dev --workspace=nextjj-example",
101
+ "jupyter:start": "./dev/sh/start-jupyter-server.sh",
102
+ "prepare": "husky || true",
103
+ "kill": "./dev/sh/kill.sh || true",
104
+ "sync:jupyter": "bash scripts/sync-jupyter.sh",
105
+ "sync:jupyter:watch": "bash scripts/sync-jupyter.sh --watch",
106
+ "create:patches": "bash scripts/create-patches.sh",
107
+ "apply:patches": "bash scripts/apply-patches.sh",
108
+ "examples:fresh": "npm run clean:cache && npm run examples",
109
+ "rebuild:fresh": "npm run create:patches && npm install && npm run build && npm run clean:cache"
110
+ },
111
+ "dependencies": {
112
+ "@datalayer/design": "^1.0.0",
113
+ "@datalayer/icons-react": "^1.0.7",
114
+ "@datalayer/jupyter-lexical": "^1.0.24",
115
+ "@datalayer/jupyter-react": "^2.0.15",
116
+ "@datalayer/primer-addons": "^1.0.15",
117
+ "@datalayer/primer-rjsf": "^1.0.3",
118
+ "@fluentui/react": "^8.125.3",
119
+ "@jupyter-widgets/base-manager": "^1.0.12",
120
+ "@jupyter-widgets/schema": "^0.5.6",
121
+ "@jupyterlab/apputils": "^4.6.0",
122
+ "@jupyterlab/cells": "^4.5.0",
123
+ "@jupyterlab/codeeditor": "^4.5.0",
124
+ "@jupyterlab/coreutils": "^6.0.0",
125
+ "@jupyterlab/documentsearch": "^4.5.0",
126
+ "@jupyterlab/rendermime": "^4.5.0",
127
+ "@jupyterlab/services": "^7.0.0",
128
+ "@jupyterlab/translation": "^4.5.0",
129
+ "@jupyterlab/ui-components": "^4.5.0",
130
+ "@lumino/commands": "^2.3.3",
131
+ "@lumino/coreutils": "^2.2.2",
132
+ "@lumino/datagrid": "^2.5.3",
133
+ "@lumino/disposable": "^2.1.5",
134
+ "@lumino/polling": "^2.1.5",
135
+ "@lumino/signaling": "^2.1.5",
136
+ "@lumino/widgets": "^2.7.3",
137
+ "@primer/behaviors": "^1.8.4",
138
+ "@primer/brand-primitives": "^0.51.0",
139
+ "@primer/css": "^21.5.1",
140
+ "@primer/octicons-react": "^19.35.0",
141
+ "@primer/primitives": "^10.7.0",
142
+ "@primer/react": "^37.31.0",
143
+ "@primer/react-brand": "^0.58.0",
144
+ "@stripe/react-stripe-js": "6.8.2",
145
+ "@stripe/stripe-js": "9.15.0",
146
+ "@styled-system/css": "^5.1.5",
147
+ "@tailwindcss/vite": "^4.1.13",
148
+ "@tanstack/react-query": "^5.90.6",
149
+ "@toon-format/toon": "^1.3.0",
150
+ "ansi-to-html": "^0.7.2",
151
+ "axios": "^1.7.7",
152
+ "boring-avatars": "^2.0.1",
153
+ "date-fns": "^2.29.3",
154
+ "deepmerge": "^4.3.1",
155
+ "diff": "^8.0.2",
156
+ "echarts": "^5.5.0",
157
+ "echarts-for-react": "^3.0.2",
158
+ "html-to-image": "^1.11.13",
159
+ "jwt-decode": "^2.2.0",
160
+ "localforage": "^1.10.0",
161
+ "lucide-react": "^0.542.0",
162
+ "marked": "^4.0.10",
163
+ "mock-socket": "^9.3.1",
164
+ "react": "19.2.8",
165
+ "react-confetti": "^6.4.0",
166
+ "react-dom": "19.2.8",
167
+ "react-is": "19.2.8",
168
+ "react-toastify": "^11.0.5",
169
+ "streamdown": "^1.6.6",
170
+ "styled-system": "^5.1.5",
171
+ "tailwind-merge": "^3.3.1",
172
+ "tailwindcss": "^4.1.13",
173
+ "tslib": "^2.8.1",
174
+ "tus-js-client": "^4.2.3",
175
+ "tw-animate-css": "^1.4.0",
176
+ "ulid": "^2.3.0",
177
+ "unique-names-generator": "^4.7.1",
178
+ "usehooks-ts": "3.1.1",
179
+ "uuid": "^13.0.0",
180
+ "validator": "^13.7.0",
181
+ "zod": "^4.1.13",
182
+ "zod-to-json-schema": "^3.25.0",
183
+ "zustand": "^4.4.1"
184
+ },
185
+ "peerDependencies": {
186
+ "react-router-dom": "^6.0.0"
187
+ },
188
+ "peerDependenciesMeta": {
189
+ "react-router-dom": {
190
+ "optional": true
191
+ }
192
+ },
193
+ "devDependencies": {
194
+ "@chromatic-com/storybook": "^4.1.0",
195
+ "@eslint/js": "^10.0.1",
196
+ "@storybook/addon-a11y": "^9.1.1",
197
+ "@storybook/addon-docs": "^9.1.1",
198
+ "@storybook/addon-onboarding": "^9.1.1",
199
+ "@storybook/addon-vitest": "^9.1.1",
200
+ "@storybook/builder-vite": "^9.1.1",
201
+ "@storybook/react-vite": "^9.1.1",
202
+ "@tailwindcss/postcss": "^4.1.16",
203
+ "@testing-library/dom": "^10.4.1",
204
+ "@testing-library/react": "^16.3.3",
205
+ "@types/node": "^20.11.0",
206
+ "@types/react": "19.2.18",
207
+ "@types/react-dom": "19.2.5",
208
+ "@vitejs/plugin-react": "^4.5.2",
209
+ "@vitest/browser": "^3.2.4",
210
+ "@vitest/coverage-v8": "^3.2.4",
211
+ "abort-controller": "^3.0.0",
212
+ "autoprefixer": "^10.4.21",
213
+ "crypto-browserify": "^3.12.1",
214
+ "dotenv": "^17.2.2",
215
+ "eslint": "^10.9.1",
216
+ "eslint-config-prettier": "^10.1.8",
217
+ "eslint-plugin-prettier": "^5.5.6",
218
+ "eslint-plugin-react": "^7.37.5",
219
+ "eslint-plugin-react-hooks": "^7.1.1",
220
+ "eslint-plugin-react-refresh": "^0.5.5",
221
+ "eslint-plugin-storybook": "^10.5.10",
222
+ "globals": "^16.2.0",
223
+ "gulp": "^4.0.2",
224
+ "gulp-append-prepend": "^1.0.8",
225
+ "gulp-filter": "^6.0.0",
226
+ "gulp-watch": "^5.0.1",
227
+ "husky": "^9.1.7",
228
+ "jsdom": "^26.0.0",
229
+ "lint-staged": "^16.1.5",
230
+ "npm-run-all": "^4.1.5",
231
+ "patch-package": "^8.0.0",
232
+ "playwright": "^1.53.2",
233
+ "prettier": "^3.6.2",
234
+ "react-router-dom": "7.18.3",
235
+ "rimraf": "^6.1.3",
236
+ "storybook": "^9.1.1",
237
+ "typedoc-plugin-markdown": "^4.0.0",
238
+ "typescript": "5.9.3",
239
+ "typescript-eslint": "^8.34.1",
240
+ "vite": "7.3.6",
241
+ "vite-plugin-treat-umd-as-commonjs": "^0.1.4",
242
+ "vitest": "^3.2.4"
243
+ },
244
+ "overrides": {
245
+ "@microsoft/fast-colors": "5.3.1",
246
+ "@microsoft/fast-components": "2.30.6",
247
+ "@microsoft/fast-element": "1.13.0",
248
+ "@microsoft/fast-foundation": "2.49.6",
249
+ "@microsoft/fast-react-wrapper": "0.3.24",
250
+ "@microsoft/fast-web-utilities": "5.4.1",
251
+ "@microsoft/load-themed-styles": "1.10.295",
252
+ "@types/react": "19.2.18",
253
+ "@types/react-dom": "19.2.5",
254
+ "eslint-plugin-react": {
255
+ "eslint": "$eslint"
256
+ },
257
+ "pyodide": "0.29.4",
258
+ "react": "19.2.8",
259
+ "react-dom": "19.2.8",
260
+ "typescript": "5.9.3"
261
+ },
262
+ "lint-staged": {
263
+ "src/**/*.{js,jsx,ts,tsx}": [
264
+ "prettier --write",
265
+ "eslint --fix"
266
+ ],
267
+ "src/**/*.{css,json,md}": [
268
+ "prettier --write"
269
+ ]
270
+ },
271
+ "optionalDependencies": {
272
+ "@github/keytar": "^7.10.6"
273
+ }
267
274
  }
@@ -6,13 +6,14 @@
6
6
  # Distributed under the terms of the Modified BSD License.
7
7
 
8
8
  """
9
- Generate deterministic TypeScript wire types from the Jupyter MCP Server's
10
- OpenAPI document, on the `generate-contents-types.py` pattern.
9
+ Generate TypeScript wire types from the Jupyter MCP Server's OpenAPI document.
10
+
11
+ The output is deterministic, on the `generate-contents-types.py` pattern.
11
12
 
12
13
  The gateway keeps no contract file: its FastAPI application *is* the
13
14
  contract, and the document is read from it — imported from the sibling
14
15
  checkout of the service when there is one, otherwise fetched from a running
15
- gateway. `DATALAYER_JUPYTER_MCP_OPENAPI` names either a file or an URL and
16
+ gateway. `DATALAYER_MCP_OPENAPI` names either a file or an URL and
16
17
  wins over both; the deployed gateway publishes its document without
17
18
  authentication at ``/api/mcp/v1/openapi.json``.
18
19
 
@@ -40,9 +41,9 @@ from typing import Any
40
41
  from urllib.request import Request, urlopen
41
42
 
42
43
  ROOT = Path(__file__).parents[1]
43
- DEFAULT_GATEWAY_CHECKOUT = ROOT.parents[2] / "k8s/services/jupyter-mcp-server"
44
- DEFAULT_GATEWAY_OPENAPI_URL = "https://mcp.datalayer.run/api/mcp/v1/openapi.json"
45
- GATEWAY_APP = "datalayer_jupyter_mcp_server.main:app"
44
+ DEFAULT_GATEWAY_CHECKOUT = ROOT.parents[2] / "k8s/services/mcp-server"
45
+ DEFAULT_GATEWAY_OPENAPI_URL = "https://r1.datalayer.run/api/mcp/v1/openapi.json"
46
+ GATEWAY_APP = "datalayer_mcp_server.main:app"
46
47
  OUTPUT = ROOT / "src/api/mcp/generated.ts"
47
48
  #: The licence header every source file in this repository carries. It is
48
49
  #: emitted here because `fix-license-header` adds it to whatever this writes,
@@ -106,13 +107,14 @@ def camel(name: str) -> str:
106
107
 
107
108
 
108
109
  def _read_from_checkout(checkout: Path) -> dict[str, Any] | None:
109
- """The document of the application in a sibling checkout, in a subprocess.
110
+ """
111
+ The document of the application in a sibling checkout, in a subprocess.
110
112
 
111
113
  A subprocess so the gateway's imports — its dependencies, its logging
112
114
  configuration — never leak into this one, and so an environment that
113
115
  cannot import it says so cleanly and the fetch takes over.
114
116
  """
115
- if not (checkout / "datalayer_jupyter_mcp_server").is_dir():
117
+ if not (checkout / "datalayer_mcp_server").is_dir():
116
118
  return None
117
119
  module, _, attribute = GATEWAY_APP.partition(":")
118
120
  code = (
@@ -137,13 +139,17 @@ def _read_from_checkout(checkout: Path) -> dict[str, Any] | None:
137
139
 
138
140
 
139
141
  def _read_from_url(url: str) -> dict[str, Any]:
140
- with urlopen(Request(url, headers={"Accept": "application/json"}), timeout=15) as response:
142
+ if not url.startswith(("http://", "https://")):
143
+ raise ValueError(f"Not an HTTP(S) URL: {url}")
144
+ with urlopen( # nosec B310 - the scheme is checked above
145
+ Request(url, headers={"Accept": "application/json"}), timeout=15
146
+ ) as response:
141
147
  return json.load(response)
142
148
 
143
149
 
144
150
  def read_openapi() -> dict[str, Any]:
145
151
  """The document, from the override, the sibling checkout or the deployed gateway."""
146
- override = os.environ.get("DATALAYER_JUPYTER_MCP_OPENAPI", "").strip()
152
+ override = os.environ.get("DATALAYER_MCP_OPENAPI", "").strip()
147
153
  if override.startswith(("http://", "https://")):
148
154
  return _read_from_url(override)
149
155
  if override: