@dxos/plugin-script 0.8.4-main.fd6878d → 0.8.4-staging.60fe92afc8
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/LICENSE +102 -5
- package/PLUGIN.mdl +515 -0
- package/README.md +15 -13
- package/dist/lib/neutral/DeploymentDialog-M3AFYQHC.mjs +114 -0
- package/dist/lib/neutral/DeploymentDialog-M3AFYQHC.mjs.map +7 -0
- package/dist/lib/neutral/NotebookArticle-NV4AHOOS.mjs +763 -0
- package/dist/lib/neutral/NotebookArticle-NV4AHOOS.mjs.map +7 -0
- package/dist/lib/neutral/ScriptArticle-QW26LOKU.mjs +79 -0
- package/dist/lib/neutral/ScriptArticle-QW26LOKU.mjs.map +7 -0
- package/dist/lib/neutral/ScriptPlugin.mjs +51 -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/ScriptPlugin.workerd.mjs +21 -0
- package/dist/lib/neutral/ScriptPlugin.workerd.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-RLXNAN3N.mjs +297 -0
- package/dist/lib/neutral/ScriptProperties-RLXNAN3N.mjs.map +7 -0
- package/dist/lib/neutral/TestContainer-AFVTBYSJ.mjs +44 -0
- package/dist/lib/neutral/TestContainer-AFVTBYSJ.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/neutral/blueprint-definition-PJ7I3JIQ.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-PJ7I3JIQ.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +10 -0
- 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-2REUEDUA.mjs +56 -0
- package/dist/lib/neutral/chunk-2REUEDUA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BDHDBPVM.mjs +52 -0
- package/dist/lib/neutral/chunk-BDHDBPVM.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BKXYHCJ6.mjs +8 -0
- package/dist/lib/neutral/chunk-BKXYHCJ6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HABDH5SS.mjs +123 -0
- package/dist/lib/neutral/chunk-HABDH5SS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-PHKPB5JN.mjs +96 -0
- package/dist/lib/neutral/chunk-PHKPB5JN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TRKXIP2Q.mjs +345 -0
- package/dist/lib/neutral/chunk-TRKXIP2Q.mjs.map +7 -0
- package/dist/lib/neutral/chunk-UA3BWOCZ.mjs +38 -0
- package/dist/lib/neutral/chunk-UA3BWOCZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VXDJH6OL.mjs +150 -0
- package/dist/lib/neutral/chunk-VXDJH6OL.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XFM63AKT.mjs +8 -0
- package/dist/lib/neutral/chunk-XFM63AKT.mjs.map +7 -0
- package/dist/lib/neutral/compiler-ODK4UA2N.mjs +101 -0
- package/dist/lib/neutral/compiler-ODK4UA2N.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +664 -0
- 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-AAA53WDL.mjs +46 -0
- package/dist/lib/neutral/create-AAA53WDL.mjs.map +7 -0
- package/dist/lib/neutral/create-object-FZM5ASWM.mjs +45 -0
- package/dist/lib/neutral/create-object-FZM5ASWM.mjs.map +7 -0
- package/dist/lib/neutral/create-script-P46JOEHH.mjs +45 -0
- package/dist/lib/neutral/create-script-P46JOEHH.mjs.map +7 -0
- package/dist/lib/neutral/delete-HCQIQFVP.mjs +21 -0
- package/dist/lib/neutral/delete-HCQIQFVP.mjs.map +7 -0
- package/dist/lib/neutral/deploy-7JVMMHSH.mjs +63 -0
- package/dist/lib/neutral/deploy-7JVMMHSH.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +369 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +41 -0
- package/dist/lib/neutral/inspect-invocations-TAOYDT4H.mjs +59 -0
- package/dist/lib/neutral/inspect-invocations-TAOYDT4H.mjs.map +7 -0
- package/dist/lib/neutral/install-function-FJIE2JAI.mjs +49 -0
- package/dist/lib/neutral/install-function-FJIE2JAI.mjs.map +7 -0
- package/dist/lib/neutral/invoke-3HVWY2KF.mjs +32 -0
- package/dist/lib/neutral/invoke-3HVWY2KF.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-YMUADD7Y.mjs +18 -0
- package/dist/lib/neutral/operation-handler-YMUADD7Y.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-F4FHJNWO.mjs +34 -0
- package/dist/lib/neutral/query-deployed-functions-F4FHJNWO.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-ACNZ35FV.mjs +121 -0
- package/dist/lib/neutral/react-surface-ACNZ35FV.mjs.map +7 -0
- package/dist/lib/neutral/read-RQESBAQI.mjs +26 -0
- package/dist/lib/neutral/read-RQESBAQI.mjs.map +7 -0
- package/dist/lib/neutral/settings-VJBW4OMK.mjs +30 -0
- package/dist/lib/neutral/settings-VJBW4OMK.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/templates/index.mjs +2 -1
- package/dist/lib/neutral/translations.mjs +105 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +17 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/update-CO7B6UBS.mjs +63 -0
- package/dist/lib/neutral/update-CO7B6UBS.mjs.map +7 -0
- package/dist/types/src/ScriptPlugin.d.ts +3 -1
- 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/ScriptPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ScriptPlugin.workerd.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 +135 -0
- package/dist/types/src/blueprints/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/delete.d.ts +17 -0
- package/dist/types/src/blueprints/functions/delete.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/deploy.d.ts +21 -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 +28 -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 +21 -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 +21 -0
- package/dist/types/src/blueprints/functions/read.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/update.d.ts +26 -0
- package/dist/types/src/blueprints/functions/update.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- 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 +3 -1
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -1
- 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 +20 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +19 -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 +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/compiler/compiler.d.ts +1 -1
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +15 -0
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +9 -0
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +16 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +240 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/index.d.ts +3 -0
- package/dist/types/src/components/NotebookStack/index.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts +5 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +13 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/index.d.ts +2 -0
- package/dist/types/src/components/QueryEditor/index.d.ts.map +1 -0
- 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 +10 -9
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +237 -10
- 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 +8 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +13 -4
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +6 -7
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +3 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts +9 -0
- 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/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -0
- 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/NotebookArticle/NotebookArticle.d.ts +7 -0
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts +7 -0
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookArticle/index.d.ts +2 -0
- package/dist/types/src/containers/NotebookArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts +10 -0
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts +242 -0
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ScriptArticle/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/containers/TestContainer/TestContainer.d.ts +8 -0
- 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/e2e/ai.test.d.ts +2 -0
- package/dist/types/src/e2e/ai.test.d.ts.map +1 -0
- package/dist/types/src/e2e/deploy.test.d.ts +2 -0
- package/dist/types/src/e2e/deploy.test.d.ts.map +1 -0
- package/dist/types/src/hooks/deploy.d.ts +31 -33
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +5 -4
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +7 -16
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts +7 -0
- package/dist/types/src/hooks/useCompiler.d.ts.map +1 -0
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/hooks/useToolbarState.d.ts +8 -1
- package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +58 -0
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -0
- package/dist/types/src/notebook/compute-graph.test.d.ts +2 -0
- package/dist/types/src/notebook/compute-graph.test.d.ts.map +1 -0
- package/dist/types/src/notebook/eval.d.ts +13 -0
- package/dist/types/src/notebook/eval.d.ts.map +1 -0
- package/dist/types/src/notebook/index.d.ts +2 -0
- package/dist/types/src/notebook/index.d.ts.map +1 -0
- package/dist/types/src/notebook/vfs-parser.d.ts +74 -0
- package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -0
- package/dist/types/src/notebook/vfs-parser.test.d.ts +2 -0
- package/dist/types/src/notebook/vfs-parser.test.d.ts.map +1 -0
- package/dist/types/src/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 +7 -0
- package/dist/types/src/templates/anthropic.d.ts.map +1 -0
- package/dist/types/src/templates/chess-bot.d.ts +14 -0
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -0
- package/dist/types/src/templates/commentary.d.ts +15 -0
- package/dist/types/src/templates/commentary.d.ts.map +1 -0
- 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 +5 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts +5 -1
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/gmail.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +47 -1
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +4 -0
- package/dist/types/src/templates/ping.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/simulator.test.d.ts +2 -0
- package/dist/types/src/testing/simulator.test.d.ts.map +1 -0
- 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 -65
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +101 -0
- package/dist/types/src/types/Notebook.d.ts.map +1 -0
- 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 +5 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +2 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/src/util/deploy.d.ts +7 -7
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +6 -3
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +186 -101
- package/src/ScriptPlugin.node.ts +21 -0
- package/src/ScriptPlugin.test.ts +31 -0
- package/src/ScriptPlugin.tsx +40 -73
- package/src/ScriptPlugin.workerd.ts +18 -0
- package/src/blueprints/functions/create.ts +47 -0
- package/src/blueprints/functions/definitions.ts +332 -0
- package/src/blueprints/functions/delete.ts +23 -0
- package/src/blueprints/functions/deploy.ts +71 -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 +34 -0
- package/src/blueprints/functions/query-deployed-functions.ts +35 -0
- package/src/blueprints/functions/read.ts +29 -0
- package/src/blueprints/functions/update.ts +68 -0
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/script-blueprint.ts +55 -0
- package/src/capabilities/app-graph-builder.ts +40 -57
- package/src/capabilities/blueprint-definition.ts +19 -0
- package/src/capabilities/compiler.ts +100 -23
- package/src/capabilities/create-object.ts +49 -0
- package/src/capabilities/index.ts +18 -8
- package/src/capabilities/node.ts +21 -0
- package/src/capabilities/operation-handler.ts +21 -0
- package/src/capabilities/react-surface.tsx +120 -80
- package/src/capabilities/settings.ts +26 -14
- package/src/compiler/compiler.ts +21 -3
- package/src/components/NotebookStack/NotebookCell.tsx +226 -0
- package/src/components/NotebookStack/NotebookMenu.tsx +47 -0
- package/src/components/NotebookStack/NotebookStack.stories.tsx +53 -0
- package/src/components/NotebookStack/NotebookStack.tsx +97 -0
- package/src/components/NotebookStack/index.ts +6 -0
- package/src/components/QueryEditor/QueryEditor.stories.tsx +96 -0
- package/src/components/QueryEditor/QueryEditor.tsx +49 -0
- package/src/components/QueryEditor/index.ts +5 -0
- 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 +55 -17
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +43 -41
- package/src/components/TestPanel/TestPanel.tsx +125 -185
- package/src/components/TestPanel/index.ts +0 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +82 -28
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +86 -77
- package/src/components/index.ts +6 -5
- package/src/constants.ts +9 -0
- package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +63 -0
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +99 -0
- package/src/containers/DeploymentDialog/index.ts +5 -0
- package/src/containers/NotebookArticle/NotebookArticle.stories.tsx +85 -0
- package/src/containers/NotebookArticle/NotebookArticle.tsx +255 -0
- package/src/containers/NotebookArticle/index.ts +5 -0
- package/src/containers/ScriptArticle/ScriptArticle.stories.tsx +107 -0
- package/src/containers/ScriptArticle/ScriptArticle.tsx +85 -0
- package/src/containers/ScriptArticle/index.ts +5 -0
- package/src/containers/ScriptProperties/BlueprintEditor.tsx +102 -0
- package/src/containers/ScriptProperties/FunctionBinding.tsx +83 -0
- package/src/containers/ScriptProperties/FunctionPublishing.tsx +121 -0
- package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +76 -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 +93 -0
- package/src/e2e/deploy.test.ts +66 -0
- package/src/hooks/deploy.ts +54 -45
- package/src/hooks/format.ts +10 -5
- package/src/hooks/index.ts +1 -0
- package/src/hooks/template.ts +23 -25
- package/src/hooks/useCompiler.ts +25 -0
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +15 -16
- package/src/hooks/useToolbarState.ts +29 -4
- package/src/index.ts +3 -4
- package/src/meta.ts +17 -9
- package/src/notebook/compute-graph.test.ts +82 -0
- package/src/notebook/compute-graph.ts +230 -0
- package/src/notebook/eval.ts +105 -0
- package/src/notebook/index.ts +5 -0
- package/src/notebook/vfs-parser.test.ts +149 -0
- package/src/notebook/vfs-parser.ts +458 -0
- package/src/operations/create-script.ts +46 -0
- package/src/operations/index.ts +7 -0
- package/src/plugin.ts +11 -0
- package/src/templates/anthropic.ts +50 -0
- package/src/templates/chess-bot.ts +63 -0
- package/src/templates/commentary.ts +252 -0
- package/src/templates/data-generator.ts +3 -1
- package/src/templates/discord.ts +18 -10
- package/src/templates/forex-effect.ts +36 -25
- package/src/templates/forex.ts +28 -15
- package/src/templates/gmail.ts +40 -70
- package/src/templates/index.ts +34 -28
- package/src/templates/ping.ts +26 -0
- package/src/testing/index.ts +6 -0
- package/src/testing/simulator.test.ts +39 -0
- package/src/testing/test-notebook.ts +71 -0
- package/src/testing/test-script.ts +28 -0
- package/src/translations.ts +93 -65
- package/src/types/Notebook.ts +39 -0
- 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 +6 -1
- package/src/types/types.ts +5 -0
- package/src/util/deploy.ts +41 -62
- package/src/util/functions.ts +60 -26
- package/src/vite-env.d.ts +7 -0
- package/dist/lib/browser/DeploymentDialog-C3XH2Z56.mjs +0 -12
- package/dist/lib/browser/ScriptContainer-FUBR4OZE.mjs +0 -263
- package/dist/lib/browser/ScriptContainer-FUBR4OZE.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-IABOSTBK.mjs +0 -64
- package/dist/lib/browser/app-graph-builder-IABOSTBK.mjs.map +0 -7
- package/dist/lib/browser/chunk-5TVBECWH.mjs +0 -15
- package/dist/lib/browser/chunk-5TVBECWH.mjs.map +0 -7
- package/dist/lib/browser/chunk-G4A2MGAL.mjs +0 -88
- package/dist/lib/browser/chunk-G4A2MGAL.mjs.map +0 -7
- package/dist/lib/browser/chunk-IS4OG2UW.mjs +0 -39
- package/dist/lib/browser/chunk-IS4OG2UW.mjs.map +0 -7
- package/dist/lib/browser/chunk-MWZDJNCQ.mjs +0 -283
- package/dist/lib/browser/chunk-MWZDJNCQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-OAVS36Q3.mjs +0 -153
- package/dist/lib/browser/chunk-OAVS36Q3.mjs.map +0 -7
- package/dist/lib/browser/chunk-OULPWKXN.mjs +0 -555
- package/dist/lib/browser/chunk-OULPWKXN.mjs.map +0 -7
- package/dist/lib/browser/chunk-QYAREHGH.mjs +0 -28
- package/dist/lib/browser/chunk-QYAREHGH.mjs.map +0 -7
- package/dist/lib/browser/chunk-SUOLJH55.mjs +0 -233
- package/dist/lib/browser/chunk-SUOLJH55.mjs.map +0 -7
- package/dist/lib/browser/compiler-RIWQVBPX.mjs +0 -85
- package/dist/lib/browser/compiler-RIWQVBPX.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -203
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-SAL2TM7U.mjs +0 -89
- package/dist/lib/browser/intent-resolver-SAL2TM7U.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-E3SXU6ON.mjs +0 -104
- package/dist/lib/browser/react-surface-E3SXU6ON.mjs.map +0 -7
- package/dist/lib/browser/settings-KCTBK5TY.mjs +0 -24
- package/dist/lib/browser/settings-KCTBK5TY.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/lib/node-esm/DeploymentDialog-O2XZVRLU.mjs +0 -13
- package/dist/lib/node-esm/ScriptContainer-VJ75TM24.mjs +0 -264
- package/dist/lib/node-esm/ScriptContainer-VJ75TM24.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-CQTTAYHP.mjs +0 -65
- package/dist/lib/node-esm/app-graph-builder-CQTTAYHP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-35M3CHYE.mjs +0 -16
- package/dist/lib/node-esm/chunk-35M3CHYE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3BBEM2U7.mjs +0 -90
- package/dist/lib/node-esm/chunk-3BBEM2U7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6WMFL3JL.mjs +0 -556
- package/dist/lib/node-esm/chunk-6WMFL3JL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7L4JDSXJ.mjs +0 -284
- package/dist/lib/node-esm/chunk-7L4JDSXJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AHXJ6NQU.mjs +0 -30
- package/dist/lib/node-esm/chunk-AHXJ6NQU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IO6T72KY.mjs +0 -154
- package/dist/lib/node-esm/chunk-IO6T72KY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JIPFLBYA.mjs +0 -40
- package/dist/lib/node-esm/chunk-JIPFLBYA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PACUN7RS.mjs +0 -234
- package/dist/lib/node-esm/chunk-PACUN7RS.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-S52P5P3F.mjs +0 -86
- package/dist/lib/node-esm/compiler-S52P5P3F.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -204
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-GO53JOPL.mjs +0 -90
- package/dist/lib/node-esm/intent-resolver-GO53JOPL.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-W3NRCS5O.mjs +0 -105
- package/dist/lib/node-esm/react-surface-W3NRCS5O.mjs.map +0 -7
- package/dist/lib/node-esm/settings-DXZ334A3.mjs +0 -25
- package/dist/lib/node-esm/settings-DXZ334A3.mjs.map +0 -7
- package/dist/lib/node-esm/templates/index.mjs +0 -10
- package/dist/lib/node-esm/types/index.mjs +0 -11
- package/dist/types/src/capabilities/artifact-definition.d.ts +0 -11
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -5
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts +0 -11
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +0 -18
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +0 -1
- 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 +0 -12
- 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/ScriptContainer.d.ts +0 -12
- 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 -6
- 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 +0 -8
- package/dist/types/src/components/TestPanel/TestContainer.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/templates/chat.d.ts +0 -6
- package/dist/types/src/templates/chat.d.ts.map +0 -1
- package/dist/types/src/templates/chess.d.ts +0 -3
- package/dist/types/src/templates/chess.d.ts.map +0 -1
- package/dist/types/src/templates/echo.d.ts +0 -6
- package/dist/types/src/templates/echo.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -38
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/artifact-definition.ts +0 -225
- package/src/capabilities/capabilities.ts +0 -12
- package/src/capabilities/intent-resolver.ts +0 -77
- package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +0 -39
- package/src/components/DeploymentDialog/DeploymentDialog.tsx +0 -112
- package/src/components/DeploymentDialog/index.ts +0 -9
- package/src/components/FrameContainer/FrameContainer.tsx +0 -83
- package/src/components/FrameContainer/frame.html +0 -25
- package/src/components/FrameContainer/frame.tsx +0 -51
- package/src/components/FrameContainer/index.ts +0 -5
- package/src/components/ScriptContainer.tsx +0 -69
- package/src/components/Settings/ScriptObjectSettings.tsx +0 -206
- package/src/components/Settings/ScriptPluginSettings.tsx +0 -71
- package/src/components/Settings/index.ts +0 -6
- package/src/components/TestPanel/TestContainer.tsx +0 -27
- package/src/events.ts +0 -11
- package/src/templates/chat.ts +0 -96
- package/src/templates/chess.ts +0 -47
- package/src/templates/echo.ts +0 -8
- package/src/types/schema.ts +0 -37
- /package/dist/lib/{browser/templates → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser/DeploymentDialog-C3XH2Z56.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/DeploymentDialog-O2XZVRLU.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/templates → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types → neutral/templates}/index.mjs.map +0 -0
package/src/translations.ts
CHANGED
|
@@ -2,79 +2,107 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Script } from '@dxos/compute';
|
|
6
|
+
import { Type } from '@dxos/echo';
|
|
6
7
|
import { type Resource } from '@dxos/react-ui';
|
|
7
8
|
|
|
8
|
-
import { meta } from '
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { Notebook } from '#types';
|
|
9
11
|
|
|
10
12
|
export const translations = [
|
|
11
13
|
{
|
|
12
14
|
'en-US': {
|
|
13
|
-
[
|
|
14
|
-
'typename
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'object
|
|
19
|
-
'
|
|
20
|
-
'
|
|
15
|
+
[Type.getTypename(Script.Script)]: {
|
|
16
|
+
'typename.label': 'Script',
|
|
17
|
+
'typename.label_zero': 'Scripts',
|
|
18
|
+
'typename.label_one': 'Script',
|
|
19
|
+
'typename.label_other': 'Scripts',
|
|
20
|
+
'object-name.placeholder': 'New script',
|
|
21
|
+
'add-object.label': 'Add script',
|
|
22
|
+
'rename-object.label': 'Rename script',
|
|
23
|
+
'delete-object.label': 'Delete script',
|
|
24
|
+
'object-deleted.label': 'Script deleted',
|
|
25
|
+
},
|
|
26
|
+
[Type.getTypename(Notebook.Notebook)]: {
|
|
27
|
+
'typename.label': 'Notebook',
|
|
28
|
+
'typename.label_zero': 'Notebooks',
|
|
29
|
+
'typename.label_one': 'Notebook',
|
|
30
|
+
'typename.label_other': 'Notebooks',
|
|
31
|
+
'object-name.placeholder': 'New notebook',
|
|
32
|
+
'add-object.label': 'Add notebook',
|
|
33
|
+
'rename-object.label': 'Rename notebook',
|
|
34
|
+
'delete-object.label': 'Delete notebook',
|
|
35
|
+
'object-deleted.label': 'Notebook deleted',
|
|
21
36
|
},
|
|
22
37
|
[meta.id]: {
|
|
23
|
-
'plugin
|
|
24
|
-
'
|
|
25
|
-
'description
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'authenticate
|
|
36
|
-
'
|
|
37
|
-
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'function
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'publish
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
'deployment
|
|
62
|
-
'deployment
|
|
63
|
-
'deployment
|
|
64
|
-
'deployment
|
|
65
|
-
'deployment
|
|
66
|
-
'
|
|
67
|
-
|
|
68
|
-
'script
|
|
69
|
-
'script
|
|
70
|
-
'script
|
|
71
|
-
'script
|
|
72
|
-
'script
|
|
73
|
-
'script
|
|
74
|
-
'script
|
|
75
|
-
'script
|
|
76
|
-
'script
|
|
77
|
-
'script
|
|
38
|
+
'plugin.name': 'Scripts',
|
|
39
|
+
'settings.title': 'Scripts settings',
|
|
40
|
+
'description.label': 'Description',
|
|
41
|
+
'description.placeholder': 'Enter description',
|
|
42
|
+
'binding.placeholder': 'Function name',
|
|
43
|
+
'function-request.placeholder': 'Function request',
|
|
44
|
+
'deploy.label': 'Deploy',
|
|
45
|
+
'deployed.label': 'Current version of the script is deployed',
|
|
46
|
+
'upload-failed.label': 'Upload failed',
|
|
47
|
+
'copy-link.label': 'Copy function link',
|
|
48
|
+
'format.label': 'Format',
|
|
49
|
+
'toggle-details.label': 'Toggle details panel',
|
|
50
|
+
'authenticate-action.label': 'Authenticate functions service',
|
|
51
|
+
'authenticate-action.description':
|
|
52
|
+
'Sign in to the remote functions service to enable script deployment and execution.',
|
|
53
|
+
'authenticate-button.label': 'Authenticate',
|
|
54
|
+
'name.label': 'Name',
|
|
55
|
+
'remote-function-settings.heading': 'Remote Function',
|
|
56
|
+
'function-url.label': 'Invocation URL',
|
|
57
|
+
'function-binding.label': 'Function binding',
|
|
58
|
+
'function-binding.placeholder': 'Enter binding name (e.g., NAME)',
|
|
59
|
+
'script-publish-settings.label': 'Publishing',
|
|
60
|
+
'script-publish-settings.description': 'Scripts can be shared publicly as Github gists.',
|
|
61
|
+
'no-github-token.label': 'This space has no GitHub access token available.',
|
|
62
|
+
'open-token-manager.label': 'Open Token Manager',
|
|
63
|
+
'publish.label': 'Publish',
|
|
64
|
+
'blueprint-editor.label': 'Blueprint',
|
|
65
|
+
'blueprint-editor.description': 'Create a blueprint that exposes this script as a tool.',
|
|
66
|
+
'blueprint-instructions.label': 'Instructions',
|
|
67
|
+
'blueprint-instructions.placeholder': 'Describe how this tool should be used.',
|
|
68
|
+
'create-blueprint.label': 'Create blueprint',
|
|
69
|
+
'update-blueprint.label': 'Update blueprint',
|
|
70
|
+
'function-panel.label': 'Debug Function',
|
|
71
|
+
'script-test.label': 'Test',
|
|
72
|
+
'script-logs.label': 'Logs',
|
|
73
|
+
'compute.label': 'Compute',
|
|
74
|
+
|
|
75
|
+
'deployment-dialog.title': 'Default Scripts',
|
|
76
|
+
'deployment-dialog-scripts-found.message': 'Script templates:',
|
|
77
|
+
'deployment-dialog-deploy-functions-button.label_one': 'Create and deploy script',
|
|
78
|
+
'deployment-dialog-deploy-functions-button.label_other': 'Create and deploy scripts',
|
|
79
|
+
'deployment-dialog-deploy-functions-pending-button.label_one': 'Deploying script',
|
|
80
|
+
'deployment-dialog-deploy-functions-pending-button.label_other': 'Deploying scripts',
|
|
81
|
+
'deployment-dialog-skip-button.label': 'Skip',
|
|
82
|
+
|
|
83
|
+
'script-deployment-toast.label_one': 'Script deployed',
|
|
84
|
+
'script-deployment-toast.label_other': 'Scripts deployed',
|
|
85
|
+
'script-deployment-toast.description_one': 'Your script has been deployed successfully.',
|
|
86
|
+
'script-deployment-toast.description_other': 'Your scripts have been deployed successfully.',
|
|
87
|
+
'script-deployment-toast-close.label_one': 'Close',
|
|
88
|
+
'script-deployment-toast-close.label_other': 'Close',
|
|
89
|
+
'script-deployment-error-toast.label_one': 'Script deployment failed',
|
|
90
|
+
'script-deployment-error-toast.label_other': 'Scripts deployment failed',
|
|
91
|
+
'script-deployment-error-toast.description_one': 'There was an error deploying your script.',
|
|
92
|
+
'script-deployment-error-toast.description_other': 'There was an error deploying your scripts.',
|
|
93
|
+
'script-deployment-error-toast-close.label_one': 'Close',
|
|
94
|
+
'script-deployment-error-toast-close.label_other': 'Close',
|
|
95
|
+
|
|
96
|
+
'notebook-cell.placeholder': 'Enter script',
|
|
97
|
+
'notebook-cell-delete.label': 'Delete cell',
|
|
98
|
+
'notebook-cell-prompt-run.label': 'Run',
|
|
99
|
+
'notebook-cell-insert-markdown.label': 'Insert Markdown',
|
|
100
|
+
'notebook-cell-insert-script.label': 'Insert Script',
|
|
101
|
+
'notebook-cell-insert-prompt.label': 'Insert Prompt',
|
|
102
|
+
'notebook-cell-insert-query.label': 'Insert Query',
|
|
103
|
+
'notebook-markdown.placeholder': 'Enter Markdown',
|
|
104
|
+
'notebook-prompt.placeholder': 'Enter prompt',
|
|
105
|
+
'notebook-cell-insert.label': 'Insert cell',
|
|
78
106
|
},
|
|
79
107
|
},
|
|
80
108
|
},
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { Routine } from '@dxos/compute';
|
|
8
|
+
import { DXN, Annotation, Obj, Ref, Type } from '@dxos/echo';
|
|
9
|
+
import { FormInputAnnotation } from '@dxos/echo/Annotation';
|
|
10
|
+
import { LabelAnnotation } from '@dxos/echo/Annotation';
|
|
11
|
+
import { Graph } from '@dxos/plugin-explorer';
|
|
12
|
+
import { Text } from '@dxos/schema';
|
|
13
|
+
|
|
14
|
+
export type CellType = 'markdown' | 'script' | 'query' | 'prompt' | 'view';
|
|
15
|
+
|
|
16
|
+
export const Cell = Schema.Struct({
|
|
17
|
+
id: Schema.String,
|
|
18
|
+
type: Schema.String,
|
|
19
|
+
name: Schema.optional(Schema.String),
|
|
20
|
+
// TODO(burdon): Union type.
|
|
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
|
+
|
|
26
|
+
export type Cell = Schema.Schema.Type<typeof Cell>;
|
|
27
|
+
|
|
28
|
+
export const Notebook = Schema.Struct({
|
|
29
|
+
name: Schema.String.pipe(Schema.optional),
|
|
30
|
+
cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
31
|
+
}).pipe(
|
|
32
|
+
LabelAnnotation.set(['name']),
|
|
33
|
+
Annotation.IconAnnotation.set({ icon: 'ph--notebook--regular', hue: 'sky' }),
|
|
34
|
+
Type.makeObject(DXN.make('org.dxos.type.notebook', '0.1.0')),
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export type Notebook = Type.InstanceType<typeof Notebook>;
|
|
38
|
+
|
|
39
|
+
export const make = (props: Obj.MakeProps<typeof Notebook> = { cells: [] }): Notebook => Obj.make(Notebook, props);
|
|
@@ -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, Type, DXN } from '@dxos/echo';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
import { templates } from '../templates';
|
|
15
|
+
|
|
16
|
+
const makeKey = (name: string) => DXN.make(`${meta.id}.operation.${name}`);
|
|
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: makeKey('createScript'), name: 'Create Script', icon: 'ph--code--regular' },
|
|
33
|
+
input: Schema.extend(
|
|
34
|
+
ScriptProps,
|
|
35
|
+
Schema.Struct({
|
|
36
|
+
db: Database.Database,
|
|
37
|
+
}),
|
|
38
|
+
),
|
|
39
|
+
output: Schema.Struct({
|
|
40
|
+
object: Type.getSchema(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,4 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './
|
|
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/util/deploy.ts
CHANGED
|
@@ -3,35 +3,30 @@
|
|
|
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 {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
getUserFunctionUrlInMetadata,
|
|
11
|
-
makeFunctionUrl,
|
|
12
|
-
setUserFunctionUrlInMetadata,
|
|
13
|
-
} from '@dxos/functions';
|
|
14
|
-
import { Bundler } from '@dxos/functions/bundler';
|
|
15
|
-
import { incrementSemverPatch, uploadWorkerFunction } from '@dxos/functions/edge';
|
|
9
|
+
import { getUserFunctionIdInMetadata } from '@dxos/functions';
|
|
10
|
+
import { bundleFunction } from '@dxos/functions-runtime/bundler';
|
|
11
|
+
import { FunctionsServiceClient, incrementSemverPatch } from '@dxos/functions-runtime/edge';
|
|
16
12
|
import { log } from '@dxos/log';
|
|
13
|
+
import { FunctionRuntimeKind } from '@dxos/protocols';
|
|
17
14
|
import { type Space } from '@dxos/react-client/echo';
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const existingFunctionUrl = fn && getUserFunctionUrlInMetadata(Obj.getMeta(fn));
|
|
23
|
-
return Boolean(existingFunctionUrl) && !script.changed;
|
|
16
|
+
export const isScriptDeployed = ({ script, fn }: { script: Script.Script; fn: any }): boolean => {
|
|
17
|
+
const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));
|
|
18
|
+
return Boolean(existingFunctionId) && !script.changed;
|
|
24
19
|
};
|
|
25
20
|
|
|
26
21
|
type DeployScriptProps = {
|
|
27
|
-
script:
|
|
22
|
+
script: Script.Script;
|
|
28
23
|
client: Client;
|
|
29
24
|
space: Space;
|
|
30
|
-
fn?:
|
|
31
|
-
|
|
25
|
+
fn?: Operation.PersistentOperation;
|
|
26
|
+
existingFunctionId?: string;
|
|
32
27
|
};
|
|
33
28
|
|
|
34
|
-
type DeployScriptResult = { success: boolean; error?: Error;
|
|
29
|
+
type DeployScriptResult = { success: boolean; error?: Error; functionId?: string };
|
|
35
30
|
|
|
36
31
|
/**
|
|
37
32
|
* Deploy a script to a space, handling bundling and uploading to the FaaS infrastructure.
|
|
@@ -41,7 +36,7 @@ export const deployScript = async ({
|
|
|
41
36
|
client,
|
|
42
37
|
space,
|
|
43
38
|
fn,
|
|
44
|
-
|
|
39
|
+
existingFunctionId,
|
|
45
40
|
}: DeployScriptProps): Promise<DeployScriptResult> => {
|
|
46
41
|
const validationError = validateDeployInputs(script, space);
|
|
47
42
|
if (validationError) {
|
|
@@ -49,33 +44,30 @@ export const deployScript = async ({
|
|
|
49
44
|
}
|
|
50
45
|
|
|
51
46
|
try {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (error
|
|
56
|
-
throw error || new Error('Bundle creation failed');
|
|
47
|
+
const buildResult = await bundleFunction({
|
|
48
|
+
source: script.source!.target!.content,
|
|
49
|
+
});
|
|
50
|
+
if ('error' in buildResult) {
|
|
51
|
+
throw buildResult.error || new Error('Bundle creation failed');
|
|
57
52
|
}
|
|
58
53
|
|
|
59
|
-
const
|
|
60
|
-
|
|
54
|
+
const functionsServiceClient = FunctionsServiceClient.fromClient(client);
|
|
55
|
+
const newFunction = await functionsServiceClient.deploy(Context.default(), {
|
|
56
|
+
// TODO(dmaretskyi): Space key or identity key.
|
|
61
57
|
ownerPublicKey: space.key,
|
|
62
|
-
version: fn ? incrementSemverPatch(fn.version) : '0.0.1',
|
|
58
|
+
version: fn ? incrementSemverPatch(Obj.getMeta(fn).version ?? '0.0.0') : '0.0.1',
|
|
63
59
|
functionId: existingFunctionId,
|
|
64
|
-
|
|
60
|
+
entryPoint: buildResult.entryPoint,
|
|
61
|
+
assets: buildResult.assets,
|
|
62
|
+
runtime: FunctionRuntimeKind.enums.WORKER_LOADER,
|
|
65
63
|
});
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, functionId, version);
|
|
72
|
-
script.changed = false;
|
|
73
|
-
updateFunctionMetadata(script, storedFunction, meta, functionId);
|
|
74
|
-
|
|
75
|
-
const functionUrl = makeFunctionUrl({ functionId });
|
|
76
|
-
setUserFunctionUrlInMetadata(Obj.getMeta(storedFunction), functionUrl);
|
|
65
|
+
const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, newFunction);
|
|
66
|
+
Obj.update(script, (script) => {
|
|
67
|
+
script.changed = false;
|
|
68
|
+
});
|
|
77
69
|
|
|
78
|
-
return { success: true,
|
|
70
|
+
return { success: true, functionId: getUserFunctionIdInMetadata(Obj.getMeta(storedFunction)) };
|
|
79
71
|
} catch (err: any) {
|
|
80
72
|
log.catch(err);
|
|
81
73
|
return { success: false, error: err };
|
|
@@ -85,39 +77,26 @@ export const deployScript = async ({
|
|
|
85
77
|
/**
|
|
86
78
|
* Validate inputs for script deployment.
|
|
87
79
|
*/
|
|
88
|
-
const validateDeployInputs = (script:
|
|
80
|
+
const validateDeployInputs = (script: Script.Script, space: Space): Error | null => {
|
|
89
81
|
if (!script.source || !space) {
|
|
90
82
|
return new Error('Script source or space not available');
|
|
91
83
|
}
|
|
92
84
|
return null;
|
|
93
85
|
};
|
|
94
86
|
|
|
95
|
-
const extractFunctionId = (functionUrl?: string): string | undefined => {
|
|
96
|
-
return functionUrl?.split('/').at(-1);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
const bundleScript = async (source: string): Promise<{ bundle?: string; error?: Error }> => {
|
|
100
|
-
const bundler = new Bundler({ platform: 'browser', sandboxedModules: [], remoteModules: {} });
|
|
101
|
-
const buildResult = await bundler.bundle({ source });
|
|
102
|
-
|
|
103
|
-
if (buildResult.error || !buildResult.bundle) {
|
|
104
|
-
return { error: buildResult.error || new Error('Bundle creation failed') };
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return { bundle: buildResult.bundle };
|
|
108
|
-
};
|
|
109
|
-
|
|
110
87
|
const createOrUpdateFunctionInSpace = (
|
|
111
88
|
space: Space,
|
|
112
|
-
fn:
|
|
113
|
-
script:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
): FunctionType => {
|
|
89
|
+
fn: Operation.PersistentOperation | undefined,
|
|
90
|
+
script: Script.Script,
|
|
91
|
+
newFunction: Operation.PersistentOperation,
|
|
92
|
+
): Operation.PersistentOperation => {
|
|
117
93
|
if (fn) {
|
|
118
|
-
fn
|
|
94
|
+
Operation.setFrom(fn, newFunction);
|
|
119
95
|
return fn;
|
|
120
96
|
} else {
|
|
121
|
-
|
|
97
|
+
Obj.update(newFunction, (newFunction) => {
|
|
98
|
+
newFunction.source = Ref.make(script);
|
|
99
|
+
});
|
|
100
|
+
return space.db.add(newFunction);
|
|
122
101
|
}
|
|
123
102
|
};
|
package/src/util/functions.ts
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
5
|
+
import { type Operation, Script } from '@dxos/compute';
|
|
6
|
+
import { Obj } from '@dxos/echo';
|
|
7
|
+
import { getUserFunctionIdInMetadata } from '@dxos/functions';
|
|
8
|
+
import { getInvocationUrl } from '@dxos/functions-runtime';
|
|
9
|
+
import { type PublicKey } from '@dxos/keys';
|
|
6
10
|
import { log } from '@dxos/log';
|
|
7
|
-
import {
|
|
11
|
+
import { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
8
12
|
|
|
9
13
|
/**
|
|
10
14
|
* Get the function URL for a given script and client configuration
|
|
@@ -14,40 +18,70 @@ export const getFunctionUrl = ({
|
|
|
14
18
|
fn,
|
|
15
19
|
edgeUrl,
|
|
16
20
|
}: {
|
|
17
|
-
script:
|
|
21
|
+
script: Script.Script;
|
|
18
22
|
fn: any;
|
|
19
23
|
edgeUrl: string;
|
|
20
24
|
}): string | undefined => {
|
|
21
|
-
const
|
|
22
|
-
const
|
|
25
|
+
const spaceId = Obj.getDatabase(script)?.spaceId;
|
|
26
|
+
const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));
|
|
23
27
|
|
|
24
|
-
if (!
|
|
28
|
+
if (!existingFunctionId) {
|
|
25
29
|
return undefined;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
return getInvocationUrl(
|
|
29
|
-
spaceId
|
|
32
|
+
return getInvocationUrl(existingFunctionId, edgeUrl, {
|
|
33
|
+
spaceId,
|
|
30
34
|
});
|
|
31
35
|
};
|
|
32
36
|
|
|
33
|
-
export const updateFunctionMetadata = (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
export const updateFunctionMetadata = (
|
|
38
|
+
script: Script.Script,
|
|
39
|
+
storedFunction: Operation.PersistentOperation,
|
|
40
|
+
meta: any,
|
|
41
|
+
functionId: string,
|
|
42
|
+
) => {
|
|
43
|
+
Obj.update(storedFunction, (storedFunction) => {
|
|
44
|
+
if (script.description !== undefined && script.description.trim() !== '') {
|
|
45
|
+
storedFunction.description = script.description;
|
|
46
|
+
} else if (meta.description) {
|
|
47
|
+
storedFunction.description = meta.description;
|
|
48
|
+
} else {
|
|
49
|
+
log.verbose('no description in function metadata', { functionId });
|
|
50
|
+
}
|
|
41
51
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
if (meta.inputSchema) {
|
|
53
|
+
storedFunction.inputSchema = meta.inputSchema;
|
|
54
|
+
} else {
|
|
55
|
+
log.verbose('no input schema in function metadata', { functionId });
|
|
56
|
+
}
|
|
47
57
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
58
|
+
if (meta.outputSchema) {
|
|
59
|
+
storedFunction.outputSchema = meta.outputSchema;
|
|
60
|
+
} else {
|
|
61
|
+
log.verbose('no output schema in function metadata', { functionId });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (meta.key) {
|
|
65
|
+
Obj.getMeta(storedFunction).key = meta.key;
|
|
66
|
+
} else {
|
|
67
|
+
log.verbose('no key in function metadata', { functionId });
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const getAccessCredential = (identityKey: PublicKey): Credential => {
|
|
73
|
+
return {
|
|
74
|
+
issuer: identityKey,
|
|
75
|
+
issuanceDate: new Date(),
|
|
76
|
+
subject: {
|
|
77
|
+
id: identityKey,
|
|
78
|
+
assertion: {
|
|
79
|
+
'@type': 'dxos.halo.credentials.ServiceAccess',
|
|
80
|
+
serverName: 'hub.dxos.network',
|
|
81
|
+
serverKey: identityKey,
|
|
82
|
+
identityKey,
|
|
83
|
+
capabilities: ['composer:beta'],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
53
87
|
};
|
package/src/vite-env.d.ts
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DEPLOYMENT_DIALOG,
|
|
3
|
-
DeploymentDialog_default
|
|
4
|
-
} from "./chunk-OAVS36Q3.mjs";
|
|
5
|
-
import "./chunk-SUOLJH55.mjs";
|
|
6
|
-
import "./chunk-IS4OG2UW.mjs";
|
|
7
|
-
import "./chunk-QYAREHGH.mjs";
|
|
8
|
-
export {
|
|
9
|
-
DEPLOYMENT_DIALOG,
|
|
10
|
-
DeploymentDialog_default as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=DeploymentDialog-C3XH2Z56.mjs.map
|