@dxos/plugin-script 0.8.4-main.406dc2a → 0.8.4-main.43cb759274
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/{browser/NotebookContainer-LVGRPFY3.mjs → neutral/NotebookArticle-NV4AHOOS.mjs} +313 -233
- package/dist/lib/neutral/NotebookArticle-NV4AHOOS.mjs.map +7 -0
- package/dist/lib/neutral/ScriptArticle-UBT27SB6.mjs +79 -0
- package/dist/lib/neutral/ScriptArticle-UBT27SB6.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-T33SBPP2.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-T33SBPP2.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-C4O7EV6M.mjs +123 -0
- package/dist/lib/neutral/chunk-C4O7EV6M.mjs.map +7 -0
- package/dist/lib/neutral/chunk-H2BRWQMY.mjs +96 -0
- package/dist/lib/neutral/chunk-H2BRWQMY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-LHEJXJEL.mjs +8 -0
- package/dist/lib/neutral/chunk-LHEJXJEL.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NQOIENTU.mjs +8 -0
- package/dist/lib/neutral/chunk-NQOIENTU.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/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-WQJXMOUE.mjs +46 -0
- package/dist/lib/neutral/create-WQJXMOUE.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-66DO3UJO.mjs +45 -0
- package/dist/lib/neutral/create-script-66DO3UJO.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-6MW73SDV.mjs +59 -0
- package/dist/lib/neutral/inspect-invocations-6MW73SDV.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-X44IGZXS.mjs +18 -0
- package/dist/lib/neutral/operation-handler-X44IGZXS.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-JZUNJYZM.mjs +63 -0
- package/dist/lib/neutral/update-JZUNJYZM.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 +5 -4
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- 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 +19 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +18 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +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 +5 -4
- 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 +5 -3
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +221 -229
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- 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 +221 -229
- 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 +6 -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 +5 -5
- 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/{components → containers}/DeploymentDialog/DeploymentDialog.d.ts +2 -4
- 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 +27 -30
- 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 +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- 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 +1 -1
- package/dist/types/src/notebook/eval.d.ts.map +1 -1
- package/dist/types/src/notebook/index.d.ts +1 -1
- package/dist/types/src/notebook/index.d.ts.map +1 -1
- package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -1
- 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 +28 -24
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +2 -4
- 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/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 -91
- 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 -2
- 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 +4 -4
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +3 -3
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +186 -105
- package/src/ScriptPlugin.node.ts +21 -0
- package/src/ScriptPlugin.test.ts +31 -0
- package/src/ScriptPlugin.tsx +29 -97
- 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 -58
- package/src/capabilities/blueprint-definition.ts +13 -24
- package/src/capabilities/compiler.ts +100 -23
- package/src/capabilities/create-object.ts +49 -0
- package/src/capabilities/index.ts +13 -9
- package/src/capabilities/node.ts +16 -0
- package/src/capabilities/operation-handler.ts +21 -0
- package/src/capabilities/react-surface.tsx +120 -92
- package/src/capabilities/settings.ts +26 -14
- package/src/compiler/compiler.ts +21 -3
- package/src/components/NotebookStack/NotebookCell.tsx +100 -91
- package/src/components/NotebookStack/NotebookMenu.tsx +7 -7
- package/src/components/NotebookStack/NotebookStack.stories.tsx +34 -13
- package/src/components/NotebookStack/NotebookStack.tsx +40 -22
- 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 +44 -22
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +43 -48
- package/src/components/TestPanel/TestPanel.tsx +125 -185
- package/src/components/TestPanel/index.ts +0 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +26 -19
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +74 -71
- package/src/components/index.ts +5 -7
- 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 +47 -37
- package/src/hooks/format.ts +10 -5
- package/src/hooks/index.ts +1 -0
- package/src/hooks/template.ts +23 -26
- 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 +2 -4
- package/src/meta.ts +17 -7
- package/src/notebook/compute-graph.test.ts +82 -0
- package/src/notebook/{notebook.ts → compute-graph.ts} +66 -19
- package/src/notebook/eval.ts +1 -1
- package/src/notebook/index.ts +1 -1
- package/src/notebook/vfs-parser.ts +10 -3
- 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 +251 -0
- package/src/templates/data-generator.ts +2 -2
- package/src/templates/discord.ts +8 -8
- package/src/templates/forex-effect.ts +36 -29
- package/src/templates/forex.ts +28 -17
- package/src/templates/gmail.ts +10 -11
- package/src/templates/index.ts +29 -23
- package/src/templates/ping.ts +23 -5
- package/src/testing/index.ts +2 -1
- 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 +89 -88
- 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 -2
- package/src/types/types.ts +5 -0
- package/src/util/deploy.ts +33 -41
- package/src/util/functions.ts +35 -30
- package/src/vite-env.d.ts +7 -0
- package/dist/lib/browser/DeploymentDialog-65TWT6S5.mjs +0 -13
- package/dist/lib/browser/NotebookContainer-LVGRPFY3.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-LRTRN7JW.mjs +0 -149
- package/dist/lib/browser/ScriptContainer-LRTRN7JW.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-DPYULSME.mjs +0 -65
- package/dist/lib/browser/app-graph-builder-DPYULSME.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-ET5KZ46I.mjs +0 -28
- package/dist/lib/browser/blueprint-definition-ET5KZ46I.mjs.map +0 -7
- package/dist/lib/browser/chunk-5CYLWXRH.mjs +0 -89
- package/dist/lib/browser/chunk-5CYLWXRH.mjs.map +0 -7
- package/dist/lib/browser/chunk-75LH4EUR.mjs +0 -326
- package/dist/lib/browser/chunk-75LH4EUR.mjs.map +0 -7
- package/dist/lib/browser/chunk-E7DXDICD.mjs +0 -282
- package/dist/lib/browser/chunk-E7DXDICD.mjs.map +0 -7
- package/dist/lib/browser/chunk-EZVXV6DA.mjs +0 -26
- package/dist/lib/browser/chunk-EZVXV6DA.mjs.map +0 -7
- package/dist/lib/browser/chunk-I3QSGUFJ.mjs +0 -646
- package/dist/lib/browser/chunk-I3QSGUFJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-JO2O7W6J.mjs +0 -254
- package/dist/lib/browser/chunk-JO2O7W6J.mjs.map +0 -7
- package/dist/lib/browser/chunk-N6M34EUC.mjs +0 -112
- package/dist/lib/browser/chunk-N6M34EUC.mjs.map +0 -7
- package/dist/lib/browser/chunk-NM4WQS4F.mjs +0 -153
- package/dist/lib/browser/chunk-NM4WQS4F.mjs.map +0 -7
- package/dist/lib/browser/chunk-OKXN2N7M.mjs +0 -15
- package/dist/lib/browser/chunk-OKXN2N7M.mjs.map +0 -7
- package/dist/lib/browser/chunk-ST3ACVUC.mjs +0 -88
- package/dist/lib/browser/chunk-ST3ACVUC.mjs.map +0 -7
- package/dist/lib/browser/compiler-G2N2CG63.mjs +0 -98
- package/dist/lib/browser/compiler-G2N2CG63.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -279
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JLU7DVLQ.mjs +0 -105
- package/dist/lib/browser/intent-resolver-JLU7DVLQ.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-76SDTUYG.mjs +0 -127
- package/dist/lib/browser/react-surface-76SDTUYG.mjs.map +0 -7
- package/dist/lib/browser/settings-ERFKVNUK.mjs +0 -25
- package/dist/lib/browser/settings-ERFKVNUK.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -13
- package/dist/lib/node-esm/DeploymentDialog-I63ZC2HH.mjs +0 -14
- package/dist/lib/node-esm/NotebookContainer-QY5NJGJI.mjs +0 -684
- package/dist/lib/node-esm/NotebookContainer-QY5NJGJI.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-SVXCSLNH.mjs +0 -150
- package/dist/lib/node-esm/ScriptContainer-SVXCSLNH.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-UXJGHXSL.mjs +0 -66
- package/dist/lib/node-esm/app-graph-builder-UXJGHXSL.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-AIYFOT7Q.mjs +0 -30
- package/dist/lib/node-esm/blueprint-definition-AIYFOT7Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2GVTWESW.mjs +0 -90
- package/dist/lib/node-esm/chunk-2GVTWESW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4X375PGY.mjs +0 -90
- package/dist/lib/node-esm/chunk-4X375PGY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-67OVZHI3.mjs +0 -327
- package/dist/lib/node-esm/chunk-67OVZHI3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-C2ORIPKH.mjs +0 -154
- package/dist/lib/node-esm/chunk-C2ORIPKH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NUXZQQ6P.mjs +0 -16
- package/dist/lib/node-esm/chunk-NUXZQQ6P.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OG2SIKHE.mjs +0 -28
- package/dist/lib/node-esm/chunk-OG2SIKHE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SMFPSKQT.mjs +0 -647
- package/dist/lib/node-esm/chunk-SMFPSKQT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VRSDE4CI.mjs +0 -114
- package/dist/lib/node-esm/chunk-VRSDE4CI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VZAFGLD7.mjs +0 -283
- package/dist/lib/node-esm/chunk-VZAFGLD7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YW36TZ7K.mjs +0 -255
- package/dist/lib/node-esm/chunk-YW36TZ7K.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-PLDAZ5GJ.mjs +0 -99
- package/dist/lib/node-esm/compiler-PLDAZ5GJ.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -280
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-SFGTIFOG.mjs +0 -106
- package/dist/lib/node-esm/intent-resolver-SFGTIFOG.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-SHEBNW4R.mjs +0 -128
- package/dist/lib/node-esm/react-surface-SHEBNW4R.mjs.map +0 -7
- package/dist/lib/node-esm/settings-5TYXQ42N.mjs +0 -26
- package/dist/lib/node-esm/settings-5TYXQ42N.mjs.map +0 -7
- package/dist/lib/node-esm/templates/index.mjs +0 -10
- package/dist/lib/node-esm/types/index.mjs +0 -14
- 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.map +0 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +0 -251
- 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/NotebookContainer.d.ts +0 -10
- package/dist/types/src/components/NotebookContainer.d.ts.map +0 -1
- package/dist/types/src/components/NotebookContainer.stories.d.ts +0 -248
- package/dist/types/src/components/NotebookContainer.stories.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/notebook/notebook.d.ts +0 -35
- package/dist/types/src/notebook/notebook.d.ts.map +0 -1
- package/dist/types/src/notebook/notebook.test.d.ts +0 -2
- package/dist/types/src/notebook/notebook.test.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/testing/data.d.ts +0 -19
- package/dist/types/src/testing/data.d.ts.map +0 -1
- package/dist/types/src/types/actions.d.ts +0 -66
- package/dist/types/src/types/actions.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -61
- 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 -87
- package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +0 -53
- package/src/components/DeploymentDialog/DeploymentDialog.tsx +0 -106
- package/src/components/DeploymentDialog/index.ts +0 -9
- package/src/components/FrameContainer/FrameContainer.tsx +0 -84
- 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/NotebookContainer.stories.tsx +0 -32
- package/src/components/NotebookContainer.tsx +0 -124
- package/src/components/ScriptContainer.tsx +0 -69
- package/src/components/Settings/ScriptObjectSettings.tsx +0 -286
- package/src/components/Settings/ScriptPluginSettings.tsx +0 -61
- package/src/components/Settings/index.ts +0 -6
- package/src/components/TestPanel/TestContainer.tsx +0 -27
- package/src/events.ts +0 -11
- package/src/notebook/notebook.test.ts +0 -70
- package/src/templates/chat.ts +0 -96
- package/src/templates/chess.ts +0 -49
- package/src/testing/data.ts +0 -47
- package/src/types/actions.ts +0 -53
- package/src/types/schema.ts +0 -48
- /package/dist/lib/{browser/templates → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser/DeploymentDialog-65TWT6S5.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-I63ZC2HH.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,106 +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 { Notebook } from '
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { Notebook } from '#types';
|
|
10
11
|
|
|
11
12
|
export const translations = [
|
|
12
13
|
{
|
|
13
14
|
'en-US': {
|
|
14
|
-
[
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'typename
|
|
19
|
-
'object
|
|
20
|
-
'
|
|
21
|
-
'
|
|
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',
|
|
22
25
|
},
|
|
23
|
-
[Notebook.Notebook
|
|
24
|
-
'typename
|
|
25
|
-
'typename
|
|
26
|
-
'typename
|
|
27
|
-
'typename
|
|
28
|
-
'object
|
|
29
|
-
'
|
|
30
|
-
'
|
|
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',
|
|
31
36
|
},
|
|
32
37
|
[meta.id]: {
|
|
33
|
-
'plugin
|
|
34
|
-
'settings
|
|
35
|
-
'description
|
|
36
|
-
'description
|
|
37
|
-
'binding
|
|
38
|
-
'function
|
|
39
|
-
'deploy
|
|
40
|
-
'deployed
|
|
41
|
-
'upload
|
|
42
|
-
'copy
|
|
43
|
-
'format
|
|
44
|
-
'toggle
|
|
45
|
-
'authenticate
|
|
46
|
-
'authenticate
|
|
47
|
-
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'function
|
|
51
|
-
'function
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'blueprint
|
|
60
|
-
'blueprint
|
|
61
|
-
'blueprint
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
68
|
-
'
|
|
69
|
-
'template select group label': 'Select template',
|
|
70
|
-
'function panel label': 'Debug Function',
|
|
71
|
-
'script test label': 'Test',
|
|
72
|
-
'script logs label': 'Logs',
|
|
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',
|
|
73
74
|
|
|
74
|
-
'deployment
|
|
75
|
-
'deployment
|
|
76
|
-
'deployment
|
|
77
|
-
'deployment
|
|
78
|
-
'deployment
|
|
79
|
-
'deployment
|
|
80
|
-
'deployment
|
|
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',
|
|
81
82
|
|
|
82
|
-
'script
|
|
83
|
-
'script
|
|
84
|
-
'script
|
|
85
|
-
'script
|
|
86
|
-
'script
|
|
87
|
-
'script
|
|
88
|
-
'script
|
|
89
|
-
'script
|
|
90
|
-
'script
|
|
91
|
-
'script
|
|
92
|
-
'script
|
|
93
|
-
'script
|
|
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',
|
|
94
95
|
|
|
95
|
-
'notebook
|
|
96
|
-
'notebook
|
|
97
|
-
'notebook
|
|
98
|
-
'notebook
|
|
99
|
-
'notebook
|
|
100
|
-
'notebook
|
|
101
|
-
'notebook
|
|
102
|
-
'notebook
|
|
103
|
-
'notebook
|
|
104
|
-
'notebook
|
|
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',
|
|
105
106
|
},
|
|
106
107
|
},
|
|
107
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/internal';
|
|
10
|
+
import { LabelAnnotation } from '@dxos/echo/internal';
|
|
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,5 +2,9 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './
|
|
6
|
-
|
|
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,30 +3,26 @@
|
|
|
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
|
-
getUserFunctionIdInMetadata,
|
|
11
|
-
setUserFunctionIdInMetadata,
|
|
12
|
-
} from '@dxos/functions';
|
|
13
|
-
import { Bundler } from '@dxos/functions/bundler';
|
|
14
|
-
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';
|
|
15
12
|
import { log } from '@dxos/log';
|
|
13
|
+
import { FunctionRuntimeKind } from '@dxos/protocols';
|
|
16
14
|
import { type Space } from '@dxos/react-client/echo';
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export const isScriptDeployed = ({ script, fn }: { script: ScriptType; fn: any }): boolean => {
|
|
16
|
+
export const isScriptDeployed = ({ script, fn }: { script: Script.Script; fn: any }): boolean => {
|
|
21
17
|
const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));
|
|
22
18
|
return Boolean(existingFunctionId) && !script.changed;
|
|
23
19
|
};
|
|
24
20
|
|
|
25
21
|
type DeployScriptProps = {
|
|
26
|
-
script:
|
|
22
|
+
script: Script.Script;
|
|
27
23
|
client: Client;
|
|
28
24
|
space: Space;
|
|
29
|
-
fn?:
|
|
25
|
+
fn?: Operation.PersistentOperation;
|
|
30
26
|
existingFunctionId?: string;
|
|
31
27
|
};
|
|
32
28
|
|
|
@@ -48,32 +44,30 @@ export const deployScript = async ({
|
|
|
48
44
|
}
|
|
49
45
|
|
|
50
46
|
try {
|
|
51
|
-
const
|
|
52
|
-
|
|
47
|
+
const buildResult = await bundleFunction({
|
|
48
|
+
source: script.source!.target!.content,
|
|
49
|
+
});
|
|
53
50
|
if ('error' in buildResult) {
|
|
54
51
|
throw buildResult.error || new Error('Bundle creation failed');
|
|
55
52
|
}
|
|
56
53
|
|
|
57
|
-
const
|
|
58
|
-
|
|
54
|
+
const functionsServiceClient = FunctionsServiceClient.fromClient(client);
|
|
55
|
+
const newFunction = await functionsServiceClient.deploy(Context.default(), {
|
|
56
|
+
// TODO(dmaretskyi): Space key or identity key.
|
|
59
57
|
ownerPublicKey: space.key,
|
|
60
|
-
version: fn ? incrementSemverPatch(fn.version) : '0.0.1',
|
|
58
|
+
version: fn ? incrementSemverPatch(Obj.getMeta(fn).version ?? '0.0.0') : '0.0.1',
|
|
61
59
|
functionId: existingFunctionId,
|
|
62
60
|
entryPoint: buildResult.entryPoint,
|
|
63
|
-
assets:
|
|
61
|
+
assets: buildResult.assets,
|
|
62
|
+
runtime: FunctionRuntimeKind.enums.WORKER_LOADER,
|
|
64
63
|
});
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, functionId, version);
|
|
71
|
-
script.changed = false;
|
|
72
|
-
updateFunctionMetadata(script, storedFunction, meta, functionId);
|
|
73
|
-
|
|
74
|
-
setUserFunctionIdInMetadata(Obj.getMeta(storedFunction), functionId);
|
|
65
|
+
const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, newFunction);
|
|
66
|
+
Obj.update(script, (script) => {
|
|
67
|
+
script.changed = false;
|
|
68
|
+
});
|
|
75
69
|
|
|
76
|
-
return { success: true, functionId };
|
|
70
|
+
return { success: true, functionId: getUserFunctionIdInMetadata(Obj.getMeta(storedFunction)) };
|
|
77
71
|
} catch (err: any) {
|
|
78
72
|
log.catch(err);
|
|
79
73
|
return { success: false, error: err };
|
|
@@ -83,7 +77,7 @@ export const deployScript = async ({
|
|
|
83
77
|
/**
|
|
84
78
|
* Validate inputs for script deployment.
|
|
85
79
|
*/
|
|
86
|
-
const validateDeployInputs = (script:
|
|
80
|
+
const validateDeployInputs = (script: Script.Script, space: Space): Error | null => {
|
|
87
81
|
if (!script.source || !space) {
|
|
88
82
|
return new Error('Script source or space not available');
|
|
89
83
|
}
|
|
@@ -92,19 +86,17 @@ const validateDeployInputs = (script: ScriptType, space: Space): Error | null =>
|
|
|
92
86
|
|
|
93
87
|
const createOrUpdateFunctionInSpace = (
|
|
94
88
|
space: Space,
|
|
95
|
-
fn:
|
|
96
|
-
script:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
): FunctionType => {
|
|
89
|
+
fn: Operation.PersistentOperation | undefined,
|
|
90
|
+
script: Script.Script,
|
|
91
|
+
newFunction: Operation.PersistentOperation,
|
|
92
|
+
): Operation.PersistentOperation => {
|
|
100
93
|
if (fn) {
|
|
101
|
-
fn
|
|
102
|
-
fn.version = version;
|
|
94
|
+
Operation.setFrom(fn, newFunction);
|
|
103
95
|
return fn;
|
|
104
96
|
} else {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return
|
|
97
|
+
Obj.update(newFunction, (newFunction) => {
|
|
98
|
+
newFunction.source = Ref.make(script);
|
|
99
|
+
});
|
|
100
|
+
return space.db.add(newFunction);
|
|
109
101
|
}
|
|
110
102
|
};
|
package/src/util/functions.ts
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
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';
|
|
6
9
|
import { type PublicKey } from '@dxos/keys';
|
|
7
10
|
import { log } from '@dxos/log';
|
|
8
11
|
import { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
9
|
-
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
14
|
* Get the function URL for a given script and client configuration
|
|
12
15
|
*/
|
|
@@ -15,53 +18,55 @@ export const getFunctionUrl = ({
|
|
|
15
18
|
fn,
|
|
16
19
|
edgeUrl,
|
|
17
20
|
}: {
|
|
18
|
-
script:
|
|
21
|
+
script: Script.Script;
|
|
19
22
|
fn: any;
|
|
20
23
|
edgeUrl: string;
|
|
21
24
|
}): string | undefined => {
|
|
22
|
-
const
|
|
23
|
-
const existingFunctionId = fn && getUserFunctionIdInMetadata(getMeta(fn));
|
|
25
|
+
const spaceId = Obj.getDatabase(script)?.spaceId;
|
|
26
|
+
const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));
|
|
24
27
|
|
|
25
28
|
if (!existingFunctionId) {
|
|
26
29
|
return undefined;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
return getInvocationUrl(existingFunctionId, edgeUrl, {
|
|
30
|
-
spaceId
|
|
33
|
+
spaceId,
|
|
31
34
|
});
|
|
32
35
|
};
|
|
33
36
|
|
|
34
37
|
export const updateFunctionMetadata = (
|
|
35
|
-
script:
|
|
36
|
-
storedFunction:
|
|
38
|
+
script: Script.Script,
|
|
39
|
+
storedFunction: Operation.PersistentOperation,
|
|
37
40
|
meta: any,
|
|
38
41
|
functionId: string,
|
|
39
42
|
) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
+
}
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
if (meta.inputSchema) {
|
|
53
|
+
storedFunction.inputSchema = meta.inputSchema;
|
|
54
|
+
} else {
|
|
55
|
+
log.verbose('no input schema in function metadata', { functionId });
|
|
56
|
+
}
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
if (meta.outputSchema) {
|
|
59
|
+
storedFunction.outputSchema = meta.outputSchema;
|
|
60
|
+
} else {
|
|
61
|
+
log.verbose('no output schema in function metadata', { functionId });
|
|
62
|
+
}
|
|
59
63
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
if (meta.key) {
|
|
65
|
+
Obj.getMeta(storedFunction).key = meta.key;
|
|
66
|
+
} else {
|
|
67
|
+
log.verbose('no key in function metadata', { functionId });
|
|
68
|
+
}
|
|
69
|
+
});
|
|
65
70
|
};
|
|
66
71
|
|
|
67
72
|
export const getAccessCredential = (identityKey: PublicKey): Credential => {
|
package/src/vite-env.d.ts
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DEPLOYMENT_DIALOG,
|
|
3
|
-
DeploymentDialog_default
|
|
4
|
-
} from "./chunk-NM4WQS4F.mjs";
|
|
5
|
-
import "./chunk-JO2O7W6J.mjs";
|
|
6
|
-
import "./chunk-5CYLWXRH.mjs";
|
|
7
|
-
import "./chunk-ST3ACVUC.mjs";
|
|
8
|
-
import "./chunk-EZVXV6DA.mjs";
|
|
9
|
-
export {
|
|
10
|
-
DEPLOYMENT_DIALOG,
|
|
11
|
-
DeploymentDialog_default as default
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=DeploymentDialog-65TWT6S5.mjs.map
|