@dxos/plugin-script 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
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/dist/lib/{browser/DeploymentDialog-IIOXAS47.mjs → neutral/DeploymentDialog-M3AFYQHC.mjs} +24 -48
- package/dist/lib/neutral/DeploymentDialog-M3AFYQHC.mjs.map +7 -0
- package/dist/lib/{browser/NotebookContainer-VVZOKGRC.mjs → neutral/NotebookArticle-NV4AHOOS.mjs} +58 -145
- package/dist/lib/neutral/NotebookArticle-NV4AHOOS.mjs.map +7 -0
- package/dist/lib/{browser/ScriptContainer-A5SSIUH6.mjs → neutral/ScriptArticle-UBT27SB6.mjs} +14 -28
- 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/{browser/blueprint-definition-YMZEJBAZ.mjs → neutral/blueprint-definition-T33SBPP2.mjs} +4 -6
- package/dist/lib/neutral/blueprint-definition-T33SBPP2.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +3 -1
- package/dist/lib/neutral/capabilities/index.mjs +21 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +17 -0
- package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
- package/dist/lib/{node-esm/chunk-JGN7TDJH.mjs → neutral/chunk-2REUEDUA.mjs} +10 -23
- 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-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/{browser/chunk-G3XIOLLI.mjs → neutral/chunk-VXDJH6OL.mjs} +24 -48
- package/dist/lib/neutral/chunk-VXDJH6OL.mjs.map +7 -0
- package/dist/lib/{browser/compiler-53G6ZHQM.mjs → neutral/compiler-ODK4UA2N.mjs} +24 -22
- 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/{browser/chunk-MUEVLYXJ.mjs → neutral/hooks/index.mjs} +52 -80
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +41 -0
- package/dist/lib/neutral/inspect-invocations-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/{browser/settings-76UM7442.mjs → neutral/settings-VJBW4OMK.mjs} +6 -12
- package/dist/lib/neutral/settings-VJBW4OMK.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/templates/index.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +105 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +17 -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 +1 -0
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/ScriptPlugin.node.d.ts +4 -0
- package/dist/types/src/ScriptPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ScriptPlugin.test.d.ts +2 -0
- package/dist/types/src/ScriptPlugin.test.d.ts.map +1 -0
- package/dist/types/src/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/script-blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler.d.ts +6 -0
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +16 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +19 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +18 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -5
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +4 -2
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +219 -228
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts +8 -0
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +1 -0
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts +241 -0
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ScriptPluginSettings/index.d.ts +2 -0
- package/dist/types/src/components/ScriptPluginSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +7 -6
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +219 -228
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestPanel.d.ts +4 -2
- package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +5 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +3 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -1
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +219 -228
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/index.d.ts +1 -2
- package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/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 +4 -5
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts +242 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/index.d.ts +1 -2
- package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -1
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts +1 -1
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -1
- package/dist/types/src/containers/TestContainer/index.d.ts +1 -2
- package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +2 -4
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/deploy.d.ts +16 -5
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +1 -1
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +1 -1
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts.map +1 -1
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
- package/dist/types/src/notebook/eval.d.ts.map +1 -1
- package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -1
- package/dist/types/src/operations/create-script.d.ts +5 -0
- package/dist/types/src/operations/create-script.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/templates/anthropic.d.ts +4 -5
- package/dist/types/src/templates/anthropic.d.ts.map +1 -1
- package/dist/types/src/templates/chess-bot.d.ts +8 -10
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
- package/dist/types/src/templates/commentary.d.ts +9 -10
- package/dist/types/src/templates/commentary.d.ts.map +1 -1
- package/dist/types/src/templates/data-generator.d.ts.map +1 -1
- package/dist/types/src/templates/discord.d.ts.map +1 -1
- package/dist/types/src/templates/email.d.ts.map +1 -1
- package/dist/types/src/templates/forex-effect.d.ts +3 -2
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts +3 -2
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/gmail.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +26 -31
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +2 -1
- package/dist/types/src/templates/ping.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-notebook.d.ts +3 -0
- package/dist/types/src/testing/test-notebook.d.ts.map +1 -0
- package/dist/types/src/testing/test-script.d.ts +7 -0
- package/dist/types/src/testing/test-script.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +222 -92
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +53 -60
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/ScriptCapabilities.d.ts +6 -0
- package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/ScriptEvents.d.ts +3 -0
- package/dist/types/src/types/ScriptEvents.d.ts.map +1 -0
- package/dist/types/src/types/ScriptOperation.d.ts +29 -0
- package/dist/types/src/types/ScriptOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +7 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -4
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -5
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts +2 -2
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +2 -2
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +167 -118
- package/src/ScriptPlugin.node.ts +21 -0
- package/src/ScriptPlugin.test.ts +31 -0
- package/src/ScriptPlugin.tsx +17 -43
- 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/script-blueprint.ts +32 -8
- package/src/capabilities/app-graph-builder.ts +47 -0
- package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +3 -1
- package/src/capabilities/{compiler/compiler.ts → compiler.ts} +17 -9
- package/src/capabilities/create-object.ts +49 -0
- package/src/capabilities/index.ts +14 -6
- package/src/capabilities/node.ts +16 -0
- package/src/capabilities/operation-handler.ts +21 -0
- package/src/capabilities/react-surface.tsx +130 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -4
- package/src/compiler/compiler.ts +12 -1
- package/src/components/NotebookStack/NotebookCell.tsx +25 -14
- package/src/components/NotebookStack/NotebookMenu.tsx +7 -7
- package/src/components/NotebookStack/NotebookStack.stories.tsx +8 -9
- package/src/components/NotebookStack/NotebookStack.tsx +24 -13
- package/src/components/QueryEditor/QueryEditor.stories.tsx +5 -11
- package/src/components/QueryEditor/QueryEditor.tsx +3 -1
- 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 +7 -7
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +24 -26
- package/src/components/TestPanel/TestPanel.tsx +91 -176
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +4 -4
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +25 -18
- package/src/components/index.ts +4 -1
- package/src/constants.ts +4 -2
- package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +7 -5
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +26 -26
- package/src/containers/DeploymentDialog/index.ts +1 -3
- package/src/containers/NotebookArticle/NotebookArticle.stories.tsx +85 -0
- package/src/containers/{NotebookContainer/NotebookContainer.tsx → NotebookArticle/NotebookArticle.tsx} +43 -56
- package/src/containers/NotebookArticle/index.ts +5 -0
- package/src/containers/ScriptArticle/ScriptArticle.stories.tsx +107 -0
- package/src/containers/{ScriptContainer/ScriptContainer.tsx → ScriptArticle/ScriptArticle.tsx} +15 -14
- 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 +12 -21
- package/src/containers/ScriptProperties/index.ts +1 -3
- package/src/containers/TestContainer/TestContainer.tsx +24 -8
- package/src/containers/TestContainer/index.ts +1 -3
- package/src/containers/index.ts +2 -4
- package/src/e2e/ai.test.ts +7 -6
- package/src/e2e/deploy.test.ts +6 -4
- package/src/hooks/deploy.ts +10 -8
- package/src/hooks/format.ts +5 -5
- package/src/hooks/template.ts +7 -6
- package/src/hooks/useCompiler.ts +3 -2
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +4 -3
- package/src/index.ts +2 -5
- package/src/meta.ts +13 -7
- package/src/notebook/compute-graph.test.ts +7 -7
- package/src/notebook/compute-graph.ts +1 -1
- package/src/notebook/vfs-parser.ts +10 -3
- package/src/operations/create-script.ts +46 -0
- package/src/operations/index.ts +7 -0
- package/src/plugin.ts +11 -0
- package/src/templates/anthropic.ts +20 -12
- package/src/templates/chess-bot.ts +42 -37
- package/src/templates/commentary.ts +185 -165
- package/src/templates/data-generator.ts +2 -2
- package/src/templates/discord.ts +8 -8
- package/src/templates/forex-effect.ts +31 -19
- package/src/templates/forex.ts +25 -15
- package/src/templates/gmail.ts +9 -9
- package/src/templates/index.ts +16 -23
- package/src/templates/ping.ts +17 -8
- package/src/testing/index.ts +2 -1
- package/src/testing/simulator.test.ts +3 -4
- package/src/testing/{data.ts → test-notebook.ts} +12 -13
- package/src/testing/test-script.ts +28 -0
- package/src/translations.ts +89 -89
- package/src/types/Notebook.ts +8 -10
- package/src/types/ScriptCapabilities.ts +18 -0
- package/src/types/ScriptEvents.ts +11 -0
- package/src/types/ScriptOperation.ts +42 -0
- package/src/types/Settings.ts +20 -0
- package/src/types/index.ts +5 -4
- package/src/types/types.ts +1 -11
- package/src/util/deploy.ts +14 -12
- package/src/util/functions.ts +12 -11
- package/src/vite-env.d.ts +5 -0
- package/dist/lib/browser/DeploymentDialog-IIOXAS47.mjs.map +0 -7
- package/dist/lib/browser/NotebookContainer-VVZOKGRC.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-A5SSIUH6.mjs.map +0 -7
- package/dist/lib/browser/ScriptObjectSettings-HYYC7KXC.mjs +0 -294
- package/dist/lib/browser/ScriptObjectSettings-HYYC7KXC.mjs.map +0 -7
- package/dist/lib/browser/ScriptPluginSettings-UTWA7CBT.mjs +0 -55
- package/dist/lib/browser/ScriptPluginSettings-UTWA7CBT.mjs.map +0 -7
- package/dist/lib/browser/ScriptProperties-HREPUE65.mjs +0 -28
- package/dist/lib/browser/ScriptProperties-HREPUE65.mjs.map +0 -7
- package/dist/lib/browser/TestContainer-D4Y2K2TT.mjs +0 -39
- package/dist/lib/browser/TestContainer-D4Y2K2TT.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-66ZDI72K.mjs +0 -69
- package/dist/lib/browser/app-graph-builder-66ZDI72K.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-YMZEJBAZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-6IXFDTAI.mjs +0 -113
- package/dist/lib/browser/chunk-6IXFDTAI.mjs.map +0 -7
- package/dist/lib/browser/chunk-ATTZUDT7.mjs +0 -67
- package/dist/lib/browser/chunk-ATTZUDT7.mjs.map +0 -7
- package/dist/lib/browser/chunk-G3XIOLLI.mjs.map +0 -7
- package/dist/lib/browser/chunk-J7PGML5B.mjs +0 -105
- package/dist/lib/browser/chunk-J7PGML5B.mjs.map +0 -7
- package/dist/lib/browser/chunk-MUEVLYXJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-PLDBKKYO.mjs +0 -789
- package/dist/lib/browser/chunk-PLDBKKYO.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q66L5EUR.mjs +0 -20
- package/dist/lib/browser/chunk-Q66L5EUR.mjs.map +0 -7
- package/dist/lib/browser/chunk-TW27W3EL.mjs +0 -29
- package/dist/lib/browser/chunk-TW27W3EL.mjs.map +0 -7
- package/dist/lib/browser/chunk-WYR4QHPE.mjs +0 -31
- package/dist/lib/browser/chunk-WYR4QHPE.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZYU2LP6U.mjs +0 -11
- package/dist/lib/browser/chunk-ZYU2LP6U.mjs.map +0 -7
- package/dist/lib/browser/compiler-53G6ZHQM.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -250
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-CYEISDDK.mjs +0 -79
- package/dist/lib/browser/operation-resolver-CYEISDDK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-26P6HAFD.mjs +0 -141
- package/dist/lib/browser/react-surface-26P6HAFD.mjs.map +0 -7
- package/dist/lib/browser/settings-76UM7442.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -18
- package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs +0 -139
- package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs.map +0 -7
- package/dist/lib/node-esm/NotebookContainer-ZLWTNMQA.mjs +0 -851
- package/dist/lib/node-esm/NotebookContainer-ZLWTNMQA.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-S4UKQAWP.mjs +0 -94
- package/dist/lib/node-esm/ScriptContainer-S4UKQAWP.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptObjectSettings-C5QBRERY.mjs +0 -295
- package/dist/lib/node-esm/ScriptObjectSettings-C5QBRERY.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptPluginSettings-MFACDW4R.mjs +0 -56
- package/dist/lib/node-esm/ScriptPluginSettings-MFACDW4R.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptProperties-FMNIX3KU.mjs +0 -29
- package/dist/lib/node-esm/ScriptProperties-FMNIX3KU.mjs.map +0 -7
- package/dist/lib/node-esm/TestContainer-AO45YPGV.mjs +0 -40
- package/dist/lib/node-esm/TestContainer-AO45YPGV.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-IGAZTJ45.mjs +0 -70
- package/dist/lib/node-esm/app-graph-builder-IGAZTJ45.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.mjs +0 -18
- package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -9
- package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs +0 -176
- package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5HSJPAK7.mjs +0 -33
- package/dist/lib/node-esm/chunk-5HSJPAK7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H46R2RS5.mjs +0 -790
- package/dist/lib/node-esm/chunk-H46R2RS5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JGN7TDJH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QG6ANK4B.mjs +0 -107
- package/dist/lib/node-esm/chunk-QG6ANK4B.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-S7DSCLOW.mjs +0 -31
- package/dist/lib/node-esm/chunk-S7DSCLOW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TZ2EBTPQ.mjs +0 -22
- package/dist/lib/node-esm/chunk-TZ2EBTPQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UFBVE33O.mjs +0 -12
- package/dist/lib/node-esm/chunk-UFBVE33O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WWD5LUU6.mjs +0 -114
- package/dist/lib/node-esm/chunk-WWD5LUU6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs +0 -398
- package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-HHQW7EP3.mjs +0 -100
- package/dist/lib/node-esm/compiler-HHQW7EP3.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -251
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-HFFDXWND.mjs +0 -80
- package/dist/lib/node-esm/operation-resolver-HFFDXWND.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-THCIK266.mjs +0 -142
- package/dist/lib/node-esm/react-surface-THCIK266.mjs.map +0 -7
- package/dist/lib/node-esm/settings-CCHDPLFJ.mjs +0 -37
- package/dist/lib/node-esm/settings-CCHDPLFJ.mjs.map +0 -7
- package/dist/lib/node-esm/templates/index.mjs +0 -11
- package/dist/lib/node-esm/types/index.mjs +0 -19
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +0 -12
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/compiler/compiler.d.ts +0 -6
- package/dist/types/src/capabilities/compiler/compiler.d.ts.map +0 -1
- package/dist/types/src/capabilities/compiler/index.d.ts +0 -3
- package/dist/types/src/capabilities/compiler/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -7
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts +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/containers/NotebookContainer/NotebookContainer.d.ts +0 -7
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +0 -1
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts +0 -7
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/NotebookContainer/index.d.ts +0 -3
- package/dist/types/src/containers/NotebookContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts +0 -10
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptContainer/index.d.ts +0 -3
- package/dist/types/src/containers/ScriptContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts +0 -7
- package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptObjectSettings/index.d.ts +0 -3
- package/dist/types/src/containers/ScriptObjectSettings/index.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts +0 -8
- package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptPluginSettings/index.d.ts +0 -3
- package/dist/types/src/containers/ScriptPluginSettings/index.d.ts.map +0 -1
- package/dist/types/src/templates/chat.d.ts +0 -6
- package/dist/types/src/templates/chat.d.ts.map +0 -1
- package/dist/types/src/testing/data.d.ts +0 -3
- package/dist/types/src/testing/data.d.ts.map +0 -1
- package/dist/types/src/types/actions.d.ts +0 -40
- package/dist/types/src/types/actions.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -12
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -5
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -56
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/artifact-definition/artifact-definition.ts +0 -227
- package/src/capabilities/artifact-definition/index.ts +0 -7
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/compiler/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -75
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -121
- package/src/capabilities/settings/index.ts +0 -7
- package/src/components/FrameContainer/FrameContainer.tsx +0 -85
- 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/containers/NotebookContainer/NotebookContainer.stories.tsx +0 -87
- package/src/containers/NotebookContainer/index.ts +0 -7
- package/src/containers/ScriptContainer/index.ts +0 -7
- package/src/containers/ScriptObjectSettings/ScriptObjectSettings.tsx +0 -291
- package/src/containers/ScriptObjectSettings/index.ts +0 -7
- package/src/containers/ScriptPluginSettings/ScriptPluginSettings.tsx +0 -66
- package/src/containers/ScriptPluginSettings/index.ts +0 -7
- package/src/templates/chat.ts +0 -96
- package/src/types/actions.ts +0 -45
- package/src/types/capabilities.ts +0 -17
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser/templates → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprints → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/templates/index.mjs.map +0 -0
- /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
getAccessCredential
|
|
4
|
-
} from "./chunk-5BG7OJGQ.mjs";
|
|
5
|
-
import {
|
|
6
|
-
meta
|
|
7
|
-
} from "./chunk-5HSJPAK7.mjs";
|
|
8
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
9
|
-
|
|
10
|
-
// src/containers/ScriptPluginSettings/ScriptPluginSettings.tsx
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { useClient } from "@dxos/react-client";
|
|
13
|
-
import { Button, Select, useTranslation } from "@dxos/react-ui";
|
|
14
|
-
import { Settings } from "@dxos/react-ui-form";
|
|
15
|
-
import { EditorInputModes } from "@dxos/ui-editor";
|
|
16
|
-
var ScriptPluginSettings = ({ settings, onSettingsChange }) => {
|
|
17
|
-
const { t } = useTranslation(meta.id);
|
|
18
|
-
const client = useClient();
|
|
19
|
-
const handleAuthenticate = async () => {
|
|
20
|
-
const { identityKey } = client.halo.identity.get();
|
|
21
|
-
await client.halo.writeCredentials([
|
|
22
|
-
getAccessCredential(identityKey)
|
|
23
|
-
]);
|
|
24
|
-
};
|
|
25
|
-
return /* @__PURE__ */ React.createElement(Settings.Root, null, /* @__PURE__ */ React.createElement(Settings.Section, {
|
|
26
|
-
title: t("settings title", {
|
|
27
|
-
ns: meta.id
|
|
28
|
-
})
|
|
29
|
-
}, /* @__PURE__ */ React.createElement(Settings.Group, null, /* @__PURE__ */ React.createElement(Settings.ItemInput, {
|
|
30
|
-
title: t("authenticate action label")
|
|
31
|
-
}, /* @__PURE__ */ React.createElement(Button, {
|
|
32
|
-
onClick: handleAuthenticate
|
|
33
|
-
}, t("authenticate button label"))), /* @__PURE__ */ React.createElement(Settings.ItemInput, {
|
|
34
|
-
title: t("editor input mode label")
|
|
35
|
-
}, /* @__PURE__ */ React.createElement(Select.Root, {
|
|
36
|
-
value: settings.editorInputMode ?? "default",
|
|
37
|
-
onValueChange: (value) => {
|
|
38
|
-
onSettingsChange((s) => ({
|
|
39
|
-
...s,
|
|
40
|
-
editorInputMode: value
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
}, /* @__PURE__ */ React.createElement(Select.TriggerButton, {
|
|
44
|
-
placeholder: t("select editor input mode placeholder")
|
|
45
|
-
}), /* @__PURE__ */ React.createElement(Select.Portal, null, /* @__PURE__ */ React.createElement(Select.Content, null, /* @__PURE__ */ React.createElement(Select.Viewport, null, EditorInputModes.map((mode) => /* @__PURE__ */ React.createElement(Select.Option, {
|
|
46
|
-
key: mode,
|
|
47
|
-
value: mode
|
|
48
|
-
}, t(`settings editor input mode ${mode} label`)))), /* @__PURE__ */ React.createElement(Select.Arrow, null))))))));
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// src/containers/ScriptPluginSettings/index.ts
|
|
52
|
-
var ScriptPluginSettings_default = ScriptPluginSettings;
|
|
53
|
-
export {
|
|
54
|
-
ScriptPluginSettings_default as default
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=ScriptPluginSettings-MFACDW4R.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/ScriptPluginSettings/ScriptPluginSettings.tsx", "../../../src/containers/ScriptPluginSettings/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useClient } from '@dxos/react-client';\nimport { Button, Select, useTranslation } from '@dxos/react-ui';\nimport { Settings } from '@dxos/react-ui-form';\nimport { type EditorInputMode, EditorInputModes } from '@dxos/ui-editor';\n\nimport { meta } from '../../meta';\nimport { type ScriptSettings } from '../../types';\nimport { getAccessCredential } from '../../util';\n\nexport type ScriptPluginSettingsComponentProps = {\n settings: ScriptSettings;\n onSettingsChange: (fn: (current: ScriptSettings) => ScriptSettings) => void;\n};\n\nexport const ScriptPluginSettings = ({ settings, onSettingsChange }: ScriptPluginSettingsComponentProps) => {\n const { t } = useTranslation(meta.id);\n const client = useClient();\n\n // TODO(burdon): Check token.\n const handleAuthenticate = async () => {\n const { identityKey } = client.halo.identity.get()!;\n await client.halo.writeCredentials([getAccessCredential(identityKey)]);\n };\n\n return (\n <Settings.Root>\n <Settings.Section title={t('settings title', { ns: meta.id })}>\n <Settings.Group>\n {/* TODO(wittjosiah): Hide outside of dev environments. */}\n <Settings.ItemInput title={t('authenticate action label')}>\n <Button onClick={handleAuthenticate}>{t('authenticate button label')}</Button>\n </Settings.ItemInput>\n\n <Settings.ItemInput title={t('editor input mode label')}>\n <Select.Root\n value={settings.editorInputMode ?? 'default'}\n onValueChange={(value) => {\n onSettingsChange((s) => ({ ...s, editorInputMode: value as EditorInputMode }));\n }}\n >\n <Select.TriggerButton placeholder={t('select editor input mode placeholder')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {EditorInputModes.map((mode) => (\n <Select.Option key={mode} value={mode}>\n {t(`settings editor input mode ${mode} label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n <Select.Arrow />\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Settings.ItemInput>\n </Settings.Group>\n </Settings.Section>\n </Settings.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ScriptPluginSettings } from './ScriptPluginSettings';\n\nexport default ScriptPluginSettings;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,iBAAiB;AAC1B,SAASC,QAAQC,QAAQC,sBAAsB;AAC/C,SAASC,gBAAgB;AACzB,SAA+BC,wBAAwB;AAWhD,IAAMC,uBAAuB,CAAC,EAAEC,UAAUC,iBAAgB,MAAsC;AACrG,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,QAAMC,SAASC,UAAAA;AAGf,QAAMC,qBAAqB,YAAA;AACzB,UAAM,EAAEC,YAAW,IAAKH,OAAOI,KAAKC,SAASC,IAAG;AAChD,UAAMN,OAAOI,KAAKG,iBAAiB;MAACC,oBAAoBL,WAAAA;KAAa;EACvE;AAEA,SACE,sBAAA,cAACM,SAASC,MAAI,MACZ,sBAAA,cAACD,SAASE,SAAO;IAACC,OAAOhB,EAAE,kBAAkB;MAAEiB,IAAIf,KAAKC;IAAG,CAAA;KACzD,sBAAA,cAACU,SAASK,OAAK,MAEb,sBAAA,cAACL,SAASM,WAAS;IAACH,OAAOhB,EAAE,2BAAA;KAC3B,sBAAA,cAACoB,QAAAA;IAAOC,SAASf;KAAqBN,EAAE,2BAAA,CAAA,CAAA,GAG1C,sBAAA,cAACa,SAASM,WAAS;IAACH,OAAOhB,EAAE,yBAAA;KAC3B,sBAAA,cAACsB,OAAOR,MAAI;IACVS,OAAOzB,SAAS0B,mBAAmB;IACnCC,eAAe,CAACF,UAAAA;AACdxB,uBAAiB,CAAC2B,OAAO;QAAE,GAAGA;QAAGF,iBAAiBD;MAAyB,EAAA;IAC7E;KAEA,sBAAA,cAACD,OAAOK,eAAa;IAACC,aAAa5B,EAAE,sCAAA;MACrC,sBAAA,cAACsB,OAAOO,QAAM,MACZ,sBAAA,cAACP,OAAOQ,SAAO,MACb,sBAAA,cAACR,OAAOS,UAAQ,MACbC,iBAAiBC,IAAI,CAACC,SACrB,sBAAA,cAACZ,OAAOa,QAAM;IAACC,KAAKF;IAAMX,OAAOW;KAC9BlC,EAAE,8BAA8BkC,IAAAA,QAAY,CAAA,CAAA,CAAA,GAInD,sBAAA,cAACZ,OAAOe,OAAK,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAS/B;;;AC3DA,IAAA,+BAAeC;",
|
|
6
|
-
"names": ["React", "useClient", "Button", "Select", "useTranslation", "Settings", "EditorInputModes", "ScriptPluginSettings", "settings", "onSettingsChange", "t", "useTranslation", "meta", "id", "client", "useClient", "handleAuthenticate", "identityKey", "halo", "identity", "get", "writeCredentials", "getAccessCredential", "Settings", "Root", "Section", "title", "ns", "Group", "ItemInput", "Button", "onClick", "Select", "value", "editorInputMode", "onValueChange", "s", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "EditorInputModes", "map", "mode", "Option", "key", "Arrow", "ScriptPluginSettings"]
|
|
7
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-5HSJPAK7.mjs";
|
|
5
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
6
|
-
|
|
7
|
-
// src/containers/ScriptProperties/ScriptProperties.tsx
|
|
8
|
-
import React from "react";
|
|
9
|
-
import { Obj } from "@dxos/echo";
|
|
10
|
-
import { Input, useTranslation } from "@dxos/react-ui";
|
|
11
|
-
var ScriptProperties = ({ object }) => {
|
|
12
|
-
const { t } = useTranslation(meta.id);
|
|
13
|
-
return /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Label, null, t("description label")), /* @__PURE__ */ React.createElement(Input.TextInput, {
|
|
14
|
-
placeholder: t("description placeholder"),
|
|
15
|
-
value: object.description ?? "",
|
|
16
|
-
onChange: (event) => {
|
|
17
|
-
Obj.change(object, (o) => {
|
|
18
|
-
o.description = event.target.value;
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}));
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// src/containers/ScriptProperties/index.ts
|
|
25
|
-
var ScriptProperties_default = ScriptProperties;
|
|
26
|
-
export {
|
|
27
|
-
ScriptProperties_default as default
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=ScriptProperties-FMNIX3KU.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/ScriptProperties/ScriptProperties.tsx", "../../../src/containers/ScriptProperties/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Obj } from '@dxos/echo';\nimport { type Script } from '@dxos/functions';\nimport { Input, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '../../meta';\n\nexport type ScriptPropertiesProps = {\n object: Script.Script;\n};\n\nexport const ScriptProperties = ({ object }: ScriptPropertiesProps) => {\n const { t } = useTranslation(meta.id);\n return (\n <Input.Root>\n <Input.Label>{t('description label')}</Input.Label>\n <Input.TextInput\n placeholder={t('description placeholder')}\n value={object.description ?? ''}\n onChange={(event) => {\n Obj.change(object, (o) => {\n o.description = event.target.value;\n });\n }}\n />\n </Input.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { ScriptProperties } from './ScriptProperties';\n\nexport default ScriptProperties;\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,WAAW;AAEpB,SAASC,OAAOC,sBAAsB;AAQ/B,IAAMC,mBAAmB,CAAC,EAAEC,OAAM,MAAyB;AAChE,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AACpC,SACE,sBAAA,cAACC,MAAMC,MAAI,MACT,sBAAA,cAACD,MAAME,OAAK,MAAEN,EAAE,mBAAA,CAAA,GAChB,sBAAA,cAACI,MAAMG,WAAS;IACdC,aAAaR,EAAE,yBAAA;IACfS,OAAOV,OAAOW,eAAe;IAC7BC,UAAU,CAACC,UAAAA;AACTC,UAAIC,OAAOf,QAAQ,CAACgB,MAAAA;AAClBA,UAAEL,cAAcE,MAAMI,OAAOP;MAC/B,CAAA;IACF;;AAIR;;;AC1BA,IAAA,2BAAeQ;",
|
|
6
|
-
"names": ["React", "Obj", "Input", "useTranslation", "ScriptProperties", "object", "t", "useTranslation", "meta", "id", "Input", "Root", "Label", "TextInput", "placeholder", "value", "description", "onChange", "event", "Obj", "change", "o", "target", "ScriptProperties"]
|
|
7
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
TestPanel
|
|
4
|
-
} from "./chunk-H46R2RS5.mjs";
|
|
5
|
-
import "./chunk-JGN7TDJH.mjs";
|
|
6
|
-
import {
|
|
7
|
-
useDeployState,
|
|
8
|
-
useToolbarState
|
|
9
|
-
} from "./chunk-ZDJ2FI7E.mjs";
|
|
10
|
-
import "./chunk-5BG7OJGQ.mjs";
|
|
11
|
-
import "./chunk-WWD5LUU6.mjs";
|
|
12
|
-
import "./chunk-QG6ANK4B.mjs";
|
|
13
|
-
import "./chunk-5HSJPAK7.mjs";
|
|
14
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
15
|
-
|
|
16
|
-
// src/containers/TestContainer/TestContainer.tsx
|
|
17
|
-
import React from "react";
|
|
18
|
-
import { Panel } from "@dxos/react-ui";
|
|
19
|
-
var TestContainer = ({ role, script }) => {
|
|
20
|
-
const state = useToolbarState();
|
|
21
|
-
useDeployState({
|
|
22
|
-
state,
|
|
23
|
-
script
|
|
24
|
-
});
|
|
25
|
-
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
26
|
-
role,
|
|
27
|
-
className: "dx-article"
|
|
28
|
-
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
29
|
-
asChild: true
|
|
30
|
-
}, /* @__PURE__ */ React.createElement(TestPanel, {
|
|
31
|
-
functionUrl: state.value.functionUrl
|
|
32
|
-
})));
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// src/containers/TestContainer/index.ts
|
|
36
|
-
var TestContainer_default = TestContainer;
|
|
37
|
-
export {
|
|
38
|
-
TestContainer_default as default
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=TestContainer-AO45YPGV.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/TestContainer/TestContainer.tsx", "../../../src/containers/TestContainer/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Script } from '@dxos/functions';\nimport { Panel } from '@dxos/react-ui';\n\nimport { TestPanel } from '../../components';\nimport { useDeployState, useToolbarState } from '../../hooks';\n\nexport type TestContainerProps = {\n role: string;\n script: Script.Script;\n};\n\nexport const TestContainer = ({ role, script }: TestContainerProps) => {\n const state = useToolbarState();\n useDeployState({ state, script });\n return (\n <Panel.Root role={role} className='dx-article'>\n <Panel.Content asChild>\n <TestPanel functionUrl={state.value.functionUrl} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { TestContainer } from './TestContainer';\n\nexport default TestContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,aAAa;AAUf,IAAMC,gBAAgB,CAAC,EAAEC,MAAMC,OAAM,MAAsB;AAChE,QAAMC,QAAQC,gBAAAA;AACdC,iBAAe;IAAEF;IAAOD;EAAO,CAAA;AAC/B,SACE,sBAAA,cAACI,MAAMC,MAAI;IAACN;IAAYO,WAAU;KAChC,sBAAA,cAACF,MAAMG,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,WAAAA;IAAUC,aAAaT,MAAMU,MAAMD;;AAI5C;;;ACrBA,IAAA,wBAAeE;",
|
|
6
|
-
"names": ["React", "Panel", "TestContainer", "role", "script", "state", "useToolbarState", "useDeployState", "Panel", "Root", "className", "Content", "asChild", "TestPanel", "functionUrl", "value", "TestContainer"]
|
|
7
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-5HSJPAK7.mjs";
|
|
5
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
6
|
-
|
|
7
|
-
// src/capabilities/app-graph-builder/app-graph-builder.ts
|
|
8
|
-
import * as Effect from "effect/Effect";
|
|
9
|
-
import { Capability } from "@dxos/app-framework";
|
|
10
|
-
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
11
|
-
import { Script } from "@dxos/functions";
|
|
12
|
-
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
|
|
13
|
-
import { GraphBuilder } from "@dxos/plugin-graph";
|
|
14
|
-
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
15
|
-
const extensions = yield* Effect.all([
|
|
16
|
-
GraphBuilder.createTypeExtension({
|
|
17
|
-
id: `${meta.id}/execute`,
|
|
18
|
-
type: Script.Script,
|
|
19
|
-
connector: (script) => Effect.succeed([
|
|
20
|
-
{
|
|
21
|
-
id: [
|
|
22
|
-
script.id,
|
|
23
|
-
"execute"
|
|
24
|
-
].join(ATTENDABLE_PATH_SEPARATOR),
|
|
25
|
-
type: PLANK_COMPANION_TYPE,
|
|
26
|
-
data: "execute",
|
|
27
|
-
properties: {
|
|
28
|
-
label: [
|
|
29
|
-
"script test label",
|
|
30
|
-
{
|
|
31
|
-
ns: meta.id
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
icon: "ph--terminal--regular",
|
|
35
|
-
disposition: "hidden"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
])
|
|
39
|
-
}),
|
|
40
|
-
GraphBuilder.createTypeExtension({
|
|
41
|
-
id: `${meta.id}/logs`,
|
|
42
|
-
type: Script.Script,
|
|
43
|
-
connector: (script) => Effect.succeed([
|
|
44
|
-
{
|
|
45
|
-
id: [
|
|
46
|
-
script.id,
|
|
47
|
-
"logs"
|
|
48
|
-
].join(ATTENDABLE_PATH_SEPARATOR),
|
|
49
|
-
type: PLANK_COMPANION_TYPE,
|
|
50
|
-
data: "logs",
|
|
51
|
-
properties: {
|
|
52
|
-
label: [
|
|
53
|
-
"script logs label",
|
|
54
|
-
{
|
|
55
|
-
ns: meta.id
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
icon: "ph--clock-countdown--regular",
|
|
59
|
-
disposition: "hidden"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
])
|
|
63
|
-
})
|
|
64
|
-
]);
|
|
65
|
-
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
66
|
-
}));
|
|
67
|
-
export {
|
|
68
|
-
app_graph_builder_default as default
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=app-graph-builder-IGAZTJ45.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Script } from '@dxos/functions';\nimport { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';\nimport { GraphBuilder } from '@dxos/plugin-graph';\n\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createTypeExtension({\n id: `${meta.id}/execute`,\n type: Script.Script,\n connector: (script) =>\n Effect.succeed([\n {\n id: [script.id, 'execute'].join(ATTENDABLE_PATH_SEPARATOR),\n type: PLANK_COMPANION_TYPE,\n data: 'execute',\n properties: {\n label: ['script test label', { ns: meta.id }],\n icon: 'ph--terminal--regular',\n disposition: 'hidden',\n },\n },\n ]),\n }),\n GraphBuilder.createTypeExtension({\n id: `${meta.id}/logs`,\n type: Script.Script,\n connector: (script) =>\n Effect.succeed([\n {\n id: [script.id, 'logs'].join(ATTENDABLE_PATH_SEPARATOR),\n type: PLANK_COMPANION_TYPE,\n data: 'logs',\n properties: {\n label: ['script logs label', { ns: meta.id }],\n icon: 'ph--clock-countdown--regular',\n disposition: 'hidden',\n },\n },\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,cAAc;AACvB,SAASC,2BAA2BC,4BAA4B;AAChE,SAASC,oBAAoB;AAI7B,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCC,aAAaC,oBAAoB;MAC/BC,IAAI,GAAGC,KAAKD,EAAE;MACdE,MAAMC,OAAOA;MACbC,WAAW,CAACC,WACHC,eAAQ;QACb;UACEN,IAAI;YAACK,OAAOL;YAAI;YAAWO,KAAKC,yBAAAA;UAChCN,MAAMO;UACNC,MAAM;UACNC,YAAY;YACVC,OAAO;cAAC;cAAqB;gBAAEC,IAAIZ,KAAKD;cAAG;;YAC3Cc,MAAM;YACNC,aAAa;UACf;QACF;OACD;IACL,CAAA;IACAjB,aAAaC,oBAAoB;MAC/BC,IAAI,GAAGC,KAAKD,EAAE;MACdE,MAAMC,OAAOA;MACbC,WAAW,CAACC,WACHC,eAAQ;QACb;UACEN,IAAI;YAACK,OAAOL;YAAI;YAAQO,KAAKC,yBAAAA;UAC7BN,MAAMO;UACNC,MAAM;UACNC,YAAY;YACVC,OAAO;cAAC;cAAqB;gBAAEC,IAAIZ,KAAKD;cAAG;;YAC3Cc,MAAM;YACNC,aAAa;UACf;QACF;OACD;IACL,CAAA;GACD;AAED,SAAOtB,WAAWuB,YAAYC,gBAAgBC,iBAAiBtB,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "Script", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "GraphBuilder", "Capability", "makeModule", "fnUntraced", "extensions", "all", "GraphBuilder", "createTypeExtension", "id", "meta", "type", "Script", "connector", "script", "succeed", "join", "ATTENDABLE_PATH_SEPARATOR", "PLANK_COMPANION_TYPE", "data", "properties", "label", "ns", "icon", "disposition", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
script_blueprint_default
|
|
4
|
-
} from "./chunk-S7DSCLOW.mjs";
|
|
5
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
6
|
-
|
|
7
|
-
// src/capabilities/blueprint-definition/blueprint-definition.ts
|
|
8
|
-
import * as Effect from "effect/Effect";
|
|
9
|
-
import { Capability } from "@dxos/app-framework";
|
|
10
|
-
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
11
|
-
var blueprintDefinition = Capability.makeModule(() => Effect.succeed([
|
|
12
|
-
Capability.contributes(AppCapabilities.BlueprintDefinition, script_blueprint_default)
|
|
13
|
-
]));
|
|
14
|
-
var blueprint_definition_default = blueprintDefinition;
|
|
15
|
-
export {
|
|
16
|
-
blueprint_definition_default as default
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=blueprint-definition-5MGY6BRQ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/blueprint-definition/blueprint-definition.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n\nimport { ScriptBlueprint } from '../../blueprints';\n\nconst blueprintDefinition = Capability.makeModule<\n [],\n Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]\n>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, ScriptBlueprint)]));\n\nexport default blueprintDefinition;\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAIhC,IAAMC,sBAAsBC,WAAWC,WAGrC,MAAaC,eAAQ;EAACF,WAAWG,YAAYC,gBAAgBC,qBAAqBC,wBAAAA;CAAiB,CAAA;AAErG,IAAA,+BAAeP;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "blueprintDefinition", "Capability", "makeModule", "succeed", "contributes", "AppCapabilities", "BlueprintDefinition", "ScriptBlueprint"]
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
script_blueprint_default
|
|
4
|
-
} from "../chunk-S7DSCLOW.mjs";
|
|
5
|
-
import "../chunk-HSLMI22Q.mjs";
|
|
6
|
-
export {
|
|
7
|
-
script_blueprint_default as ScriptBlueprint
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/util/deploy.ts
|
|
4
|
-
import { Obj, Ref } from "@dxos/echo";
|
|
5
|
-
import { Function, getUserFunctionIdInMetadata } from "@dxos/functions";
|
|
6
|
-
import { bundleFunction } from "@dxos/functions-runtime/bundler";
|
|
7
|
-
import { FunctionsServiceClient, incrementSemverPatch } from "@dxos/functions-runtime/edge";
|
|
8
|
-
import { log } from "@dxos/log";
|
|
9
|
-
import { FunctionRuntimeKind } from "@dxos/protocols";
|
|
10
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-script/src/util/deploy.ts";
|
|
11
|
-
var isScriptDeployed = ({ script, fn }) => {
|
|
12
|
-
const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));
|
|
13
|
-
return Boolean(existingFunctionId) && !script.changed;
|
|
14
|
-
};
|
|
15
|
-
var deployScript = async ({ script, client, space, fn, existingFunctionId }) => {
|
|
16
|
-
const validationError = validateDeployInputs(script, space);
|
|
17
|
-
if (validationError) {
|
|
18
|
-
return {
|
|
19
|
-
success: false,
|
|
20
|
-
error: validationError
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
const buildResult = await bundleFunction({
|
|
25
|
-
source: script.source.target.content
|
|
26
|
-
});
|
|
27
|
-
if ("error" in buildResult) {
|
|
28
|
-
throw buildResult.error || new Error("Bundle creation failed");
|
|
29
|
-
}
|
|
30
|
-
const functionsServiceClient = FunctionsServiceClient.fromClient(client);
|
|
31
|
-
const newFunction = await functionsServiceClient.deploy({
|
|
32
|
-
// TODO(dmaretskyi): Space key or identity key.
|
|
33
|
-
ownerPublicKey: space.key,
|
|
34
|
-
version: fn ? incrementSemverPatch(fn.version) : "0.0.1",
|
|
35
|
-
functionId: existingFunctionId,
|
|
36
|
-
entryPoint: buildResult.entryPoint,
|
|
37
|
-
assets: buildResult.assets,
|
|
38
|
-
runtime: FunctionRuntimeKind.enums.WORKER_LOADER
|
|
39
|
-
});
|
|
40
|
-
const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, newFunction);
|
|
41
|
-
Obj.change(script, (s) => {
|
|
42
|
-
s.changed = false;
|
|
43
|
-
});
|
|
44
|
-
return {
|
|
45
|
-
success: true,
|
|
46
|
-
functionId: getUserFunctionIdInMetadata(Obj.getMeta(storedFunction))
|
|
47
|
-
};
|
|
48
|
-
} catch (err) {
|
|
49
|
-
log.catch(err, void 0, {
|
|
50
|
-
F: __dxlog_file,
|
|
51
|
-
L: 70,
|
|
52
|
-
S: void 0,
|
|
53
|
-
C: (f, a) => f(...a)
|
|
54
|
-
});
|
|
55
|
-
return {
|
|
56
|
-
success: false,
|
|
57
|
-
error: err
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
var validateDeployInputs = (script, space) => {
|
|
62
|
-
if (!script.source || !space) {
|
|
63
|
-
return new Error("Script source or space not available");
|
|
64
|
-
}
|
|
65
|
-
return null;
|
|
66
|
-
};
|
|
67
|
-
var createOrUpdateFunctionInSpace = (space, fn, script, newFunction) => {
|
|
68
|
-
if (fn) {
|
|
69
|
-
Function.setFrom(fn, newFunction);
|
|
70
|
-
return fn;
|
|
71
|
-
} else {
|
|
72
|
-
Obj.change(newFunction, (f) => {
|
|
73
|
-
f.source = Ref.make(script);
|
|
74
|
-
});
|
|
75
|
-
return space.db.add(newFunction);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
// src/util/functions.ts
|
|
80
|
-
import { Obj as Obj2 } from "@dxos/echo";
|
|
81
|
-
import { getUserFunctionIdInMetadata as getUserFunctionIdInMetadata2 } from "@dxos/functions";
|
|
82
|
-
import { getInvocationUrl } from "@dxos/functions-runtime";
|
|
83
|
-
import { log as log2 } from "@dxos/log";
|
|
84
|
-
import { getSpace } from "@dxos/react-client/echo";
|
|
85
|
-
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-script/src/util/functions.ts";
|
|
86
|
-
var getFunctionUrl = ({ script, fn, edgeUrl }) => {
|
|
87
|
-
const space = getSpace(script);
|
|
88
|
-
const existingFunctionId = fn && getUserFunctionIdInMetadata2(Obj2.getMeta(fn));
|
|
89
|
-
if (!existingFunctionId) {
|
|
90
|
-
return void 0;
|
|
91
|
-
}
|
|
92
|
-
return getInvocationUrl(existingFunctionId, edgeUrl, {
|
|
93
|
-
spaceId: space?.id
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
var updateFunctionMetadata = (script, storedFunction, meta, functionId) => {
|
|
97
|
-
Obj2.change(storedFunction, (f) => {
|
|
98
|
-
if (script.description !== void 0 && script.description.trim() !== "") {
|
|
99
|
-
f.description = script.description;
|
|
100
|
-
} else if (meta.description) {
|
|
101
|
-
f.description = meta.description;
|
|
102
|
-
} else {
|
|
103
|
-
log2.verbose("no description in function metadata", {
|
|
104
|
-
functionId
|
|
105
|
-
}, {
|
|
106
|
-
F: __dxlog_file2,
|
|
107
|
-
L: 48,
|
|
108
|
-
S: void 0,
|
|
109
|
-
C: (f2, a) => f2(...a)
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
if (meta.inputSchema) {
|
|
113
|
-
f.inputSchema = meta.inputSchema;
|
|
114
|
-
} else {
|
|
115
|
-
log2.verbose("no input schema in function metadata", {
|
|
116
|
-
functionId
|
|
117
|
-
}, {
|
|
118
|
-
F: __dxlog_file2,
|
|
119
|
-
L: 54,
|
|
120
|
-
S: void 0,
|
|
121
|
-
C: (f2, a) => f2(...a)
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
if (meta.outputSchema) {
|
|
125
|
-
f.outputSchema = meta.outputSchema;
|
|
126
|
-
} else {
|
|
127
|
-
log2.verbose("no output schema in function metadata", {
|
|
128
|
-
functionId
|
|
129
|
-
}, {
|
|
130
|
-
F: __dxlog_file2,
|
|
131
|
-
L: 60,
|
|
132
|
-
S: void 0,
|
|
133
|
-
C: (f2, a) => f2(...a)
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
if (meta.key) {
|
|
137
|
-
f.key = meta.key;
|
|
138
|
-
} else {
|
|
139
|
-
log2.verbose("no key in function metadata", {
|
|
140
|
-
functionId
|
|
141
|
-
}, {
|
|
142
|
-
F: __dxlog_file2,
|
|
143
|
-
L: 66,
|
|
144
|
-
S: void 0,
|
|
145
|
-
C: (f2, a) => f2(...a)
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
var getAccessCredential = (identityKey) => {
|
|
151
|
-
return {
|
|
152
|
-
issuer: identityKey,
|
|
153
|
-
issuanceDate: /* @__PURE__ */ new Date(),
|
|
154
|
-
subject: {
|
|
155
|
-
id: identityKey,
|
|
156
|
-
assertion: {
|
|
157
|
-
"@type": "dxos.halo.credentials.ServiceAccess",
|
|
158
|
-
serverName: "hub.dxos.network",
|
|
159
|
-
serverKey: identityKey,
|
|
160
|
-
identityKey,
|
|
161
|
-
capabilities: [
|
|
162
|
-
"composer:beta"
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
export {
|
|
170
|
-
isScriptDeployed,
|
|
171
|
-
deployScript,
|
|
172
|
-
getFunctionUrl,
|
|
173
|
-
updateFunctionMetadata,
|
|
174
|
-
getAccessCredential
|
|
175
|
-
};
|
|
176
|
-
//# sourceMappingURL=chunk-5BG7OJGQ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/util/deploy.ts", "../../../src/util/functions.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Client } from '@dxos/client';\nimport { Obj, Ref } from '@dxos/echo';\nimport { Function, type Script, getUserFunctionIdInMetadata } from '@dxos/functions';\nimport { bundleFunction } from '@dxos/functions-runtime/bundler';\nimport { FunctionsServiceClient, incrementSemverPatch } from '@dxos/functions-runtime/edge';\nimport { log } from '@dxos/log';\nimport { FunctionRuntimeKind } from '@dxos/protocols';\nimport { type Space } from '@dxos/react-client/echo';\n\nexport const isScriptDeployed = ({ script, fn }: { script: Script.Script; fn: any }): boolean => {\n const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));\n return Boolean(existingFunctionId) && !script.changed;\n};\n\ntype DeployScriptProps = {\n script: Script.Script;\n client: Client;\n space: Space;\n fn?: Function.Function;\n existingFunctionId?: string;\n};\n\ntype DeployScriptResult = { success: boolean; error?: Error; functionId?: string };\n\n/**\n * Deploy a script to a space, handling bundling and uploading to the FaaS infrastructure.\n */\nexport const deployScript = async ({\n script,\n client,\n space,\n fn,\n existingFunctionId,\n}: DeployScriptProps): Promise<DeployScriptResult> => {\n const validationError = validateDeployInputs(script, space);\n if (validationError) {\n return { success: false, error: validationError };\n }\n\n try {\n const buildResult = await bundleFunction({\n source: script.source!.target!.content,\n });\n if ('error' in buildResult) {\n throw buildResult.error || new Error('Bundle creation failed');\n }\n\n const functionsServiceClient = FunctionsServiceClient.fromClient(client);\n const newFunction = await functionsServiceClient.deploy({\n // TODO(dmaretskyi): Space key or identity key.\n ownerPublicKey: space.key,\n version: fn ? incrementSemverPatch(fn.version) : '0.0.1',\n functionId: existingFunctionId,\n entryPoint: buildResult.entryPoint,\n assets: buildResult.assets,\n runtime: FunctionRuntimeKind.enums.WORKER_LOADER,\n });\n\n const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, newFunction);\n Obj.change(script, (s) => {\n s.changed = false;\n });\n\n return { success: true, functionId: getUserFunctionIdInMetadata(Obj.getMeta(storedFunction)) };\n } catch (err: any) {\n log.catch(err);\n return { success: false, error: err };\n }\n};\n\n/**\n * Validate inputs for script deployment.\n */\nconst validateDeployInputs = (script: Script.Script, space: Space): Error | null => {\n if (!script.source || !space) {\n return new Error('Script source or space not available');\n }\n return null;\n};\n\nconst createOrUpdateFunctionInSpace = (\n space: Space,\n fn: Function.Function | undefined,\n script: Script.Script,\n newFunction: Function.Function,\n): Function.Function => {\n if (fn) {\n Function.setFrom(fn, newFunction);\n return fn;\n } else {\n Obj.change(newFunction, (f) => {\n f.source = Ref.make(script);\n });\n return space.db.add(newFunction);\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Obj } from '@dxos/echo';\nimport { type Function, type Script, getUserFunctionIdInMetadata } from '@dxos/functions';\nimport { getInvocationUrl } from '@dxos/functions-runtime';\nimport { type PublicKey } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\nimport { getSpace } from '@dxos/react-client/echo';\n/**\n * Get the function URL for a given script and client configuration\n */\nexport const getFunctionUrl = ({\n script,\n fn,\n edgeUrl,\n}: {\n script: Script.Script;\n fn: any;\n edgeUrl: string;\n}): string | undefined => {\n const space = getSpace(script);\n const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));\n\n if (!existingFunctionId) {\n return undefined;\n }\n\n return getInvocationUrl(existingFunctionId, edgeUrl, {\n spaceId: space?.id,\n });\n};\n\nexport const updateFunctionMetadata = (\n script: Script.Script,\n storedFunction: Function.Function,\n meta: any,\n functionId: string,\n) => {\n Obj.change(storedFunction, (f) => {\n if (script.description !== undefined && script.description.trim() !== '') {\n f.description = script.description;\n } else if (meta.description) {\n f.description = meta.description;\n } else {\n log.verbose('no description in function metadata', { functionId });\n }\n\n if (meta.inputSchema) {\n f.inputSchema = meta.inputSchema;\n } else {\n log.verbose('no input schema in function metadata', { functionId });\n }\n\n if (meta.outputSchema) {\n f.outputSchema = meta.outputSchema;\n } else {\n log.verbose('no output schema in function metadata', { functionId });\n }\n\n if (meta.key) {\n f.key = meta.key;\n } else {\n log.verbose('no key in function metadata', { functionId });\n }\n });\n};\n\nexport const getAccessCredential = (identityKey: PublicKey): Credential => {\n return {\n issuer: identityKey,\n issuanceDate: new Date(),\n subject: {\n id: identityKey,\n assertion: {\n '@type': 'dxos.halo.credentials.ServiceAccess',\n serverName: 'hub.dxos.network',\n serverKey: identityKey,\n identityKey,\n capabilities: ['composer:beta'],\n },\n },\n };\n};\n"],
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,KAAKC,WAAW;AACzB,SAASC,UAAuBC,mCAAmC;AACnE,SAASC,sBAAsB;AAC/B,SAASC,wBAAwBC,4BAA4B;AAC7D,SAASC,WAAW;AACpB,SAASC,2BAA2B;;AAG7B,IAAMC,mBAAmB,CAAC,EAAEC,QAAQC,GAAE,MAAsC;AACjF,QAAMC,qBAAqBD,MAAMR,4BAA4BH,IAAIa,QAAQF,EAAAA,CAAAA;AACzE,SAAOG,QAAQF,kBAAAA,KAAuB,CAACF,OAAOK;AAChD;AAeO,IAAMC,eAAe,OAAO,EACjCN,QACAO,QACAC,OACAP,IACAC,mBAAkB,MACA;AAClB,QAAMO,kBAAkBC,qBAAqBV,QAAQQ,KAAAA;AACrD,MAAIC,iBAAiB;AACnB,WAAO;MAAEE,SAAS;MAAOC,OAAOH;IAAgB;EAClD;AAEA,MAAI;AACF,UAAMI,cAAc,MAAMnB,eAAe;MACvCoB,QAAQd,OAAOc,OAAQC,OAAQC;IACjC,CAAA;AACA,QAAI,WAAWH,aAAa;AAC1B,YAAMA,YAAYD,SAAS,IAAIK,MAAM,wBAAA;IACvC;AAEA,UAAMC,yBAAyBvB,uBAAuBwB,WAAWZ,MAAAA;AACjE,UAAMa,cAAc,MAAMF,uBAAuBG,OAAO;;MAEtDC,gBAAgBd,MAAMe;MACtBC,SAASvB,KAAKL,qBAAqBK,GAAGuB,OAAO,IAAI;MACjDC,YAAYvB;MACZwB,YAAYb,YAAYa;MACxBC,QAAQd,YAAYc;MACpBC,SAAS9B,oBAAoB+B,MAAMC;IACrC,CAAA;AAEA,UAAMC,iBAAiBC,8BAA8BxB,OAAOP,IAAID,QAAQoB,WAAAA;AACxE9B,QAAI2C,OAAOjC,QAAQ,CAACkC,MAAAA;AAClBA,QAAE7B,UAAU;IACd,CAAA;AAEA,WAAO;MAAEM,SAAS;MAAMc,YAAYhC,4BAA4BH,IAAIa,QAAQ4B,cAAAA,CAAAA;IAAiB;EAC/F,SAASI,KAAU;AACjBtC,QAAIuC,MAAMD,KAAAA,QAAAA;;;;;;AACV,WAAO;MAAExB,SAAS;MAAOC,OAAOuB;IAAI;EACtC;AACF;AAKA,IAAMzB,uBAAuB,CAACV,QAAuBQ,UAAAA;AACnD,MAAI,CAACR,OAAOc,UAAU,CAACN,OAAO;AAC5B,WAAO,IAAIS,MAAM,sCAAA;EACnB;AACA,SAAO;AACT;AAEA,IAAMe,gCAAgC,CACpCxB,OACAP,IACAD,QACAoB,gBAAAA;AAEA,MAAInB,IAAI;AACNT,aAAS6C,QAAQpC,IAAImB,WAAAA;AACrB,WAAOnB;EACT,OAAO;AACLX,QAAI2C,OAAOb,aAAa,CAACkB,MAAAA;AACvBA,QAAExB,SAASvB,IAAIgD,KAAKvC,MAAAA;IACtB,CAAA;AACA,WAAOQ,MAAMgC,GAAGC,IAAIrB,WAAAA;EACtB;AACF;;;AC/FA,SAASsB,OAAAA,YAAW;AACpB,SAAqCC,+BAAAA,oCAAmC;AACxE,SAASC,wBAAwB;AAEjC,SAASC,OAAAA,YAAW;AAEpB,SAASC,gBAAgB;;AAIlB,IAAMC,iBAAiB,CAAC,EAC7BC,QACAC,IACAC,QAAO,MAKR;AACC,QAAMC,QAAQL,SAASE,MAAAA;AACvB,QAAMI,qBAAqBH,MAAMN,6BAA4BD,KAAIW,QAAQJ,EAAAA,CAAAA;AAEzE,MAAI,CAACG,oBAAoB;AACvB,WAAOE;EACT;AAEA,SAAOV,iBAAiBQ,oBAAoBF,SAAS;IACnDK,SAASJ,OAAOK;EAClB,CAAA;AACF;AAEO,IAAMC,yBAAyB,CACpCT,QACAU,gBACAC,MACAC,eAAAA;AAEAlB,EAAAA,KAAImB,OAAOH,gBAAgB,CAACI,MAAAA;AAC1B,QAAId,OAAOe,gBAAgBT,UAAaN,OAAOe,YAAYC,KAAI,MAAO,IAAI;AACxEF,QAAEC,cAAcf,OAAOe;IACzB,WAAWJ,KAAKI,aAAa;AAC3BD,QAAEC,cAAcJ,KAAKI;IACvB,OAAO;AACLlB,MAAAA,KAAIoB,QAAQ,uCAAuC;QAAEL;MAAW,GAAA;;;;;;IAClE;AAEA,QAAID,KAAKO,aAAa;AACpBJ,QAAEI,cAAcP,KAAKO;IACvB,OAAO;AACLrB,MAAAA,KAAIoB,QAAQ,wCAAwC;QAAEL;MAAW,GAAA;;;;;;IACnE;AAEA,QAAID,KAAKQ,cAAc;AACrBL,QAAEK,eAAeR,KAAKQ;IACxB,OAAO;AACLtB,MAAAA,KAAIoB,QAAQ,yCAAyC;QAAEL;MAAW,GAAA;;;;;;IACpE;AAEA,QAAID,KAAKS,KAAK;AACZN,QAAEM,MAAMT,KAAKS;IACf,OAAO;AACLvB,MAAAA,KAAIoB,QAAQ,+BAA+B;QAAEL;MAAW,GAAA;;;;;;IAC1D;EACF,CAAA;AACF;AAEO,IAAMS,sBAAsB,CAACC,gBAAAA;AAClC,SAAO;IACLC,QAAQD;IACRE,cAAc,oBAAIC,KAAAA;IAClBC,SAAS;MACPlB,IAAIc;MACJK,WAAW;QACT,SAAS;QACTC,YAAY;QACZC,WAAWP;QACXA;QACAQ,cAAc;UAAC;;MACjB;IACF;EACF;AACF;",
|
|
6
|
-
"names": ["Obj", "Ref", "Function", "getUserFunctionIdInMetadata", "bundleFunction", "FunctionsServiceClient", "incrementSemverPatch", "log", "FunctionRuntimeKind", "isScriptDeployed", "script", "fn", "existingFunctionId", "getMeta", "Boolean", "changed", "deployScript", "client", "space", "validationError", "validateDeployInputs", "success", "error", "buildResult", "source", "target", "content", "Error", "functionsServiceClient", "fromClient", "newFunction", "deploy", "ownerPublicKey", "key", "version", "functionId", "entryPoint", "assets", "runtime", "enums", "WORKER_LOADER", "storedFunction", "createOrUpdateFunctionInSpace", "change", "s", "err", "catch", "setFrom", "f", "make", "db", "add", "Obj", "getUserFunctionIdInMetadata", "getInvocationUrl", "log", "getSpace", "getFunctionUrl", "script", "fn", "edgeUrl", "space", "existingFunctionId", "getMeta", "undefined", "spaceId", "id", "updateFunctionMetadata", "storedFunction", "meta", "functionId", "change", "f", "description", "trim", "verbose", "inputSchema", "outputSchema", "key", "getAccessCredential", "identityKey", "issuer", "issuanceDate", "Date", "subject", "assertion", "serverName", "serverKey", "capabilities"]
|
|
7
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/meta.ts
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var meta = {
|
|
6
|
-
id: "dxos.org/plugin/script",
|
|
7
|
-
name: "Scripts",
|
|
8
|
-
description: trim`
|
|
9
|
-
Write and deploy custom JavaScript functions that extend your workspace capabilities.
|
|
10
|
-
Create AI agent tools, spreadsheet formulas, and automation scripts that integrate seamlessly with other plugins.
|
|
11
|
-
`,
|
|
12
|
-
icon: "ph--code--regular",
|
|
13
|
-
iconHue: "sky",
|
|
14
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer",
|
|
15
|
-
tags: [
|
|
16
|
-
"labs"
|
|
17
|
-
],
|
|
18
|
-
screenshots: [
|
|
19
|
-
"https://dxos.network/plugin-details-scripts-dark.png"
|
|
20
|
-
]
|
|
21
|
-
};
|
|
22
|
-
var defaultScriptsForIntegration = {
|
|
23
|
-
// TODO(wittjosiah): Also include content extraction scripts in the default set.
|
|
24
|
-
"gmail.com": [
|
|
25
|
-
"dxos.org/script/gmail"
|
|
26
|
-
]
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
meta,
|
|
31
|
-
defaultScriptsForIntegration
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=chunk-5HSJPAK7.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/script',\n name: 'Scripts',\n description: trim`\n Write and deploy custom JavaScript functions that extend your workspace capabilities.\n Create AI agent tools, spreadsheet formulas, and automation scripts that integrate seamlessly with other plugins.\n `,\n icon: 'ph--code--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer',\n tags: ['labs'],\n screenshots: ['https://dxos.network/plugin-details-scripts-dark.png'],\n};\n\n// TODO(ZaymonFC): Configure by scopes?\nexport const defaultScriptsForIntegration: Record<string, string[]> = {\n // TODO(wittjosiah): Also include content extraction scripts in the default set.\n 'gmail.com': ['dxos.org/script/gmail'],\n};\n"],
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;AAGO,IAAMC,+BAAyD;;EAEpE,aAAa;IAAC;;AAChB;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "screenshots", "defaultScriptsForIntegration"]
|
|
7
|
-
}
|