@marimo-team/frontend 0.25.3-dev40 → 0.25.3-dev42
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.
- package/dist/assets/{CellStatus-BGIWF94J.js → CellStatus-BpOBz-8m.js} +1 -1
- package/dist/assets/{ErrorBoundary-hliG40Pk.js → ErrorBoundary-DmXl4Nre.js} +2 -2
- package/dist/assets/{JsonOutput-9tmC-p6h.js → JsonOutput-BJraU9kp.js} +1 -1
- package/dist/assets/{MarimoErrorOutput-BaHdbtck.js → MarimoErrorOutput-DVjK8RgY.js} +1 -1
- package/dist/assets/{RenderHTML-B1FzB5NY.js → RenderHTML-BFaztTR0.js} +1 -1
- package/dist/assets/{RunButton-DpGokdF1.js → RunButton-B44xE_d5.js} +1 -1
- package/dist/assets/{add-cell-with-ai-BYWG0iKO.js → add-cell-with-ai-CkjslziO.js} +1 -1
- package/dist/assets/{add-connection-dialog-BWbUVPJk.js → add-connection-dialog-CWLLVKju.js} +1 -1
- package/dist/assets/{agent-panel-DKNiQrAl.js → agent-panel-DYdQ_2pp.js} +1 -1
- package/dist/assets/{ai-model-dropdown-CIg9eu47.js → ai-model-dropdown-F3mm17Wa.js} +1 -1
- package/dist/assets/{app-config-button-BvkL2eSY.js → app-config-button-D0uDs5nC.js} +1 -1
- package/dist/assets/{blob-BQfLiwKr.js → blob-BSfsdCNF.js} +1 -1
- package/dist/assets/{cell-editor-BKKUv4d5.js → cell-editor-DzvvHs9g.js} +1 -1
- package/dist/assets/{cell-link-B_QkRkm-.js → cell-link-DFPHORAO.js} +1 -1
- package/dist/assets/{cells-CdH98VSn.js → cells-BdgzY0of.js} +1 -1
- package/dist/assets/{chat-display-CNbRSebo.js → chat-display-BrcwdhKJ.js} +1 -1
- package/dist/assets/{chat-panel-HbEKDf0c.js → chat-panel-C__3iSyI.js} +1 -1
- package/dist/assets/{chat-ui-BwMev8Bf.js → chat-ui-NlBK3kK6.js} +1 -1
- package/dist/assets/{code-visibility-sQ37CBNo.js → code-visibility-Cs-Vv3jV.js} +1 -1
- package/dist/assets/{column-preview-CsEBzIUE.js → column-preview-ivm1b-GY.js} +1 -1
- package/dist/assets/{command-palette-BzZ86pUz.js → command-palette-TgwswwvD.js} +1 -1
- package/dist/assets/{common-S2v8dsEy.js → common-BcEY1yDS.js} +1 -1
- package/dist/assets/{components-D-TnFWjo.js → components-lkCfd2vy.js} +1 -1
- package/dist/assets/{config-CYsbZpwa.js → config-BwHT0yGp.js} +2 -2
- package/dist/assets/{config-BoBwH7CU.js → config-DXjnAwtL.js} +1 -1
- package/dist/assets/{datasource-BA7YF4eo.js → datasource-dKk3JHSQ.js} +1 -1
- package/dist/assets/{dependency-graph-panel-DsjI61Qa.js → dependency-graph-panel-BaisS9Zt.js} +1 -1
- package/dist/assets/{documentation-panel-hk3IdeXy.js → documentation-panel-CpSUoM8r.js} +1 -1
- package/dist/assets/{download-CCZkq0y4.js → download-RV4i1fWI.js} +1 -1
- package/dist/assets/{edit-page-BgS6tjth.js → edit-page-C8RUVAaO.js} +4 -4
- package/dist/assets/{error-entries-BVXrGOTZ.js → error-entries-CJS0gOId.js} +1 -1
- package/dist/assets/{error-panel-DYethUUR.js → error-panel-BxCKpZtN.js} +1 -1
- package/dist/assets/feedback-button-BLvwvndE.js +1 -0
- package/dist/assets/{feedback-button-DaNc3uJa.js → feedback-button-DYjae3_b.js} +1 -1
- package/dist/assets/{file-explorer-panel-CqnzSSYc.js → file-explorer-panel-BmjAJusg.js} +1 -1
- package/dist/assets/{file-name-input-D4AvwZV9.js → file-name-input-BpfSzvEB.js} +1 -1
- package/dist/assets/{floating-outline-CTy-Iakk.js → floating-outline-CrWdiNQ2.js} +1 -1
- package/dist/assets/{gallery-page-ByjlvM6k.js → gallery-page-W_b-XWq6.js} +1 -1
- package/dist/assets/{glide-data-editor-CABBj2b0.js → glide-data-editor-C_bIL30J.js} +1 -1
- package/dist/assets/{home-page-DejRSjeJ.js → home-page-D1teQDdF.js} +1 -1
- package/dist/assets/{hooks-BJgCcVXZ.js → hooks-CZF85I2f.js} +1 -1
- package/dist/assets/{index-PDJQd7X6.js → index-4Nwpioic.js} +5 -5
- package/dist/assets/{layout-Ct0rjb-5.js → layout-ByZveRPN.js} +3 -3
- package/dist/assets/{logs-panel-TyeqEvOY.js → logs-panel-DVSgfMgv.js} +1 -1
- package/dist/assets/{markdown-renderer-BFyD6Jhs.js → markdown-renderer-DX2O5YiE.js} +1 -1
- package/dist/assets/{name-cell-input-D-0VF3qd.js → name-cell-input-DL1i8Mj0.js} +1 -1
- package/dist/assets/{outline-panel-DMTjk2WC.js → outline-panel-DPKPT2eg.js} +1 -1
- package/dist/assets/{packages-panel-DrT69k9L.js → packages-panel-CZZwD9YV.js} +1 -1
- package/dist/assets/{panel-accordion-state-Ban6j---.js → panel-accordion-state-C7vvsYz1.js} +1 -1
- package/dist/assets/panels-BT2oosq8.js +4 -0
- package/dist/assets/{process-output-DzpQYlpY.js → process-output-BKhybJBb.js} +1 -1
- package/dist/assets/{readonly-code-display-Cyn3k5TX.js → readonly-code-display-9QrSm_7D.js} +1 -1
- package/dist/assets/{readonly-python-code-DrXDDAnA.js → readonly-python-code-BLotL3XP.js} +1 -1
- package/dist/assets/{reveal-component-_lKImPWP.js → reveal-component-2QaMbLNx.js} +1 -1
- package/dist/assets/{run-page-7UNg--Rj.js → run-page-DyZ8JFKU.js} +1 -1
- package/dist/assets/{runtime-details-state-CKOKhMhv.js → runtime-details-state-B25uM-Ps.js} +1 -1
- package/dist/assets/{scratchpad-panel-C7h4MgqN.js → scratchpad-panel-Dt83MaaA.js} +1 -1
- package/dist/assets/{session-panel-CLiWXc5y.js → session-panel-xVWVwa1U.js} +1 -1
- package/dist/assets/{snippets-panel-Wrqaorxa.js → snippets-panel-IxIxfxNc.js} +1 -1
- package/dist/assets/{state-TVREh4u4.js → state-BHuYDaxs.js} +1 -1
- package/dist/assets/{state-_uXVmwuN.js → state-CVgqwwCU.js} +1 -1
- package/dist/assets/{terminal-Dp5gyJ7l.js → terminal-CjvCrRrA.js} +1 -1
- package/dist/assets/{tracing-fUNLyKuj.js → tracing-V5zejPsw.js} +1 -1
- package/dist/assets/{tracing-panel-Cx4OqOoP.js → tracing-panel-DLS3iwK6.js} +2 -2
- package/dist/assets/{tree-actions-B1vsdenY.js → tree-actions-Be_mzC1C.js} +1 -1
- package/dist/assets/{useAddCell-DZ-50qEG.js → useAddCell-DK79W1vA.js} +1 -1
- package/dist/assets/{useBoolean-5g-bBaYF.js → useBoolean-j0qHaJxu.js} +1 -1
- package/dist/assets/{useCellActionButton-DINnRstv.js → useCellActionButton-Cw9Ob12j.js} +1 -1
- package/dist/assets/{useDeleteCell-CREJXVNp.js → useDeleteCell-BNqX6PPu.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-Cw5VT16Q.js → useDependencyPanelTab-GnTnqKJo.js} +1 -1
- package/dist/assets/{useInstallPackage-Cw0dVELh.js → useInstallPackage-CVItDn1e.js} +1 -1
- package/dist/assets/{useNotebookActions-B4av4mLc.js → useNotebookActions-_qJ1Sjtj.js} +1 -1
- package/dist/assets/{useRunCells-BHBMk9zW.js → useRunCells-DP09DHT6.js} +1 -1
- package/dist/assets/{useSplitCell-DAgwZV0q.js → useSplitCell-IfumZ4sm.js} +1 -1
- package/dist/assets/{vega-component-pQE2mKc1.js → vega-component-CMn031HF.js} +1 -1
- package/dist/index.html +24 -24
- package/package.json +2 -4
- package/src/__tests__/host-imports.test.ts +1 -0
- package/src/core/attachments/state.ts +2 -2
- package/src/core/host/AGENTS.md +6 -2
- package/src/core/host/__tests__/attachments.test.ts +9 -10
- package/src/core/host/__tests__/document.test.ts +18 -16
- package/src/core/host/__tests__/events.test.ts +5 -2
- package/src/core/host/__tests__/fixtures.ts +6 -4
- package/src/core/host/events.ts +18 -2
- package/src/core/host/notebook-client.ts +46 -13
- package/src/core/host/resources/attachments.ts +3 -3
- package/src/core/host/resources/document.ts +3 -3
- package/src/core/websocket/__tests__/useNotebookSession.hook.test.tsx +1 -1
- package/dist/assets/feedback-button-DDzObtF2.js +0 -1
- package/dist/assets/panels-BLYQRkEc.js +0 -4
- package/src/core/host/__tests__/protocol.test.ts +0 -229
- package/src/core/host/__tests__/stream.test.ts +0 -209
- package/src/core/host/protocol.ts +0 -1948
- package/src/core/host/resources/resource.ts +0 -47
- package/src/core/host/stream.ts +0 -211
package/dist/index.html
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<marimo-server-token data-token="{{ server_token }}" hidden></marimo-server-token>
|
|
67
67
|
<!-- /TODO -->
|
|
68
68
|
<title>{{ title }}</title>
|
|
69
|
-
<script type="module" crossorigin src="./assets/index-
|
|
69
|
+
<script type="module" crossorigin src="./assets/index-4Nwpioic.js"></script>
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-B0Z9INg1.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="./assets/react-DVplv7_D.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/compiler-runtime-BrajqUja.js">
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<link rel="modulepreload" crossorigin href="./assets/utils-B4K466FK.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="./assets/session-B8Y-GJnS.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="./assets/Deferred-CrTnjj37.js">
|
|
82
|
-
<link rel="modulepreload" crossorigin href="./assets/config-
|
|
82
|
+
<link rel="modulepreload" crossorigin href="./assets/config-BwHT0yGp.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="./assets/isObject-BCaOs5rp.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="./assets/isSymbol-oX0TOjjx.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="./assets/now-Cmx0b_zA.js">
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
<link rel="modulepreload" crossorigin href="./assets/useTheme-DLtPc-39.js">
|
|
140
140
|
<link rel="modulepreload" crossorigin href="./assets/useAsyncData-DhhdOGGd.js">
|
|
141
141
|
<link rel="modulepreload" crossorigin href="./assets/purify.es--06brOip.js">
|
|
142
|
-
<link rel="modulepreload" crossorigin href="./assets/cells-
|
|
142
|
+
<link rel="modulepreload" crossorigin href="./assets/cells-BdgzY0of.js">
|
|
143
143
|
<link rel="modulepreload" crossorigin href="./assets/coerce-DWjFeXOY.js">
|
|
144
144
|
<link rel="modulepreload" crossorigin href="./assets/get-DjNf4SIX.js">
|
|
145
145
|
<link rel="modulepreload" crossorigin href="./assets/_hasPath-BmRQipI0.js">
|
|
@@ -147,47 +147,47 @@
|
|
|
147
147
|
<link rel="modulepreload" crossorigin href="./assets/_baseSet-Bpdo9AvU.js">
|
|
148
148
|
<link rel="modulepreload" crossorigin href="./assets/pick-DKIID_Mo.js">
|
|
149
149
|
<link rel="modulepreload" crossorigin href="./assets/errors-CNsgAw6m.js">
|
|
150
|
-
<link rel="modulepreload" crossorigin href="./assets/config-
|
|
150
|
+
<link rel="modulepreload" crossorigin href="./assets/config-DXjnAwtL.js">
|
|
151
151
|
<link rel="modulepreload" crossorigin href="./assets/state-C0irhlOZ.js">
|
|
152
152
|
<link rel="modulepreload" crossorigin href="./assets/state-DaWgt-rn.js">
|
|
153
153
|
<link rel="modulepreload" crossorigin href="./assets/LazyAnyLanguageCodeMirror-BPYE76jR.js">
|
|
154
154
|
<link rel="modulepreload" crossorigin href="./assets/copy-KlhazlhB.js">
|
|
155
155
|
<link rel="modulepreload" crossorigin href="./assets/micromark-factory-space-D9Dr-k4J.js">
|
|
156
156
|
<link rel="modulepreload" crossorigin href="./assets/chunk-YOKDWASO-BIpRENEC.js">
|
|
157
|
-
<link rel="modulepreload" crossorigin href="./assets/markdown-renderer-
|
|
157
|
+
<link rel="modulepreload" crossorigin href="./assets/markdown-renderer-DX2O5YiE.js">
|
|
158
158
|
<link rel="modulepreload" crossorigin href="./assets/copy-Djr5m5ac.js">
|
|
159
159
|
<link rel="modulepreload" crossorigin href="./assets/copy-icon-8-a5vovc.js">
|
|
160
|
-
<link rel="modulepreload" crossorigin href="./assets/useRunCells-
|
|
161
|
-
<link rel="modulepreload" crossorigin href="./assets/RenderHTML-
|
|
162
|
-
<link rel="modulepreload" crossorigin href="./assets/blob-
|
|
160
|
+
<link rel="modulepreload" crossorigin href="./assets/useRunCells-DP09DHT6.js">
|
|
161
|
+
<link rel="modulepreload" crossorigin href="./assets/RenderHTML-BFaztTR0.js">
|
|
162
|
+
<link rel="modulepreload" crossorigin href="./assets/blob-BSfsdCNF.js">
|
|
163
163
|
<link rel="modulepreload" crossorigin href="./assets/kbd-pdKBv96t.js">
|
|
164
|
-
<link rel="modulepreload" crossorigin href="./assets/useInstallPackage-
|
|
164
|
+
<link rel="modulepreload" crossorigin href="./assets/useInstallPackage-CVItDn1e.js">
|
|
165
165
|
<link rel="modulepreload" crossorigin href="./assets/share-BZW3tzEX.js">
|
|
166
166
|
<link rel="modulepreload" crossorigin href="./assets/events-CbeVJ6OD.js">
|
|
167
|
-
<link rel="modulepreload" crossorigin href="./assets/state-
|
|
168
|
-
<link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-
|
|
167
|
+
<link rel="modulepreload" crossorigin href="./assets/state-BHuYDaxs.js">
|
|
168
|
+
<link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-DmXl4Nre.js">
|
|
169
169
|
<link rel="modulepreload" crossorigin href="./assets/chevron-right-eAtVhbNZ.js">
|
|
170
170
|
<link rel="modulepreload" crossorigin href="./assets/dropdown-menu-DS6umAnH.js">
|
|
171
171
|
<link rel="modulepreload" crossorigin href="./assets/html-to-image-D_0rd3_B.js">
|
|
172
|
-
<link rel="modulepreload" crossorigin href="./assets/download-
|
|
172
|
+
<link rel="modulepreload" crossorigin href="./assets/download-RV4i1fWI.js">
|
|
173
173
|
<link rel="modulepreload" crossorigin href="./assets/switch-1h011wlH.js">
|
|
174
174
|
<link rel="modulepreload" crossorigin href="./assets/tabs-CY8E4r9U.js">
|
|
175
175
|
<link rel="modulepreload" crossorigin href="./assets/table-DG7Ap4H4.js">
|
|
176
176
|
<link rel="modulepreload" crossorigin href="./assets/eye-off-CxVozGAC.js">
|
|
177
177
|
<link rel="modulepreload" crossorigin href="./assets/refresh-cw-Qw1f8Jhy.js">
|
|
178
|
-
<link rel="modulepreload" crossorigin href="./assets/tree-actions-
|
|
178
|
+
<link rel="modulepreload" crossorigin href="./assets/tree-actions-Be_mzC1C.js">
|
|
179
179
|
<link rel="modulepreload" crossorigin href="./assets/ellipsis-63DyBLHQ.js">
|
|
180
180
|
<link rel="modulepreload" crossorigin href="./assets/external-link-UrX9KO36.js">
|
|
181
181
|
<link rel="modulepreload" crossorigin href="./assets/spinner-DyNE-o8o.js">
|
|
182
182
|
<link rel="modulepreload" crossorigin href="./assets/message-circle-C3rKm8_a.js">
|
|
183
183
|
<link rel="modulepreload" crossorigin href="./assets/hat-glasses-C8RhSVii.js">
|
|
184
184
|
<link rel="modulepreload" crossorigin href="./assets/package-GSoSTiIK.js">
|
|
185
|
-
<link rel="modulepreload" crossorigin href="./assets/datasource-
|
|
186
|
-
<link rel="modulepreload" crossorigin href="./assets/error-entries-
|
|
185
|
+
<link rel="modulepreload" crossorigin href="./assets/datasource-dKk3JHSQ.js">
|
|
186
|
+
<link rel="modulepreload" crossorigin href="./assets/error-entries-CJS0gOId.js">
|
|
187
187
|
<link rel="modulepreload" crossorigin href="./assets/alert-DTaqCu_d.js">
|
|
188
|
-
<link rel="modulepreload" crossorigin href="./assets/state-
|
|
189
|
-
<link rel="modulepreload" crossorigin href="./assets/cell-link-
|
|
190
|
-
<link rel="modulepreload" crossorigin href="./assets/MarimoErrorOutput-
|
|
188
|
+
<link rel="modulepreload" crossorigin href="./assets/state-CVgqwwCU.js">
|
|
189
|
+
<link rel="modulepreload" crossorigin href="./assets/cell-link-DFPHORAO.js">
|
|
190
|
+
<link rel="modulepreload" crossorigin href="./assets/MarimoErrorOutput-DVjK8RgY.js">
|
|
191
191
|
<link rel="modulepreload" crossorigin href="./assets/useDateFormatter-DA-62E-Y.js">
|
|
192
192
|
<link rel="modulepreload" crossorigin href="./assets/en-US-Buu61juQ.js">
|
|
193
193
|
<link rel="modulepreload" crossorigin href="./assets/isValid-q_Ad80ug.js">
|
|
@@ -206,13 +206,13 @@
|
|
|
206
206
|
<link rel="modulepreload" crossorigin href="./assets/formats-zylfwejq.js">
|
|
207
207
|
<link rel="modulepreload" crossorigin href="./assets/table-vrvqpuKJ.js">
|
|
208
208
|
<link rel="modulepreload" crossorigin href="./assets/react-resizable-panels.browser.esm-Dbe0MrFr.js">
|
|
209
|
-
<link rel="modulepreload" crossorigin href="./assets/JsonOutput-
|
|
209
|
+
<link rel="modulepreload" crossorigin href="./assets/JsonOutput-BJraU9kp.js">
|
|
210
210
|
<link rel="modulepreload" crossorigin href="./assets/chart-no-axes-column-C4_v6fQW.js">
|
|
211
211
|
<link rel="modulepreload" crossorigin href="./assets/square-function-_W_Lo0P4.js">
|
|
212
212
|
<link rel="modulepreload" crossorigin href="./assets/spec-uCpVvaAR.js">
|
|
213
213
|
<link rel="modulepreload" crossorigin href="./assets/semaphore-BjoL5P0h.js">
|
|
214
214
|
<link rel="modulepreload" crossorigin href="./assets/fileToBase64-BgBraYAr.js">
|
|
215
|
-
<link rel="modulepreload" crossorigin href="./assets/useBoolean-
|
|
215
|
+
<link rel="modulepreload" crossorigin href="./assets/useBoolean-j0qHaJxu.js">
|
|
216
216
|
<link rel="modulepreload" crossorigin href="./assets/code-xml-SQaZqvcO.js">
|
|
217
217
|
<link rel="modulepreload" crossorigin href="./assets/file-headphone-Dl35U6h3.js">
|
|
218
218
|
<link rel="modulepreload" crossorigin href="./assets/file-BPBVl9pl.js">
|
|
@@ -220,11 +220,11 @@
|
|
|
220
220
|
<link rel="modulepreload" crossorigin href="./assets/file-icons-CdJgUy-I.js">
|
|
221
221
|
<link rel="modulepreload" crossorigin href="./assets/globe-UdPdIbF7.js">
|
|
222
222
|
<link rel="modulepreload" crossorigin href="./assets/esm-CI_o7NhW.js">
|
|
223
|
-
<link rel="modulepreload" crossorigin href="./assets/useAddCell-
|
|
224
|
-
<link rel="modulepreload" crossorigin href="./assets/readonly-python-code-
|
|
223
|
+
<link rel="modulepreload" crossorigin href="./assets/useAddCell-DK79W1vA.js">
|
|
224
|
+
<link rel="modulepreload" crossorigin href="./assets/readonly-python-code-BLotL3XP.js">
|
|
225
225
|
<link rel="modulepreload" crossorigin href="./assets/data-grid-types-DgHVN_Zz.js">
|
|
226
226
|
<link rel="modulepreload" crossorigin href="./assets/glide-utils-HFqhvWHI.js">
|
|
227
|
-
<link rel="modulepreload" crossorigin href="./assets/column-preview-
|
|
227
|
+
<link rel="modulepreload" crossorigin href="./assets/column-preview-ivm1b-GY.js">
|
|
228
228
|
<link rel="modulepreload" crossorigin href="./assets/square-BPmgQFnh.js">
|
|
229
229
|
<link rel="modulepreload" crossorigin href="./assets/triangle-alert-DmIqR8sY.js">
|
|
230
230
|
<link rel="modulepreload" crossorigin href="./assets/prop-types-Djf4O40e.js">
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
<link rel="modulepreload" crossorigin href="./assets/icons-CiZ_8zS-.js">
|
|
237
237
|
<link rel="modulepreload" crossorigin href="./assets/useDeepCompareMemoize-DFIVN9dn.js">
|
|
238
238
|
<link rel="modulepreload" crossorigin href="./assets/pathUtils-DPmlLd-r.js">
|
|
239
|
-
<link rel="modulepreload" crossorigin href="./assets/floating-outline-
|
|
239
|
+
<link rel="modulepreload" crossorigin href="./assets/floating-outline-CrWdiNQ2.js">
|
|
240
240
|
<link rel="stylesheet" crossorigin href="./assets/cells-0PFKL3SH.css">
|
|
241
241
|
<link rel="stylesheet" crossorigin href="./assets/markdown-renderer-DjIHoF9Z.css">
|
|
242
242
|
<link rel="stylesheet" crossorigin href="./assets/JsonOutput-B0GmlMnR.css">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marimo-team/frontend",
|
|
3
|
-
"version": "0.25.3-
|
|
3
|
+
"version": "0.25.3-dev42",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@marimo-team/codemirror-mcp": "^0.1.7",
|
|
58
58
|
"@marimo-team/codemirror-sql": "^0.3.0",
|
|
59
59
|
"@marimo-team/llm-info": "workspace:*",
|
|
60
|
+
"@marimo-team/client": "workspace:*",
|
|
60
61
|
"@marimo-team/marimo-api": "workspace:*",
|
|
61
62
|
"@marimo-team/react-slotz": "^0.2.0",
|
|
62
63
|
"@marimo-team/smart-cells": "workspace:*",
|
|
@@ -185,8 +186,6 @@
|
|
|
185
186
|
"storybook": "storybook dev -p 6006",
|
|
186
187
|
"build-storybook": "storybook build",
|
|
187
188
|
"sync-katex-css": "node --experimental-strip-types scripts/sync-katex-css.ts",
|
|
188
|
-
"codegen": "node --experimental-strip-types scripts/generate-host-protocol.ts",
|
|
189
|
-
"codegen:check": "node --experimental-strip-types scripts/generate-host-protocol.ts --check",
|
|
190
189
|
"doctor": "npx react-doctor@latest"
|
|
191
190
|
},
|
|
192
191
|
"peerDependencies": {
|
|
@@ -216,7 +215,6 @@
|
|
|
216
215
|
"jsdom": "^24.1.3",
|
|
217
216
|
"msw": "^2.15.0",
|
|
218
217
|
"npm-run-all2": "^6.2.6",
|
|
219
|
-
"orval": "8.40.0",
|
|
220
218
|
"oxc-transform-react": "0.145.0",
|
|
221
219
|
"oxfmt": "^0.68.0",
|
|
222
220
|
"oxlint": "^1.83.0",
|
|
@@ -19,6 +19,7 @@ it("enforces host dependencies for runtime and type imports", () => {
|
|
|
19
19
|
"src/core/host/allowed.ts": `
|
|
20
20
|
import { atom } from "jotai/vanilla";
|
|
21
21
|
import { z } from "zod";
|
|
22
|
+
import * as Protocol from "@marimo-team/client/protocol";
|
|
22
23
|
import { Logger } from "@/utils/Logger";
|
|
23
24
|
import type { Document } from "./document";
|
|
24
25
|
export * from "@/core/host/events";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { atom } from "jotai";
|
|
4
|
-
import type { Attachment } from "
|
|
4
|
+
import type { Attachment } from "@marimo-team/client/protocol";
|
|
5
5
|
import { notebookClientAtom } from "@/core/websocket/state";
|
|
6
6
|
|
|
7
|
-
export type { Attachment } from "
|
|
7
|
+
export type { Attachment } from "@marimo-team/client/protocol";
|
|
8
8
|
|
|
9
9
|
export const agentAttachmentsAtom = atom((get) => {
|
|
10
10
|
const notebook = get(notebookClientAtom);
|
package/src/core/host/AGENTS.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
# Host core
|
|
2
2
|
|
|
3
|
-
Production code may import host modules,
|
|
4
|
-
`@/utils/Logger`. Enforced by
|
|
3
|
+
Production code may import host modules, `@marimo-team/client`,
|
|
4
|
+
`jotai/vanilla`, `zod`, and `@/utils/Logger`. Enforced by
|
|
5
|
+
`marimo/host-imports`. Tests are exempt.
|
|
6
|
+
|
|
7
|
+
The protocol schemas and types live in `@marimo-team/client/protocol`.
|
|
8
|
+
The native `marimo` event is a marimo extension and is defined in `events.ts`.
|
|
5
9
|
|
|
6
10
|
Define interfaces here and inject application behavior through adapters.
|
|
7
11
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import { attachments } from "../resources/attachments";
|
|
5
|
-
import {
|
|
5
|
+
import { createReducer } from "@marimo-team/client/reducer";
|
|
6
6
|
import { fixtureEvents } from "./fixtures";
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const reducer = createReducer({ attachments });
|
|
9
9
|
const snapshot = fixtureEvents("notebook-events.sse");
|
|
10
10
|
const records = snapshot.flatMap((event) =>
|
|
11
11
|
event.event === "attachment" ? [event.data.attachment] : [],
|
|
12
12
|
);
|
|
13
|
-
const confirmed = () => snapshot.reduce(
|
|
13
|
+
const confirmed = () => snapshot.reduce(reducer.reduce, reducer.initial);
|
|
14
14
|
|
|
15
15
|
describe("attachment resource", () => {
|
|
16
16
|
it("collects snapshot records, replaces by id, and removes attachments", () => {
|
|
@@ -18,7 +18,7 @@ describe("attachment resource", () => {
|
|
|
18
18
|
expect(state.resources.attachments).toEqual(records);
|
|
19
19
|
const [browser, agent] = records;
|
|
20
20
|
const renamed = { ...agent, name: "Renamed agent" };
|
|
21
|
-
const updated =
|
|
21
|
+
const updated = reducer.reduce(state, {
|
|
22
22
|
event: "attachment",
|
|
23
23
|
id: "98",
|
|
24
24
|
data: { attachment: renamed },
|
|
@@ -26,13 +26,13 @@ describe("attachment resource", () => {
|
|
|
26
26
|
expect(updated.resources.attachments).toEqual([browser, renamed]);
|
|
27
27
|
expect(state.resources.attachments).toEqual(records);
|
|
28
28
|
|
|
29
|
-
const removed =
|
|
29
|
+
const removed = reducer.reduce(updated, {
|
|
30
30
|
event: "attachment.removed",
|
|
31
31
|
id: "99",
|
|
32
32
|
data: { id: browser.id, time: "2026-10-01T09:30:00Z" },
|
|
33
33
|
});
|
|
34
34
|
expect(removed.resources.attachments).toEqual([renamed]);
|
|
35
|
-
const repeated =
|
|
35
|
+
const repeated = reducer.reduce(removed, {
|
|
36
36
|
event: "attachment.removed",
|
|
37
37
|
id: "100",
|
|
38
38
|
data: { id: browser.id, time: "2026-10-01T09:30:00Z" },
|
|
@@ -40,10 +40,9 @@ describe("attachment resource", () => {
|
|
|
40
40
|
expect(repeated.resources.attachments).toBe(removed.resources.attachments);
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
it("
|
|
43
|
+
it("rebuilds records after reset", () => {
|
|
44
44
|
const state = confirmed();
|
|
45
|
-
|
|
46
|
-
const reset = stream.reduce(state, { event: "reset", data: {} });
|
|
45
|
+
const reset = reducer.reduce(state, { event: "reset", data: {} });
|
|
47
46
|
expect(reset.resources.attachments).toEqual([]);
|
|
48
47
|
const replacement = snapshot
|
|
49
48
|
.filter(
|
|
@@ -51,7 +50,7 @@ describe("attachment resource", () => {
|
|
|
51
50
|
event.event !== "attachment" ||
|
|
52
51
|
event.data.attachment.id === records[0].id,
|
|
53
52
|
)
|
|
54
|
-
.reduce(
|
|
53
|
+
.reduce(reducer.reduce, reset);
|
|
55
54
|
expect(replacement.resources.attachments).toEqual([records[0]]);
|
|
56
55
|
});
|
|
57
56
|
});
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
|
-
import type
|
|
4
|
+
import type * as Protocol from "@marimo-team/client/protocol";
|
|
5
5
|
import { document } from "../resources/document";
|
|
6
|
-
import {
|
|
6
|
+
import { createReducer } from "@marimo-team/client/reducer";
|
|
7
7
|
import { fixtureEvents } from "./fixtures";
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const reducer = createReducer({ document });
|
|
10
10
|
const snapshot = fixtureEvents("notebook-events.sse");
|
|
11
11
|
const edits = fixtureEvents("edits.sse");
|
|
12
12
|
|
|
13
|
-
function replay(
|
|
14
|
-
|
|
13
|
+
function replay(
|
|
14
|
+
events: readonly Protocol.EventOutput[],
|
|
15
|
+
from = reducer.initial,
|
|
16
|
+
) {
|
|
17
|
+
return events.reduce((state, event) => reducer.reduce(state, event), from);
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
const confirmed = () => replay(snapshot);
|
|
@@ -33,12 +36,12 @@ describe("document resource", () => {
|
|
|
33
36
|
confirmed(),
|
|
34
37
|
);
|
|
35
38
|
expect(current(pending)).toEqual(first);
|
|
36
|
-
const changed =
|
|
39
|
+
const changed = reducer.reduce(pending, edit);
|
|
37
40
|
expect(current(changed)?.revision).toEqual(edit.data.document);
|
|
38
41
|
expect([...current(changed)!.cells.keys()].toSorted()).toEqual(
|
|
39
42
|
edit.data.document.order.toSorted(),
|
|
40
43
|
);
|
|
41
|
-
const saved = current(
|
|
44
|
+
const saved = current(reducer.reduce(changed, save));
|
|
42
45
|
expect(saved?.revision).toEqual(save.data.document);
|
|
43
46
|
expect(saved?.cells.get("c3")?.code).toBe("x = 22");
|
|
44
47
|
expect(saved?.cells.has("k7f2")).toBe(false);
|
|
@@ -55,7 +58,7 @@ describe("document resource", () => {
|
|
|
55
58
|
order: revision.order.toReversed(),
|
|
56
59
|
version: revision.version + 1,
|
|
57
60
|
};
|
|
58
|
-
const changed =
|
|
61
|
+
const changed = reducer.reduce(state, {
|
|
59
62
|
event: "document",
|
|
60
63
|
data: { document: reordered },
|
|
61
64
|
id: "200",
|
|
@@ -66,17 +69,17 @@ describe("document resource", () => {
|
|
|
66
69
|
});
|
|
67
70
|
|
|
68
71
|
const empty = { ...revision, order: [] };
|
|
69
|
-
const opening =
|
|
72
|
+
const opening = reducer.reduce(reducer.initial, {
|
|
70
73
|
event: "document",
|
|
71
74
|
data: { document: empty },
|
|
72
75
|
});
|
|
73
76
|
expect(current(opening)).toBeNull();
|
|
74
77
|
expect(
|
|
75
|
-
current(
|
|
78
|
+
current(reducer.reduce(opening, { event: "ready", data: {}, id: "0" })),
|
|
76
79
|
).toEqual({ revision: empty, cells: new Map() });
|
|
77
80
|
expect(
|
|
78
81
|
current(
|
|
79
|
-
|
|
82
|
+
reducer.reduce(reducer.initial, { event: "ready", data: {}, id: "0" }),
|
|
80
83
|
),
|
|
81
84
|
).toBeNull();
|
|
82
85
|
});
|
|
@@ -89,7 +92,6 @@ describe("document resource", () => {
|
|
|
89
92
|
}
|
|
90
93
|
const partial = replay([cell, removed], state);
|
|
91
94
|
expect(current(partial)).toBe(current(state));
|
|
92
|
-
expect(stream.resume(partial)).toBe(partial);
|
|
93
95
|
const completed = replay(
|
|
94
96
|
[published, { event: "ready", data: {}, id: "113" }],
|
|
95
97
|
partial,
|
|
@@ -98,7 +100,7 @@ describe("document resource", () => {
|
|
|
98
100
|
});
|
|
99
101
|
|
|
100
102
|
it("removes a notebook without waiting for individual cell removals", () => {
|
|
101
|
-
const removed =
|
|
103
|
+
const removed = reducer.reduce(confirmed(), {
|
|
102
104
|
event: "notebook.removed",
|
|
103
105
|
data: { id: "n1", time: "2026-10-01T09:30:00Z" },
|
|
104
106
|
id: "200",
|
|
@@ -110,15 +112,15 @@ describe("document resource", () => {
|
|
|
110
112
|
const state = confirmed();
|
|
111
113
|
const revision = current(state)!.revision;
|
|
112
114
|
expect(() =>
|
|
113
|
-
|
|
115
|
+
reducer.reduce(state, {
|
|
114
116
|
event: "document",
|
|
115
117
|
data: { document: { ...revision, order: ["missing"] } },
|
|
116
118
|
id: "200",
|
|
117
119
|
}),
|
|
118
120
|
).toThrow("Document records do not match");
|
|
119
|
-
const partial =
|
|
121
|
+
const partial = reducer.reduce(state, edits[0]);
|
|
120
122
|
expect(() =>
|
|
121
|
-
|
|
123
|
+
reducer.reduce(partial, { event: "ready", data: {}, id: "200" }),
|
|
122
124
|
).toThrow("incomplete document update");
|
|
123
125
|
});
|
|
124
126
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { describe, expect, expectTypeOf, it } from "vitest";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { parseNotebookEvent } from "../events";
|
|
5
|
+
import { type NotebookEvent, parseNotebookEvent } from "../events";
|
|
6
6
|
|
|
7
7
|
describe("notebook messages", () => {
|
|
8
8
|
it("normalizes session and host envelopes for native marimo messages", () => {
|
|
@@ -10,6 +10,9 @@ describe("notebook messages", () => {
|
|
|
10
10
|
op: "variables",
|
|
11
11
|
variables: [{ name: "x", value: Number.NaN }],
|
|
12
12
|
};
|
|
13
|
+
expectTypeOf<
|
|
14
|
+
Extract<NotebookEvent, { event: "marimo" }>["data"]["marimo"]
|
|
15
|
+
>().toBeUnknown();
|
|
13
16
|
const host = { event: "marimo", data: { marimo: notification } };
|
|
14
17
|
expect(parseNotebookEvent({ data: notification })).toEqual(host);
|
|
15
18
|
expect(parseNotebookEvent({ ...host, id: "42" })).toEqual({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import NodeFs from "node:fs";
|
|
4
4
|
import NodeUrl from "node:url";
|
|
5
|
-
import
|
|
5
|
+
import * as Protocol from "@marimo-team/client/protocol";
|
|
6
6
|
|
|
7
7
|
/** Read the protocol's portable examples as transport messages. */
|
|
8
8
|
export function fixtureMessages(name: string) {
|
|
@@ -33,7 +33,9 @@ export function fixtureMessages(name: string) {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/** Read the protocol's portable examples as decoded
|
|
37
|
-
export function fixtureEvents(name: string):
|
|
38
|
-
return fixtureMessages(name).map(
|
|
36
|
+
/** Read the protocol's portable examples as decoded protocol events. */
|
|
37
|
+
export function fixtureEvents(name: string): Protocol.EventOutput[] {
|
|
38
|
+
return fixtureMessages(name).map(({ id, ...message }) =>
|
|
39
|
+
Protocol.Event.parse(id === undefined ? message : { ...message, id }),
|
|
40
|
+
);
|
|
39
41
|
}
|
package/src/core/host/events.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import * as Protocol from "
|
|
4
|
+
import * as Protocol from "@marimo-team/client/protocol";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Notebook stream events, including native marimo notifications.
|
|
@@ -29,16 +29,29 @@ const knownNames = new Set<string>(
|
|
|
29
29
|
Protocol.Event.options.flatMap((schema) => schema.shape.event.options),
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* A native marimo message carried by a host stream.
|
|
34
|
+
*
|
|
35
|
+
* The protocol leaves extension events to their producer. The payload is
|
|
36
|
+
* passed through for the session handler to interpret.
|
|
37
|
+
*/
|
|
38
|
+
const MarimoEvent = z.object({
|
|
39
|
+
event: z.literal("marimo"),
|
|
40
|
+
id: z.string().min(1).optional(),
|
|
41
|
+
data: z.object({ marimo: z.unknown() }),
|
|
42
|
+
});
|
|
43
|
+
|
|
32
44
|
/** A decoded event, or the name and cursor of an unrecognized event. */
|
|
33
45
|
export type NotebookEvent =
|
|
34
46
|
| Protocol.EventOutput
|
|
47
|
+
| z.output<typeof MarimoEvent>
|
|
35
48
|
| {
|
|
36
49
|
readonly event: "unknown";
|
|
37
50
|
readonly name: string;
|
|
38
51
|
readonly id?: string;
|
|
39
52
|
};
|
|
40
53
|
|
|
41
|
-
const sessionEnvelope = z.object({ data:
|
|
54
|
+
const sessionEnvelope = z.object({ data: z.unknown() });
|
|
42
55
|
|
|
43
56
|
/**
|
|
44
57
|
* Decode a host event or a legacy `{ data: notification }` session message.
|
|
@@ -54,6 +67,9 @@ export function parseNotebookEvent(value: unknown): NotebookEvent {
|
|
|
54
67
|
};
|
|
55
68
|
}
|
|
56
69
|
const parsed = envelope.parse(value);
|
|
70
|
+
if (parsed.event === "marimo") {
|
|
71
|
+
return MarimoEvent.parse(parsed);
|
|
72
|
+
}
|
|
57
73
|
if (knownNames.has(parsed.event)) {
|
|
58
74
|
return Protocol.Event.parse(parsed);
|
|
59
75
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { Logger } from "@/utils/Logger";
|
|
4
|
+
import type { Attachment } from "@marimo-team/client/protocol";
|
|
5
|
+
import { createReducer } from "@marimo-team/client/reducer";
|
|
4
6
|
import { type Atom, atom, type createStore } from "jotai/vanilla";
|
|
5
7
|
import {
|
|
6
8
|
type ConnectionStatus,
|
|
@@ -10,11 +12,16 @@ import {
|
|
|
10
12
|
type NotebookTransport,
|
|
11
13
|
TransportReadyState,
|
|
12
14
|
} from "./connection";
|
|
13
|
-
import { parseNotebookEvent } from "./events";
|
|
14
|
-
import type { Attachment } from "./protocol";
|
|
15
|
+
import { type NotebookEvent, parseNotebookEvent } from "./events";
|
|
15
16
|
import { attachments } from "./resources/attachments";
|
|
16
17
|
import { type Document, document } from "./resources/document";
|
|
17
|
-
|
|
18
|
+
|
|
19
|
+
/** Events that may arrive without a cursor after `ready`. */
|
|
20
|
+
const UNCURSORED = new Set<NotebookEvent["event"]>([
|
|
21
|
+
"reset",
|
|
22
|
+
"marimo",
|
|
23
|
+
"unknown",
|
|
24
|
+
]);
|
|
18
25
|
|
|
19
26
|
/** A connection to a notebook on a marimo host. */
|
|
20
27
|
export interface NotebookClient {
|
|
@@ -64,8 +71,8 @@ export function createNotebookClient(store: ReturnType<typeof createStore>) {
|
|
|
64
71
|
state: ConnectionState.NOT_STARTED,
|
|
65
72
|
});
|
|
66
73
|
// One atom holds the whole stream, which resource atoms derive from.
|
|
67
|
-
const
|
|
68
|
-
const streamAtom = atom(
|
|
74
|
+
const reducer = createReducer({ document, attachments });
|
|
75
|
+
const streamAtom = atom(reducer.initial);
|
|
69
76
|
// A resumed stream is live, but presence waits for this connection's ready.
|
|
70
77
|
const readyAtom = atom(false);
|
|
71
78
|
const documentAtom = atom(
|
|
@@ -103,6 +110,8 @@ export function createNotebookClient(store: ReturnType<typeof createStore>) {
|
|
|
103
110
|
let terminal = false;
|
|
104
111
|
let checkingHealth = false;
|
|
105
112
|
let streamKey: string | undefined;
|
|
113
|
+
// The id of the last live event. Null before `ready` and after `reset`.
|
|
114
|
+
let cursor: string | null = null;
|
|
106
115
|
const transport = createTransport(() => {
|
|
107
116
|
if (messageFormat === "session") {
|
|
108
117
|
return url();
|
|
@@ -118,15 +127,23 @@ export function createNotebookClient(store: ReturnType<typeof createStore>) {
|
|
|
118
127
|
identity.searchParams.delete("access_token");
|
|
119
128
|
identity.searchParams.sort();
|
|
120
129
|
const key = identity.toString();
|
|
130
|
+
const current = store.get(streamAtom);
|
|
131
|
+
// A live stream keeps its state and resumes from the cursor. An
|
|
132
|
+
// incomplete snapshot starts over.
|
|
121
133
|
const state =
|
|
122
|
-
key
|
|
123
|
-
?
|
|
124
|
-
:
|
|
134
|
+
key !== streamKey
|
|
135
|
+
? reducer.initial
|
|
136
|
+
: current.phase === "snapshot"
|
|
137
|
+
? { ...reducer.initial, notebookId: current.notebookId }
|
|
138
|
+
: current;
|
|
139
|
+
if (state.phase === "snapshot") {
|
|
140
|
+
cursor = null;
|
|
141
|
+
}
|
|
125
142
|
streamKey = key;
|
|
126
143
|
store.set(readyAtom, false);
|
|
127
144
|
store.set(streamAtom, state);
|
|
128
|
-
if (
|
|
129
|
-
next.searchParams.set("cursor",
|
|
145
|
+
if (cursor !== null) {
|
|
146
|
+
next.searchParams.set("cursor", cursor);
|
|
130
147
|
}
|
|
131
148
|
return next.toString();
|
|
132
149
|
});
|
|
@@ -188,7 +205,22 @@ export function createNotebookClient(store: ReturnType<typeof createStore>) {
|
|
|
188
205
|
let event;
|
|
189
206
|
try {
|
|
190
207
|
event = parseNotebookEvent(decodeJson(message.data));
|
|
191
|
-
|
|
208
|
+
const state = store.get(streamAtom);
|
|
209
|
+
if (
|
|
210
|
+
state.phase === "live" &&
|
|
211
|
+
event.id === undefined &&
|
|
212
|
+
!UNCURSORED.has(event.event)
|
|
213
|
+
) {
|
|
214
|
+
throw new Error("Live notebook event is missing its cursor");
|
|
215
|
+
}
|
|
216
|
+
if (event.event !== "marimo" && event.event !== "unknown") {
|
|
217
|
+
store.set(streamAtom, reducer.reduce(state, event));
|
|
218
|
+
}
|
|
219
|
+
if (event.event === "reset") {
|
|
220
|
+
cursor = null;
|
|
221
|
+
} else if (event.event === "ready" || state.phase === "live") {
|
|
222
|
+
cursor = event.id ?? cursor;
|
|
223
|
+
}
|
|
192
224
|
if (event.event === "ready" || event.event === "reset") {
|
|
193
225
|
store.set(readyAtom, event.event === "ready");
|
|
194
226
|
}
|
|
@@ -198,7 +230,8 @@ export function createNotebookClient(store: ReturnType<typeof createStore>) {
|
|
|
198
230
|
onMessageError(error);
|
|
199
231
|
return;
|
|
200
232
|
}
|
|
201
|
-
store.set(streamAtom,
|
|
233
|
+
store.set(streamAtom, reducer.initial);
|
|
234
|
+
cursor = null;
|
|
202
235
|
terminal = true;
|
|
203
236
|
setStatus({
|
|
204
237
|
...disconnected,
|
|
@@ -256,7 +289,7 @@ export function createNotebookClient(store: ReturnType<typeof createStore>) {
|
|
|
256
289
|
transport.removeEventListener("message", onMessage);
|
|
257
290
|
transport.close();
|
|
258
291
|
reconnect = undefined;
|
|
259
|
-
store.set(streamAtom,
|
|
292
|
+
store.set(streamAtom, reducer.initial);
|
|
260
293
|
setStatus({ state: ConnectionState.NOT_STARTED });
|
|
261
294
|
},
|
|
262
295
|
{ once: true },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import type { Attachment } from "
|
|
4
|
-
import type { Resource } from "
|
|
3
|
+
import type { Attachment } from "@marimo-team/client/protocol";
|
|
4
|
+
import type { Resource } from "@marimo-team/client/reducer";
|
|
5
5
|
|
|
6
6
|
/** Attachment records retained with the stream's resume cursor. */
|
|
7
|
-
export const attachments: Resource<readonly Attachment[]> = {
|
|
7
|
+
export const attachments: Resource<readonly Attachment[], "attachment"> = {
|
|
8
8
|
initial: [],
|
|
9
9
|
on: {
|
|
10
10
|
attachment: (state, { data: { attachment } }) =>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
import type * as Protocol from "
|
|
4
|
-
import type { Resource } from "
|
|
3
|
+
import type * as Protocol from "@marimo-team/client/protocol";
|
|
4
|
+
import type { Resource } from "@marimo-team/client/reducer";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The notebook's content at one revision.
|
|
@@ -58,7 +58,7 @@ function publish(
|
|
|
58
58
|
return { current: { revision, cells }, pending: null };
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export const document: Resource<DocumentState> = {
|
|
61
|
+
export const document: Resource<DocumentState, "cell" | "document"> = {
|
|
62
62
|
initial: { current: null, pending: null },
|
|
63
63
|
on: {
|
|
64
64
|
cell: (state, { data }) => {
|
|
@@ -45,7 +45,7 @@ import { notebookAtom } from "@/core/cells/cells";
|
|
|
45
45
|
import { AppConfigSchema } from "@/core/config/config-schema";
|
|
46
46
|
import { ConnectionNotice } from "@/components/editor/alerts/connection-notice";
|
|
47
47
|
import { kernelStartupErrorAtom } from "@/core/errors/state";
|
|
48
|
-
import type { RunEvent } from "
|
|
48
|
+
import type { RunEvent } from "@marimo-team/client/protocol";
|
|
49
49
|
import type { NotificationPayload } from "@/core/kernel/messages";
|
|
50
50
|
import { useRuntimeManager } from "@/core/runtime/config";
|
|
51
51
|
import { initialRunCompletedAtom } from "../../kernel/state";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./feedback-button-DaNc3uJa.js";export{e as FeedbackModal};
|