@dxos/plugin-script 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 0.13.0
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/PLUGIN.mdl +93 -17
- package/README.md +1 -1
- package/dist/lib/Notebook.mjs +4 -5
- package/dist/lib/Notebook.mjs.map +1 -1
- package/dist/lib/ScriptCapabilities.mjs.map +1 -1
- package/dist/lib/ScriptOperation.mjs +1 -1
- package/dist/lib/ScriptOperation.mjs.map +1 -1
- package/dist/lib/ScriptOperationHandlerSet.mjs.map +1 -1
- package/dist/lib/ScriptSkill.mjs +1 -1
- package/dist/lib/ScriptSkill.mjs.map +1 -1
- package/dist/lib/capabilities.browser.mjs +51 -0
- package/dist/lib/capabilities.browser.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +17 -7
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +16 -4
- package/dist/lib/capabilities.node.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +51 -0
- package/dist/lib/capabilities.tauri.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +1 -1
- package/dist/lib/capabilities.workerd.mjs.map +1 -1
- package/dist/lib/chunk-DeploymentDialog.mjs +12 -9
- package/dist/lib/chunk-DeploymentDialog.mjs.map +1 -1
- package/dist/lib/chunk-NotebookArticle.mjs +37 -36
- package/dist/lib/chunk-NotebookArticle.mjs.map +1 -1
- package/dist/lib/chunk-PLUGIN.mjs +6 -0
- package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
- package/dist/lib/chunk-ScriptArticle.mjs +14 -15
- package/dist/lib/chunk-ScriptArticle.mjs.map +1 -1
- package/dist/lib/chunk-ScriptProperties.mjs +91 -94
- package/dist/lib/chunk-ScriptProperties.mjs.map +1 -1
- package/dist/lib/chunk-ScriptSettings.mjs +11 -8
- package/dist/lib/chunk-ScriptSettings.mjs.map +1 -1
- package/dist/lib/chunk-TestContainer.mjs +5 -5
- package/dist/lib/chunk-TestContainer.mjs.map +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +2 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-compiler.mjs +87 -4
- package/dist/lib/chunk-compiler.mjs.map +1 -1
- package/dist/lib/chunk-create-object.mjs +1 -1
- package/dist/lib/chunk-create-script.mjs.map +1 -1
- package/dist/lib/chunk-create.mjs +4 -4
- package/dist/lib/chunk-create.mjs.map +1 -1
- package/dist/lib/chunk-definitions.mjs +246 -0
- package/dist/lib/chunk-definitions.mjs.map +1 -0
- package/dist/lib/chunk-delete.mjs +2 -2
- package/dist/lib/chunk-delete.mjs.map +1 -1
- package/dist/lib/chunk-deploy.mjs +16 -12
- package/dist/lib/chunk-deploy.mjs.map +1 -1
- package/dist/lib/chunk-errors.mjs +8 -0
- package/dist/lib/chunk-errors.mjs.map +1 -0
- package/dist/lib/chunk-functions.mjs +66 -246
- package/dist/lib/chunk-functions.mjs.map +1 -1
- package/dist/lib/chunk-inspect-invocations.mjs +3 -3
- package/dist/lib/chunk-inspect-invocations.mjs.map +1 -1
- package/dist/lib/chunk-install-function.mjs +11 -11
- package/dist/lib/chunk-install-function.mjs.map +1 -1
- package/dist/lib/chunk-invoke.mjs +6 -6
- package/dist/lib/chunk-invoke.mjs.map +1 -1
- package/dist/lib/chunk-operation-handler.mjs +16 -2
- package/dist/lib/chunk-operation-handler.mjs.map +1 -1
- package/dist/lib/chunk-query-deployed-functions.mjs +5 -6
- package/dist/lib/chunk-query-deployed-functions.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +14 -10
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-read.mjs +4 -3
- package/dist/lib/chunk-read.mjs.map +1 -1
- package/dist/lib/chunk-settings.mjs +2 -2
- package/dist/lib/chunk-settings.mjs.map +1 -1
- package/dist/lib/chunk-skill-definition.mjs +1 -1
- package/dist/lib/chunk-templates.mjs +3 -3
- package/dist/lib/chunk-update.mjs +4 -3
- package/dist/lib/chunk-update.mjs.map +1 -1
- package/dist/lib/components.mjs +114 -123
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/hooks.mjs +96 -16
- package/dist/lib/hooks.mjs.map +1 -1
- package/dist/lib/index.mjs +5 -3
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/ns/ScriptFunction.mjs +12 -0
- package/dist/lib/ns/ScriptFunction.mjs.map +1 -0
- package/dist/lib/ns/Templates.mjs +11 -0
- package/dist/lib/ns/Templates.mjs.map +1 -0
- package/dist/lib/testing.mjs +1 -1
- package/dist/lib/translations.mjs +2 -1
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/src/ScriptFunction.d.ts +2 -0
- package/dist/types/src/ScriptFunction.d.ts.map +1 -0
- package/dist/types/src/Templates.d.ts +2 -0
- package/dist/types/src/Templates.d.ts.map +1 -0
- package/dist/types/src/capabilities/ScriptSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/compiler.d.ts +2 -1
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -1
- package/dist/types/src/capabilities/errors.d.ts +33 -0
- package/dist/types/src/capabilities/errors.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/browser.d.ts +12 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/tauri.d.ts +12 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/compiler/index.d.ts +1 -1
- package/dist/types/src/compiler/index.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +3 -3
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +4 -4
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +10 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/index.d.ts +2 -2
- package/dist/types/src/components/NotebookStack/index.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +2 -2
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +10 -0
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/index.d.ts +1 -1
- package/dist/types/src/components/ScriptToolbar/index.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestPanel.d.ts +2 -2
- package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/index.d.ts +1 -1
- package/dist/types/src/components/TestPanel/index.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +2 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/index.d.ts +1 -1
- package/dist/types/src/components/TypescriptEditor/index.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +10 -0
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/index.d.ts +1 -1
- package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts +1 -1
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts.map +1 -1
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts +1 -1
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/NotebookArticle/index.d.ts +1 -1
- package/dist/types/src/containers/NotebookArticle/index.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts +1 -1
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts +10 -0
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptArticle/index.d.ts +1 -1
- package/dist/types/src/containers/ScriptArticle/index.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts +10 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/SkillEditor.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/index.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts +2 -2
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.stories.d.ts +11 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptSettings/index.d.ts +1 -1
- package/dist/types/src/containers/ScriptSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/TestContainer/index.d.ts +1 -1
- package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/deploy.d.ts +3 -3
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +6 -6
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts.map +1 -1
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts +1 -1
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/hooks/useToolbarState.d.ts +2 -2
- package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +5 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +3 -3
- package/dist/types/src/notebook/compute-graph.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/operations/ScriptOperationHandlerSet.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/skills/ScriptSkill.d.ts.map +1 -1
- package/dist/types/src/skills/functions/definitions.d.ts +8 -6
- package/dist/types/src/skills/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/skills/functions/deploy.d.ts +4 -2
- package/dist/types/src/skills/functions/deploy.d.ts.map +1 -1
- package/dist/types/src/skills/functions/errors.d.ts +33 -0
- package/dist/types/src/skills/functions/errors.d.ts.map +1 -0
- package/dist/types/src/skills/functions/index.d.ts +1 -1
- package/dist/types/src/skills/functions/index.d.ts.map +1 -1
- package/dist/types/src/skills/functions/install-function.d.ts +3 -2
- package/dist/types/src/skills/functions/install-function.d.ts.map +1 -1
- package/dist/types/src/skills/functions/invoke.d.ts +2 -2
- package/dist/types/src/skills/functions/invoke.d.ts.map +1 -1
- package/dist/types/src/skills/functions/query-deployed-functions.d.ts +2 -2
- package/dist/types/src/skills/functions/query-deployed-functions.d.ts.map +1 -1
- package/dist/types/src/skills/index.d.ts +1 -1
- package/dist/types/src/skills/index.d.ts.map +1 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -2
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +10 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/ScriptCapabilities.d.ts +3 -3
- package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +5 -5
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts +6 -3
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +1 -1
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +2 -2
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +106 -96
- package/src/ScriptFunction.ts +7 -0
- package/src/Templates.ts +7 -0
- package/src/capabilities/ScriptSurfaces.tsx +19 -10
- package/src/capabilities/app-graph-builder.ts +2 -0
- package/src/capabilities/compiler.ts +6 -5
- package/src/capabilities/errors.ts +8 -0
- package/src/capabilities/gen/browser.ts +62 -0
- package/src/capabilities/gen/node.ts +10 -10
- package/src/capabilities/gen/tauri.ts +62 -0
- package/src/capabilities/gen/workerd.ts +4 -4
- package/src/capabilities/index.ts +11 -11
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.ts +4 -4
- package/src/capabilities/settings.ts +2 -2
- package/src/compiler/compiler.browser.test.ts +1 -1
- package/src/compiler/index.ts +1 -1
- package/src/components/NotebookStack/NotebookCell.tsx +35 -29
- package/src/components/NotebookStack/NotebookMenu.tsx +27 -26
- package/src/components/NotebookStack/NotebookStack.stories.tsx +3 -3
- package/src/components/NotebookStack/NotebookStack.tsx +20 -17
- package/src/components/NotebookStack/index.ts +2 -2
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +5 -5
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +14 -15
- package/src/components/ScriptToolbar/index.ts +1 -1
- package/src/components/TestPanel/TestPanel.tsx +29 -23
- package/src/components/TestPanel/index.ts +1 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +10 -8
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +11 -7
- package/src/components/TypescriptEditor/index.ts +1 -1
- package/src/components/index.ts +4 -5
- package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +5 -7
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +18 -15
- package/src/containers/DeploymentDialog/index.ts +1 -1
- package/src/containers/NotebookArticle/NotebookArticle.stories.tsx +6 -6
- package/src/containers/NotebookArticle/NotebookArticle.tsx +25 -21
- package/src/containers/NotebookArticle/index.ts +1 -1
- package/src/containers/ScriptArticle/ScriptArticle.stories.tsx +3 -3
- package/src/containers/ScriptArticle/ScriptArticle.tsx +13 -11
- package/src/containers/ScriptArticle/index.ts +1 -1
- package/src/containers/ScriptProperties/FunctionBinding.tsx +18 -18
- package/src/containers/ScriptProperties/FunctionPublishing.tsx +22 -22
- package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +3 -3
- package/src/containers/ScriptProperties/ScriptProperties.tsx +10 -10
- package/src/containers/ScriptProperties/SkillEditor.tsx +16 -14
- package/src/containers/ScriptProperties/index.ts +1 -1
- package/src/containers/ScriptSettings/ScriptSettings.stories.tsx +1 -1
- package/src/containers/ScriptSettings/ScriptSettings.tsx +16 -11
- package/src/containers/ScriptSettings/index.ts +1 -1
- package/src/containers/TestContainer/TestContainer.tsx +4 -4
- package/src/containers/TestContainer/index.ts +1 -1
- package/src/containers/index.ts +6 -6
- package/src/e2e/ai.test.ts +1 -1
- package/src/hooks/deploy.ts +12 -5
- package/src/hooks/index.ts +6 -6
- package/src/hooks/template.ts +1 -1
- package/src/hooks/useCompiler.ts +8 -7
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +10 -5
- package/src/hooks/useToolbarState.ts +4 -4
- package/src/index.ts +5 -3
- package/src/meta.ts +1 -1
- package/src/notebook/compute-graph.test.ts +2 -2
- package/src/notebook/compute-graph.ts +4 -4
- package/src/notebook/index.ts +1 -1
- package/src/notebook/vfs-parser.test.ts +1 -1
- package/src/notebook/vfs-parser.ts +1 -1
- package/src/operations/ScriptOperationHandlerSet.ts +3 -1
- package/src/operations/create-script.ts +1 -1
- package/src/operations/index.ts +1 -1
- package/src/plugin.test.ts +2 -2
- package/src/skills/ScriptSkill.ts +3 -1
- package/src/skills/functions/create.ts +4 -4
- package/src/skills/functions/definitions.ts +8 -6
- package/src/skills/functions/delete.ts +1 -1
- package/src/skills/functions/deploy.ts +13 -9
- package/src/skills/functions/errors.ts +8 -0
- package/src/skills/functions/index.ts +11 -11
- package/src/skills/functions/inspect-invocations.ts +1 -1
- package/src/skills/functions/install-function.ts +11 -14
- package/src/skills/functions/invoke.ts +5 -5
- package/src/skills/functions/query-deployed-functions.ts +3 -4
- package/src/skills/functions/read.ts +3 -2
- package/src/skills/functions/update.ts +3 -2
- package/src/skills/index.ts +1 -1
- package/src/templates/anthropic.ts +2 -2
- package/src/templates/commentary.ts +1 -1
- package/src/templates/forex-effect.ts +7 -4
- package/src/testing/index.ts +2 -2
- package/src/translations.ts +4 -2
- package/src/types/Notebook.ts +6 -4
- package/src/types/ScriptCapabilities.ts +3 -3
- package/src/types/ScriptOperation.ts +1 -1
- package/src/types/index.ts +5 -5
- package/src/util/deploy.ts +10 -7
- package/src/util/functions.ts +24 -15
- package/src/util/index.ts +2 -2
- package/dist/lib/chunk-compiler2.mjs +0 -76
- package/dist/lib/chunk-compiler2.mjs.map +0 -1
- package/dist/lib/chunk-util.mjs +0 -146
- package/dist/lib/chunk-util.mjs.map +0 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts +0 -5
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +0 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +0 -14
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/QueryEditor/index.d.ts +0 -2
- package/dist/types/src/components/QueryEditor/index.d.ts.map +0 -1
- package/src/components/QueryEditor/QueryEditor.stories.tsx +0 -91
- package/src/components/QueryEditor/QueryEditor.tsx +0 -50
- package/src/components/QueryEditor/index.ts +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-script",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Braneframe notebook plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,19 +10,21 @@
|
|
|
10
10
|
},
|
|
11
11
|
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
|
-
"sideEffects":
|
|
13
|
+
"sideEffects": false,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
16
|
"#capabilities": {
|
|
17
17
|
"source": {
|
|
18
18
|
"workerd": "./src/capabilities/gen/workerd.ts",
|
|
19
19
|
"node": "./src/capabilities/gen/node.ts",
|
|
20
|
-
"
|
|
20
|
+
"tauri": "./src/capabilities/gen/tauri.ts",
|
|
21
|
+
"browser": "./src/capabilities/gen/browser.ts"
|
|
21
22
|
},
|
|
22
23
|
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
23
24
|
"workerd": "./dist/lib/capabilities.workerd.mjs",
|
|
24
25
|
"node": "./dist/lib/capabilities.node.mjs",
|
|
25
|
-
"
|
|
26
|
+
"tauri": "./dist/lib/capabilities.tauri.mjs",
|
|
27
|
+
"browser": "./dist/lib/capabilities.browser.mjs"
|
|
26
28
|
},
|
|
27
29
|
"#components": {
|
|
28
30
|
"source": "./src/components/index.ts",
|
|
@@ -59,7 +61,11 @@
|
|
|
59
61
|
"types": "./dist/types/src/skills/index.d.ts",
|
|
60
62
|
"default": "./dist/lib/skills.mjs"
|
|
61
63
|
},
|
|
62
|
-
"#testing":
|
|
64
|
+
"#testing": {
|
|
65
|
+
"source": "./src/testing/index.ts",
|
|
66
|
+
"types": "./dist/types/src/testing/index.d.ts",
|
|
67
|
+
"default": "./dist/lib/testing.mjs"
|
|
68
|
+
},
|
|
63
69
|
"#translations": {
|
|
64
70
|
"source": "./src/translations.ts",
|
|
65
71
|
"types": "./dist/types/src/translations.d.ts",
|
|
@@ -78,27 +84,12 @@
|
|
|
78
84
|
"import": "./dist/lib/index.mjs"
|
|
79
85
|
},
|
|
80
86
|
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
81
|
-
"./containers": {
|
|
82
|
-
"source": "./src/containers/index.ts",
|
|
83
|
-
"types": "./dist/types/src/containers/index.d.ts",
|
|
84
|
-
"import": "./dist/lib/containers.mjs"
|
|
85
|
-
},
|
|
86
|
-
"./package.json": "./package.json",
|
|
87
|
-
"./templates": {
|
|
88
|
-
"source": "./src/templates/index.ts",
|
|
89
|
-
"types": "./dist/types/src/templates/index.d.ts",
|
|
90
|
-
"import": "./dist/lib/templates.mjs"
|
|
91
|
-
},
|
|
92
|
-
"./translations": {
|
|
93
|
-
"source": "./src/translations.ts",
|
|
94
|
-
"types": "./dist/types/src/translations.d.ts",
|
|
95
|
-
"import": "./dist/lib/translations.mjs"
|
|
96
|
-
},
|
|
97
87
|
"./Notebook": {
|
|
98
88
|
"source": "./src/types/Notebook.ts",
|
|
99
89
|
"types": "./dist/types/src/types/Notebook.d.ts",
|
|
100
90
|
"import": "./dist/lib/Notebook.mjs"
|
|
101
91
|
},
|
|
92
|
+
"./package.json": "./package.json",
|
|
102
93
|
"./ScriptCapabilities": {
|
|
103
94
|
"source": "./src/types/ScriptCapabilities.ts",
|
|
104
95
|
"types": "./dist/types/src/types/ScriptCapabilities.d.ts",
|
|
@@ -109,30 +100,45 @@
|
|
|
109
100
|
"types": "./dist/types/src/types/ScriptEvents.d.ts",
|
|
110
101
|
"import": "./dist/lib/ScriptEvents.mjs"
|
|
111
102
|
},
|
|
103
|
+
"./ScriptFunction": {
|
|
104
|
+
"source": "./src/ScriptFunction.ts",
|
|
105
|
+
"types": "./dist/types/src/ScriptFunction.d.ts",
|
|
106
|
+
"import": "./dist/lib/ns/ScriptFunction.mjs"
|
|
107
|
+
},
|
|
112
108
|
"./ScriptOperation": {
|
|
113
109
|
"source": "./src/types/ScriptOperation.ts",
|
|
114
110
|
"types": "./dist/types/src/types/ScriptOperation.d.ts",
|
|
115
111
|
"import": "./dist/lib/ScriptOperation.mjs"
|
|
116
112
|
},
|
|
113
|
+
"./ScriptOperationHandlerSet": {
|
|
114
|
+
"source": "./src/operations/ScriptOperationHandlerSet.ts",
|
|
115
|
+
"types": "./dist/types/src/operations/ScriptOperationHandlerSet.d.ts",
|
|
116
|
+
"import": "./dist/lib/ScriptOperationHandlerSet.mjs"
|
|
117
|
+
},
|
|
117
118
|
"./ScriptPlugin": {
|
|
118
119
|
"source": "./src/ScriptPlugin.ts",
|
|
119
120
|
"types": "./dist/types/src/ScriptPlugin.d.ts",
|
|
120
121
|
"import": "./dist/lib/ScriptPlugin.mjs"
|
|
121
122
|
},
|
|
123
|
+
"./ScriptSkill": {
|
|
124
|
+
"source": "./src/skills/ScriptSkill.ts",
|
|
125
|
+
"types": "./dist/types/src/skills/ScriptSkill.d.ts",
|
|
126
|
+
"import": "./dist/lib/ScriptSkill.mjs"
|
|
127
|
+
},
|
|
122
128
|
"./Settings": {
|
|
123
129
|
"source": "./src/types/Settings.ts",
|
|
124
130
|
"types": "./dist/types/src/types/Settings.d.ts",
|
|
125
131
|
"import": "./dist/lib/Settings.mjs"
|
|
126
132
|
},
|
|
127
|
-
"./
|
|
128
|
-
"source": "./src/
|
|
129
|
-
"types": "./dist/types/src/
|
|
130
|
-
"import": "./dist/lib/
|
|
133
|
+
"./Templates": {
|
|
134
|
+
"source": "./src/Templates.ts",
|
|
135
|
+
"types": "./dist/types/src/Templates.d.ts",
|
|
136
|
+
"import": "./dist/lib/ns/Templates.mjs"
|
|
131
137
|
},
|
|
132
|
-
"./
|
|
133
|
-
"source": "./src/
|
|
134
|
-
"types": "./dist/types/src/
|
|
135
|
-
"import": "./dist/lib/
|
|
138
|
+
"./translations": {
|
|
139
|
+
"source": "./src/translations.ts",
|
|
140
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
141
|
+
"import": "./dist/lib/translations.mjs"
|
|
136
142
|
}
|
|
137
143
|
},
|
|
138
144
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -162,18 +168,17 @@
|
|
|
162
168
|
"PLUGIN.mdl"
|
|
163
169
|
],
|
|
164
170
|
"dependencies": {
|
|
165
|
-
"@automerge/automerge": "3.
|
|
171
|
+
"@automerge/automerge": "3.5.0",
|
|
166
172
|
"@codemirror/autocomplete": "^6.20.3",
|
|
167
173
|
"@codemirror/lang-javascript": "^6.2.5",
|
|
168
174
|
"@codemirror/language": "^6.12.4",
|
|
169
175
|
"@codemirror/lint": "6.9.7",
|
|
170
|
-
"@codemirror/state": "^6.7.
|
|
171
|
-
"@codemirror/view": "^6.43.
|
|
172
|
-
"@effect/atom-react": "4.0.0
|
|
176
|
+
"@codemirror/state": "^6.7.6",
|
|
177
|
+
"@codemirror/view": "^6.43.13",
|
|
178
|
+
"@effect/atom-react": "4.0.0",
|
|
173
179
|
"@lezer/common": "^1.5.2",
|
|
174
180
|
"@lezer/highlight": "^1.2.3",
|
|
175
181
|
"@octokit/core": "^7.0.6",
|
|
176
|
-
"@radix-ui/react-compose-refs": "1.1.1",
|
|
177
182
|
"@typescript/typescript6": "^6.0.2",
|
|
178
183
|
"@typescript/vfs": "^1.6.0",
|
|
179
184
|
"@valtown/codemirror-continue": "^2.3.1",
|
|
@@ -181,78 +186,83 @@
|
|
|
181
186
|
"chess.js": "^1.0.0",
|
|
182
187
|
"esbuild-wasm": "^0.28.0",
|
|
183
188
|
"prettier": "^3.6.2",
|
|
184
|
-
"@dxos/ai": "0.
|
|
185
|
-
"@dxos/app-framework": "0.
|
|
186
|
-
"@dxos/app-graph": "0.
|
|
187
|
-
"@dxos/app-toolkit": "0.
|
|
188
|
-
"@dxos/assistant": "0.
|
|
189
|
-
"@dxos/assistant-toolkit": "0.
|
|
190
|
-
"@dxos/client": "0.
|
|
191
|
-
"@dxos/
|
|
192
|
-
"@dxos/compute": "0.
|
|
193
|
-
"@dxos/
|
|
194
|
-
"@dxos/
|
|
195
|
-
"@dxos/
|
|
196
|
-
"@dxos/
|
|
197
|
-
"@dxos/echo": "0.
|
|
198
|
-
"@dxos/echo-
|
|
199
|
-
"@dxos/echo-
|
|
200
|
-
"@dxos/
|
|
201
|
-
"@dxos/edge-compute": "0.
|
|
202
|
-
"@dxos/
|
|
203
|
-
"@dxos/
|
|
204
|
-
"@dxos/
|
|
205
|
-
"@dxos/
|
|
206
|
-
"@dxos/
|
|
207
|
-
"@dxos/
|
|
208
|
-
"@dxos/
|
|
209
|
-
"@dxos/
|
|
210
|
-
"@dxos/plugin-
|
|
211
|
-
"@dxos/plugin-
|
|
212
|
-
"@dxos/plugin-
|
|
213
|
-
"@dxos/plugin-
|
|
214
|
-
"@dxos/plugin-
|
|
215
|
-
"@dxos/
|
|
216
|
-
"@dxos/
|
|
217
|
-
"@dxos/
|
|
218
|
-
"@dxos/react-
|
|
219
|
-
"@dxos/react-
|
|
220
|
-
"@dxos/react-ui-
|
|
221
|
-
"@dxos/react-ui-
|
|
222
|
-
"@dxos/react-ui-
|
|
223
|
-
"@dxos/react-ui-
|
|
224
|
-
"@dxos/
|
|
225
|
-
"@dxos/
|
|
226
|
-
"@dxos/ui": "0.
|
|
227
|
-
"@dxos/ui-
|
|
228
|
-
"@dxos/
|
|
229
|
-
"@dxos/
|
|
189
|
+
"@dxos/ai": "0.13.0",
|
|
190
|
+
"@dxos/app-framework": "0.13.0",
|
|
191
|
+
"@dxos/app-graph": "0.13.0",
|
|
192
|
+
"@dxos/app-toolkit": "0.13.0",
|
|
193
|
+
"@dxos/assistant": "0.13.0",
|
|
194
|
+
"@dxos/assistant-toolkit": "0.13.0",
|
|
195
|
+
"@dxos/client-protocol": "0.13.0",
|
|
196
|
+
"@dxos/compute": "0.13.0",
|
|
197
|
+
"@dxos/compute-runtime": "0.13.0",
|
|
198
|
+
"@dxos/config": "0.13.0",
|
|
199
|
+
"@dxos/context": "0.13.0",
|
|
200
|
+
"@dxos/devtools": "0.13.0",
|
|
201
|
+
"@dxos/echo": "0.13.0",
|
|
202
|
+
"@dxos/echo-doc": "0.13.0",
|
|
203
|
+
"@dxos/echo-query": "0.13.0",
|
|
204
|
+
"@dxos/echo-react": "0.13.0",
|
|
205
|
+
"@dxos/edge-client": "0.13.0",
|
|
206
|
+
"@dxos/edge-compute": "0.13.0",
|
|
207
|
+
"@dxos/effect": "0.13.0",
|
|
208
|
+
"@dxos/errors": "0.13.0",
|
|
209
|
+
"@dxos/halo": "0.13.0",
|
|
210
|
+
"@dxos/halo-react": "0.13.0",
|
|
211
|
+
"@dxos/invariant": "0.13.0",
|
|
212
|
+
"@dxos/keys": "0.13.0",
|
|
213
|
+
"@dxos/link": "0.13.0",
|
|
214
|
+
"@dxos/log": "0.13.0",
|
|
215
|
+
"@dxos/plugin-chess": "0.13.0",
|
|
216
|
+
"@dxos/plugin-client": "0.13.0",
|
|
217
|
+
"@dxos/plugin-explorer": "0.13.0",
|
|
218
|
+
"@dxos/plugin-game": "0.13.0",
|
|
219
|
+
"@dxos/plugin-markdown": "0.13.0",
|
|
220
|
+
"@dxos/plugin-routine": "0.13.0",
|
|
221
|
+
"@dxos/plugin-space": "0.13.0",
|
|
222
|
+
"@dxos/protocols": "0.13.0",
|
|
223
|
+
"@dxos/react-client": "0.13.0",
|
|
224
|
+
"@dxos/react-hooks": "0.13.0",
|
|
225
|
+
"@dxos/react-ui-attention": "0.13.0",
|
|
226
|
+
"@dxos/react-ui-dnd": "0.13.0",
|
|
227
|
+
"@dxos/react-ui-editor": "0.13.0",
|
|
228
|
+
"@dxos/react-ui-form": "0.13.0",
|
|
229
|
+
"@dxos/react-ui-menu": "0.13.0",
|
|
230
|
+
"@dxos/react-ui-mosaic": "0.13.0",
|
|
231
|
+
"@dxos/react-ui-query": "0.13.0",
|
|
232
|
+
"@dxos/react-ui-syntax-highlighter": "0.13.0",
|
|
233
|
+
"@dxos/schema": "0.13.0",
|
|
234
|
+
"@dxos/types": "0.13.0",
|
|
235
|
+
"@dxos/ui-editor": "0.13.0",
|
|
236
|
+
"@dxos/ui-types": "0.13.0",
|
|
237
|
+
"@dxos/util": "0.13.0",
|
|
238
|
+
"@dxos/ui": "0.13.0"
|
|
230
239
|
},
|
|
231
240
|
"devDependencies": {
|
|
232
|
-
"@effect/atom-react": "4.0.0
|
|
233
|
-
"@storybook/react-vite": "^10.
|
|
241
|
+
"@effect/atom-react": "4.0.0",
|
|
242
|
+
"@storybook/react-vite": "^10.6.0",
|
|
234
243
|
"@types/react": "~19.2.17",
|
|
235
244
|
"@types/react-dom": "~19.2.3",
|
|
236
|
-
"effect": "4.0.0
|
|
245
|
+
"effect": "4.0.0",
|
|
237
246
|
"react": "~19.2.7",
|
|
238
247
|
"react-dom": "~19.2.7",
|
|
239
|
-
"vite": "^8.2.
|
|
240
|
-
"@dxos/
|
|
241
|
-
"@dxos/
|
|
242
|
-
"@dxos/
|
|
243
|
-
"@dxos/
|
|
244
|
-
"@dxos/
|
|
245
|
-
"@dxos/
|
|
246
|
-
"@dxos/
|
|
247
|
-
"@dxos/
|
|
248
|
+
"vite": "^8.2.2",
|
|
249
|
+
"@dxos/client": "0.13.0",
|
|
250
|
+
"@dxos/config": "0.13.0",
|
|
251
|
+
"@dxos/echo-client": "0.13.0",
|
|
252
|
+
"@dxos/functions-simulator-cloudflare": "0.13.0",
|
|
253
|
+
"@dxos/plugin-assistant": "0.13.0",
|
|
254
|
+
"@dxos/plugin-routine": "0.13.0",
|
|
255
|
+
"@dxos/plugin-testing": "0.13.0",
|
|
256
|
+
"@dxos/react-ui": "0.13.0",
|
|
257
|
+
"@dxos/ui-theme": "0.13.0"
|
|
248
258
|
},
|
|
249
259
|
"peerDependencies": {
|
|
250
|
-
"@effect/atom-react": "4.0.0
|
|
251
|
-
"effect": "4.0.0
|
|
260
|
+
"@effect/atom-react": "4.0.0",
|
|
261
|
+
"effect": "4.0.0",
|
|
252
262
|
"react": "~19.2.7",
|
|
253
263
|
"react-dom": "~19.2.7",
|
|
254
|
-
"@dxos/react-ui": "^0.
|
|
255
|
-
"@dxos/ui-theme": "^0.
|
|
264
|
+
"@dxos/react-ui": "^0.13.0",
|
|
265
|
+
"@dxos/ui-theme": "^0.13.0"
|
|
256
266
|
},
|
|
257
267
|
"publishConfig": {
|
|
258
268
|
"access": "public"
|
package/src/Templates.ts
ADDED
|
@@ -6,14 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import * as Hooks from '@dxos/app-framework/Hooks';
|
|
10
10
|
import type * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
11
|
+
import * as SettingsScope from '@dxos/app-toolkit/SettingsScope';
|
|
11
12
|
import type * as Script from '@dxos/compute/Script';
|
|
12
13
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
13
14
|
import { Feed } from '@dxos/echo';
|
|
14
|
-
import {
|
|
15
|
+
import { useResolveRef } from '@dxos/echo-react';
|
|
16
|
+
import * as ClientOperation from '@dxos/plugin-client/ClientOperation';
|
|
15
17
|
import { getSpace } from '@dxos/react-client/echo';
|
|
16
|
-
import
|
|
18
|
+
import * as Panel from '@dxos/react-ui/Panel';
|
|
17
19
|
|
|
18
20
|
import { NotebookArticle, ScriptArticle, ScriptSettings } from '#containers';
|
|
19
21
|
import { useCompiler } from '#hooks';
|
|
@@ -27,8 +29,8 @@ export type ScriptSettingsSurfaceProps = {
|
|
|
27
29
|
|
|
28
30
|
/** Hub authentication is a write, so it is dispatched as an operation rather than mapped as props. */
|
|
29
31
|
export const ScriptSettingsSurface = ({ subject }: ScriptSettingsSurfaceProps) => {
|
|
30
|
-
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
31
|
-
const { invokePromise } = useOperationInvoker();
|
|
32
|
+
const { settings, updateSettings } = Hooks.useSettingsState<Settings.Settings>(subject.atom);
|
|
33
|
+
const { invokePromise } = Hooks.useOperationInvoker();
|
|
32
34
|
// TODO(burdon): Check token.
|
|
33
35
|
const handleAuthenticate = async () => {
|
|
34
36
|
await invokePromise(ClientOperation.GrantServiceAccess, {
|
|
@@ -37,7 +39,14 @@ export const ScriptSettingsSurface = ({ subject }: ScriptSettingsSurfaceProps) =
|
|
|
37
39
|
});
|
|
38
40
|
};
|
|
39
41
|
|
|
40
|
-
return
|
|
42
|
+
return (
|
|
43
|
+
<ScriptSettings
|
|
44
|
+
settings={settings}
|
|
45
|
+
onSettingsChange={updateSettings}
|
|
46
|
+
onAuthenticate={handleAuthenticate}
|
|
47
|
+
scope={<SettingsScope.Root prefix={subject.prefix} />}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
41
50
|
};
|
|
42
51
|
|
|
43
52
|
export type ScriptArticleSurfaceProps = {
|
|
@@ -49,7 +58,7 @@ export type ScriptArticleSurfaceProps = {
|
|
|
49
58
|
/** The compiler environment and settings are ambient, so they are resolved here rather than mapped. */
|
|
50
59
|
export const ScriptArticleSurface = ({ role, subject, attendableId }: ScriptArticleSurfaceProps) => {
|
|
51
60
|
const compiler = useCompiler();
|
|
52
|
-
const settings = useAtomCapability(ScriptCapabilities.Settings);
|
|
61
|
+
const settings = Hooks.useAtomCapability(ScriptCapabilities.Settings);
|
|
53
62
|
|
|
54
63
|
return (
|
|
55
64
|
<ScriptArticle
|
|
@@ -82,14 +91,14 @@ export type ScriptLogsSurfaceProps = {
|
|
|
82
91
|
/** Resolves the space's invocation-trace feed for the selected script. */
|
|
83
92
|
export const ScriptLogsSurface = ({ role, script }: ScriptLogsSurfaceProps) => {
|
|
84
93
|
const space = getSpace(script);
|
|
85
|
-
const feed = space?.properties.invocationTraceFeed
|
|
94
|
+
const feed = useResolveRef(space?.properties.invocationTraceFeed);
|
|
86
95
|
const feedDXN = feed ? Feed.getFeedUri(feed) : undefined;
|
|
87
96
|
|
|
88
97
|
return (
|
|
89
98
|
<Panel.Root role={role}>
|
|
90
|
-
<Panel.
|
|
99
|
+
<Panel.Body asChild>
|
|
91
100
|
<InvocationTraceContainer db={space?.db} feedDXN={feedDXN} target={script} detailAxis='block' />
|
|
92
|
-
</Panel.
|
|
101
|
+
</Panel.Body>
|
|
93
102
|
</Panel.Root>
|
|
94
103
|
);
|
|
95
104
|
};
|
|
@@ -17,6 +17,7 @@ export default Capability.makeModule(
|
|
|
17
17
|
const extensions = yield* Effect.all([
|
|
18
18
|
AppGraphBuilder.createTypeExtension({
|
|
19
19
|
id: 'execute',
|
|
20
|
+
relation: AppNode.companion,
|
|
20
21
|
type: Script.Script,
|
|
21
22
|
connector: () =>
|
|
22
23
|
Effect.succeed([
|
|
@@ -30,6 +31,7 @@ export default Capability.makeModule(
|
|
|
30
31
|
}),
|
|
31
32
|
AppGraphBuilder.createTypeExtension({
|
|
32
33
|
id: 'logs',
|
|
34
|
+
relation: AppNode.companion,
|
|
33
35
|
type: Script.Script,
|
|
34
36
|
connector: () =>
|
|
35
37
|
Effect.succeed([
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as ts from '@typescript/typescript6';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as FetchHttpClient from 'effect/http/FetchHttpClient';
|
|
8
|
+
import * as HttpClient from 'effect/http/HttpClient';
|
|
7
9
|
import * as Schedule from 'effect/Schedule';
|
|
8
10
|
import * as Schema from 'effect/Schema';
|
|
9
|
-
import * as FetchHttpClient from 'effect/unstable/http/FetchHttpClient';
|
|
10
|
-
import * as HttpClient from 'effect/unstable/http/HttpClient';
|
|
11
11
|
import wasmUrl from 'esbuild-wasm/esbuild.wasm?url';
|
|
12
12
|
|
|
13
13
|
import * as Capability from '@dxos/app-framework/Capability';
|
|
@@ -17,7 +17,8 @@ import { trim } from '@dxos/util';
|
|
|
17
17
|
|
|
18
18
|
import { ScriptCapabilities } from '#types';
|
|
19
19
|
|
|
20
|
-
import { Compiler } from '../compiler';
|
|
20
|
+
import { Compiler } from '../compiler/index.ts';
|
|
21
|
+
import { CompilerError } from './errors.ts';
|
|
21
22
|
|
|
22
23
|
// TODO(burdon): Document.
|
|
23
24
|
const SCRIPT_PACKAGES_BUCKET = 'https://pub-5745ae82e450484aa28f75fc6a175935.r2.dev/dev/';
|
|
@@ -28,7 +29,7 @@ export default Capability.makeModule(() =>
|
|
|
28
29
|
Effect.gen(function* () {
|
|
29
30
|
yield* Effect.tryPromise({
|
|
30
31
|
try: () => initializeBundler({ wasmUrl }),
|
|
31
|
-
catch: (error) => new
|
|
32
|
+
catch: (error) => new CompilerError({ message: 'Failed to initialize bundler.', cause: error }),
|
|
32
33
|
});
|
|
33
34
|
|
|
34
35
|
const runtimeModules = yield* fetchRuntimeModules().pipe(Effect.provide(FetchHttpClient.layer));
|
|
@@ -51,7 +52,7 @@ export default Capability.makeModule(() =>
|
|
|
51
52
|
declare module 'https://*';
|
|
52
53
|
${NO_TYPES ? '' : 'declare module "*";'}
|
|
53
54
|
`),
|
|
54
|
-
catch: (error) => new
|
|
55
|
+
catch: (error) => new CompilerError({ message: 'Failed to initialize compiler.', cause: error }),
|
|
55
56
|
});
|
|
56
57
|
if (!NO_TYPES) {
|
|
57
58
|
for (const mod of runtimeModules) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { BaseError } from '@dxos/errors';
|
|
6
|
+
|
|
7
|
+
/** The script compiler's WASM bundler or its TypeScript front end failed to start. */
|
|
8
|
+
export class CompilerError extends BaseError.extend('CompilerError', 'Compiler failed to initialize.') {}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.
|
|
6
|
+
|
|
7
|
+
import * as ActivationEvents from '@dxos/app-framework/ActivationEvents';
|
|
8
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
9
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
10
|
+
import * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { translations } from '#translations';
|
|
14
|
+
import { ScriptCapabilities, ScriptEvents } from '#types';
|
|
15
|
+
|
|
16
|
+
import pluginSpec from '../../../PLUGIN.mdl?raw';
|
|
17
|
+
|
|
18
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {
|
|
19
|
+
environments: ['browser', 'node', 'tauri'],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const Schema = AppCapability.schema(() => import('../schema.ts'));
|
|
23
|
+
|
|
24
|
+
export const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition.ts'), {
|
|
25
|
+
environments: ['browser', 'node', 'tauri'],
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const CreateObject = SpaceCapability.createObject(() => import('../create-object.ts'), {
|
|
29
|
+
environments: ['browser', 'node', 'tauri'],
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const Compiler = Capability.lazyModule(
|
|
33
|
+
'Compiler',
|
|
34
|
+
{
|
|
35
|
+
provides: [ScriptCapabilities.Compiler],
|
|
36
|
+
// Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.
|
|
37
|
+
activatesOn: ScriptEvents.SetupCompiler,
|
|
38
|
+
},
|
|
39
|
+
() => import('../compiler.ts'),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {
|
|
43
|
+
activatesOn: ActivationEvents.Idle,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {
|
|
47
|
+
roles: ['org.dxos.role.article', 'org.dxos.role.dialog', 'org.dxos.role.objectProperties', 'org.dxos.role.section'],
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export const ScriptSettings = AppCapability.settings(() => import('../settings.ts'), {
|
|
51
|
+
activatesOn: ActivationEvents.Idle,
|
|
52
|
+
provides: [ScriptCapabilities.Settings],
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const Translations = AppCapability.translations(translations);
|
|
56
|
+
|
|
57
|
+
export const PluginAsset = AppCapability.pluginAsset({
|
|
58
|
+
pluginId: meta.profile.key,
|
|
59
|
+
path: 'PLUGIN.mdl',
|
|
60
|
+
content: pluginSpec,
|
|
61
|
+
mimeType: 'application/x-mdl',
|
|
62
|
+
});
|
|
@@ -12,18 +12,18 @@ import * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';
|
|
|
12
12
|
import { translations } from '#translations';
|
|
13
13
|
import { ScriptCapabilities, ScriptEvents } from '#types';
|
|
14
14
|
|
|
15
|
-
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder'), {
|
|
16
|
-
environments: ['node'],
|
|
15
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {
|
|
16
|
+
environments: ['browser', 'node', 'tauri'],
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
export const Schema = AppCapability.schema(() => import('../schema'));
|
|
19
|
+
export const Schema = AppCapability.schema(() => import('../schema.ts'));
|
|
20
20
|
|
|
21
|
-
export const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition'), {
|
|
22
|
-
environments: ['node'],
|
|
21
|
+
export const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition.ts'), {
|
|
22
|
+
environments: ['browser', 'node', 'tauri'],
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
export const CreateObject = SpaceCapability.createObject(() => import('../create-object'), {
|
|
26
|
-
environments: ['node'],
|
|
25
|
+
export const CreateObject = SpaceCapability.createObject(() => import('../create-object.ts'), {
|
|
26
|
+
environments: ['browser', 'node', 'tauri'],
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
export const Compiler = Capability.lazyModule(
|
|
@@ -33,14 +33,14 @@ export const Compiler = Capability.lazyModule(
|
|
|
33
33
|
// Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.
|
|
34
34
|
activatesOn: ScriptEvents.SetupCompiler,
|
|
35
35
|
},
|
|
36
|
-
() => import('../compiler'),
|
|
36
|
+
() => import('../compiler.ts'),
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler'), {
|
|
39
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {
|
|
40
40
|
activatesOn: ActivationEvents.Idle,
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
export const ScriptSettings = AppCapability.settings(() => import('../settings'), {
|
|
43
|
+
export const ScriptSettings = AppCapability.settings(() => import('../settings.ts'), {
|
|
44
44
|
activatesOn: ActivationEvents.Idle,
|
|
45
45
|
provides: [ScriptCapabilities.Settings],
|
|
46
46
|
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'tauri' condition.
|
|
6
|
+
|
|
7
|
+
import * as ActivationEvents from '@dxos/app-framework/ActivationEvents';
|
|
8
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
9
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
10
|
+
import * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { translations } from '#translations';
|
|
14
|
+
import { ScriptCapabilities, ScriptEvents } from '#types';
|
|
15
|
+
|
|
16
|
+
import pluginSpec from '../../../PLUGIN.mdl?raw';
|
|
17
|
+
|
|
18
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {
|
|
19
|
+
environments: ['browser', 'node', 'tauri'],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const Schema = AppCapability.schema(() => import('../schema.ts'));
|
|
23
|
+
|
|
24
|
+
export const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition.ts'), {
|
|
25
|
+
environments: ['browser', 'node', 'tauri'],
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const CreateObject = SpaceCapability.createObject(() => import('../create-object.ts'), {
|
|
29
|
+
environments: ['browser', 'node', 'tauri'],
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const Compiler = Capability.lazyModule(
|
|
33
|
+
'Compiler',
|
|
34
|
+
{
|
|
35
|
+
provides: [ScriptCapabilities.Compiler],
|
|
36
|
+
// Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.
|
|
37
|
+
activatesOn: ScriptEvents.SetupCompiler,
|
|
38
|
+
},
|
|
39
|
+
() => import('../compiler.ts'),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {
|
|
43
|
+
activatesOn: ActivationEvents.Idle,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {
|
|
47
|
+
roles: ['org.dxos.role.article', 'org.dxos.role.dialog', 'org.dxos.role.objectProperties', 'org.dxos.role.section'],
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export const ScriptSettings = AppCapability.settings(() => import('../settings.ts'), {
|
|
51
|
+
activatesOn: ActivationEvents.Idle,
|
|
52
|
+
provides: [ScriptCapabilities.Settings],
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const Translations = AppCapability.translations(translations);
|
|
56
|
+
|
|
57
|
+
export const PluginAsset = AppCapability.pluginAsset({
|
|
58
|
+
pluginId: meta.profile.key,
|
|
59
|
+
path: 'PLUGIN.mdl',
|
|
60
|
+
content: pluginSpec,
|
|
61
|
+
mimeType: 'application/x-mdl',
|
|
62
|
+
});
|