@dxos/plugin-script 0.8.4-main.937b3ca → 0.8.4-main.abd8ff62ef
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/README.md +15 -13
- package/dist/lib/browser/DeploymentDialog-6DBF3V6C.mjs +112 -0
- package/dist/lib/browser/DeploymentDialog-6DBF3V6C.mjs.map +7 -0
- package/dist/lib/browser/{NotebookContainer-4MM2VAQF.mjs → NotebookContainer-RO4NJRYH.mjs} +59 -144
- package/dist/lib/browser/NotebookContainer-RO4NJRYH.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-2OPBAXFB.mjs +79 -0
- package/dist/lib/browser/ScriptContainer-2OPBAXFB.mjs.map +7 -0
- package/dist/lib/browser/ScriptProperties-NRXG4PBX.mjs +304 -0
- package/dist/lib/browser/ScriptProperties-NRXG4PBX.mjs.map +7 -0
- package/dist/lib/browser/TestContainer-JNFPLAJX.mjs +44 -0
- package/dist/lib/browser/TestContainer-JNFPLAJX.mjs.map +7 -0
- package/dist/lib/browser/access-token-created-MSWZWZCT.mjs +37 -0
- package/dist/lib/browser/access-token-created-MSWZWZCT.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +53 -3
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/chunk-KF6H7J5N.mjs +81 -0
- package/dist/lib/browser/chunk-KF6H7J5N.mjs.map +7 -0
- package/dist/lib/browser/chunk-MI6X5CTJ.mjs +336 -0
- package/dist/lib/browser/chunk-MI6X5CTJ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UX4GHJ5E.mjs → chunk-NSAF3763.mjs} +29 -29
- package/dist/lib/browser/chunk-NSAF3763.mjs.map +7 -0
- package/dist/lib/browser/chunk-RQ5LDVFK.mjs +49 -0
- package/dist/lib/browser/chunk-RQ5LDVFK.mjs.map +7 -0
- package/dist/lib/browser/containers/index.mjs +17 -0
- package/dist/lib/browser/containers/index.mjs.map +7 -0
- package/dist/lib/browser/create-JDXWBARB.mjs +44 -0
- package/dist/lib/browser/create-JDXWBARB.mjs.map +7 -0
- package/dist/lib/browser/create-script-Q7B3CFAP.mjs +45 -0
- package/dist/lib/browser/create-script-Q7B3CFAP.mjs.map +7 -0
- package/dist/lib/browser/delete-PAUWA2QM.mjs +21 -0
- package/dist/lib/browser/delete-PAUWA2QM.mjs.map +7 -0
- package/dist/lib/browser/deploy-CXVW54JJ.mjs +62 -0
- package/dist/lib/browser/deploy-CXVW54JJ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +169 -220
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/inspect-invocations-LEOEP5I2.mjs +59 -0
- package/dist/lib/browser/inspect-invocations-LEOEP5I2.mjs.map +7 -0
- package/dist/lib/browser/install-function-5N24Q45W.mjs +51 -0
- package/dist/lib/browser/install-function-5N24Q45W.mjs.map +7 -0
- package/dist/lib/browser/invoke-5QVEZ3X5.mjs +33 -0
- package/dist/lib/browser/invoke-5QVEZ3X5.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +14 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/query-deployed-functions-FVD7NYPA.mjs +30 -0
- package/dist/lib/browser/query-deployed-functions-FVD7NYPA.mjs.map +7 -0
- package/dist/lib/browser/read-FFOSK6A3.mjs +26 -0
- package/dist/lib/browser/read-FFOSK6A3.mjs.map +7 -0
- package/dist/lib/browser/templates/index.mjs +1 -1
- package/dist/lib/browser/translations.mjs +104 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +3 -7
- package/dist/lib/browser/update-PJS5GG3Y.mjs +63 -0
- package/dist/lib/browser/update-PJS5GG3Y.mjs.map +7 -0
- package/dist/lib/node-esm/DeploymentDialog-A5BZHUJB.mjs +113 -0
- package/dist/lib/node-esm/DeploymentDialog-A5BZHUJB.mjs.map +7 -0
- package/dist/lib/node-esm/{NotebookContainer-QLW5ZYGS.mjs → NotebookContainer-DPT65MA7.mjs} +59 -144
- package/dist/lib/node-esm/NotebookContainer-DPT65MA7.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-UKD7QORM.mjs +80 -0
- package/dist/lib/node-esm/ScriptContainer-UKD7QORM.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptProperties-FQXEOJKG.mjs +305 -0
- package/dist/lib/node-esm/ScriptProperties-FQXEOJKG.mjs.map +7 -0
- package/dist/lib/node-esm/TestContainer-Y4XVV7KQ.mjs +45 -0
- package/dist/lib/node-esm/TestContainer-Y4XVV7KQ.mjs.map +7 -0
- package/dist/lib/node-esm/access-token-created-DCD6LYQC.mjs +38 -0
- package/dist/lib/node-esm/access-token-created-DCD6LYQC.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +53 -3
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-2DZNF5NG.mjs +82 -0
- package/dist/lib/node-esm/chunk-2DZNF5NG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-C55UYWN4.mjs +50 -0
- package/dist/lib/node-esm/chunk-C55UYWN4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4F5FJZ36.mjs → chunk-EW63XFRQ.mjs} +29 -29
- package/dist/lib/node-esm/chunk-EW63XFRQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XFM2BEHY.mjs +338 -0
- package/dist/lib/node-esm/chunk-XFM2BEHY.mjs.map +7 -0
- package/dist/lib/node-esm/containers/index.mjs +18 -0
- package/dist/lib/node-esm/containers/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-D2JDNXY6.mjs +45 -0
- package/dist/lib/node-esm/create-D2JDNXY6.mjs.map +7 -0
- package/dist/lib/node-esm/create-script-4AB4G7GQ.mjs +46 -0
- package/dist/lib/node-esm/create-script-4AB4G7GQ.mjs.map +7 -0
- package/dist/lib/node-esm/delete-YXLT7J27.mjs +22 -0
- package/dist/lib/node-esm/delete-YXLT7J27.mjs.map +7 -0
- package/dist/lib/node-esm/deploy-MXVZXAUC.mjs +63 -0
- package/dist/lib/node-esm/deploy-MXVZXAUC.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +169 -220
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/inspect-invocations-TVAKGYX5.mjs +60 -0
- package/dist/lib/node-esm/inspect-invocations-TVAKGYX5.mjs.map +7 -0
- package/dist/lib/node-esm/install-function-ST3VABJH.mjs +52 -0
- package/dist/lib/node-esm/install-function-ST3VABJH.mjs.map +7 -0
- package/dist/lib/node-esm/invoke-64WDU55Y.mjs +34 -0
- package/dist/lib/node-esm/invoke-64WDU55Y.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +15 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/query-deployed-functions-2VCNGQ7X.mjs +31 -0
- package/dist/lib/node-esm/query-deployed-functions-2VCNGQ7X.mjs.map +7 -0
- package/dist/lib/node-esm/read-PECQUAPS.mjs +27 -0
- package/dist/lib/node-esm/read-PECQUAPS.mjs.map +7 -0
- package/dist/lib/node-esm/templates/index.mjs +1 -1
- package/dist/lib/node-esm/translations.mjs +105 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +3 -7
- package/dist/lib/node-esm/update-XDFTGSPP.mjs +64 -0
- package/dist/lib/node-esm/update-XDFTGSPP.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/index.d.ts +1 -1
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/script-blueprint.d.ts +3 -21
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/{artifact-definition/artifact-definition.d.ts → artifact-definition.d.ts} +1 -1
- 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/index.d.ts +8 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- 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 +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +7 -0
- 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 -5
- 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/TestPanel/index.d.ts +0 -1
- package/dist/types/src/components/TestPanel/index.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 +6 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/DeploymentDialog/DeploymentDialog.d.ts +0 -2
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -0
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +240 -0
- package/dist/types/src/{components → containers}/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/index.d.ts +2 -0
- package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts +7 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/index.d.ts +2 -0
- package/dist/types/src/containers/NotebookContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts +10 -0
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/containers/ScriptContainer/index.d.ts.map +1 -0
- 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 +6 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -0
- package/dist/types/src/{components/TestPanel → containers/TestContainer}/TestContainer.d.ts +1 -1
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -0
- package/dist/types/src/containers/TestContainer/index.d.ts +2 -0
- package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/deploy.d.ts +18 -5
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +2 -1
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +2 -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 -2
- 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/definitions.d.ts +29 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.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 +7 -5
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
- package/dist/types/src/templates/commentary.d.ts +7 -4
- 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 +65 -49
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- 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/capabilities.d.ts +2 -5
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- 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 +121 -99
- package/src/ScriptPlugin.node.ts +70 -0
- package/src/ScriptPlugin.test.ts +31 -0
- package/src/ScriptPlugin.tsx +52 -34
- 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/index.ts +1 -1
- package/src/blueprints/script-blueprint.ts +40 -9
- package/src/capabilities/app-graph-builder.ts +47 -0
- package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts} +2 -3
- package/src/capabilities/blueprint-definition.ts +19 -0
- package/src/capabilities/{compiler/compiler.ts → compiler.ts} +17 -9
- package/src/capabilities/index.ts +13 -6
- package/src/capabilities/operation-handler.ts +21 -0
- package/src/capabilities/react-surface.tsx +130 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +7 -6
- package/src/compiler/compiler.ts +8 -1
- package/src/components/{FrameContainer/FrameContainer.tsx → FramePanel/FramePanel.tsx} +4 -5
- package/src/components/{FrameContainer → FramePanel}/index.ts +1 -1
- package/src/components/NotebookStack/NotebookCell.tsx +31 -22
- package/src/components/NotebookStack/NotebookMenu.tsx +7 -7
- package/src/components/NotebookStack/NotebookStack.stories.tsx +7 -9
- package/src/components/NotebookStack/NotebookStack.tsx +27 -16
- package/src/components/QueryEditor/QueryEditor.stories.tsx +18 -22
- 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 +8 -9
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +24 -26
- package/src/components/TestPanel/TestPanel.tsx +110 -194
- package/src/components/TestPanel/index.ts +0 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +17 -15
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +26 -19
- package/src/components/index.ts +6 -7
- package/src/constants.ts +7 -0
- package/src/{components → containers}/DeploymentDialog/DeploymentDialog.stories.tsx +8 -7
- package/src/{components → containers}/DeploymentDialog/DeploymentDialog.tsx +33 -37
- package/src/containers/DeploymentDialog/index.ts +5 -0
- package/src/{components → containers/NotebookContainer}/NotebookContainer.stories.tsx +18 -20
- package/src/{components → containers/NotebookContainer}/NotebookContainer.tsx +61 -77
- package/src/containers/NotebookContainer/index.ts +5 -0
- package/src/containers/ScriptContainer/ScriptContainer.stories.tsx +106 -0
- package/src/{components → containers/ScriptContainer}/ScriptContainer.tsx +28 -27
- package/src/containers/ScriptContainer/index.ts +5 -0
- 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 +24 -0
- package/src/containers/ScriptProperties/index.ts +5 -0
- package/src/containers/TestContainer/TestContainer.tsx +44 -0
- package/src/containers/TestContainer/index.ts +5 -0
- package/src/containers/index.ts +11 -0
- package/src/e2e/ai.test.ts +7 -6
- package/src/e2e/deploy.test.ts +5 -5
- package/src/hooks/deploy.ts +15 -13
- package/src/hooks/format.ts +6 -5
- package/src/hooks/template.ts +9 -8
- package/src/hooks/useCompiler.ts +4 -3
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +5 -4
- package/src/hooks/useToolbarState.ts +7 -6
- package/src/index.ts +6 -3
- 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/definitions.ts +40 -0
- package/src/operations/index.ts +12 -0
- package/src/templates/anthropic.ts +19 -12
- package/src/templates/chat.ts +1 -1
- package/src/templates/chess-bot.ts +37 -34
- package/src/templates/commentary.ts +178 -162
- 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} +4 -5
- package/src/testing/test-script.ts +29 -0
- package/src/translations.ts +86 -87
- package/src/types/Notebook.ts +12 -8
- package/src/types/Settings.ts +20 -0
- package/src/types/capabilities.ts +5 -5
- package/src/types/events.ts +2 -2
- package/src/types/index.ts +0 -1
- 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-GXNRUXF6.mjs +0 -14
- package/dist/lib/browser/DeploymentDialog-GXNRUXF6.mjs.map +0 -7
- package/dist/lib/browser/NotebookContainer-4MM2VAQF.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-X6GCYZZW.mjs +0 -149
- package/dist/lib/browser/ScriptContainer-X6GCYZZW.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-7VO7AUI6.mjs +0 -68
- package/dist/lib/browser/app-graph-builder-7VO7AUI6.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-OSOUYI7A.mjs +0 -17
- package/dist/lib/browser/blueprint-definition-OSOUYI7A.mjs.map +0 -7
- package/dist/lib/browser/chunk-3O2DQGCP.mjs +0 -113
- package/dist/lib/browser/chunk-3O2DQGCP.mjs.map +0 -7
- package/dist/lib/browser/chunk-BTWHM6FH.mjs +0 -270
- package/dist/lib/browser/chunk-BTWHM6FH.mjs.map +0 -7
- package/dist/lib/browser/chunk-F3QKSKSF.mjs +0 -35
- package/dist/lib/browser/chunk-F3QKSKSF.mjs.map +0 -7
- package/dist/lib/browser/chunk-I7CSE6T3.mjs +0 -110
- package/dist/lib/browser/chunk-I7CSE6T3.mjs.map +0 -7
- package/dist/lib/browser/chunk-IQRLM6JK.mjs +0 -137
- package/dist/lib/browser/chunk-IQRLM6JK.mjs.map +0 -7
- package/dist/lib/browser/chunk-NWSK27QB.mjs +0 -606
- package/dist/lib/browser/chunk-NWSK27QB.mjs.map +0 -7
- package/dist/lib/browser/chunk-UX4GHJ5E.mjs.map +0 -7
- package/dist/lib/browser/chunk-WX2NVNFQ.mjs +0 -557
- package/dist/lib/browser/chunk-WX2NVNFQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-WYR4QHPE.mjs +0 -31
- package/dist/lib/browser/chunk-WYR4QHPE.mjs.map +0 -7
- package/dist/lib/browser/compiler-XRBFQFXO.mjs +0 -161
- package/dist/lib/browser/compiler-XRBFQFXO.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-MUNR376F.mjs +0 -82
- package/dist/lib/browser/operation-resolver-MUNR376F.mjs.map +0 -7
- package/dist/lib/browser/react-surface-5TEC66UY.mjs +0 -139
- package/dist/lib/browser/react-surface-5TEC66UY.mjs.map +0 -7
- package/dist/lib/browser/settings-R4WKREUJ.mjs +0 -35
- package/dist/lib/browser/settings-R4WKREUJ.mjs.map +0 -7
- package/dist/lib/node-esm/DeploymentDialog-EVFV2VJT.mjs +0 -15
- package/dist/lib/node-esm/DeploymentDialog-EVFV2VJT.mjs.map +0 -7
- package/dist/lib/node-esm/NotebookContainer-QLW5ZYGS.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-3DZ3BMHW.mjs +0 -150
- package/dist/lib/node-esm/ScriptContainer-3DZ3BMHW.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-NVE3EVBG.mjs +0 -69
- package/dist/lib/node-esm/app-graph-builder-NVE3EVBG.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-NC7NNJGI.mjs +0 -18
- package/dist/lib/node-esm/blueprint-definition-NC7NNJGI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4F5FJZ36.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-KN6SQYUF.mjs +0 -114
- package/dist/lib/node-esm/chunk-KN6SQYUF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MGWKULCD.mjs +0 -558
- package/dist/lib/node-esm/chunk-MGWKULCD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SLU3KRV3.mjs +0 -112
- package/dist/lib/node-esm/chunk-SLU3KRV3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VWOLKNMO.mjs +0 -271
- package/dist/lib/node-esm/chunk-VWOLKNMO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Y3G5NCTP.mjs +0 -36
- package/dist/lib/node-esm/chunk-Y3G5NCTP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YEWLTVBT.mjs +0 -138
- package/dist/lib/node-esm/chunk-YEWLTVBT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZQGHFNO3.mjs +0 -607
- package/dist/lib/node-esm/chunk-ZQGHFNO3.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-ORJAXDN7.mjs +0 -162
- package/dist/lib/node-esm/compiler-ORJAXDN7.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-CLE4ZCC5.mjs +0 -83
- package/dist/lib/node-esm/operation-resolver-CLE4ZCC5.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-O3UDMKOQ.mjs +0 -140
- package/dist/lib/node-esm/react-surface-O3UDMKOQ.mjs.map +0 -7
- package/dist/lib/node-esm/settings-OFIMHU7K.mjs +0 -36
- package/dist/lib/node-esm/settings-OFIMHU7K.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- 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 -9
- 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 +0 -5
- 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 +0 -9
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +0 -249
- package/dist/types/src/components/DeploymentDialog/index.d.ts +0 -4
- package/dist/types/src/components/DeploymentDialog/index.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/components/NotebookContainer.d.ts +0 -8
- package/dist/types/src/components/NotebookContainer.d.ts.map +0 -1
- package/dist/types/src/components/NotebookContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ScriptContainer.d.ts +0 -11
- package/dist/types/src/components/ScriptContainer.d.ts.map +0 -1
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts +0 -8
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +0 -8
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +0 -1
- package/dist/types/src/components/Settings/index.d.ts +0 -3
- package/dist/types/src/components/Settings/index.d.ts.map +0 -1
- package/dist/types/src/components/TestPanel/TestContainer.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/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -55
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/artifact-definition/index.ts +0 -7
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -23
- 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 -74
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -118
- package/src/capabilities/settings/index.ts +0 -7
- package/src/components/DeploymentDialog/index.ts +0 -9
- package/src/components/FrameContainer/frame.html +0 -25
- package/src/components/FrameContainer/frame.tsx +0 -51
- package/src/components/Settings/ScriptObjectSettings.tsx +0 -309
- package/src/components/Settings/ScriptPluginSettings.tsx +0 -66
- package/src/components/Settings/index.ts +0 -6
- package/src/components/TestPanel/TestContainer.tsx +0 -27
- package/src/types/actions.ts +0 -45
- /package/dist/types/src/{components → containers/NotebookContainer}/NotebookContainer.stories.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,17 +2,16 @@
|
|
|
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
9
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
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: [
|
|
@@ -46,7 +45,7 @@ export const createNotebook = (): Notebook.Notebook =>
|
|
|
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
|
),
|
|
@@ -62,7 +61,7 @@ export const createNotebook = (): Notebook.Notebook =>
|
|
|
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,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { Obj, 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
11
|
import { Graph } from '@dxos/plugin-explorer/types';
|
|
@@ -18,22 +18,26 @@ export const Cell = Schema.Struct({
|
|
|
18
18
|
type: Schema.String,
|
|
19
19
|
name: Schema.optional(Schema.String),
|
|
20
20
|
// TODO(burdon): Union type.
|
|
21
|
-
source: Schema.optional(
|
|
22
|
-
prompt: Schema.optional(
|
|
23
|
-
graph: Schema.optional(
|
|
24
|
-
})
|
|
21
|
+
source: Schema.optional(Ref.Ref(Text.Text)),
|
|
22
|
+
prompt: Schema.optional(Ref.Ref(Routine.Routine)),
|
|
23
|
+
graph: Schema.optional(Ref.Ref(Graph.Graph)),
|
|
24
|
+
});
|
|
25
25
|
|
|
26
26
|
export interface Cell extends Schema.Schema.Type<typeof Cell> {}
|
|
27
27
|
|
|
28
28
|
export const Notebook = Schema.Struct({
|
|
29
29
|
name: Schema.String.pipe(Schema.optional),
|
|
30
|
-
cells: Cell.pipe(Schema.Array,
|
|
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,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> {}
|
|
@@ -6,12 +6,12 @@ import { type Atom } from '@effect-atom/atom-react';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import { meta } from '../meta';
|
|
9
|
+
import { meta } from '#meta';
|
|
11
10
|
|
|
12
|
-
import { type
|
|
11
|
+
import { type Compiler } from '../compiler';
|
|
12
|
+
import * as Settings from './Settings';
|
|
13
13
|
|
|
14
14
|
export namespace ScriptCapabilities {
|
|
15
|
-
export const Settings = Capability.make<Atom.Writable<
|
|
16
|
-
export const Compiler = Capability.make<Compiler>(`${meta.id}
|
|
15
|
+
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);
|
|
16
|
+
export const Compiler = Capability.make<Compiler>(`${meta.id}.capability.compiler`);
|
|
17
17
|
}
|
package/src/types/events.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { ActivationEvent } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import { meta } from '
|
|
7
|
+
import { meta } from '#meta';
|
|
8
8
|
|
|
9
9
|
export namespace ScriptEvents {
|
|
10
|
-
export const SetupCompiler = ActivationEvent.make(`${meta.id}
|
|
10
|
+
export const SetupCompiler = ActivationEvent.make(`${meta.id}.event.setup-compiler`);
|
|
11
11
|
}
|
package/src/types/index.ts
CHANGED
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
|
}
|
package/src/util/functions.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { type Operation, Script } from '@dxos/compute';
|
|
5
6
|
import { Obj } from '@dxos/echo';
|
|
6
|
-
import {
|
|
7
|
+
import { getUserFunctionIdInMetadata } from '@dxos/functions';
|
|
7
8
|
import { getInvocationUrl } from '@dxos/functions-runtime';
|
|
8
9
|
import { type PublicKey } from '@dxos/keys';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
@@ -35,33 +36,33 @@ export const getFunctionUrl = ({
|
|
|
35
36
|
|
|
36
37
|
export const updateFunctionMetadata = (
|
|
37
38
|
script: Script.Script,
|
|
38
|
-
storedFunction:
|
|
39
|
+
storedFunction: Operation.PersistentOperation,
|
|
39
40
|
meta: any,
|
|
40
41
|
functionId: string,
|
|
41
42
|
) => {
|
|
42
|
-
Obj.
|
|
43
|
+
Obj.update(storedFunction, (storedFunction) => {
|
|
43
44
|
if (script.description !== undefined && script.description.trim() !== '') {
|
|
44
|
-
|
|
45
|
+
storedFunction.description = script.description;
|
|
45
46
|
} else if (meta.description) {
|
|
46
|
-
|
|
47
|
+
storedFunction.description = meta.description;
|
|
47
48
|
} else {
|
|
48
49
|
log.verbose('no description in function metadata', { functionId });
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
if (meta.inputSchema) {
|
|
52
|
-
|
|
53
|
+
storedFunction.inputSchema = meta.inputSchema;
|
|
53
54
|
} else {
|
|
54
55
|
log.verbose('no input schema in function metadata', { functionId });
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
if (meta.outputSchema) {
|
|
58
|
-
|
|
59
|
+
storedFunction.outputSchema = meta.outputSchema;
|
|
59
60
|
} else {
|
|
60
61
|
log.verbose('no output schema in function metadata', { functionId });
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
if (meta.key) {
|
|
64
|
-
|
|
65
|
+
storedFunction.key = meta.key;
|
|
65
66
|
} else {
|
|
66
67
|
log.verbose('no key in function metadata', { functionId });
|
|
67
68
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DEPLOYMENT_DIALOG,
|
|
3
|
-
DeploymentDialog_default
|
|
4
|
-
} from "./chunk-IQRLM6JK.mjs";
|
|
5
|
-
import "./chunk-WX2NVNFQ.mjs";
|
|
6
|
-
import "./chunk-3O2DQGCP.mjs";
|
|
7
|
-
import "./chunk-UX4GHJ5E.mjs";
|
|
8
|
-
import "./chunk-WYR4QHPE.mjs";
|
|
9
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
10
|
-
export {
|
|
11
|
-
DEPLOYMENT_DIALOG,
|
|
12
|
-
DeploymentDialog_default as default
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=DeploymentDialog-GXNRUXF6.mjs.map
|