@dxos/plugin-script 0.11.1 → 0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d
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/dist/lib/Notebook.mjs +33 -0
- package/dist/lib/Notebook.mjs.map +1 -0
- package/dist/lib/ScriptCapabilities.mjs +14 -0
- package/dist/lib/ScriptCapabilities.mjs.map +1 -0
- package/dist/lib/ScriptEvents.mjs +19 -0
- package/dist/lib/ScriptEvents.mjs.map +1 -0
- package/dist/lib/ScriptOperation.mjs +33 -0
- package/dist/lib/ScriptOperation.mjs.map +1 -0
- package/dist/lib/ScriptPlugin.mjs +5 -12
- package/dist/lib/ScriptPlugin.mjs.map +1 -1
- package/dist/lib/ScriptPlugin.node.mjs +4 -4
- package/dist/lib/ScriptPlugin.node.mjs.map +1 -1
- package/dist/lib/ScriptPlugin.workerd.mjs +4 -4
- package/dist/lib/ScriptPlugin.workerd.mjs.map +1 -1
- package/dist/lib/Settings.mjs +13 -0
- package/dist/lib/Settings.mjs.map +1 -0
- package/dist/lib/capabilities/node.mjs +8 -7
- package/dist/lib/capabilities/node.mjs.map +1 -1
- package/dist/lib/capabilities.mjs +24 -8
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/chunk-DeploymentDialog.mjs +1 -1
- package/dist/lib/chunk-DeploymentDialog.mjs.map +1 -1
- package/dist/lib/chunk-NotebookArticle.mjs +13 -11
- package/dist/lib/chunk-NotebookArticle.mjs.map +1 -1
- package/dist/lib/chunk-ScriptArticle.mjs.map +1 -1
- package/dist/lib/chunk-ScriptProperties.mjs +6 -4
- package/dist/lib/chunk-ScriptProperties.mjs.map +1 -1
- package/dist/lib/chunk-ScriptSettings.mjs +2 -2
- package/dist/lib/chunk-ScriptSettings.mjs.map +1 -1
- package/dist/lib/chunk-TestContainer.mjs.map +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +5 -4
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-compiler2.mjs +7 -7
- package/dist/lib/chunk-compiler2.mjs.map +1 -1
- package/dist/lib/chunk-create-object.mjs +15 -12
- package/dist/lib/chunk-create-object.mjs.map +1 -1
- package/dist/lib/chunk-create-script.mjs +3 -2
- package/dist/lib/chunk-create-script.mjs.map +1 -1
- package/dist/lib/chunk-create.mjs +3 -2
- package/dist/lib/chunk-create.mjs.map +1 -1
- package/dist/lib/chunk-delete.mjs +1 -1
- package/dist/lib/chunk-delete.mjs.map +1 -1
- package/dist/lib/chunk-deploy.mjs +3 -3
- package/dist/lib/chunk-deploy.mjs.map +1 -1
- package/dist/lib/chunk-functions.mjs +15 -4
- package/dist/lib/chunk-functions.mjs.map +1 -1
- package/dist/lib/chunk-inspect-invocations.mjs +1 -1
- package/dist/lib/chunk-inspect-invocations.mjs.map +1 -1
- package/dist/lib/chunk-install-function.mjs +2 -2
- package/dist/lib/chunk-install-function.mjs.map +1 -1
- package/dist/lib/chunk-invoke.mjs +2 -2
- package/dist/lib/chunk-invoke.mjs.map +1 -1
- package/dist/lib/chunk-meta.mjs +3 -3
- package/dist/lib/chunk-meta.mjs.map +1 -1
- package/dist/lib/chunk-operation-handler.mjs +4 -3
- package/dist/lib/chunk-operation-handler.mjs.map +1 -1
- package/dist/lib/chunk-query-deployed-functions.mjs +2 -2
- package/dist/lib/chunk-query-deployed-functions.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +9 -7
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-read.mjs +1 -1
- package/dist/lib/chunk-read.mjs.map +1 -1
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/chunk-settings.mjs +7 -6
- package/dist/lib/chunk-settings.mjs.map +1 -1
- package/dist/lib/chunk-skill-definition.mjs +3 -3
- package/dist/lib/chunk-skill-definition.mjs.map +1 -1
- package/dist/lib/chunk-skills.mjs +2 -1
- package/dist/lib/chunk-skills.mjs.map +1 -1
- package/dist/lib/chunk-templates.mjs +6 -6
- package/dist/lib/chunk-update.mjs +1 -1
- package/dist/lib/chunk-update.mjs.map +1 -1
- package/dist/lib/chunk-util.mjs +7 -7
- package/dist/lib/chunk-util.mjs.map +1 -1
- package/dist/lib/components.mjs +3 -2
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/hooks.mjs +12 -9
- package/dist/lib/hooks.mjs.map +1 -1
- package/dist/lib/index.mjs +6 -2
- package/dist/lib/operations.mjs +4 -2
- package/dist/lib/operations.mjs.map +1 -1
- package/dist/lib/plugin.mjs +2 -3
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/testing.mjs +7 -5
- package/dist/lib/testing.mjs.map +1 -1
- package/dist/lib/translations.mjs +3 -3
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/src/ScriptPlugin.d.ts +1 -1
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/ScriptPlugin.node.d.ts +1 -1
- package/dist/types/src/ScriptPlugin.node.d.ts.map +1 -1
- package/dist/types/src/ScriptPlugin.workerd.d.ts +1 -1
- package/dist/types/src/ScriptPlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/ScriptSurfaces.d.ts +3 -3
- package/dist/types/src/capabilities/ScriptSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/compiler.d.ts +2 -2
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +2 -2
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +4 -7
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +2 -3
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +2 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/skill-definition.d.ts +2 -2
- package/dist/types/src/capabilities/skill-definition.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 +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +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/ScriptArticle/ScriptArticle.d.ts +2 -2
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts +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 +1 -1
- package/dist/types/src/containers/ScriptProperties/SkillEditor.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/SkillEditor.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts +1 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.stories.d.ts +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/hooks/deploy.d.ts +2 -1
- 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/index.d.ts +6 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
- package/dist/types/src/operations/create-script.d.ts +2 -2
- package/dist/types/src/operations/create-script.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/plugin.d.ts +1 -2
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/skills/functions/create.d.ts +1 -1
- package/dist/types/src/skills/functions/create.d.ts.map +1 -1
- package/dist/types/src/skills/functions/definitions.d.ts +1 -1
- package/dist/types/src/skills/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/skills/functions/delete.d.ts +1 -1
- package/dist/types/src/skills/functions/delete.d.ts.map +1 -1
- package/dist/types/src/skills/functions/deploy.d.ts +1 -1
- package/dist/types/src/skills/functions/deploy.d.ts.map +1 -1
- 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/inspect-invocations.d.ts +1 -1
- package/dist/types/src/skills/functions/inspect-invocations.d.ts.map +1 -1
- package/dist/types/src/skills/functions/install-function.d.ts +1 -1
- package/dist/types/src/skills/functions/install-function.d.ts.map +1 -1
- package/dist/types/src/skills/functions/invoke.d.ts +1 -1
- package/dist/types/src/skills/functions/invoke.d.ts.map +1 -1
- package/dist/types/src/skills/functions/query-deployed-functions.d.ts +1 -1
- package/dist/types/src/skills/functions/query-deployed-functions.d.ts.map +1 -1
- package/dist/types/src/skills/functions/read.d.ts +1 -1
- package/dist/types/src/skills/functions/read.d.ts.map +1 -1
- package/dist/types/src/skills/functions/update.d.ts +1 -1
- package/dist/types/src/skills/functions/update.d.ts.map +1 -1
- package/dist/types/src/skills/script-skill.d.ts +1 -1
- package/dist/types/src/skills/script-skill.d.ts.map +1 -1
- package/dist/types/src/templates/anthropic.d.ts +1 -1
- package/dist/types/src/templates/anthropic.d.ts.map +1 -1
- package/dist/types/src/templates/chess-bot.d.ts +2 -2
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
- package/dist/types/src/templates/commentary.d.ts +2 -2
- package/dist/types/src/templates/commentary.d.ts.map +1 -1
- package/dist/types/src/templates/forex-effect.d.ts +1 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts +1 -1
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +1 -1
- package/dist/types/src/templates/ping.d.ts.map +1 -1
- package/dist/types/src/testing/test-notebook.d.ts +1 -1
- package/dist/types/src/testing/test-notebook.d.ts.map +1 -1
- package/dist/types/src/testing/test-script.d.ts +1 -1
- package/dist/types/src/testing/test-script.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +2 -2
- 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/ScriptEvents.d.ts +7 -1
- package/dist/types/src/types/ScriptEvents.d.ts.map +1 -1
- package/dist/types/src/types/ScriptOperation.d.ts +2 -1
- package/dist/types/src/types/ScriptOperation.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts +2 -1
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +2 -1
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +1 -1
- package/package.json +115 -82
- package/src/ScriptPlugin.node.ts +8 -8
- package/src/ScriptPlugin.test.ts +3 -6
- package/src/ScriptPlugin.tsx +20 -22
- package/src/ScriptPlugin.workerd.ts +5 -5
- package/src/capabilities/ScriptSurfaces.tsx +5 -3
- package/src/capabilities/app-graph-builder.ts +5 -4
- package/src/capabilities/compiler.ts +3 -4
- package/src/capabilities/create-object.ts +34 -31
- package/src/capabilities/index.ts +28 -11
- package/src/capabilities/node.ts +9 -10
- package/src/capabilities/operation-handler.ts +5 -4
- package/src/capabilities/react-surface.ts +5 -4
- package/src/capabilities/settings.ts +7 -5
- package/src/capabilities/skill-definition.ts +3 -3
- package/src/components/NotebookStack/NotebookCell.tsx +1 -1
- package/src/components/NotebookStack/NotebookMenu.tsx +2 -1
- package/src/components/NotebookStack/NotebookStack.tsx +1 -1
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +1 -1
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +4 -2
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +1 -1
- package/src/containers/NotebookArticle/NotebookArticle.stories.tsx +7 -7
- package/src/containers/NotebookArticle/NotebookArticle.tsx +5 -4
- package/src/containers/ScriptArticle/ScriptArticle.stories.tsx +3 -3
- package/src/containers/ScriptArticle/ScriptArticle.tsx +3 -2
- package/src/containers/ScriptProperties/FunctionBinding.tsx +2 -2
- package/src/containers/ScriptProperties/FunctionPublishing.tsx +5 -3
- package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +3 -3
- package/src/containers/ScriptProperties/ScriptProperties.tsx +1 -1
- package/src/containers/ScriptProperties/SkillEditor.tsx +4 -3
- package/src/containers/ScriptSettings/ScriptSettings.tsx +2 -1
- package/src/containers/TestContainer/TestContainer.tsx +1 -1
- package/src/e2e/ai.test.ts +1 -1
- package/src/hooks/deploy.ts +2 -1
- package/src/hooks/format.ts +1 -1
- package/src/hooks/template.ts +1 -1
- package/src/hooks/useCompiler.ts +2 -3
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +2 -3
- package/src/hooks/useToolbarState.ts +1 -1
- package/src/index.ts +6 -2
- package/src/meta.ts +1 -1
- package/src/notebook/compute-graph.ts +1 -2
- package/src/operations/create-script.ts +3 -2
- package/src/operations/index.ts +7 -2
- package/src/plugin.ts +1 -3
- package/src/skills/functions/create.ts +3 -2
- package/src/skills/functions/definitions.ts +1 -1
- package/src/skills/functions/delete.ts +1 -1
- package/src/skills/functions/deploy.ts +2 -1
- package/src/skills/functions/index.ts +25 -12
- package/src/skills/functions/inspect-invocations.ts +1 -1
- package/src/skills/functions/install-function.ts +1 -1
- package/src/skills/functions/invoke.ts +1 -1
- package/src/skills/functions/query-deployed-functions.ts +1 -1
- package/src/skills/functions/read.ts +2 -1
- package/src/skills/functions/update.ts +2 -1
- package/src/skills/script-skill.ts +2 -1
- package/src/templates/anthropic.ts +1 -1
- package/src/templates/chess-bot.ts +5 -4
- package/src/templates/commentary.ts +8 -6
- package/src/templates/forex-effect.ts +1 -1
- package/src/templates/forex.ts +1 -1
- package/src/templates/ping.ts +1 -1
- package/src/testing/test-notebook.ts +3 -3
- package/src/testing/test-script.ts +2 -1
- package/src/translations.ts +3 -2
- package/src/types/Notebook.ts +2 -2
- package/src/types/ScriptCapabilities.ts +3 -3
- package/src/types/ScriptEvents.ts +8 -1
- package/src/types/ScriptOperation.ts +2 -1
- package/src/util/deploy.ts +2 -1
- package/src/util/functions.ts +2 -1
- package/dist/lib/chunk-types.mjs +0 -90
- package/dist/lib/chunk-types.mjs.map +0 -1
- package/dist/lib/types.mjs +0 -2
- package/dist/types/src/types/index.d.ts +0 -6
- package/dist/types/src/types/index.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -2
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/types/index.ts +0 -10
- package/src/types/types.ts +0 -5
package/dx.config.ts
CHANGED
|
@@ -21,6 +21,6 @@ export default Config2.make({
|
|
|
21
21
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer',
|
|
22
22
|
spec: 'PLUGIN.mdl',
|
|
23
23
|
tags: ['labs'],
|
|
24
|
-
screenshots: [{ dark: 'https://dxos.network/plugin-details-scripts-dark.png' }],
|
|
24
|
+
screenshots: [{ dark: 'https://media.dxos.network/plugin-details-scripts-dark.png' }],
|
|
25
25
|
},
|
|
26
26
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-script",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
4
4
|
"description": "Braneframe notebook plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -68,11 +68,6 @@
|
|
|
68
68
|
"source": "./src/translations.ts",
|
|
69
69
|
"types": "./dist/types/src/translations.d.ts",
|
|
70
70
|
"default": "./dist/lib/translations.mjs"
|
|
71
|
-
},
|
|
72
|
-
"#types": {
|
|
73
|
-
"source": "./src/types/index.ts",
|
|
74
|
-
"types": "./dist/types/src/types/index.d.ts",
|
|
75
|
-
"default": "./dist/lib/types.mjs"
|
|
76
71
|
}
|
|
77
72
|
},
|
|
78
73
|
"exports": {
|
|
@@ -81,22 +76,53 @@
|
|
|
81
76
|
"types": "./dist/types/src/index.d.ts",
|
|
82
77
|
"import": "./dist/lib/index.mjs"
|
|
83
78
|
},
|
|
84
|
-
"./
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
79
|
+
"./Notebook": {
|
|
80
|
+
"source": "./src/types/Notebook.ts",
|
|
81
|
+
"types": "./dist/types/src/types/Notebook.d.ts",
|
|
82
|
+
"import": "./dist/lib/Notebook.mjs"
|
|
83
|
+
},
|
|
84
|
+
"./ScriptCapabilities": {
|
|
85
|
+
"source": "./src/types/ScriptCapabilities.ts",
|
|
86
|
+
"types": "./dist/types/src/types/ScriptCapabilities.d.ts",
|
|
87
|
+
"import": "./dist/lib/ScriptCapabilities.mjs"
|
|
89
88
|
},
|
|
89
|
+
"./ScriptEvents": {
|
|
90
|
+
"source": "./src/types/ScriptEvents.ts",
|
|
91
|
+
"types": "./dist/types/src/types/ScriptEvents.d.ts",
|
|
92
|
+
"import": "./dist/lib/ScriptEvents.mjs"
|
|
93
|
+
},
|
|
94
|
+
"./ScriptOperation": {
|
|
95
|
+
"source": "./src/types/ScriptOperation.ts",
|
|
96
|
+
"types": "./dist/types/src/types/ScriptOperation.d.ts",
|
|
97
|
+
"import": "./dist/lib/ScriptOperation.mjs"
|
|
98
|
+
},
|
|
99
|
+
"./Settings": {
|
|
100
|
+
"source": "./src/types/Settings.ts",
|
|
101
|
+
"types": "./dist/types/src/types/Settings.d.ts",
|
|
102
|
+
"import": "./dist/lib/Settings.mjs"
|
|
103
|
+
},
|
|
104
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
90
105
|
"./containers": {
|
|
91
106
|
"source": "./src/containers/index.ts",
|
|
92
107
|
"types": "./dist/types/src/containers/index.d.ts",
|
|
93
108
|
"import": "./dist/lib/containers.mjs"
|
|
94
109
|
},
|
|
110
|
+
"./operations": {
|
|
111
|
+
"source": "./src/operations/index.ts",
|
|
112
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
113
|
+
"import": "./dist/lib/operations.mjs"
|
|
114
|
+
},
|
|
115
|
+
"./package.json": "./package.json",
|
|
95
116
|
"./plugin": {
|
|
96
117
|
"source": "./src/plugin.ts",
|
|
97
118
|
"types": "./dist/types/src/plugin.d.ts",
|
|
98
119
|
"import": "./dist/lib/plugin.mjs"
|
|
99
120
|
},
|
|
121
|
+
"./skills": {
|
|
122
|
+
"source": "./src/skills/index.ts",
|
|
123
|
+
"types": "./dist/types/src/skills/index.d.ts",
|
|
124
|
+
"import": "./dist/lib/skills.mjs"
|
|
125
|
+
},
|
|
100
126
|
"./templates": {
|
|
101
127
|
"source": "./src/templates/index.ts",
|
|
102
128
|
"types": "./dist/types/src/templates/index.d.ts",
|
|
@@ -106,14 +132,28 @@
|
|
|
106
132
|
"source": "./src/translations.ts",
|
|
107
133
|
"types": "./dist/types/src/translations.d.ts",
|
|
108
134
|
"import": "./dist/lib/translations.mjs"
|
|
109
|
-
},
|
|
110
|
-
"./types": {
|
|
111
|
-
"source": "./src/types/index.ts",
|
|
112
|
-
"types": "./dist/types/src/types/index.d.ts",
|
|
113
|
-
"import": "./dist/lib/types.mjs"
|
|
114
135
|
}
|
|
115
136
|
},
|
|
116
137
|
"types": "dist/types/src/index.d.ts",
|
|
138
|
+
"typesVersions": {
|
|
139
|
+
"*": {
|
|
140
|
+
"Notebook": [
|
|
141
|
+
"dist/types/src/types/Notebook.d.ts"
|
|
142
|
+
],
|
|
143
|
+
"ScriptCapabilities": [
|
|
144
|
+
"dist/types/src/types/ScriptCapabilities.d.ts"
|
|
145
|
+
],
|
|
146
|
+
"ScriptEvents": [
|
|
147
|
+
"dist/types/src/types/ScriptEvents.d.ts"
|
|
148
|
+
],
|
|
149
|
+
"ScriptOperation": [
|
|
150
|
+
"dist/types/src/types/ScriptOperation.d.ts"
|
|
151
|
+
],
|
|
152
|
+
"Settings": [
|
|
153
|
+
"dist/types/src/types/Settings.d.ts"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
},
|
|
117
157
|
"files": [
|
|
118
158
|
"dist",
|
|
119
159
|
"dx.config.ts",
|
|
@@ -130,6 +170,7 @@
|
|
|
130
170
|
"@codemirror/view": "^6.43.6",
|
|
131
171
|
"@effect-atom/atom": "^0.5.3",
|
|
132
172
|
"@effect-atom/atom-react": "^0.5.0",
|
|
173
|
+
"@effect/ai": "0.36.0",
|
|
133
174
|
"@lezer/common": "^1.5.2",
|
|
134
175
|
"@lezer/highlight": "^1.2.3",
|
|
135
176
|
"@octokit/core": "^7.0.6",
|
|
@@ -137,83 +178,75 @@
|
|
|
137
178
|
"@typescript/vfs": "^1.6.0",
|
|
138
179
|
"@valtown/codemirror-continue": "^2.3.1",
|
|
139
180
|
"@valtown/codemirror-ts": "^2.3.1",
|
|
140
|
-
"
|
|
141
|
-
"date-fns": "^3.6.0",
|
|
181
|
+
"chess.js": "^1.0.0",
|
|
142
182
|
"esbuild-wasm": "^0.28.0",
|
|
143
183
|
"prettier": "^3.6.2",
|
|
144
184
|
"typescript": "^6.0.3",
|
|
145
|
-
"@dxos/ai": "0.
|
|
146
|
-
"@dxos/app-framework": "0.
|
|
147
|
-
"@dxos/app-toolkit": "0.
|
|
148
|
-
"@dxos/assistant": "0.
|
|
149
|
-
"@dxos/assistant-toolkit": "0.
|
|
150
|
-
"@dxos/client": "0.
|
|
151
|
-
"@dxos/client-protocol": "0.
|
|
152
|
-
"@dxos/compute": "0.
|
|
153
|
-
"@dxos/compute-runtime": "0.
|
|
154
|
-
"@dxos/config": "0.
|
|
155
|
-
"@dxos/context": "0.
|
|
156
|
-
"@dxos/devtools": "0.
|
|
157
|
-
"@dxos/echo": "0.
|
|
158
|
-
"@dxos/echo-
|
|
159
|
-
"@dxos/echo-doc": "0.
|
|
160
|
-
"@dxos/echo-
|
|
161
|
-
"@dxos/
|
|
162
|
-
"@dxos/
|
|
163
|
-
"@dxos/
|
|
164
|
-
"@dxos/
|
|
165
|
-
"@dxos/
|
|
166
|
-
"@dxos/
|
|
167
|
-
"@dxos/
|
|
168
|
-
"@dxos/
|
|
169
|
-
"@dxos/
|
|
170
|
-
"@dxos/plugin-
|
|
171
|
-
"@dxos/
|
|
172
|
-
"@dxos/
|
|
173
|
-
"@dxos/plugin-
|
|
174
|
-
"@dxos/plugin-
|
|
175
|
-
"@dxos/plugin-
|
|
176
|
-
"@dxos/
|
|
177
|
-
"@dxos/
|
|
178
|
-
"@dxos/react-
|
|
179
|
-
"@dxos/react-ui-
|
|
180
|
-
"@dxos/react-ui-
|
|
181
|
-
"@dxos/react-ui-
|
|
182
|
-
"@dxos/react-ui-
|
|
183
|
-
"@dxos/react-ui-
|
|
184
|
-
"@dxos/react-ui-menu": "0.
|
|
185
|
-
"@dxos/react-ui-
|
|
186
|
-
"@dxos/
|
|
187
|
-
"@dxos/
|
|
188
|
-
"@dxos/
|
|
189
|
-
"@dxos/
|
|
190
|
-
"@dxos/
|
|
191
|
-
"@dxos/ui-editor": "0.11.1",
|
|
192
|
-
"@dxos/types": "0.11.1",
|
|
193
|
-
"@dxos/util": "0.11.1",
|
|
194
|
-
"@dxos/ui": "0.11.1"
|
|
185
|
+
"@dxos/ai": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
186
|
+
"@dxos/app-framework": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
187
|
+
"@dxos/app-toolkit": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
188
|
+
"@dxos/assistant": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
189
|
+
"@dxos/assistant-toolkit": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
190
|
+
"@dxos/client": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
191
|
+
"@dxos/client-protocol": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
192
|
+
"@dxos/compute": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
193
|
+
"@dxos/compute-runtime": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
194
|
+
"@dxos/config": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
195
|
+
"@dxos/context": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
196
|
+
"@dxos/devtools": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
197
|
+
"@dxos/echo": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
198
|
+
"@dxos/echo-query": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
199
|
+
"@dxos/echo-doc": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
200
|
+
"@dxos/echo-react": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
201
|
+
"@dxos/edge-compute": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
202
|
+
"@dxos/halo-react": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
203
|
+
"@dxos/invariant": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
204
|
+
"@dxos/keys": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
205
|
+
"@dxos/link": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
206
|
+
"@dxos/plugin-chess": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
207
|
+
"@dxos/plugin-explorer": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
208
|
+
"@dxos/plugin-client": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
209
|
+
"@dxos/plugin-game": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
210
|
+
"@dxos/plugin-graph": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
211
|
+
"@dxos/effect": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
212
|
+
"@dxos/log": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
213
|
+
"@dxos/plugin-markdown": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
214
|
+
"@dxos/plugin-routine": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
215
|
+
"@dxos/plugin-space": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
216
|
+
"@dxos/protocols": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
217
|
+
"@dxos/react-client": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
218
|
+
"@dxos/react-ui-attention": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
219
|
+
"@dxos/react-ui-components": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
220
|
+
"@dxos/react-ui-dnd": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
221
|
+
"@dxos/react-ui-editor": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
222
|
+
"@dxos/react-ui-form": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
223
|
+
"@dxos/react-ui-mosaic": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
224
|
+
"@dxos/react-ui-menu": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
225
|
+
"@dxos/react-ui-syntax-highlighter": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
226
|
+
"@dxos/schema": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
227
|
+
"@dxos/types": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
228
|
+
"@dxos/ui": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
229
|
+
"@dxos/ui-editor": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
230
|
+
"@dxos/util": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d"
|
|
195
231
|
},
|
|
196
232
|
"devDependencies": {
|
|
197
233
|
"@effect-atom/atom-react": "^0.5.0",
|
|
198
|
-
"@effect/ai": "0.36.0",
|
|
199
|
-
"@effect/ai-anthropic": "0.26.0",
|
|
200
234
|
"@effect/platform": "0.96.2",
|
|
235
|
+
"@storybook/react-vite": "^10.4.2",
|
|
201
236
|
"@types/react": "~19.2.17",
|
|
202
237
|
"@types/react-dom": "~19.2.3",
|
|
203
|
-
"chess.js": "^1.0.0",
|
|
204
238
|
"effect": "3.21.4",
|
|
205
239
|
"react": "~19.2.7",
|
|
206
240
|
"react-dom": "~19.2.7",
|
|
207
241
|
"vite": "^8.1.4",
|
|
208
|
-
"@dxos/config": "0.
|
|
209
|
-
"@dxos/
|
|
210
|
-
"@dxos/plugin-
|
|
211
|
-
"@dxos/
|
|
212
|
-
"@dxos/
|
|
213
|
-
"@dxos/
|
|
214
|
-
"@dxos/
|
|
215
|
-
"@dxos/
|
|
216
|
-
"@dxos/ui-theme": "0.11.1"
|
|
242
|
+
"@dxos/config": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
243
|
+
"@dxos/plugin-routine": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
244
|
+
"@dxos/plugin-testing": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
245
|
+
"@dxos/react-ui": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
246
|
+
"@dxos/ui-theme": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
247
|
+
"@dxos/plugin-assistant": "0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
248
|
+
"@dxos/echo-client": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
249
|
+
"@dxos/functions-simulator-cloudflare": "1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d"
|
|
217
250
|
},
|
|
218
251
|
"peerDependencies": {
|
|
219
252
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -221,8 +254,8 @@
|
|
|
221
254
|
"effect": "3.21.4",
|
|
222
255
|
"react": "~19.2.7",
|
|
223
256
|
"react-dom": "~19.2.7",
|
|
224
|
-
"@dxos/react-ui": "^0.
|
|
225
|
-
"@dxos/ui-theme": "^0.
|
|
257
|
+
"@dxos/react-ui": "^1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d",
|
|
258
|
+
"@dxos/ui-theme": "^1.0.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d"
|
|
226
259
|
},
|
|
227
260
|
"publishConfig": {
|
|
228
261
|
"access": "public"
|
package/src/ScriptPlugin.node.ts
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import * as Plugin from '@dxos/app-framework/Plugin';
|
|
6
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
7
|
+
import * as Script from '@dxos/compute/Script';
|
|
8
8
|
|
|
9
9
|
import { AppGraphBuilder, CreateObject, OperationHandler, SkillDefinition } from '#capabilities';
|
|
10
10
|
import { meta } from '#meta';
|
|
11
11
|
|
|
12
12
|
export const ScriptPlugin = Plugin.define(meta).pipe(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
Plugin.addModule(AppGraphBuilder),
|
|
14
|
+
Plugin.addModule(SkillDefinition),
|
|
15
|
+
Plugin.addModule(CreateObject),
|
|
16
|
+
Plugin.addModule(OperationHandler),
|
|
17
|
+
Plugin.addModule(AppCapability.schema([Script.Script])),
|
|
18
18
|
Plugin.make,
|
|
19
19
|
);
|
|
20
20
|
|
package/src/ScriptPlugin.test.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import { describe, test } from 'vitest';
|
|
6
6
|
|
|
7
|
-
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
8
7
|
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
9
8
|
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
10
9
|
|
|
@@ -20,12 +19,10 @@ describe('ScriptPlugin', () => {
|
|
|
20
19
|
plugins: [ClientPlugin({}), ScriptPlugin()],
|
|
21
20
|
});
|
|
22
21
|
|
|
23
|
-
// After autoStart: AppGraphBuilder, CreateObject, schema all auto-cascade.
|
|
22
|
+
// After autoStart: AppGraphBuilder, CreateObject, schema all auto-cascade. SkillDefinition is a
|
|
23
|
+
// dependency-mode root, so it activates immediately too.
|
|
24
24
|
expect(harness.manager.getActive()).toEqual(
|
|
25
|
-
expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('
|
|
25
|
+
expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('schema')]),
|
|
26
26
|
);
|
|
27
|
-
|
|
28
|
-
await harness.fire(AppActivationEvents.SetupArtifactDefinition);
|
|
29
|
-
expect(harness.manager.getActive()).toContain(moduleId('SkillDefinition'));
|
|
30
27
|
});
|
|
31
28
|
});
|
package/src/ScriptPlugin.tsx
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import * as Plugin from '@dxos/app-framework/Plugin';
|
|
6
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
7
|
+
import * as Script from '@dxos/compute/Script';
|
|
8
8
|
|
|
9
9
|
import {
|
|
10
10
|
AppGraphBuilder,
|
|
@@ -17,30 +17,28 @@ import {
|
|
|
17
17
|
} from '#capabilities';
|
|
18
18
|
import { meta } from '#meta';
|
|
19
19
|
import { translations } from '#translations';
|
|
20
|
-
import { ScriptEvents } from '#types';
|
|
21
20
|
|
|
22
21
|
// eslint-disable-next-line import/no-relative-packages
|
|
23
22
|
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
24
23
|
|
|
25
24
|
export const ScriptPlugin = Plugin.define(meta).pipe(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Plugin.addModule(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}),
|
|
25
|
+
Plugin.addModule(AppGraphBuilder),
|
|
26
|
+
Plugin.addModule(SkillDefinition),
|
|
27
|
+
Plugin.addModule(CreateObject),
|
|
28
|
+
Plugin.addModule(OperationHandler),
|
|
29
|
+
Plugin.addModule(AppCapability.schema([Script.Script])),
|
|
30
|
+
Plugin.addModule(ReactSurface),
|
|
31
|
+
Plugin.addModule(AppCapability.translations(translations)),
|
|
32
|
+
Plugin.addModule(ScriptSettings),
|
|
33
|
+
Plugin.addModule(Compiler),
|
|
34
|
+
Plugin.addModule(
|
|
35
|
+
AppCapability.pluginAsset({
|
|
36
|
+
pluginId: meta.profile.key,
|
|
37
|
+
path: 'PLUGIN.mdl',
|
|
38
|
+
content: pluginSpec,
|
|
39
|
+
mimeType: 'application/x-mdl',
|
|
40
|
+
}),
|
|
41
|
+
),
|
|
44
42
|
Plugin.make,
|
|
45
43
|
);
|
|
46
44
|
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import * as Plugin from '@dxos/app-framework/Plugin';
|
|
6
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
7
|
+
import * as Script from '@dxos/compute/Script';
|
|
8
8
|
|
|
9
9
|
import { OperationHandler } from '#capabilities';
|
|
10
10
|
import { meta } from '#meta';
|
|
11
11
|
|
|
12
12
|
export const ScriptPlugin = Plugin.define(meta).pipe(
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Plugin.addModule(OperationHandler),
|
|
14
|
+
Plugin.addModule(AppCapability.schema([Script.Script])),
|
|
15
15
|
Plugin.make,
|
|
16
16
|
);
|
|
17
17
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
|
|
9
9
|
import { useAtomCapability, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import type * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
11
|
+
import type * as Script from '@dxos/compute/Script';
|
|
12
12
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
13
13
|
import { Feed } from '@dxos/echo';
|
|
14
14
|
import { useClient } from '@dxos/react-client';
|
|
@@ -17,8 +17,10 @@ import { Panel } from '@dxos/react-ui';
|
|
|
17
17
|
|
|
18
18
|
import { NotebookArticle, ScriptArticle, ScriptSettings } from '#containers';
|
|
19
19
|
import { useCompiler } from '#hooks';
|
|
20
|
-
import { type Notebook, ScriptCapabilities, type Settings } from '#types';
|
|
21
20
|
|
|
21
|
+
import * as Notebook from '../types/Notebook';
|
|
22
|
+
import * as ScriptCapabilities from '../types/ScriptCapabilities';
|
|
23
|
+
import * as Settings from '../types/Settings';
|
|
22
24
|
import { getAccessCredential } from '../util';
|
|
23
25
|
|
|
24
26
|
export type ScriptSettingsSurfaceProps = {
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
8
|
+
import * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
9
|
+
import * as AppNode from '@dxos/app-toolkit/AppNode';
|
|
10
|
+
import * as Script from '@dxos/compute/Script';
|
|
10
11
|
import { GraphBuilder } from '@dxos/plugin-graph';
|
|
11
12
|
|
|
12
13
|
import { meta } from '#meta';
|
|
@@ -42,6 +43,6 @@ export default Capability.makeModule(
|
|
|
42
43
|
}),
|
|
43
44
|
]);
|
|
44
45
|
|
|
45
|
-
return Capability.
|
|
46
|
+
return Capability.contribute(AppCapabilities.AppGraphBuilder, extensions);
|
|
46
47
|
}),
|
|
47
48
|
);
|
|
@@ -10,14 +10,13 @@ import * as Schema from 'effect/Schema';
|
|
|
10
10
|
import wasmUrl from 'esbuild-wasm/esbuild.wasm?url';
|
|
11
11
|
import * as ts from 'typescript';
|
|
12
12
|
|
|
13
|
-
import
|
|
13
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
14
14
|
import { initializeBundler } from '@dxos/edge-compute/bundler';
|
|
15
15
|
import { log } from '@dxos/log';
|
|
16
16
|
import { trim } from '@dxos/util';
|
|
17
17
|
|
|
18
|
-
import { ScriptCapabilities } from '#types';
|
|
19
|
-
|
|
20
18
|
import { Compiler } from '../compiler';
|
|
19
|
+
import * as ScriptCapabilities from '../types/ScriptCapabilities';
|
|
21
20
|
|
|
22
21
|
// TODO(burdon): Document.
|
|
23
22
|
const SCRIPT_PACKAGES_BUCKET = 'https://pub-5745ae82e450484aa28f75fc6a175935.r2.dev/dev/';
|
|
@@ -59,7 +58,7 @@ export default Capability.makeModule(() =>
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
|
|
62
|
-
return Capability.
|
|
61
|
+
return Capability.contribute(ScriptCapabilities.Compiler, compiler);
|
|
63
62
|
}),
|
|
64
63
|
);
|
|
65
64
|
|
|
@@ -4,44 +4,47 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
8
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
9
|
+
import * as Script from '@dxos/compute/Script';
|
|
9
10
|
import { Type } from '@dxos/echo';
|
|
10
11
|
import { SpaceOperation } from '@dxos/plugin-space';
|
|
11
|
-
import
|
|
12
|
+
import * as SpaceCapabilities from '@dxos/plugin-space/SpaceCapabilities';
|
|
12
13
|
|
|
13
|
-
import
|
|
14
|
-
import
|
|
14
|
+
import * as Notebook from '../types/Notebook';
|
|
15
|
+
import * as ScriptOperation from '../types/ScriptOperation';
|
|
15
16
|
|
|
16
17
|
export default Capability.makeModule(
|
|
17
18
|
Effect.fnUntraced(function* () {
|
|
18
19
|
return [
|
|
19
|
-
Capability.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
20
|
+
Capability.contributeAll(SpaceCapabilities.CreateObjectEntry, [
|
|
21
|
+
{
|
|
22
|
+
id: Type.getTypename(Script.Script),
|
|
23
|
+
inputSchema: ScriptOperation.ScriptProps,
|
|
24
|
+
createObject: (props, options) =>
|
|
25
|
+
Effect.gen(function* () {
|
|
26
|
+
const { object } = yield* Operation.invoke(ScriptOperation.CreateScript, props);
|
|
27
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
28
|
+
object,
|
|
29
|
+
target: options.target,
|
|
30
|
+
targetNodeId: options.targetNodeId,
|
|
31
|
+
});
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: Type.getTypename(Notebook.Notebook),
|
|
36
|
+
inputSchema: ScriptOperation.NotebookProps,
|
|
37
|
+
createObject: (props, options) =>
|
|
38
|
+
Effect.gen(function* () {
|
|
39
|
+
const object = Notebook.make(props);
|
|
40
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
41
|
+
object,
|
|
42
|
+
target: options.target,
|
|
43
|
+
targetNodeId: options.targetNodeId,
|
|
44
|
+
});
|
|
45
|
+
}),
|
|
46
|
+
},
|
|
47
|
+
]),
|
|
45
48
|
];
|
|
46
49
|
}),
|
|
47
50
|
);
|
|
@@ -2,16 +2,33 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import * as ActivationEvents from '@dxos/app-framework/ActivationEvents';
|
|
6
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
7
|
+
import * as AppCapability from '@dxos/app-toolkit/AppCapability';
|
|
8
|
+
import * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
import * as ScriptCapabilities from '../types/ScriptCapabilities';
|
|
11
|
+
import * as ScriptEvents from '../types/ScriptEvents';
|
|
12
|
+
|
|
13
|
+
export const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder'));
|
|
14
|
+
export const SkillDefinition = AppCapability.skillDefinition(() => import('./skill-definition'));
|
|
15
|
+
export const CreateObject = SpaceCapability.createObject(() => import('./create-object'));
|
|
16
|
+
export const Compiler = Capability.lazyModule(
|
|
17
|
+
'Compiler',
|
|
18
|
+
{
|
|
19
|
+
provides: [ScriptCapabilities.Compiler],
|
|
20
|
+
// Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.
|
|
21
|
+
activatesOn: ScriptEvents.SetupCompiler,
|
|
22
|
+
},
|
|
23
|
+
() => import('./compiler'),
|
|
15
24
|
);
|
|
16
|
-
export const
|
|
17
|
-
|
|
25
|
+
export const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler'), {
|
|
26
|
+
activatesOn: ActivationEvents.Idle,
|
|
27
|
+
});
|
|
28
|
+
export const ReactSurface = AppCapability.surface(() => import('./react-surface'), {
|
|
29
|
+
roles: ['org.dxos.role.article', 'org.dxos.role.dialog', 'org.dxos.role.objectProperties', 'org.dxos.role.section'],
|
|
30
|
+
});
|
|
31
|
+
export const ScriptSettings = AppCapability.settings(() => import('./settings'), {
|
|
32
|
+
activatesOn: ActivationEvents.Idle,
|
|
33
|
+
provides: [ScriptCapabilities.Settings],
|
|
34
|
+
});
|