@dxos/plugin-script 0.8.4-main.c85a9c8dae → 0.8.4-main.dfabb4ec29
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-IIOXAS47.mjs → neutral/DeploymentDialog-6DBF3V6C.mjs} +22 -48
- package/dist/lib/neutral/DeploymentDialog-6DBF3V6C.mjs.map +7 -0
- package/dist/lib/{browser/NotebookContainer-VVZOKGRC.mjs → neutral/NotebookContainer-FIAQI3A2.mjs} +49 -139
- package/dist/lib/neutral/NotebookContainer-FIAQI3A2.mjs.map +7 -0
- package/dist/lib/{browser/ScriptContainer-A5SSIUH6.mjs → neutral/ScriptContainer-2OPBAXFB.mjs} +13 -27
- package/dist/lib/neutral/ScriptContainer-2OPBAXFB.mjs.map +7 -0
- package/dist/lib/neutral/ScriptPlugin.mjs +39 -0
- package/dist/lib/neutral/ScriptPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ScriptPlugin.node.mjs +27 -0
- package/dist/lib/neutral/ScriptPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs +31 -0
- package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs.map +7 -0
- package/dist/lib/neutral/ScriptProperties-F6NE6M4H.mjs +296 -0
- package/dist/lib/neutral/ScriptProperties-F6NE6M4H.mjs.map +7 -0
- package/dist/lib/neutral/TestContainer-JNFPLAJX.mjs +44 -0
- package/dist/lib/neutral/TestContainer-JNFPLAJX.mjs.map +7 -0
- package/dist/lib/neutral/access-token-created-ENMCEGVU.mjs +34 -0
- package/dist/lib/neutral/access-token-created-ENMCEGVU.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-7AWFCEQF.mjs +52 -0
- package/dist/lib/neutral/app-graph-builder-7AWFCEQF.mjs.map +7 -0
- package/dist/lib/{browser/blueprint-definition-YMZEJBAZ.mjs → neutral/blueprint-definition-T33SBPP2.mjs} +4 -6
- package/dist/lib/neutral/blueprint-definition-T33SBPP2.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +3 -1
- package/dist/lib/neutral/capabilities/index.mjs +21 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +17 -0
- package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
- package/dist/lib/neutral/chunk-2DMPFVUM.mjs +8 -0
- package/dist/lib/neutral/chunk-2DMPFVUM.mjs.map +7 -0
- package/dist/lib/{browser/chunk-G3XIOLLI.mjs → neutral/chunk-4RJALG6K.mjs} +21 -44
- package/dist/lib/neutral/chunk-4RJALG6K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-B4FVQEHV.mjs +8 -0
- package/dist/lib/neutral/chunk-B4FVQEHV.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BDRB6ZX2.mjs +52 -0
- package/dist/lib/neutral/chunk-BDRB6ZX2.mjs.map +7 -0
- package/dist/lib/{browser/chunk-J7PGML5B.mjs → neutral/chunk-BUKQITZT.mjs} +29 -29
- package/dist/lib/neutral/chunk-BUKQITZT.mjs.map +7 -0
- package/dist/lib/{browser/chunk-ATTZUDT7.mjs → neutral/chunk-D7DFASAE.mjs} +5 -20
- package/dist/lib/neutral/chunk-D7DFASAE.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MI6X5CTJ.mjs +336 -0
- package/dist/lib/neutral/chunk-MI6X5CTJ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-P2F3STZN.mjs +8 -0
- package/dist/lib/neutral/chunk-P2F3STZN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-PDB6UOSB.mjs +125 -0
- package/dist/lib/neutral/chunk-PDB6UOSB.mjs.map +7 -0
- package/dist/lib/{browser/chunk-WYR4QHPE.mjs → neutral/chunk-UYR3YH4Q.mjs} +3 -3
- package/dist/lib/{browser/chunk-WYR4QHPE.mjs.map → neutral/chunk-UYR3YH4Q.mjs.map} +3 -3
- package/dist/lib/{browser/compiler-53G6ZHQM.mjs → neutral/compiler-SMVIP5UN.mjs} +24 -22
- package/dist/lib/neutral/compiler-SMVIP5UN.mjs.map +7 -0
- package/dist/lib/{browser/chunk-PLDBKKYO.mjs → neutral/components/index.mjs} +163 -233
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +17 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-OZRIZ7RN.mjs +44 -0
- package/dist/lib/neutral/create-OZRIZ7RN.mjs.map +7 -0
- package/dist/lib/neutral/create-object-F2NWICFV.mjs +44 -0
- package/dist/lib/neutral/create-object-F2NWICFV.mjs.map +7 -0
- package/dist/lib/neutral/create-script-VBA3SLSU.mjs +45 -0
- package/dist/lib/neutral/create-script-VBA3SLSU.mjs.map +7 -0
- package/dist/lib/neutral/delete-PAUWA2QM.mjs +21 -0
- package/dist/lib/neutral/delete-PAUWA2QM.mjs.map +7 -0
- package/dist/lib/neutral/deploy-CXVW54JJ.mjs +62 -0
- package/dist/lib/neutral/deploy-CXVW54JJ.mjs.map +7 -0
- package/dist/lib/{browser/chunk-MUEVLYXJ.mjs → neutral/hooks/index.mjs} +52 -80
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +41 -0
- package/dist/lib/neutral/inspect-invocations-LEOEP5I2.mjs +59 -0
- package/dist/lib/neutral/inspect-invocations-LEOEP5I2.mjs.map +7 -0
- package/dist/lib/neutral/install-function-5N24Q45W.mjs +51 -0
- package/dist/lib/neutral/install-function-5N24Q45W.mjs.map +7 -0
- package/dist/lib/neutral/invoke-5QVEZ3X5.mjs +33 -0
- package/dist/lib/neutral/invoke-5QVEZ3X5.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/operation-handler-OTCWYDFI.mjs +18 -0
- package/dist/lib/neutral/operation-handler-OTCWYDFI.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/query-deployed-functions-FVD7NYPA.mjs +30 -0
- package/dist/lib/neutral/query-deployed-functions-FVD7NYPA.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-JH2AOK7V.mjs +117 -0
- package/dist/lib/neutral/react-surface-JH2AOK7V.mjs.map +7 -0
- package/dist/lib/neutral/read-FFOSK6A3.mjs +26 -0
- package/dist/lib/neutral/read-FFOSK6A3.mjs.map +7 -0
- package/dist/lib/{browser/settings-76UM7442.mjs → neutral/settings-VJBW4OMK.mjs} +6 -12
- package/dist/lib/neutral/settings-VJBW4OMK.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/templates/index.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +104 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +17 -0
- package/dist/lib/neutral/update-PJS5GG3Y.mjs +63 -0
- package/dist/lib/neutral/update-PJS5GG3Y.mjs.map +7 -0
- package/dist/types/src/ScriptPlugin.d.ts +1 -0
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/ScriptPlugin.node.d.ts +4 -0
- package/dist/types/src/ScriptPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ScriptPlugin.test.d.ts +2 -0
- package/dist/types/src/ScriptPlugin.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/create.d.ts +11 -0
- package/dist/types/src/blueprints/functions/create.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/definitions.d.ts +141 -0
- package/dist/types/src/blueprints/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/delete.d.ts +18 -0
- package/dist/types/src/blueprints/functions/delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/deploy.d.ts +22 -0
- package/dist/types/src/blueprints/functions/deploy.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/inspect-invocations.d.ts +29 -0
- package/dist/types/src/blueprints/functions/inspect-invocations.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/install-function.d.ts +11 -0
- package/dist/types/src/blueprints/functions/install-function.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/invoke.d.ts +22 -0
- package/dist/types/src/blueprints/functions/invoke.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/query-deployed-functions.d.ts +13 -0
- package/dist/types/src/blueprints/functions/query-deployed-functions.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/read.d.ts +22 -0
- package/dist/types/src/blueprints/functions/read.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/update.d.ts +27 -0
- package/dist/types/src/blueprints/functions/update.d.ts.map +1 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler.d.ts +6 -0
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +16 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +19 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +18 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -5
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/{FrameContainer/FrameContainer.d.ts → FramePanel/FramePanel.d.ts} +3 -3
- package/dist/types/src/components/FramePanel/FramePanel.d.ts.map +1 -0
- package/dist/types/src/components/FramePanel/index.d.ts +2 -0
- package/dist/types/src/components/FramePanel/index.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +4 -2
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +219 -228
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts +8 -0
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +1 -0
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts +241 -0
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ScriptPluginSettings/index.d.ts +2 -0
- package/dist/types/src/components/ScriptPluginSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +7 -6
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +219 -228
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestPanel.d.ts +4 -2
- package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +5 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +3 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +219 -228
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/index.d.ts +1 -2
- package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts +5 -5
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +1 -1
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/NotebookContainer/index.d.ts +1 -2
- package/dist/types/src/containers/NotebookContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts +7 -7
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.stories.d.ts +242 -0
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptContainer/index.d.ts +1 -2
- package/dist/types/src/containers/ScriptContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts +7 -0
- package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts +7 -0
- package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts +7 -0
- package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +4 -5
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts +242 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/index.d.ts +1 -2
- package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -1
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts +1 -1
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -1
- package/dist/types/src/containers/TestContainer/index.d.ts +1 -2
- package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +0 -2
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/deploy.d.ts +17 -5
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +1 -1
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +1 -1
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts.map +1 -1
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
- package/dist/types/src/notebook/eval.d.ts.map +1 -1
- package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -1
- package/dist/types/src/operations/access-token-created.d.ts +5 -0
- package/dist/types/src/operations/access-token-created.d.ts.map +1 -0
- package/dist/types/src/operations/create-script.d.ts +5 -0
- package/dist/types/src/operations/create-script.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/templates/anthropic.d.ts +4 -5
- package/dist/types/src/templates/anthropic.d.ts.map +1 -1
- package/dist/types/src/templates/chat.d.ts.map +1 -1
- package/dist/types/src/templates/chess-bot.d.ts +8 -12
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
- package/dist/types/src/templates/commentary.d.ts +8 -11
- package/dist/types/src/templates/commentary.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/email.d.ts.map +1 -1
- package/dist/types/src/templates/forex-effect.d.ts +3 -2
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts +3 -2
- 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 +29 -29
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +2 -1
- package/dist/types/src/templates/ping.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-notebook.d.ts +3 -0
- package/dist/types/src/testing/test-notebook.d.ts.map +1 -0
- package/dist/types/src/testing/test-script.d.ts +7 -0
- package/dist/types/src/testing/test-script.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +222 -92
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +37 -25
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/ScriptCapabilities.d.ts +6 -0
- package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/ScriptEvents.d.ts +3 -0
- package/dist/types/src/types/ScriptEvents.d.ts.map +1 -0
- package/dist/types/src/types/ScriptOperation.d.ts +29 -0
- package/dist/types/src/types/ScriptOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +7 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -4
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -5
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts +2 -2
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +2 -2
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +153 -104
- package/src/ScriptPlugin.node.ts +21 -0
- package/src/ScriptPlugin.test.ts +31 -0
- package/src/ScriptPlugin.tsx +11 -43
- package/src/blueprints/functions/create.ts +47 -0
- package/src/blueprints/functions/definitions.ts +323 -0
- package/src/blueprints/functions/delete.ts +23 -0
- package/src/blueprints/functions/deploy.ts +70 -0
- package/src/blueprints/functions/index.ts +19 -0
- package/src/blueprints/functions/inspect-invocations.ts +56 -0
- package/src/blueprints/functions/install-function.ts +56 -0
- package/src/blueprints/functions/invoke.ts +35 -0
- package/src/blueprints/functions/query-deployed-functions.ts +31 -0
- package/src/blueprints/functions/read.ts +29 -0
- package/src/blueprints/functions/update.ts +68 -0
- package/src/blueprints/script-blueprint.ts +32 -8
- package/src/capabilities/app-graph-builder.ts +47 -0
- package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts} +4 -5
- package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +3 -1
- package/src/capabilities/{compiler/compiler.ts → compiler.ts} +17 -9
- package/src/capabilities/create-object.ts +48 -0
- package/src/capabilities/index.ts +14 -6
- package/src/capabilities/node.ts +16 -0
- package/src/capabilities/operation-handler.ts +21 -0
- package/src/capabilities/react-surface.tsx +130 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -4
- package/src/compiler/compiler.ts +8 -1
- package/src/components/{FrameContainer/FrameContainer.tsx → FramePanel/FramePanel.tsx} +2 -2
- package/src/components/{FrameContainer → FramePanel}/index.ts +1 -1
- package/src/components/NotebookStack/NotebookCell.tsx +23 -12
- package/src/components/NotebookStack/NotebookMenu.tsx +7 -7
- package/src/components/NotebookStack/NotebookStack.stories.tsx +8 -9
- package/src/components/NotebookStack/NotebookStack.tsx +24 -13
- package/src/components/QueryEditor/QueryEditor.stories.tsx +5 -11
- package/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.tsx +32 -0
- package/src/components/ScriptPluginSettings/ScriptPluginSettings.tsx +42 -0
- package/src/components/ScriptPluginSettings/index.ts +5 -0
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +5 -5
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +24 -26
- package/src/components/TestPanel/TestPanel.tsx +91 -177
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +4 -4
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +25 -18
- package/src/components/index.ts +5 -1
- package/src/constants.ts +2 -2
- package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +5 -3
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +26 -26
- package/src/containers/DeploymentDialog/index.ts +1 -3
- package/src/containers/NotebookContainer/NotebookContainer.stories.tsx +21 -23
- package/src/containers/NotebookContainer/NotebookContainer.tsx +39 -53
- package/src/containers/NotebookContainer/index.ts +1 -3
- package/src/containers/ScriptContainer/ScriptContainer.stories.tsx +106 -0
- package/src/containers/ScriptContainer/ScriptContainer.tsx +14 -13
- package/src/containers/ScriptContainer/index.ts +1 -3
- package/src/containers/ScriptProperties/BlueprintEditor.tsx +101 -0
- package/src/containers/ScriptProperties/FunctionBinding.tsx +83 -0
- package/src/containers/ScriptProperties/FunctionPublishing.tsx +121 -0
- package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +75 -0
- package/src/containers/ScriptProperties/ScriptProperties.tsx +12 -21
- package/src/containers/ScriptProperties/index.ts +1 -3
- package/src/containers/TestContainer/TestContainer.tsx +24 -8
- package/src/containers/TestContainer/index.ts +1 -3
- package/src/containers/index.ts +0 -2
- package/src/e2e/ai.test.ts +7 -6
- package/src/e2e/deploy.test.ts +6 -4
- package/src/hooks/deploy.ts +10 -8
- package/src/hooks/format.ts +5 -5
- package/src/hooks/template.ts +7 -6
- package/src/hooks/useCompiler.ts +3 -2
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +4 -3
- package/src/index.ts +2 -5
- package/src/meta.ts +2 -2
- package/src/notebook/compute-graph.test.ts +7 -7
- package/src/notebook/compute-graph.ts +1 -1
- package/src/notebook/vfs-parser.ts +10 -3
- package/src/operations/access-token-created.ts +37 -0
- package/src/operations/create-script.ts +46 -0
- package/src/operations/index.ts +10 -0
- package/src/plugin.ts +11 -0
- package/src/templates/anthropic.ts +19 -12
- package/src/templates/chat.ts +1 -1
- package/src/templates/chess-bot.ts +42 -37
- package/src/templates/commentary.ts +179 -161
- package/src/templates/data-generator.ts +1 -1
- package/src/templates/discord.ts +3 -3
- package/src/templates/forex-effect.ts +30 -19
- package/src/templates/forex.ts +24 -15
- package/src/templates/gmail.ts +4 -4
- package/src/templates/index.ts +18 -18
- package/src/templates/ping.ts +16 -8
- package/src/testing/index.ts +2 -1
- package/src/testing/simulator.test.ts +3 -4
- package/src/testing/{data.ts → test-notebook.ts} +11 -12
- package/src/testing/test-script.ts +29 -0
- package/src/translations.ts +86 -87
- package/src/types/Notebook.ts +9 -5
- package/src/types/ScriptCapabilities.ts +18 -0
- package/src/types/ScriptEvents.ts +11 -0
- package/src/types/ScriptOperation.ts +42 -0
- package/src/types/Settings.ts +20 -0
- package/src/types/index.ts +5 -4
- package/src/types/types.ts +1 -11
- package/src/util/deploy.ts +13 -11
- package/src/util/functions.ts +9 -8
- package/dist/lib/browser/DeploymentDialog-IIOXAS47.mjs.map +0 -7
- package/dist/lib/browser/NotebookContainer-VVZOKGRC.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-A5SSIUH6.mjs.map +0 -7
- package/dist/lib/browser/ScriptObjectSettings-HYYC7KXC.mjs +0 -294
- package/dist/lib/browser/ScriptObjectSettings-HYYC7KXC.mjs.map +0 -7
- package/dist/lib/browser/ScriptPluginSettings-UTWA7CBT.mjs +0 -55
- package/dist/lib/browser/ScriptPluginSettings-UTWA7CBT.mjs.map +0 -7
- package/dist/lib/browser/ScriptProperties-HREPUE65.mjs +0 -28
- package/dist/lib/browser/ScriptProperties-HREPUE65.mjs.map +0 -7
- package/dist/lib/browser/TestContainer-D4Y2K2TT.mjs +0 -39
- package/dist/lib/browser/TestContainer-D4Y2K2TT.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-66ZDI72K.mjs +0 -69
- package/dist/lib/browser/app-graph-builder-66ZDI72K.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-YMZEJBAZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-6IXFDTAI.mjs +0 -113
- package/dist/lib/browser/chunk-6IXFDTAI.mjs.map +0 -7
- package/dist/lib/browser/chunk-ATTZUDT7.mjs.map +0 -7
- package/dist/lib/browser/chunk-G3XIOLLI.mjs.map +0 -7
- package/dist/lib/browser/chunk-J7PGML5B.mjs.map +0 -7
- package/dist/lib/browser/chunk-MUEVLYXJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-PLDBKKYO.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q66L5EUR.mjs +0 -20
- package/dist/lib/browser/chunk-Q66L5EUR.mjs.map +0 -7
- package/dist/lib/browser/chunk-TW27W3EL.mjs +0 -29
- package/dist/lib/browser/chunk-TW27W3EL.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZYU2LP6U.mjs +0 -11
- package/dist/lib/browser/chunk-ZYU2LP6U.mjs.map +0 -7
- package/dist/lib/browser/compiler-53G6ZHQM.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -250
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-CYEISDDK.mjs +0 -79
- package/dist/lib/browser/operation-resolver-CYEISDDK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-26P6HAFD.mjs +0 -141
- package/dist/lib/browser/react-surface-26P6HAFD.mjs.map +0 -7
- package/dist/lib/browser/settings-76UM7442.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -18
- package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs +0 -139
- package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs.map +0 -7
- package/dist/lib/node-esm/NotebookContainer-ZLWTNMQA.mjs +0 -851
- package/dist/lib/node-esm/NotebookContainer-ZLWTNMQA.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-S4UKQAWP.mjs +0 -94
- package/dist/lib/node-esm/ScriptContainer-S4UKQAWP.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptObjectSettings-C5QBRERY.mjs +0 -295
- package/dist/lib/node-esm/ScriptObjectSettings-C5QBRERY.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptPluginSettings-MFACDW4R.mjs +0 -56
- package/dist/lib/node-esm/ScriptPluginSettings-MFACDW4R.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptProperties-FMNIX3KU.mjs +0 -29
- package/dist/lib/node-esm/ScriptProperties-FMNIX3KU.mjs.map +0 -7
- package/dist/lib/node-esm/TestContainer-AO45YPGV.mjs +0 -40
- package/dist/lib/node-esm/TestContainer-AO45YPGV.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-IGAZTJ45.mjs +0 -70
- package/dist/lib/node-esm/app-graph-builder-IGAZTJ45.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.mjs +0 -18
- package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -9
- package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs +0 -176
- package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5HSJPAK7.mjs +0 -33
- package/dist/lib/node-esm/chunk-5HSJPAK7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H46R2RS5.mjs +0 -790
- package/dist/lib/node-esm/chunk-H46R2RS5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JGN7TDJH.mjs +0 -69
- package/dist/lib/node-esm/chunk-JGN7TDJH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QG6ANK4B.mjs +0 -107
- package/dist/lib/node-esm/chunk-QG6ANK4B.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-S7DSCLOW.mjs +0 -31
- package/dist/lib/node-esm/chunk-S7DSCLOW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TZ2EBTPQ.mjs +0 -22
- package/dist/lib/node-esm/chunk-TZ2EBTPQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UFBVE33O.mjs +0 -12
- package/dist/lib/node-esm/chunk-UFBVE33O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WWD5LUU6.mjs +0 -114
- package/dist/lib/node-esm/chunk-WWD5LUU6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs +0 -398
- package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-HHQW7EP3.mjs +0 -100
- package/dist/lib/node-esm/compiler-HHQW7EP3.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -251
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-HFFDXWND.mjs +0 -80
- package/dist/lib/node-esm/operation-resolver-HFFDXWND.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-THCIK266.mjs +0 -142
- package/dist/lib/node-esm/react-surface-THCIK266.mjs.map +0 -7
- package/dist/lib/node-esm/settings-CCHDPLFJ.mjs +0 -37
- package/dist/lib/node-esm/settings-CCHDPLFJ.mjs.map +0 -7
- package/dist/lib/node-esm/templates/index.mjs +0 -11
- package/dist/lib/node-esm/types/index.mjs +0 -19
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/compiler/compiler.d.ts +0 -6
- package/dist/types/src/capabilities/compiler/compiler.d.ts.map +0 -1
- package/dist/types/src/capabilities/compiler/index.d.ts +0 -3
- package/dist/types/src/capabilities/compiler/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -7
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +0 -1
- package/dist/types/src/components/FrameContainer/frame.d.ts +0 -2
- package/dist/types/src/components/FrameContainer/frame.d.ts.map +0 -1
- package/dist/types/src/components/FrameContainer/index.d.ts +0 -2
- package/dist/types/src/components/FrameContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts +0 -7
- package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptObjectSettings/index.d.ts +0 -3
- package/dist/types/src/containers/ScriptObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts +0 -8
- package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptPluginSettings/index.d.ts +0 -3
- package/dist/types/src/containers/ScriptPluginSettings/index.d.ts.map +0 -1
- package/dist/types/src/testing/data.d.ts +0 -3
- package/dist/types/src/testing/data.d.ts.map +0 -1
- package/dist/types/src/types/actions.d.ts +0 -40
- package/dist/types/src/types/actions.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -12
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -5
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -56
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/artifact-definition/index.ts +0 -7
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/compiler/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -75
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -121
- package/src/capabilities/settings/index.ts +0 -7
- package/src/components/FrameContainer/frame.html +0 -25
- package/src/components/FrameContainer/frame.tsx +0 -51
- package/src/containers/ScriptObjectSettings/ScriptObjectSettings.tsx +0 -291
- package/src/containers/ScriptObjectSettings/index.ts +0 -7
- package/src/containers/ScriptPluginSettings/ScriptPluginSettings.tsx +0 -66
- package/src/containers/ScriptPluginSettings/index.ts +0 -7
- package/src/types/actions.ts +0 -45
- package/src/types/capabilities.ts +0 -17
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser/templates → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprints → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/templates/index.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{artifact-definition/artifact-definition.d.ts → artifact-definition.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/src/templates/ping.ts
CHANGED
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
5
6
|
import * as Schema from 'effect/Schema';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
handler: async ({ data }) => {
|
|
15
|
-
return data;
|
|
10
|
+
const Ping = Operation.make({
|
|
11
|
+
meta: {
|
|
12
|
+
key: 'org.dxos.script.ping',
|
|
13
|
+
name: 'Ping',
|
|
16
14
|
},
|
|
15
|
+
input: Schema.Any,
|
|
16
|
+
output: Schema.Any,
|
|
17
17
|
});
|
|
18
|
+
|
|
19
|
+
export default Ping.pipe(
|
|
20
|
+
Operation.withHandler(
|
|
21
|
+
Effect.fn(function* (data) {
|
|
22
|
+
return data;
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
);
|
package/src/testing/index.ts
CHANGED
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { readFile } from 'node:fs/promises';
|
|
6
|
-
|
|
7
5
|
import * as Record from 'effect/Record';
|
|
6
|
+
import { readFile } from 'node:fs/promises';
|
|
8
7
|
import { describe, expect, test } from 'vitest';
|
|
9
8
|
|
|
10
9
|
import { bundleFunction } from '@dxos/functions-runtime/bundler';
|
|
11
10
|
import { FunctionWorker } from '@dxos/functions-simulator-cloudflare';
|
|
12
11
|
import { ErrorCodec } from '@dxos/protocols';
|
|
13
12
|
|
|
14
|
-
// Requires downloading assets from R2
|
|
15
|
-
describe
|
|
13
|
+
// Requires downloading assets from R2.
|
|
14
|
+
describe('Run script in sumulator', { tags: ['functions-e2e'] }, () => {
|
|
16
15
|
test('forex-effect', { timeout: 120_000 }, async () => {
|
|
17
16
|
const source = await readFile(new URL('../templates/forex-effect.ts', import.meta.url), 'utf-8');
|
|
18
17
|
|
|
@@ -2,51 +2,50 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Routine } from '@dxos/compute';
|
|
6
6
|
import { Ref } from '@dxos/echo';
|
|
7
7
|
import { createObject } from '@dxos/echo-db';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
|
-
import { Markdown } from '@dxos/plugin-markdown
|
|
9
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
10
10
|
import { Text } from '@dxos/schema';
|
|
11
11
|
|
|
12
|
-
import { Notebook } from '
|
|
12
|
+
import { Notebook } from '#types';
|
|
13
13
|
|
|
14
14
|
// TODO(burdon): NOTE: createObject is required for tests.
|
|
15
|
-
|
|
16
15
|
export const createNotebook = (): Notebook.Notebook =>
|
|
17
16
|
Notebook.make({
|
|
18
17
|
cells: [
|
|
19
18
|
{
|
|
20
19
|
id: PublicKey.random().toString(),
|
|
21
20
|
type: 'script',
|
|
22
|
-
source: Ref.make(createObject(Text.make('c = a() + b'))),
|
|
21
|
+
source: Ref.make(createObject(Text.make({ content: 'c = a() + b' }))),
|
|
23
22
|
},
|
|
24
23
|
{
|
|
25
24
|
id: PublicKey.random().toString(),
|
|
26
25
|
type: 'script',
|
|
27
|
-
source: Ref.make(createObject(Text.make('a = () => 100'))),
|
|
26
|
+
source: Ref.make(createObject(Text.make({ content: 'a = () => 100' }))),
|
|
28
27
|
},
|
|
29
28
|
{
|
|
30
29
|
id: PublicKey.random().toString(),
|
|
31
30
|
type: 'script',
|
|
32
|
-
source: Ref.make(createObject(Text.make('b = 200'))),
|
|
31
|
+
source: Ref.make(createObject(Text.make({ content: 'b = 200' }))),
|
|
33
32
|
},
|
|
34
33
|
{
|
|
35
34
|
id: PublicKey.random().toString(),
|
|
36
35
|
type: 'script',
|
|
37
|
-
source: Ref.make(createObject(Text.make('d = a() * 2'))),
|
|
36
|
+
source: Ref.make(createObject(Text.make({ content: 'd = a() * 2' }))),
|
|
38
37
|
},
|
|
39
38
|
{
|
|
40
39
|
id: PublicKey.random().toString(),
|
|
41
40
|
type: 'script',
|
|
42
|
-
source: Ref.make(createObject(Text.make('c + d'))),
|
|
41
|
+
source: Ref.make(createObject(Text.make({ content: 'c + d' }))),
|
|
43
42
|
},
|
|
44
43
|
{
|
|
45
44
|
id: PublicKey.random().toString(),
|
|
46
45
|
type: 'prompt',
|
|
47
46
|
prompt: Ref.make(
|
|
48
47
|
createObject(
|
|
49
|
-
|
|
48
|
+
Routine.make({
|
|
50
49
|
instructions: 'Very briefly, what colors are associated with the numbers {{a}} and {{b}}.',
|
|
51
50
|
}),
|
|
52
51
|
),
|
|
@@ -55,14 +54,14 @@ export const createNotebook = (): Notebook.Notebook =>
|
|
|
55
54
|
{
|
|
56
55
|
id: PublicKey.random().toString(),
|
|
57
56
|
type: 'query',
|
|
58
|
-
source: Ref.make(createObject(Text.make(`docs = (type: ${Markdown.Document.typename})`))),
|
|
57
|
+
source: Ref.make(createObject(Text.make({ content: `docs = (type: ${Markdown.Document.typename})` }))),
|
|
59
58
|
},
|
|
60
59
|
{
|
|
61
60
|
id: PublicKey.random().toString(),
|
|
62
61
|
type: 'prompt',
|
|
63
62
|
prompt: Ref.make(
|
|
64
63
|
createObject(
|
|
65
|
-
|
|
64
|
+
Routine.make({
|
|
66
65
|
instructions: 'Very briefly, summarize the documents: {{docs}}',
|
|
67
66
|
}),
|
|
68
67
|
),
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Script, Operation } from '@dxos/compute';
|
|
6
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
7
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Seeds a script and linked persistent operation for Storybook stories.
|
|
11
|
+
*/
|
|
12
|
+
export const createScript = (space: Space): Script.Script => {
|
|
13
|
+
const script = Script.make({
|
|
14
|
+
name: 'Test',
|
|
15
|
+
source: 'export default () => 42;',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
space.db.add(script);
|
|
19
|
+
space.db.add(
|
|
20
|
+
Obj.make(Operation.PersistentOperation, {
|
|
21
|
+
key: 'org.dxos.script.story-fn',
|
|
22
|
+
name: 'Test',
|
|
23
|
+
version: '0.1.0',
|
|
24
|
+
source: Ref.make(script),
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return script;
|
|
29
|
+
};
|
package/src/translations.ts
CHANGED
|
@@ -2,107 +2,106 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Script } from '@dxos/
|
|
5
|
+
import { Script } from '@dxos/compute';
|
|
6
6
|
import { type Resource } from '@dxos/react-ui';
|
|
7
7
|
|
|
8
|
-
import { meta } from '
|
|
9
|
-
import { Notebook } from '
|
|
8
|
+
import { meta } from '#meta';
|
|
9
|
+
import { Notebook } from '#types';
|
|
10
10
|
|
|
11
11
|
export const translations = [
|
|
12
12
|
{
|
|
13
13
|
'en-US': {
|
|
14
14
|
[Script.Script.typename]: {
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'typename
|
|
19
|
-
'object
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'object
|
|
15
|
+
'typename.label': 'Script',
|
|
16
|
+
'typename.label_zero': 'Scripts',
|
|
17
|
+
'typename.label_one': 'Script',
|
|
18
|
+
'typename.label_other': 'Scripts',
|
|
19
|
+
'object-name.placeholder': 'New script',
|
|
20
|
+
'add-object.label': 'Add script',
|
|
21
|
+
'rename-object.label': 'Rename script',
|
|
22
|
+
'delete-object.label': 'Delete script',
|
|
23
|
+
'object-deleted.label': 'Script deleted',
|
|
23
24
|
},
|
|
24
25
|
[Notebook.Notebook.typename]: {
|
|
25
|
-
'typename
|
|
26
|
-
'typename
|
|
27
|
-
'typename
|
|
28
|
-
'typename
|
|
29
|
-
'object
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'object
|
|
26
|
+
'typename.label': 'Notebook',
|
|
27
|
+
'typename.label_zero': 'Notebooks',
|
|
28
|
+
'typename.label_one': 'Notebook',
|
|
29
|
+
'typename.label_other': 'Notebooks',
|
|
30
|
+
'object-name.placeholder': 'New notebook',
|
|
31
|
+
'add-object.label': 'Add notebook',
|
|
32
|
+
'rename-object.label': 'Rename notebook',
|
|
33
|
+
'delete-object.label': 'Delete notebook',
|
|
34
|
+
'object-deleted.label': 'Notebook deleted',
|
|
33
35
|
},
|
|
34
36
|
[meta.id]: {
|
|
35
|
-
'plugin
|
|
36
|
-
'settings
|
|
37
|
-
'description
|
|
38
|
-
'description
|
|
39
|
-
'binding
|
|
40
|
-
'function
|
|
41
|
-
'deploy
|
|
42
|
-
'deployed
|
|
43
|
-
'upload
|
|
44
|
-
'copy
|
|
45
|
-
'format
|
|
46
|
-
'toggle
|
|
47
|
-
'authenticate
|
|
48
|
-
'authenticate
|
|
49
|
-
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'function
|
|
53
|
-
'function
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'blueprint
|
|
62
|
-
'blueprint
|
|
63
|
-
'blueprint
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
'
|
|
71
|
-
'function panel label': 'Debug Function',
|
|
72
|
-
'script test label': 'Test',
|
|
73
|
-
'script logs label': 'Logs',
|
|
37
|
+
'plugin.name': 'Scripts',
|
|
38
|
+
'settings.title': 'Scripts settings',
|
|
39
|
+
'description.label': 'Description',
|
|
40
|
+
'description.placeholder': 'Enter description',
|
|
41
|
+
'binding.placeholder': 'Function name',
|
|
42
|
+
'function-request.placeholder': 'Function request',
|
|
43
|
+
'deploy.label': 'Deploy',
|
|
44
|
+
'deployed.label': 'Current version of the script is deployed',
|
|
45
|
+
'upload-failed.label': 'Upload failed',
|
|
46
|
+
'copy-link.label': 'Copy function link',
|
|
47
|
+
'format.label': 'Format',
|
|
48
|
+
'toggle-details.label': 'Toggle details panel',
|
|
49
|
+
'authenticate-action.label': 'Authenticate functions service',
|
|
50
|
+
'authenticate-action.description':
|
|
51
|
+
'Sign in to the remote functions service to enable script deployment and execution.',
|
|
52
|
+
'authenticate-button.label': 'Authenticate',
|
|
53
|
+
'name.label': 'Name',
|
|
54
|
+
'remote-function-settings.heading': 'Remote Function',
|
|
55
|
+
'function-url.label': 'Invocation URL',
|
|
56
|
+
'function-binding.label': 'Function binding',
|
|
57
|
+
'function-binding.placeholder': 'Enter binding name (e.g., NAME)',
|
|
58
|
+
'script-publish-settings.label': 'Publishing',
|
|
59
|
+
'script-publish-settings.description': 'Scripts can be shared publicly as Github gists.',
|
|
60
|
+
'no-github-token.label': 'This space has no GitHub access token available.',
|
|
61
|
+
'open-token-manager.label': 'Open Token Manager',
|
|
62
|
+
'publish.label': 'Publish',
|
|
63
|
+
'blueprint-editor.label': 'Blueprint',
|
|
64
|
+
'blueprint-editor.description': 'Create a blueprint that exposes this script as a tool.',
|
|
65
|
+
'blueprint-instructions.label': 'Instructions',
|
|
66
|
+
'blueprint-instructions.placeholder': 'Describe how this tool should be used.',
|
|
67
|
+
'create-blueprint.label': 'Create blueprint',
|
|
68
|
+
'update-blueprint.label': 'Update blueprint',
|
|
69
|
+
'function-panel.label': 'Debug Function',
|
|
70
|
+
'script-test.label': 'Test',
|
|
71
|
+
'script-logs.label': 'Logs',
|
|
72
|
+
'compute.label': 'Compute',
|
|
74
73
|
|
|
75
|
-
'deployment
|
|
76
|
-
'deployment
|
|
77
|
-
'deployment
|
|
78
|
-
'deployment
|
|
79
|
-
'deployment
|
|
80
|
-
'deployment
|
|
81
|
-
'deployment
|
|
74
|
+
'deployment-dialog.title': 'Default Scripts',
|
|
75
|
+
'deployment-dialog-scripts-found.message': 'Script templates:',
|
|
76
|
+
'deployment-dialog-deploy-functions-button.label_one': 'Create and deploy script',
|
|
77
|
+
'deployment-dialog-deploy-functions-button.label_other': 'Create and deploy scripts',
|
|
78
|
+
'deployment-dialog-deploy-functions-pending-button.label_one': 'Deploying script',
|
|
79
|
+
'deployment-dialog-deploy-functions-pending-button.label_other': 'Deploying scripts',
|
|
80
|
+
'deployment-dialog-skip-button.label': 'Skip',
|
|
82
81
|
|
|
83
|
-
'script
|
|
84
|
-
'script
|
|
85
|
-
'script
|
|
86
|
-
'script
|
|
87
|
-
'script
|
|
88
|
-
'script
|
|
89
|
-
'script
|
|
90
|
-
'script
|
|
91
|
-
'script
|
|
92
|
-
'script
|
|
93
|
-
'script
|
|
94
|
-
'script
|
|
82
|
+
'script-deployment-toast.label_one': 'Script deployed',
|
|
83
|
+
'script-deployment-toast.label_other': 'Scripts deployed',
|
|
84
|
+
'script-deployment-toast.description_one': 'Your script has been deployed successfully.',
|
|
85
|
+
'script-deployment-toast.description_other': 'Your scripts have been deployed successfully.',
|
|
86
|
+
'script-deployment-toast-close.label_one': 'Close',
|
|
87
|
+
'script-deployment-toast-close.label_other': 'Close',
|
|
88
|
+
'script-deployment-error-toast.label_one': 'Script deployment failed',
|
|
89
|
+
'script-deployment-error-toast.label_other': 'Scripts deployment failed',
|
|
90
|
+
'script-deployment-error-toast.description_one': 'There was an error deploying your script.',
|
|
91
|
+
'script-deployment-error-toast.description_other': 'There was an error deploying your scripts.',
|
|
92
|
+
'script-deployment-error-toast-close.label_one': 'Close',
|
|
93
|
+
'script-deployment-error-toast-close.label_other': 'Close',
|
|
95
94
|
|
|
96
|
-
'notebook
|
|
97
|
-
'notebook
|
|
98
|
-
'notebook
|
|
99
|
-
'notebook
|
|
100
|
-
'notebook
|
|
101
|
-
'notebook
|
|
102
|
-
'notebook
|
|
103
|
-
'notebook
|
|
104
|
-
'notebook
|
|
105
|
-
'notebook
|
|
95
|
+
'notebook-cell.placeholder': 'Enter script',
|
|
96
|
+
'notebook-cell-delete.label': 'Delete cell',
|
|
97
|
+
'notebook-cell-prompt-run.label': 'Run',
|
|
98
|
+
'notebook-cell-insert-markdown.label': 'Insert Markdown',
|
|
99
|
+
'notebook-cell-insert-script.label': 'Insert Script',
|
|
100
|
+
'notebook-cell-insert-prompt.label': 'Insert Prompt',
|
|
101
|
+
'notebook-cell-insert-query.label': 'Insert Query',
|
|
102
|
+
'notebook-markdown.placeholder': 'Enter Markdown',
|
|
103
|
+
'notebook-prompt.placeholder': 'Enter prompt',
|
|
104
|
+
'notebook-cell-insert.label': 'Insert cell',
|
|
106
105
|
},
|
|
107
106
|
},
|
|
108
107
|
},
|
package/src/types/Notebook.ts
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { Obj, Ref, Type } from '@dxos/echo';
|
|
7
|
+
import { Routine } from '@dxos/compute';
|
|
8
|
+
import { Annotation, Obj, Ref, Type } from '@dxos/echo';
|
|
9
9
|
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
10
10
|
import { LabelAnnotation } from '@dxos/echo/internal';
|
|
11
|
-
import { Graph } from '@dxos/plugin-explorer
|
|
11
|
+
import { Graph } from '@dxos/plugin-explorer';
|
|
12
12
|
import { Text } from '@dxos/schema';
|
|
13
13
|
|
|
14
14
|
export type CellType = 'markdown' | 'script' | 'query' | 'prompt' | 'view';
|
|
@@ -19,7 +19,7 @@ export const Cell = Schema.Struct({
|
|
|
19
19
|
name: Schema.optional(Schema.String),
|
|
20
20
|
// TODO(burdon): Union type.
|
|
21
21
|
source: Schema.optional(Ref.Ref(Text.Text)),
|
|
22
|
-
prompt: Schema.optional(Ref.Ref(
|
|
22
|
+
prompt: Schema.optional(Ref.Ref(Routine.Routine)),
|
|
23
23
|
graph: Schema.optional(Ref.Ref(Graph.Graph)),
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -30,10 +30,14 @@ export const Notebook = Schema.Struct({
|
|
|
30
30
|
cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
31
31
|
}).pipe(
|
|
32
32
|
Type.object({
|
|
33
|
-
typename: 'dxos.
|
|
33
|
+
typename: 'org.dxos.type.notebook',
|
|
34
34
|
version: '0.1.0',
|
|
35
35
|
}),
|
|
36
36
|
LabelAnnotation.set(['name']),
|
|
37
|
+
Annotation.IconAnnotation.set({
|
|
38
|
+
icon: 'ph--notebook--regular',
|
|
39
|
+
hue: 'sky',
|
|
40
|
+
}),
|
|
37
41
|
);
|
|
38
42
|
|
|
39
43
|
export type Notebook = Schema.Schema.Type<typeof Notebook>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
8
|
+
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
|
|
13
|
+
import { type Compiler as CompilerType } from '../compiler';
|
|
14
|
+
|
|
15
|
+
// Inline import to avoid `Settings` namespace alias colliding with the
|
|
16
|
+
// `Settings` capability export below.
|
|
17
|
+
export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);
|
|
18
|
+
export const Compiler = Capability.make<CompilerType>(`${meta.id}.capability.compiler`);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { Script, Operation } from '@dxos/compute';
|
|
10
|
+
import { Database } from '@dxos/echo';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
import { templates } from '../templates';
|
|
15
|
+
|
|
16
|
+
const SCRIPT_OPERATION = `${meta.id}.operation`;
|
|
17
|
+
|
|
18
|
+
export const ScriptProps = Schema.Struct({
|
|
19
|
+
name: Schema.optional(Schema.String),
|
|
20
|
+
gistUrl: Schema.optional(Schema.String.annotations({ title: 'Import from Gist (url)' })),
|
|
21
|
+
initialTemplateId: Schema.Literal(...templates.map(({ id }) => id)).pipe(
|
|
22
|
+
Schema.annotations({ title: 'Template' }),
|
|
23
|
+
Schema.optional,
|
|
24
|
+
),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const NotebookProps = Schema.Struct({
|
|
28
|
+
name: Schema.optional(Schema.String),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const CreateScript = Operation.make({
|
|
32
|
+
meta: { key: `${SCRIPT_OPERATION}.create-script`, name: 'Create Script' },
|
|
33
|
+
input: Schema.extend(
|
|
34
|
+
ScriptProps,
|
|
35
|
+
Schema.Struct({
|
|
36
|
+
db: Database.Database,
|
|
37
|
+
}),
|
|
38
|
+
),
|
|
39
|
+
output: Schema.Struct({
|
|
40
|
+
object: Script.Script,
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { EditorInputMode } from '@dxos/ui-editor/types';
|
|
10
|
+
|
|
11
|
+
export const Settings = Schema.mutable(
|
|
12
|
+
Schema.Struct({
|
|
13
|
+
editorInputMode: EditorInputMode.annotations({
|
|
14
|
+
title: 'Editor input mode',
|
|
15
|
+
description: 'Choose the keybinding style for the script editor.',
|
|
16
|
+
}),
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export interface Settings extends Schema.Schema.Type<typeof Settings> {}
|
package/src/types/index.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './actions';
|
|
6
|
-
export * from './capabilities';
|
|
7
|
-
export * from './events';
|
|
8
|
-
export * as Notebook from './Notebook';
|
|
9
5
|
export * from './types';
|
|
6
|
+
|
|
7
|
+
export * as Notebook from './Notebook';
|
|
8
|
+
export * as ScriptCapabilities from './ScriptCapabilities';
|
|
9
|
+
export * as ScriptEvents from './ScriptEvents';
|
|
10
|
+
export * as ScriptOperation from './ScriptOperation';
|
package/src/types/types.ts
CHANGED
|
@@ -2,14 +2,4 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { EditorInputMode } from '@dxos/ui-editor';
|
|
8
|
-
|
|
9
|
-
export const ScriptSettings = Schema.mutable(
|
|
10
|
-
Schema.Struct({
|
|
11
|
-
editorInputMode: EditorInputMode,
|
|
12
|
-
}),
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export type ScriptSettings = Schema.Schema.Type<typeof ScriptSettings>;
|
|
5
|
+
export * as Settings from './Settings';
|
package/src/util/deploy.ts
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Client } from '@dxos/client';
|
|
6
|
+
import { Script, Operation } from '@dxos/compute';
|
|
7
|
+
import { Context } from '@dxos/context';
|
|
6
8
|
import { Obj, Ref } from '@dxos/echo';
|
|
7
|
-
import {
|
|
9
|
+
import { getUserFunctionIdInMetadata } from '@dxos/functions';
|
|
8
10
|
import { bundleFunction } from '@dxos/functions-runtime/bundler';
|
|
9
11
|
import { FunctionsServiceClient, incrementSemverPatch } from '@dxos/functions-runtime/edge';
|
|
10
12
|
import { log } from '@dxos/log';
|
|
@@ -20,7 +22,7 @@ type DeployScriptProps = {
|
|
|
20
22
|
script: Script.Script;
|
|
21
23
|
client: Client;
|
|
22
24
|
space: Space;
|
|
23
|
-
fn?:
|
|
25
|
+
fn?: Operation.PersistentOperation;
|
|
24
26
|
existingFunctionId?: string;
|
|
25
27
|
};
|
|
26
28
|
|
|
@@ -50,7 +52,7 @@ export const deployScript = async ({
|
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
const functionsServiceClient = FunctionsServiceClient.fromClient(client);
|
|
53
|
-
const newFunction = await functionsServiceClient.deploy({
|
|
55
|
+
const newFunction = await functionsServiceClient.deploy(Context.default(), {
|
|
54
56
|
// TODO(dmaretskyi): Space key or identity key.
|
|
55
57
|
ownerPublicKey: space.key,
|
|
56
58
|
version: fn ? incrementSemverPatch(fn.version) : '0.0.1',
|
|
@@ -61,8 +63,8 @@ export const deployScript = async ({
|
|
|
61
63
|
});
|
|
62
64
|
|
|
63
65
|
const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, newFunction);
|
|
64
|
-
Obj.
|
|
65
|
-
|
|
66
|
+
Obj.update(script, (script) => {
|
|
67
|
+
script.changed = false;
|
|
66
68
|
});
|
|
67
69
|
|
|
68
70
|
return { success: true, functionId: getUserFunctionIdInMetadata(Obj.getMeta(storedFunction)) };
|
|
@@ -84,16 +86,16 @@ const validateDeployInputs = (script: Script.Script, space: Space): Error | null
|
|
|
84
86
|
|
|
85
87
|
const createOrUpdateFunctionInSpace = (
|
|
86
88
|
space: Space,
|
|
87
|
-
fn:
|
|
89
|
+
fn: Operation.PersistentOperation | undefined,
|
|
88
90
|
script: Script.Script,
|
|
89
|
-
newFunction:
|
|
90
|
-
):
|
|
91
|
+
newFunction: Operation.PersistentOperation,
|
|
92
|
+
): Operation.PersistentOperation => {
|
|
91
93
|
if (fn) {
|
|
92
|
-
|
|
94
|
+
Operation.setFrom(fn, newFunction);
|
|
93
95
|
return fn;
|
|
94
96
|
} else {
|
|
95
|
-
Obj.
|
|
96
|
-
|
|
97
|
+
Obj.update(newFunction, (newFunction) => {
|
|
98
|
+
newFunction.source = Ref.make(script);
|
|
97
99
|
});
|
|
98
100
|
return space.db.add(newFunction);
|
|
99
101
|
}
|