@dxos/plugin-script 0.8.4-main.2e9d522 → 0.8.4-main.548089c
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/lib/browser/DeploymentDialog-MZX4T77L.mjs +14 -0
- package/dist/lib/browser/NotebookContainer-S6GUYCUE.mjs +817 -0
- package/dist/lib/browser/NotebookContainer-S6GUYCUE.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-3JQSTDFZ.mjs +147 -0
- package/dist/lib/browser/ScriptContainer-3JQSTDFZ.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-HLQ7K3BT.mjs → app-graph-builder-2WR2ATTJ.mjs} +12 -10
- package/dist/lib/browser/app-graph-builder-2WR2ATTJ.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs +30 -0
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs.map +7 -0
- package/dist/lib/browser/chunk-2G2NA6DQ.mjs +88 -0
- package/dist/lib/browser/chunk-2G2NA6DQ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-P4HQKUCP.mjs → chunk-3IJASGG5.mjs} +23 -21
- package/dist/lib/browser/chunk-3IJASGG5.mjs.map +7 -0
- package/dist/lib/browser/chunk-5JSNQYZZ.mjs +517 -0
- package/dist/lib/browser/chunk-5JSNQYZZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QYAREHGH.mjs → chunk-EB6AXFXO.mjs} +8 -5
- package/dist/lib/browser/chunk-EB6AXFXO.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/{chunk-FIM2MVNJ.mjs → chunk-JRF6FHYQ.mjs} +179 -88
- package/dist/lib/browser/chunk-JRF6FHYQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-LNNCD2H4.mjs +102 -0
- package/dist/lib/browser/chunk-LNNCD2H4.mjs.map +7 -0
- package/dist/lib/browser/chunk-M6KJPUJK.mjs +111 -0
- package/dist/lib/browser/chunk-M6KJPUJK.mjs.map +7 -0
- package/dist/lib/browser/chunk-RXLF2X2R.mjs +304 -0
- package/dist/lib/browser/chunk-RXLF2X2R.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5TVBECWH.mjs → chunk-UOQ6NCH3.mjs} +2 -2
- package/dist/lib/browser/{compiler-CXCUA4UQ.mjs → compiler-4KHRSX7J.mjs} +10 -6
- package/dist/lib/browser/compiler-4KHRSX7J.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +108 -44
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-7B77IG3N.mjs → intent-resolver-PUMSYKVB.mjs} +39 -26
- package/dist/lib/browser/intent-resolver-PUMSYKVB.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-FYYXZA7C.mjs → react-surface-DLRMWFTN.mjs} +45 -21
- package/dist/lib/browser/react-surface-DLRMWFTN.mjs.map +7 -0
- package/dist/lib/browser/{settings-KCTBK5TY.mjs → settings-LNLSTZM4.mjs} +10 -8
- package/dist/lib/browser/settings-LNLSTZM4.mjs.map +7 -0
- package/dist/lib/browser/templates/index.mjs +2 -1
- package/dist/lib/browser/types/index.mjs +8 -4
- package/dist/lib/node-esm/DeploymentDialog-GL5AUWMR.mjs +15 -0
- package/dist/lib/node-esm/DeploymentDialog-GL5AUWMR.mjs.map +7 -0
- package/dist/lib/node-esm/NotebookContainer-RTUHQN25.mjs +818 -0
- package/dist/lib/node-esm/NotebookContainer-RTUHQN25.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-SSLISMLS.mjs +148 -0
- package/dist/lib/node-esm/ScriptContainer-SSLISMLS.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-7EYIHWH4.mjs → app-graph-builder-NCVLUL5R.mjs} +12 -10
- package/dist/lib/node-esm/app-graph-builder-NCVLUL5R.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs +31 -0
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-35M3CHYE.mjs → chunk-55JZVM6K.mjs} +2 -2
- package/dist/lib/node-esm/chunk-57JA6XL5.mjs +90 -0
- package/dist/lib/node-esm/chunk-57JA6XL5.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7NMI4CEU.mjs → chunk-ASPYIAYG.mjs} +179 -88
- package/dist/lib/node-esm/chunk-ASPYIAYG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs +113 -0
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AHXJ6NQU.mjs → chunk-IBV2DR36.mjs} +8 -5
- package/dist/lib/node-esm/chunk-IBV2DR36.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IQTBVH4L.mjs +518 -0
- package/dist/lib/node-esm/chunk-IQTBVH4L.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NNHWLRHT.mjs +103 -0
- package/dist/lib/node-esm/chunk-NNHWLRHT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Q5XB7DD4.mjs +305 -0
- package/dist/lib/node-esm/chunk-Q5XB7DD4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QKK3NDHW.mjs → chunk-RIE676OW.mjs} +23 -21
- package/dist/lib/node-esm/chunk-RIE676OW.mjs.map +7 -0
- package/dist/lib/node-esm/{compiler-EPFKQXPE.mjs → compiler-DU5NQISX.mjs} +10 -6
- package/dist/lib/node-esm/compiler-DU5NQISX.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +108 -44
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-FRZGS4TB.mjs → intent-resolver-JK7J6JQB.mjs} +39 -26
- package/dist/lib/node-esm/intent-resolver-JK7J6JQB.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-V32NWHKN.mjs → react-surface-BPQLLTT4.mjs} +45 -21
- package/dist/lib/node-esm/react-surface-BPQLLTT4.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-DXZ334A3.mjs → settings-IUFMOCXY.mjs} +10 -8
- package/dist/lib/node-esm/settings-IUFMOCXY.mjs.map +7 -0
- package/dist/lib/node-esm/templates/index.mjs +2 -1
- package/dist/lib/node-esm/types/index.mjs +8 -4
- package/dist/types/src/ScriptPlugin.d.ts +1 -1
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler.d.ts +1 -1
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts +4 -4
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +243 -13
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/DeploymentDialog/index.d.ts +1 -1
- package/dist/types/src/components/DeploymentDialog/index.d.ts.map +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -1
- package/dist/types/src/components/NotebookContainer.d.ts +10 -0
- package/dist/types/src/components/NotebookContainer.d.ts.map +1 -0
- package/dist/types/src/components/NotebookContainer.stories.d.ts +251 -0
- package/dist/types/src/components/NotebookContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +15 -0
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +9 -0
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +14 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +245 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/index.d.ts +3 -0
- package/dist/types/src/components/NotebookStack/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptContainer.d.ts +4 -4
- package/dist/types/src/components/ScriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +5 -6
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +242 -10
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts +2 -2
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +2 -2
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestContainer.d.ts +2 -2
- package/dist/types/src/components/TestPanel/TestContainer.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +4 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +11 -4
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/deploy.d.ts +18 -16
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +2 -2
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +4 -14
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +45 -0
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -0
- package/dist/types/src/notebook/compute-graph.test.d.ts +2 -0
- package/dist/types/src/notebook/compute-graph.test.d.ts.map +1 -0
- package/dist/types/src/notebook/eval.d.ts +13 -0
- package/dist/types/src/notebook/eval.d.ts.map +1 -0
- package/dist/types/src/notebook/index.d.ts +2 -0
- package/dist/types/src/notebook/index.d.ts.map +1 -0
- package/dist/types/src/notebook/vfs-parser.d.ts +74 -0
- package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -0
- package/dist/types/src/notebook/vfs-parser.test.d.ts +2 -0
- package/dist/types/src/notebook/vfs-parser.test.d.ts.map +1 -0
- package/dist/types/src/templates/chess.d.ts.map +1 -1
- package/dist/types/src/templates/data-generator.d.ts.map +1 -1
- package/dist/types/src/templates/discord.d.ts.map +1 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/gmail.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +43 -1
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/{echo.d.ts → ping.d.ts} +1 -1
- package/dist/types/src/templates/ping.d.ts.map +1 -0
- package/dist/types/src/testing/data.d.ts +3 -0
- package/dist/types/src/testing/data.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +30 -5
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +31 -0
- package/dist/types/src/types/Notebook.d.ts.map +1 -0
- package/dist/types/src/types/actions.d.ts +54 -0
- package/dist/types/src/types/actions.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +6 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/src/util/deploy.d.ts +7 -7
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +6 -3
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +82 -70
- package/src/ScriptPlugin.tsx +90 -71
- package/src/capabilities/app-graph-builder.ts +12 -11
- package/src/capabilities/artifact-definition.ts +8 -13
- package/src/capabilities/blueprint-definition.ts +30 -0
- package/src/capabilities/compiler.ts +3 -2
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/intent-resolver.ts +21 -15
- package/src/capabilities/react-surface.tsx +33 -19
- package/src/capabilities/settings.ts +3 -3
- package/src/compiler/compiler.ts +1 -1
- package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +39 -20
- package/src/components/DeploymentDialog/DeploymentDialog.tsx +45 -34
- package/src/components/DeploymentDialog/index.ts +1 -1
- package/src/components/FrameContainer/FrameContainer.tsx +4 -3
- package/src/components/NotebookContainer.stories.tsx +83 -0
- package/src/components/NotebookContainer.tsx +263 -0
- package/src/components/NotebookStack/NotebookCell.tsx +214 -0
- package/src/components/NotebookStack/NotebookMenu.tsx +47 -0
- package/src/components/NotebookStack/NotebookStack.stories.tsx +54 -0
- package/src/components/NotebookStack/NotebookStack.tsx +86 -0
- package/src/components/NotebookStack/index.ts +6 -0
- package/src/components/ScriptContainer.tsx +7 -6
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +34 -17
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +36 -29
- package/src/components/Settings/ScriptObjectSettings.tsx +127 -36
- package/src/components/Settings/ScriptPluginSettings.tsx +37 -47
- package/src/components/TestPanel/TestContainer.tsx +4 -3
- package/src/components/TestPanel/TestPanel.tsx +42 -19
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +79 -31
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +37 -35
- package/src/components/index.ts +3 -0
- package/src/events.ts +2 -2
- package/src/hooks/deploy.ts +23 -24
- package/src/hooks/format.ts +4 -4
- package/src/hooks/template.ts +6 -15
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +11 -6
- package/src/index.ts +1 -0
- package/src/meta.ts +7 -5
- package/src/notebook/compute-graph.test.ts +70 -0
- package/src/notebook/compute-graph.ts +206 -0
- package/src/notebook/eval.ts +105 -0
- package/src/notebook/index.ts +5 -0
- package/src/notebook/vfs-parser.test.ts +149 -0
- package/src/notebook/vfs-parser.ts +451 -0
- package/src/templates/chess.ts +3 -1
- package/src/templates/data-generator.ts +9 -3
- package/src/templates/discord.ts +12 -4
- package/src/templates/forex-effect.ts +7 -3
- package/src/templates/forex.ts +3 -1
- package/src/templates/gmail.ts +34 -64
- package/src/templates/index.ts +6 -6
- package/src/testing/data.ts +72 -0
- package/src/testing/index.ts +5 -0
- package/src/translations.ts +33 -7
- package/src/types/Notebook.ts +41 -0
- package/src/types/actions.ts +53 -0
- package/src/types/index.ts +3 -1
- package/src/types/types.ts +15 -0
- package/src/util/deploy.ts +29 -46
- package/src/util/functions.ts +37 -7
- package/dist/lib/browser/DeploymentDialog-M4QIHTDR.mjs +0 -12
- package/dist/lib/browser/ScriptContainer-Z6SIGRRC.mjs +0 -262
- package/dist/lib/browser/ScriptContainer-Z6SIGRRC.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-HLQ7K3BT.mjs.map +0 -7
- package/dist/lib/browser/artifact-definition-24Q3IHOU.mjs +0 -249
- package/dist/lib/browser/artifact-definition-24Q3IHOU.mjs.map +0 -7
- package/dist/lib/browser/chunk-3U6DTUH3.mjs +0 -283
- package/dist/lib/browser/chunk-3U6DTUH3.mjs.map +0 -7
- package/dist/lib/browser/chunk-FIM2MVNJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-FMDXKOP7.mjs +0 -233
- package/dist/lib/browser/chunk-FMDXKOP7.mjs.map +0 -7
- package/dist/lib/browser/chunk-IS4OG2UW.mjs +0 -39
- package/dist/lib/browser/chunk-IS4OG2UW.mjs.map +0 -7
- package/dist/lib/browser/chunk-P4HQKUCP.mjs.map +0 -7
- package/dist/lib/browser/chunk-QYAREHGH.mjs.map +0 -7
- package/dist/lib/browser/chunk-R4R7VOFY.mjs +0 -88
- package/dist/lib/browser/chunk-R4R7VOFY.mjs.map +0 -7
- package/dist/lib/browser/compiler-CXCUA4UQ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-7B77IG3N.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FYYXZA7C.mjs.map +0 -7
- package/dist/lib/browser/settings-KCTBK5TY.mjs.map +0 -7
- package/dist/lib/node-esm/DeploymentDialog-3KPRWFE7.mjs +0 -13
- package/dist/lib/node-esm/ScriptContainer-KPU75HHI.mjs +0 -263
- package/dist/lib/node-esm/ScriptContainer-KPU75HHI.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-7EYIHWH4.mjs.map +0 -7
- package/dist/lib/node-esm/artifact-definition-WAJFALUI.mjs +0 -250
- package/dist/lib/node-esm/artifact-definition-WAJFALUI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7NMI4CEU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AHXJ6NQU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-F5GFJ3PY.mjs +0 -90
- package/dist/lib/node-esm/chunk-F5GFJ3PY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JIPFLBYA.mjs +0 -40
- package/dist/lib/node-esm/chunk-JIPFLBYA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QKK3NDHW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RT43MACC.mjs +0 -284
- package/dist/lib/node-esm/chunk-RT43MACC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XJPK3IYI.mjs +0 -234
- package/dist/lib/node-esm/chunk-XJPK3IYI.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-EPFKQXPE.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-FRZGS4TB.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-V32NWHKN.mjs.map +0 -7
- package/dist/lib/node-esm/settings-DXZ334A3.mjs.map +0 -7
- package/dist/types/src/templates/echo.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -38
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/types/schema.ts +0 -37
- /package/dist/lib/browser/{DeploymentDialog-M4QIHTDR.mjs.map → DeploymentDialog-MZX4T77L.mjs.map} +0 -0
- /package/dist/lib/{node-esm/DeploymentDialog-3KPRWFE7.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-5TVBECWH.mjs.map → chunk-UOQ6NCH3.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-35M3CHYE.mjs.map → chunk-55JZVM6K.mjs.map} +0 -0
- /package/src/templates/{echo.ts → ping.ts} +0 -0
|
@@ -4,73 +4,87 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createSurface
|
|
7
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
+
import { useCapability } from '@dxos/app-framework/react';
|
|
8
9
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
9
10
|
import { Obj } from '@dxos/echo';
|
|
10
|
-
import {
|
|
11
|
+
import { Script } from '@dxos/functions';
|
|
11
12
|
import { SettingsStore } from '@dxos/local-storage';
|
|
12
13
|
import { getSpace } from '@dxos/react-client/echo';
|
|
13
14
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
14
|
-
import { type
|
|
15
|
+
import { type AccessToken } from '@dxos/types';
|
|
15
16
|
|
|
16
|
-
import { ScriptCapabilities } from './capabilities';
|
|
17
17
|
import {
|
|
18
18
|
DEPLOYMENT_DIALOG,
|
|
19
19
|
DeploymentDialog,
|
|
20
|
+
NotebookContainer,
|
|
20
21
|
ScriptContainer,
|
|
21
|
-
ScriptPluginSettings,
|
|
22
22
|
ScriptObjectSettings,
|
|
23
|
+
ScriptPluginSettings,
|
|
23
24
|
ScriptProperties,
|
|
24
25
|
TestContainer,
|
|
25
26
|
} from '../components';
|
|
26
27
|
import { meta } from '../meta';
|
|
27
|
-
import { type
|
|
28
|
+
import { Notebook, type ScriptSettings } from '../types';
|
|
29
|
+
|
|
30
|
+
import { ScriptCapabilities } from './capabilities';
|
|
28
31
|
|
|
29
32
|
export default () =>
|
|
30
33
|
contributes(Capabilities.ReactSurface, [
|
|
31
34
|
createSurface({
|
|
32
35
|
id: `${meta.id}/plugin-settings`,
|
|
33
36
|
role: 'article',
|
|
34
|
-
filter: (data): data is { subject: SettingsStore<
|
|
37
|
+
filter: (data): data is { subject: SettingsStore<ScriptSettings> } =>
|
|
35
38
|
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
36
39
|
component: ({ data: { subject } }) => <ScriptPluginSettings settings={subject.value} />,
|
|
37
40
|
}),
|
|
38
41
|
createSurface({
|
|
39
|
-
id: `${meta.id}/article`,
|
|
40
|
-
role: 'article',
|
|
41
|
-
filter: (data): data is { subject:
|
|
42
|
+
id: `${meta.id}/script/article`,
|
|
43
|
+
role: ['article', 'section'],
|
|
44
|
+
filter: (data): data is { subject: Script.Script } => Obj.instanceOf(Script.Script, data.subject),
|
|
42
45
|
component: ({ data, role }) => {
|
|
43
46
|
const compiler = useCapability(ScriptCapabilities.Compiler);
|
|
44
47
|
// TODO(dmaretskyi): Since settings store is not reactive, this would break on the script plugin being enabled without a page reload.
|
|
45
|
-
const settings = useCapability(Capabilities.SettingsStore).getStore<
|
|
48
|
+
const settings = useCapability(Capabilities.SettingsStore).getStore<ScriptSettings>(meta.id)?.value;
|
|
46
49
|
return <ScriptContainer role={role} script={data.subject} settings={settings} env={compiler.environment} />;
|
|
47
50
|
},
|
|
48
51
|
}),
|
|
52
|
+
createSurface({
|
|
53
|
+
id: `${meta.id}/notebook/article`,
|
|
54
|
+
role: 'article',
|
|
55
|
+
filter: (data): data is { subject: Notebook.Notebook } => Obj.instanceOf(Notebook.Notebook, data.subject),
|
|
56
|
+
component: ({ data, role }) => {
|
|
57
|
+
const compiler = useCapability(ScriptCapabilities.Compiler);
|
|
58
|
+
return <NotebookContainer role={role} notebook={data.subject} env={compiler.environment} />;
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
// TODO(burdon): Standardize PluginSettings vs ObjectSettings.
|
|
62
|
+
// TODO(burdon): Why is ScriptProperties different from ScriptObjectSettings?
|
|
49
63
|
createSurface({
|
|
50
64
|
id: `${meta.id}/companion/base-settings`,
|
|
51
65
|
role: 'base-object-settings',
|
|
52
|
-
filter: (data): data is { subject:
|
|
66
|
+
filter: (data): data is { subject: Script.Script } => Obj.instanceOf(Script.Script, data.subject),
|
|
53
67
|
component: ({ data }) => <ScriptProperties object={data.subject} />,
|
|
54
68
|
}),
|
|
55
69
|
createSurface({
|
|
56
70
|
id: `${meta.id}/companion/settings`,
|
|
57
71
|
role: 'object-settings',
|
|
58
|
-
filter: (data): data is { subject:
|
|
72
|
+
filter: (data): data is { subject: Script.Script } => Obj.instanceOf(Script.Script, data.subject),
|
|
59
73
|
component: ({ data }) => <ScriptObjectSettings object={data.subject} />,
|
|
60
74
|
}),
|
|
61
75
|
createSurface({
|
|
62
76
|
id: `${meta.id}/companion/execute`,
|
|
63
77
|
role: 'article',
|
|
64
|
-
filter: (data): data is { companionTo:
|
|
65
|
-
Obj.instanceOf(
|
|
78
|
+
filter: (data): data is { companionTo: Script.Script } =>
|
|
79
|
+
Obj.instanceOf(Script.Script, data.companionTo) && data.subject === 'execute',
|
|
66
80
|
component: ({ data, role }) => <TestContainer script={data.companionTo} role={role} />,
|
|
67
81
|
}),
|
|
68
82
|
createSurface({
|
|
69
83
|
id: `${meta.id}/companion/logs`,
|
|
70
84
|
role: 'article',
|
|
71
|
-
filter: (data): data is { companionTo:
|
|
72
|
-
Obj.instanceOf(
|
|
73
|
-
component: ({ data
|
|
85
|
+
filter: (data): data is { companionTo: Script.Script } =>
|
|
86
|
+
Obj.instanceOf(Script.Script, data.companionTo) && data.subject === 'logs',
|
|
87
|
+
component: ({ data }) => {
|
|
74
88
|
const space = getSpace(data.companionTo);
|
|
75
89
|
return (
|
|
76
90
|
<StackItem.Content>
|
|
@@ -82,7 +96,7 @@ export default () =>
|
|
|
82
96
|
createSurface({
|
|
83
97
|
id: DEPLOYMENT_DIALOG,
|
|
84
98
|
role: 'dialog',
|
|
85
|
-
filter: (data): data is { props: { accessToken:
|
|
99
|
+
filter: (data): data is { props: { accessToken: AccessToken.AccessToken; scriptTemplates: any } } =>
|
|
86
100
|
data.component === DEPLOYMENT_DIALOG,
|
|
87
101
|
component: ({ data }) => <DeploymentDialog {...data.props} />,
|
|
88
102
|
}),
|
|
@@ -6,16 +6,16 @@ import { Capabilities, contributes } from '@dxos/app-framework';
|
|
|
6
6
|
import { live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
8
|
import { meta } from '../meta';
|
|
9
|
-
import {
|
|
9
|
+
import { ScriptSettings } from '../types';
|
|
10
10
|
|
|
11
11
|
export default () => {
|
|
12
|
-
const settings = live(
|
|
12
|
+
const settings = live<ScriptSettings>({
|
|
13
13
|
editorInputMode: 'vscode',
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
return contributes(Capabilities.Settings, {
|
|
17
17
|
prefix: meta.id,
|
|
18
|
-
schema:
|
|
18
|
+
schema: ScriptSettings,
|
|
19
19
|
value: settings,
|
|
20
20
|
});
|
|
21
21
|
};
|
package/src/compiler/compiler.ts
CHANGED
|
@@ -2,38 +2,57 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
8
|
+
import { IntentPlugin } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
10
12
|
import { Dialog } from '@dxos/react-ui';
|
|
11
|
-
import {
|
|
13
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
|
+
import { AccessToken } from '@dxos/types';
|
|
12
15
|
|
|
13
16
|
import { translations } from '../../translations';
|
|
14
|
-
import { DeploymentDialog } from '../DeploymentDialog/DeploymentDialog';
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{ label: 'Script 1', templateId: 'template1' },
|
|
21
|
-
{ label: 'Script 2', templateId: 'template2' },
|
|
22
|
-
{ label: 'Script 3', templateId: 'template3' },
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
render: (args: any) => (
|
|
18
|
+
import { DeploymentDialog, type DeploymentDialogProps } from './DeploymentDialog';
|
|
19
|
+
|
|
20
|
+
const DefaultStory = (props: DeploymentDialogProps) => {
|
|
21
|
+
return (
|
|
26
22
|
<Dialog.Root defaultOpen={true}>
|
|
27
|
-
<DeploymentDialog {...
|
|
23
|
+
<DeploymentDialog {...props} />
|
|
28
24
|
</Dialog.Root>
|
|
29
|
-
)
|
|
25
|
+
);
|
|
30
26
|
};
|
|
31
27
|
|
|
32
|
-
const meta
|
|
28
|
+
const meta = {
|
|
33
29
|
title: 'plugins/plugin-script/DeploymentDialog',
|
|
34
30
|
component: DeploymentDialog,
|
|
31
|
+
render: DefaultStory,
|
|
35
32
|
parameters: { translations },
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
34
|
+
decorators: [
|
|
35
|
+
withTheme,
|
|
36
|
+
withPluginManager({
|
|
37
|
+
plugins: [IntentPlugin(), ClientPlugin({})],
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
40
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
38
41
|
|
|
39
42
|
export default meta;
|
|
43
|
+
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
|
|
46
|
+
export const Default: Story = {
|
|
47
|
+
args: {
|
|
48
|
+
accessToken: Obj.make(AccessToken.AccessToken, {
|
|
49
|
+
source: 'example.com',
|
|
50
|
+
token: 'example-token',
|
|
51
|
+
}),
|
|
52
|
+
scriptTemplates: [
|
|
53
|
+
{ id: 't-1', name: 'Script 1', source: 'template1' },
|
|
54
|
+
{ id: 't-2', name: 'Script 2', source: 'template2' },
|
|
55
|
+
{ id: 't-3', name: 'Script 3', source: 'template3' },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -4,29 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useEffect, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { LayoutAction, createIntent } from '@dxos/app-framework';
|
|
8
|
+
import { useIntentDispatcher } from '@dxos/app-framework/react';
|
|
8
9
|
import { getSpace } from '@dxos/react-client/echo';
|
|
9
|
-
import { Button, Dialog,
|
|
10
|
-
import { type
|
|
10
|
+
import { Button, Dialog, IconButton, useTranslation } from '@dxos/react-ui';
|
|
11
|
+
import { type AccessToken } from '@dxos/types';
|
|
11
12
|
|
|
12
|
-
import { useCreateAndDeployScriptTemplates } from '../../hooks
|
|
13
|
-
import {
|
|
13
|
+
import { useCreateAndDeployScriptTemplates } from '../../hooks';
|
|
14
|
+
import { meta } from '../../meta';
|
|
14
15
|
import { type Template } from '../../templates';
|
|
15
16
|
|
|
16
|
-
export const DEPLOYMENT_DIALOG = `${
|
|
17
|
+
export const DEPLOYMENT_DIALOG = `${meta.id}/deployment/dialog`;
|
|
17
18
|
|
|
18
19
|
// TODO(ZaymonFC):
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
20
|
+
// - Show activity and feedback to the user.
|
|
21
|
+
// - Only take an array of templateIds and get the name from the data.
|
|
22
|
+
// - Pending / onError states.
|
|
22
23
|
|
|
23
|
-
type DeploymentDialogProps = {
|
|
24
|
-
accessToken:
|
|
24
|
+
export type DeploymentDialogProps = {
|
|
25
|
+
accessToken: AccessToken.AccessToken;
|
|
25
26
|
scriptTemplates: Template[];
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDialogProps) => {
|
|
29
|
-
const { t } = useTranslation(
|
|
30
|
+
const { t } = useTranslation(meta.id);
|
|
30
31
|
const space = useMemo(() => getSpace(accessToken), [accessToken]);
|
|
31
32
|
|
|
32
33
|
// TODO(ZaymonFC): Thinking further. All of this should get moved to intents to run async in the background.
|
|
@@ -41,35 +42,39 @@ export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDia
|
|
|
41
42
|
createIntent(LayoutAction.AddToast, {
|
|
42
43
|
part: 'toast',
|
|
43
44
|
subject: {
|
|
44
|
-
id: `${
|
|
45
|
+
id: `${meta.id}/deployment-success`,
|
|
45
46
|
icon: 'ph--check--regular',
|
|
46
47
|
duration: Infinity,
|
|
47
|
-
title: ['script deployment toast label', { ns:
|
|
48
|
-
description: ['script deployment toast description', { ns:
|
|
49
|
-
closeLabel: ['script deployment toast close label', { ns:
|
|
48
|
+
title: ['script deployment toast label', { ns: meta.id, count: scriptTemplates.length }],
|
|
49
|
+
description: ['script deployment toast description', { ns: meta.id, count: scriptTemplates.length }],
|
|
50
|
+
closeLabel: ['script deployment toast close label', { ns: meta.id, count: scriptTemplates.length }],
|
|
50
51
|
},
|
|
51
52
|
}),
|
|
52
53
|
);
|
|
53
|
-
void dispatch(
|
|
54
|
+
void dispatch(
|
|
55
|
+
createIntent(LayoutAction.UpdateDialog, {
|
|
56
|
+
part: 'dialog',
|
|
57
|
+
options: { state: false },
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
54
60
|
}
|
|
55
61
|
if (status === 'error') {
|
|
56
|
-
void dispatch(
|
|
62
|
+
void dispatch(
|
|
63
|
+
createIntent(LayoutAction.UpdateDialog, {
|
|
64
|
+
part: 'dialog',
|
|
65
|
+
options: { state: false },
|
|
66
|
+
}),
|
|
67
|
+
);
|
|
57
68
|
void dispatch(
|
|
58
69
|
createIntent(LayoutAction.AddToast, {
|
|
59
70
|
part: 'toast',
|
|
60
71
|
subject: {
|
|
61
|
-
id: `${
|
|
72
|
+
id: `${meta.id}/deployment-error`,
|
|
62
73
|
icon: 'ph--warning--regular',
|
|
63
74
|
duration: Infinity,
|
|
64
|
-
title: ['script deployment error toast label', { ns:
|
|
65
|
-
description: [
|
|
66
|
-
|
|
67
|
-
{ ns: SCRIPT_PLUGIN, count: scriptTemplates.length },
|
|
68
|
-
],
|
|
69
|
-
closeLabel: [
|
|
70
|
-
'script deployment error toast close label',
|
|
71
|
-
{ ns: SCRIPT_PLUGIN, count: scriptTemplates.length },
|
|
72
|
-
],
|
|
75
|
+
title: ['script deployment error toast label', { ns: meta.id, count: scriptTemplates.length }],
|
|
76
|
+
description: ['script deployment error toast description', { ns: meta.id, count: scriptTemplates.length }],
|
|
77
|
+
closeLabel: ['script deployment error toast close label', { ns: meta.id, count: scriptTemplates.length }],
|
|
73
78
|
},
|
|
74
79
|
}),
|
|
75
80
|
);
|
|
@@ -81,14 +86,16 @@ export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDia
|
|
|
81
86
|
<div className='flex justify-between items-center'>
|
|
82
87
|
<Dialog.Title>{t('deployment dialog title')}</Dialog.Title>
|
|
83
88
|
<Dialog.Close asChild>
|
|
84
|
-
<
|
|
85
|
-
<Icon icon='ph--x--regular' size={4} />
|
|
86
|
-
</Button>
|
|
89
|
+
<IconButton icon='ph--x--regular' size={4} label='Close' iconOnly density='fine' variant='ghost' />
|
|
87
90
|
</Dialog.Close>
|
|
88
91
|
</div>
|
|
89
92
|
<div role='none' className='plb-4'>
|
|
90
93
|
{/* TODO: Implement deployment logic and UI. */}
|
|
91
|
-
<p>
|
|
94
|
+
<p>
|
|
95
|
+
{t('deployment dialog scripts found message', {
|
|
96
|
+
count: scriptTemplates.length,
|
|
97
|
+
})}
|
|
98
|
+
</p>
|
|
92
99
|
<ul className='pbs-2'>
|
|
93
100
|
{scriptTemplates.map((template) => {
|
|
94
101
|
return <li key={template.id}>{template.name}</li>;
|
|
@@ -98,8 +105,12 @@ export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDia
|
|
|
98
105
|
<div role='none' className='flex flex-row-reverse gap-1'>
|
|
99
106
|
<Button variant='primary' onClick={handleCreateAndDeployScripts} disabled={status === 'pending'}>
|
|
100
107
|
{status === 'pending'
|
|
101
|
-
? t('deployment dialog deploy functions pending button label', {
|
|
102
|
-
|
|
108
|
+
? t('deployment dialog deploy functions pending button label', {
|
|
109
|
+
count: scriptTemplates.length,
|
|
110
|
+
})
|
|
111
|
+
: t('deployment dialog deploy functions button label', {
|
|
112
|
+
count: scriptTemplates.length,
|
|
113
|
+
})}
|
|
103
114
|
</Button>
|
|
104
115
|
<Dialog.Close asChild disabled={status === 'pending'}>
|
|
105
116
|
<Button disabled={status === 'pending'}>{t('deployment dialog skip button label')}</Button>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useEffect, useRef } from 'react';
|
|
6
6
|
|
|
7
7
|
import { clientServiceBundle } from '@dxos/client-protocol';
|
|
8
|
-
import { type BundleResult } from '@dxos/functions/bundler';
|
|
8
|
+
import { type BundleResult } from '@dxos/functions-runtime/bundler';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
@@ -48,7 +48,8 @@ export const FrameContainer = ({ containerUrl, result, debug = true }: FrameCont
|
|
|
48
48
|
// Encodes compiled code via URL.
|
|
49
49
|
invariant(result.sourceHash, 'Source hash is required.');
|
|
50
50
|
const sourceHash = Buffer.from(result.sourceHash).toString('hex');
|
|
51
|
-
const src =
|
|
51
|
+
const src =
|
|
52
|
+
'bundle' in result ? `${containerUrl}?ts=${sourceHash}#code=${encodeURIComponent(result.bundle)}` : undefined;
|
|
52
53
|
|
|
53
54
|
return (
|
|
54
55
|
<>
|
|
@@ -68,7 +69,7 @@ export const FrameContainer = ({ containerUrl, result, debug = true }: FrameCont
|
|
|
68
69
|
{
|
|
69
70
|
timestamp: result.timestamp,
|
|
70
71
|
sourceHash,
|
|
71
|
-
error: result.error,
|
|
72
|
+
error: 'error' in result ? result.error : undefined,
|
|
72
73
|
src,
|
|
73
74
|
},
|
|
74
75
|
undefined,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { SERVICES_CONFIG } from '@dxos/ai/testing';
|
|
9
|
+
import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
|
|
10
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
|
+
import { Agent } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { Filter } from '@dxos/echo';
|
|
13
|
+
import { Function, serializeFunction } from '@dxos/functions';
|
|
14
|
+
import { AssistantPlugin } from '@dxos/plugin-assistant';
|
|
15
|
+
import { AutomationPlugin } from '@dxos/plugin-automation';
|
|
16
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
17
|
+
import { ExplorerPlugin } from '@dxos/plugin-explorer';
|
|
18
|
+
import { Markdown, MarkdownPlugin } from '@dxos/plugin-markdown';
|
|
19
|
+
import { SpacePlugin } from '@dxos/plugin-space';
|
|
20
|
+
import { Config, useClient } from '@dxos/react-client';
|
|
21
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
22
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
23
|
+
import { DataTypes } from '@dxos/schema';
|
|
24
|
+
|
|
25
|
+
import { createNotebook } from '../testing';
|
|
26
|
+
import { translations } from '../translations';
|
|
27
|
+
import { Notebook } from '../types';
|
|
28
|
+
|
|
29
|
+
import { NotebookContainer } from './NotebookContainer';
|
|
30
|
+
|
|
31
|
+
const meta = {
|
|
32
|
+
title: 'plugins/plugin-script/NotebookContainer',
|
|
33
|
+
component: NotebookContainer,
|
|
34
|
+
render: (args) => {
|
|
35
|
+
const client = useClient();
|
|
36
|
+
const space = client.spaces.default;
|
|
37
|
+
const notebooks = useQuery(space?.db, Filter.type(Notebook.Notebook));
|
|
38
|
+
return <NotebookContainer {...args} notebook={notebooks[0]} />;
|
|
39
|
+
},
|
|
40
|
+
decorators: [
|
|
41
|
+
withTheme,
|
|
42
|
+
withLayout({ container: 'column', classNames: 'is-prose' }),
|
|
43
|
+
withPluginManager({
|
|
44
|
+
plugins: [
|
|
45
|
+
ClientPlugin({
|
|
46
|
+
// TODO(wittjosiah): ComputeRuntime requires edge to be configured or it will throw.
|
|
47
|
+
config: new Config({
|
|
48
|
+
runtime: {
|
|
49
|
+
services: SERVICES_CONFIG.REMOTE,
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
52
|
+
types: [...DataTypes, Notebook.Notebook, Function.Function, Markdown.Document],
|
|
53
|
+
onClientInitialized: async ({ client }) => {
|
|
54
|
+
await client.halo.createIdentity();
|
|
55
|
+
await client.spaces.waitUntilReady();
|
|
56
|
+
const space = client.spaces.default;
|
|
57
|
+
await space.waitUntilReady();
|
|
58
|
+
|
|
59
|
+
space.db.add(createNotebook());
|
|
60
|
+
space.db.add(Markdown.make({ content: '# Hello World' }));
|
|
61
|
+
space.db.add(serializeFunction(Agent.prompt));
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
SpacePlugin({}),
|
|
65
|
+
SettingsPlugin(),
|
|
66
|
+
IntentPlugin(),
|
|
67
|
+
AssistantPlugin(),
|
|
68
|
+
AutomationPlugin(),
|
|
69
|
+
ExplorerPlugin(),
|
|
70
|
+
MarkdownPlugin(),
|
|
71
|
+
],
|
|
72
|
+
}),
|
|
73
|
+
],
|
|
74
|
+
parameters: {
|
|
75
|
+
translations,
|
|
76
|
+
},
|
|
77
|
+
} satisfies Meta<typeof NotebookContainer>;
|
|
78
|
+
|
|
79
|
+
export default meta;
|
|
80
|
+
|
|
81
|
+
type Story = StoryObj<typeof meta>;
|
|
82
|
+
|
|
83
|
+
export const Default: Story = {};
|