@dxos/plugin-script 0.8.4-main.3fbcb4aa9b → 0.8.4-main.43cb759274
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/PLUGIN.mdl +515 -0
- package/dist/lib/neutral/{DeploymentDialog-6DBF3V6C.mjs → DeploymentDialog-M3AFYQHC.mjs} +4 -2
- package/dist/lib/neutral/{DeploymentDialog-6DBF3V6C.mjs.map → DeploymentDialog-M3AFYQHC.mjs.map} +3 -3
- package/dist/lib/neutral/{NotebookContainer-FIAQI3A2.mjs → NotebookArticle-NV4AHOOS.mjs} +15 -12
- package/dist/lib/neutral/NotebookArticle-NV4AHOOS.mjs.map +7 -0
- package/dist/lib/neutral/{ScriptContainer-2OPBAXFB.mjs → ScriptArticle-UBT27SB6.mjs} +4 -4
- package/dist/lib/neutral/{ScriptContainer-2OPBAXFB.mjs.map → ScriptArticle-UBT27SB6.mjs.map} +4 -4
- package/dist/lib/neutral/ScriptPlugin.mjs +12 -0
- package/dist/lib/neutral/ScriptPlugin.mjs.map +4 -4
- package/dist/lib/neutral/ScriptPlugin.workerd.mjs +21 -0
- package/dist/lib/neutral/ScriptPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/{ScriptProperties-F6NE6M4H.mjs → ScriptProperties-RLXNAN3N.mjs} +9 -8
- package/dist/lib/neutral/ScriptProperties-RLXNAN3N.mjs.map +7 -0
- package/dist/lib/neutral/{TestContainer-JNFPLAJX.mjs → TestContainer-AFVTBYSJ.mjs} +5 -5
- package/dist/lib/neutral/TestContainer-AFVTBYSJ.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +3 -3
- package/dist/lib/neutral/capabilities/index.mjs +4 -4
- package/dist/lib/neutral/capabilities/node.mjs +3 -3
- package/dist/lib/neutral/{chunk-D7DFASAE.mjs → chunk-2REUEDUA.mjs} +8 -4
- package/dist/lib/neutral/chunk-2REUEDUA.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BDRB6ZX2.mjs → chunk-BDHDBPVM.mjs} +2 -2
- package/dist/lib/neutral/{chunk-PDB6UOSB.mjs → chunk-C4O7EV6M.mjs} +11 -13
- 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-B4FVQEHV.mjs → chunk-LHEJXJEL.mjs} +2 -2
- package/dist/lib/neutral/{chunk-B4FVQEHV.mjs.map → chunk-LHEJXJEL.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-NQOIENTU.mjs +8 -0
- package/dist/lib/neutral/{chunk-MI6X5CTJ.mjs → chunk-TRKXIP2Q.mjs} +30 -21
- package/dist/lib/neutral/chunk-TRKXIP2Q.mjs.map +7 -0
- package/dist/lib/neutral/chunk-UA3BWOCZ.mjs +38 -0
- package/dist/lib/neutral/chunk-UA3BWOCZ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-4RJALG6K.mjs → chunk-VXDJH6OL.mjs} +9 -10
- package/dist/lib/neutral/chunk-VXDJH6OL.mjs.map +7 -0
- package/dist/lib/neutral/{compiler-SMVIP5UN.mjs → compiler-ODK4UA2N.mjs} +2 -2
- package/dist/lib/neutral/components/index.mjs +93 -148
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/containers/index.mjs +7 -7
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-OZRIZ7RN.mjs → create-WQJXMOUE.mjs} +7 -5
- package/dist/lib/neutral/create-WQJXMOUE.mjs.map +7 -0
- package/dist/lib/neutral/{create-object-F2NWICFV.mjs → create-object-FZM5ASWM.mjs} +4 -3
- package/dist/lib/neutral/create-object-FZM5ASWM.mjs.map +7 -0
- package/dist/lib/neutral/{create-script-VBA3SLSU.mjs → create-script-66DO3UJO.mjs} +3 -3
- package/dist/lib/neutral/{delete-PAUWA2QM.mjs → delete-HCQIQFVP.mjs} +2 -2
- package/dist/lib/neutral/{deploy-CXVW54JJ.mjs → deploy-7JVMMHSH.mjs} +6 -5
- package/dist/lib/neutral/{deploy-CXVW54JJ.mjs.map → deploy-7JVMMHSH.mjs.map} +3 -3
- package/dist/lib/neutral/hooks/index.mjs +2 -2
- package/dist/lib/neutral/index.mjs +7 -7
- package/dist/lib/neutral/{inspect-invocations-LEOEP5I2.mjs → inspect-invocations-6MW73SDV.mjs} +3 -3
- package/dist/lib/neutral/{inspect-invocations-LEOEP5I2.mjs.map → inspect-invocations-6MW73SDV.mjs.map} +3 -3
- package/dist/lib/neutral/{install-function-5N24Q45W.mjs → install-function-FJIE2JAI.mjs} +7 -9
- package/dist/lib/neutral/install-function-FJIE2JAI.mjs.map +7 -0
- package/dist/lib/neutral/{invoke-5QVEZ3X5.mjs → invoke-3HVWY2KF.mjs} +7 -8
- package/dist/lib/neutral/invoke-3HVWY2KF.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{operation-handler-OTCWYDFI.mjs → operation-handler-X44IGZXS.mjs} +3 -3
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +2 -2
- package/dist/lib/neutral/{query-deployed-functions-FVD7NYPA.mjs → query-deployed-functions-F4FHJNWO.mjs} +14 -10
- package/dist/lib/neutral/query-deployed-functions-F4FHJNWO.mjs.map +7 -0
- package/dist/lib/neutral/{react-surface-JH2AOK7V.mjs → react-surface-ACNZ35FV.mjs} +17 -13
- package/dist/lib/neutral/react-surface-ACNZ35FV.mjs.map +7 -0
- package/dist/lib/neutral/{read-FFOSK6A3.mjs → read-RQESBAQI.mjs} +2 -2
- package/dist/lib/neutral/templates/index.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +3 -2
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +2 -2
- package/dist/lib/neutral/{update-PJS5GG3Y.mjs → update-JZUNJYZM.mjs} +3 -3
- package/dist/lib/neutral/{update-PJS5GG3Y.mjs.map → update-JZUNJYZM.mjs.map} +3 -3
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/types/src/blueprints/functions/definitions.d.ts +24 -30
- package/dist/types/src/blueprints/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/blueprints/functions/delete.d.ts +4 -5
- package/dist/types/src/blueprints/functions/deploy.d.ts +4 -5
- package/dist/types/src/blueprints/functions/inspect-invocations.d.ts +4 -5
- package/dist/types/src/blueprints/functions/invoke.d.ts +5 -6
- package/dist/types/src/blueprints/functions/invoke.d.ts.map +1 -1
- package/dist/types/src/blueprints/functions/read.d.ts +4 -5
- package/dist/types/src/blueprints/functions/update.d.ts +4 -5
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -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/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/{ScriptContainer → NotebookArticle}/index.d.ts.map +1 -1
- package/dist/types/src/containers/{ScriptContainer/ScriptContainer.d.ts → ScriptArticle/ScriptArticle.d.ts} +2 -2
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{ScriptContainer/ScriptContainer.stories.d.ts → ScriptArticle/ScriptArticle.stories.d.ts} +1 -1
- 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.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +2 -2
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/deploy.d.ts +5 -6
- package/dist/types/src/hooks/deploy.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/operations/index.d.ts.map +1 -1
- package/dist/types/src/templates/chess-bot.d.ts +4 -2
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
- package/dist/types/src/templates/commentary.d.ts +6 -4
- package/dist/types/src/templates/commentary.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +0 -5
- package/dist/types/src/templates/index.d.ts.map +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 +28 -47
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/ScriptOperation.d.ts +6 -6
- package/dist/types/src/types/ScriptOperation.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +90 -90
- package/src/ScriptPlugin.tsx +6 -0
- package/src/ScriptPlugin.workerd.ts +18 -0
- package/src/blueprints/functions/create.ts +3 -3
- package/src/blueprints/functions/definitions.ts +20 -11
- package/src/blueprints/functions/deploy.ts +3 -2
- package/src/blueprints/functions/inspect-invocations.ts +1 -1
- package/src/blueprints/functions/install-function.ts +5 -5
- package/src/blueprints/functions/invoke.ts +4 -5
- package/src/blueprints/functions/query-deployed-functions.ts +11 -7
- package/src/blueprints/functions/update.ts +1 -1
- package/src/capabilities/create-object.ts +3 -2
- package/src/capabilities/react-surface.tsx +6 -6
- package/src/compiler/compiler.ts +4 -0
- package/src/components/NotebookStack/NotebookCell.tsx +2 -2
- package/src/components/NotebookStack/NotebookStack.stories.tsx +2 -2
- package/src/components/NotebookStack/NotebookStack.tsx +1 -1
- package/src/components/QueryEditor/QueryEditor.tsx +3 -1
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +3 -3
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +1 -1
- package/src/components/TestPanel/TestPanel.tsx +2 -1
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +1 -1
- package/src/components/index.ts +0 -1
- package/src/constants.ts +3 -1
- package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +3 -3
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +1 -1
- package/src/containers/{NotebookContainer/NotebookContainer.stories.tsx → NotebookArticle/NotebookArticle.stories.tsx} +10 -10
- package/src/containers/{NotebookContainer/NotebookContainer.tsx → NotebookArticle/NotebookArticle.tsx} +10 -9
- package/src/containers/NotebookArticle/index.ts +5 -0
- package/src/containers/{ScriptContainer/ScriptContainer.stories.tsx → ScriptArticle/ScriptArticle.stories.tsx} +6 -5
- package/src/containers/{ScriptContainer/ScriptContainer.tsx → ScriptArticle/ScriptArticle.tsx} +1 -1
- package/src/containers/ScriptArticle/index.ts +5 -0
- package/src/containers/ScriptProperties/BlueprintEditor.tsx +8 -7
- package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +3 -2
- package/src/containers/TestContainer/TestContainer.tsx +4 -4
- package/src/containers/index.ts +2 -2
- package/src/meta.ts +13 -7
- package/src/operations/index.ts +1 -4
- package/src/templates/anthropic.ts +2 -1
- package/src/templates/chess-bot.ts +2 -2
- package/src/templates/commentary.ts +19 -17
- package/src/templates/data-generator.ts +1 -1
- package/src/templates/discord.ts +5 -5
- package/src/templates/forex-effect.ts +2 -1
- package/src/templates/forex.ts +2 -1
- package/src/templates/gmail.ts +5 -5
- package/src/templates/index.ts +0 -7
- package/src/templates/ping.ts +2 -1
- package/src/testing/test-notebook.ts +2 -2
- package/src/testing/test-script.ts +1 -2
- package/src/translations.ts +3 -2
- package/src/types/Notebook.ts +5 -11
- package/src/types/ScriptOperation.ts +4 -4
- package/src/util/deploy.ts +1 -1
- package/src/util/functions.ts +4 -4
- package/src/vite-env.d.ts +5 -0
- package/dist/lib/neutral/NotebookContainer-FIAQI3A2.mjs.map +0 -7
- package/dist/lib/neutral/ScriptProperties-F6NE6M4H.mjs.map +0 -7
- package/dist/lib/neutral/TestContainer-JNFPLAJX.mjs.map +0 -7
- package/dist/lib/neutral/access-token-created-ENMCEGVU.mjs +0 -34
- package/dist/lib/neutral/access-token-created-ENMCEGVU.mjs.map +0 -7
- package/dist/lib/neutral/chunk-2DMPFVUM.mjs +0 -8
- package/dist/lib/neutral/chunk-4RJALG6K.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BUKQITZT.mjs +0 -105
- package/dist/lib/neutral/chunk-BUKQITZT.mjs.map +0 -7
- package/dist/lib/neutral/chunk-D7DFASAE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MI6X5CTJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-P2F3STZN.mjs +0 -8
- package/dist/lib/neutral/chunk-P2F3STZN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-PDB6UOSB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-UYR3YH4Q.mjs +0 -31
- package/dist/lib/neutral/chunk-UYR3YH4Q.mjs.map +0 -7
- package/dist/lib/neutral/create-OZRIZ7RN.mjs.map +0 -7
- package/dist/lib/neutral/create-object-F2NWICFV.mjs.map +0 -7
- package/dist/lib/neutral/install-function-5N24Q45W.mjs.map +0 -7
- package/dist/lib/neutral/invoke-5QVEZ3X5.mjs.map +0 -7
- package/dist/lib/neutral/query-deployed-functions-FVD7NYPA.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-JH2AOK7V.mjs.map +0 -7
- package/dist/types/src/capabilities/artifact-definition.d.ts +0 -12
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/components/FramePanel/FramePanel.d.ts +0 -12
- package/dist/types/src/components/FramePanel/FramePanel.d.ts.map +0 -1
- package/dist/types/src/components/FramePanel/index.d.ts +0 -2
- package/dist/types/src/components/FramePanel/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 -2
- package/dist/types/src/containers/NotebookContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptContainer/index.d.ts +0 -2
- package/dist/types/src/operations/access-token-created.d.ts +0 -5
- package/dist/types/src/operations/access-token-created.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/src/capabilities/artifact-definition.ts +0 -226
- package/src/components/FramePanel/FramePanel.tsx +0 -85
- package/src/components/FramePanel/index.ts +0 -5
- package/src/containers/NotebookContainer/index.ts +0 -5
- package/src/containers/ScriptContainer/index.ts +0 -5
- package/src/operations/access-token-created.ts +0 -37
- package/src/templates/chat.ts +0 -96
- /package/dist/lib/neutral/{chunk-BDRB6ZX2.mjs.map → chunk-BDHDBPVM.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-2DMPFVUM.mjs.map → chunk-NQOIENTU.mjs.map} +0 -0
- /package/dist/lib/neutral/{compiler-SMVIP5UN.mjs.map → compiler-ODK4UA2N.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-script-VBA3SLSU.mjs.map → create-script-66DO3UJO.mjs.map} +0 -0
- /package/dist/lib/neutral/{delete-PAUWA2QM.mjs.map → delete-HCQIQFVP.mjs.map} +0 -0
- /package/dist/lib/neutral/{operation-handler-OTCWYDFI.mjs.map → operation-handler-X44IGZXS.mjs.map} +0 -0
- /package/dist/lib/neutral/{read-FFOSK6A3.mjs.map → read-RQESBAQI.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-script",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.43cb759274",
|
|
4
4
|
"description": "Braneframe notebook plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
@@ -54,10 +54,12 @@
|
|
|
54
54
|
},
|
|
55
55
|
"#plugin": {
|
|
56
56
|
"source": {
|
|
57
|
+
"workerd": "./src/ScriptPlugin.workerd.ts",
|
|
57
58
|
"node": "./src/ScriptPlugin.node.ts",
|
|
58
59
|
"default": "./src/ScriptPlugin.tsx"
|
|
59
60
|
},
|
|
60
61
|
"types": "./dist/types/src/ScriptPlugin.d.ts",
|
|
62
|
+
"workerd": "./dist/lib/neutral/ScriptPlugin.workerd.mjs",
|
|
61
63
|
"node": "./dist/lib/neutral/ScriptPlugin.node.mjs",
|
|
62
64
|
"default": "./dist/lib/neutral/ScriptPlugin.mjs"
|
|
63
65
|
},
|
|
@@ -79,6 +81,12 @@
|
|
|
79
81
|
"types": "./dist/types/src/index.d.ts",
|
|
80
82
|
"default": "./dist/lib/neutral/index.mjs"
|
|
81
83
|
},
|
|
84
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
85
|
+
"./blueprints": {
|
|
86
|
+
"source": "./src/blueprints/index.ts",
|
|
87
|
+
"types": "./dist/types/src/blueprints/index.d.ts",
|
|
88
|
+
"default": "./dist/lib/neutral/blueprints/index.mjs"
|
|
89
|
+
},
|
|
82
90
|
"./containers": {
|
|
83
91
|
"source": "./src/containers/index.ts",
|
|
84
92
|
"types": "./dist/types/src/containers/index.d.ts",
|
|
@@ -98,123 +106,115 @@
|
|
|
98
106
|
"source": "./src/translations.ts",
|
|
99
107
|
"types": "./dist/types/src/translations.d.ts",
|
|
100
108
|
"default": "./dist/lib/neutral/translations.mjs"
|
|
109
|
+
},
|
|
110
|
+
"./types": {
|
|
111
|
+
"source": "./src/types/index.ts",
|
|
112
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
113
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
101
114
|
}
|
|
102
115
|
},
|
|
103
116
|
"types": "dist/types/src/index.d.ts",
|
|
104
117
|
"files": [
|
|
105
118
|
"dist",
|
|
106
|
-
"src"
|
|
119
|
+
"src",
|
|
120
|
+
"PLUGIN.mdl"
|
|
107
121
|
],
|
|
108
122
|
"dependencies": {
|
|
109
|
-
"@automerge/automerge": "3.
|
|
110
|
-
"@codemirror/autocomplete": "^6.
|
|
111
|
-
"@codemirror/lang-javascript": "^6.2.
|
|
112
|
-
"@codemirror/language": "^6.
|
|
113
|
-
"@codemirror/lint": "6.
|
|
114
|
-
"@codemirror/state": "^6.
|
|
115
|
-
"@codemirror/
|
|
116
|
-
"@codemirror/view": "^6.38.5",
|
|
117
|
-
"@effect-atom/atom": "^0.5.1",
|
|
123
|
+
"@automerge/automerge": "3.3.0-fragments.1",
|
|
124
|
+
"@codemirror/autocomplete": "^6.20.2",
|
|
125
|
+
"@codemirror/lang-javascript": "^6.2.5",
|
|
126
|
+
"@codemirror/language": "^6.12.3",
|
|
127
|
+
"@codemirror/lint": "6.9.6",
|
|
128
|
+
"@codemirror/state": "^6.6.0",
|
|
129
|
+
"@codemirror/view": "^6.43.0",
|
|
118
130
|
"@effect-atom/atom-react": "^0.5.0",
|
|
119
|
-
"@lezer/common": "^1.
|
|
120
|
-
"@lezer/highlight": "^1.2.
|
|
131
|
+
"@lezer/common": "^1.5.2",
|
|
132
|
+
"@lezer/highlight": "^1.2.3",
|
|
121
133
|
"@octokit/core": "^7.0.6",
|
|
122
134
|
"@radix-ui/react-compose-refs": "1.1.1",
|
|
123
135
|
"@typescript/vfs": "^1.6.0",
|
|
124
136
|
"@valtown/codemirror-continue": "^2.3.1",
|
|
125
137
|
"@valtown/codemirror-ts": "^2.3.1",
|
|
126
|
-
"codemirror": "^6.0.
|
|
138
|
+
"codemirror": "^6.0.2",
|
|
127
139
|
"date-fns": "^3.6.0",
|
|
128
|
-
"esbuild-wasm": "^0.
|
|
140
|
+
"esbuild-wasm": "^0.28.0",
|
|
129
141
|
"prettier": "^3.6.2",
|
|
130
|
-
"react-syntax-highlighter": "^15.6.1",
|
|
131
142
|
"typescript": "^6.0.3",
|
|
132
|
-
"@dxos/ai": "0.8.4-main.
|
|
133
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
134
|
-
"@dxos/app-toolkit": "0.8.4-main.
|
|
135
|
-
"@dxos/
|
|
136
|
-
"@dxos/assistant-toolkit": "0.8.4-main.
|
|
137
|
-
"@dxos/
|
|
138
|
-
"@dxos/client-protocol": "0.8.4-main.
|
|
139
|
-
"@dxos/
|
|
140
|
-
"@dxos/
|
|
141
|
-
"@dxos/
|
|
142
|
-
"@dxos/
|
|
143
|
-
"@dxos/
|
|
144
|
-
"@dxos/
|
|
145
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
146
|
-
"@dxos/
|
|
147
|
-
"@dxos/
|
|
148
|
-
"@dxos/
|
|
149
|
-
"@dxos/
|
|
150
|
-
"@dxos/
|
|
151
|
-
"@dxos/
|
|
152
|
-
"@dxos/
|
|
153
|
-
"@dxos/
|
|
154
|
-
"@dxos/
|
|
155
|
-
"@dxos/plugin-
|
|
156
|
-
"@dxos/plugin-automation": "0.8.4-main.
|
|
157
|
-
"@dxos/
|
|
158
|
-
"@dxos/plugin-
|
|
159
|
-
"@dxos/
|
|
160
|
-
"@dxos/
|
|
161
|
-
"@dxos/plugin-
|
|
162
|
-
"@dxos/
|
|
163
|
-
"@dxos/
|
|
164
|
-
"@dxos/
|
|
165
|
-
"@dxos/
|
|
166
|
-
"@dxos/plugin-
|
|
167
|
-
"@dxos/
|
|
168
|
-
"@dxos/
|
|
169
|
-
"@dxos/
|
|
170
|
-
"@dxos/
|
|
171
|
-
"@dxos/
|
|
172
|
-
"@dxos/
|
|
173
|
-
"@dxos/
|
|
174
|
-
"@dxos/
|
|
175
|
-
"@dxos/react-ui-menu": "0.8.4-main.
|
|
176
|
-
"@dxos/react-ui-
|
|
177
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.3fbcb4aa9b",
|
|
178
|
-
"@dxos/react-ui-stack": "0.8.4-main.3fbcb4aa9b",
|
|
179
|
-
"@dxos/rpc": "0.8.4-main.3fbcb4aa9b",
|
|
180
|
-
"@dxos/rpc-tunnel": "0.8.4-main.3fbcb4aa9b",
|
|
181
|
-
"@dxos/schema": "0.8.4-main.3fbcb4aa9b",
|
|
182
|
-
"@dxos/ui": "0.8.4-main.3fbcb4aa9b",
|
|
183
|
-
"@dxos/util": "0.8.4-main.3fbcb4aa9b",
|
|
184
|
-
"@dxos/types": "0.8.4-main.3fbcb4aa9b",
|
|
185
|
-
"@dxos/vendor-quickjs": "0.8.4-main.3fbcb4aa9b",
|
|
186
|
-
"@dxos/react-ui-editor": "0.8.4-main.3fbcb4aa9b",
|
|
187
|
-
"@dxos/ui-editor": "0.8.4-main.3fbcb4aa9b"
|
|
143
|
+
"@dxos/ai": "0.8.4-main.43cb759274",
|
|
144
|
+
"@dxos/app-framework": "0.8.4-main.43cb759274",
|
|
145
|
+
"@dxos/app-toolkit": "0.8.4-main.43cb759274",
|
|
146
|
+
"@dxos/client": "0.8.4-main.43cb759274",
|
|
147
|
+
"@dxos/assistant-toolkit": "0.8.4-main.43cb759274",
|
|
148
|
+
"@dxos/assistant": "0.8.4-main.43cb759274",
|
|
149
|
+
"@dxos/client-protocol": "0.8.4-main.43cb759274",
|
|
150
|
+
"@dxos/config": "0.8.4-main.43cb759274",
|
|
151
|
+
"@dxos/context": "0.8.4-main.43cb759274",
|
|
152
|
+
"@dxos/compute": "0.8.4-main.43cb759274",
|
|
153
|
+
"@dxos/devtools": "0.8.4-main.43cb759274",
|
|
154
|
+
"@dxos/echo": "0.8.4-main.43cb759274",
|
|
155
|
+
"@dxos/echo-query": "0.8.4-main.43cb759274",
|
|
156
|
+
"@dxos/echo-db": "0.8.4-main.43cb759274",
|
|
157
|
+
"@dxos/effect": "0.8.4-main.43cb759274",
|
|
158
|
+
"@dxos/functions": "0.8.4-main.43cb759274",
|
|
159
|
+
"@dxos/functions-runtime": "0.8.4-main.43cb759274",
|
|
160
|
+
"@dxos/functions-simulator-cloudflare": "0.8.4-main.43cb759274",
|
|
161
|
+
"@dxos/invariant": "0.8.4-main.43cb759274",
|
|
162
|
+
"@dxos/keys": "0.8.4-main.43cb759274",
|
|
163
|
+
"@dxos/log": "0.8.4-main.43cb759274",
|
|
164
|
+
"@dxos/plugin-assistant": "0.8.4-main.43cb759274",
|
|
165
|
+
"@dxos/plugin-client": "0.8.4-main.43cb759274",
|
|
166
|
+
"@dxos/plugin-game": "0.8.4-main.43cb759274",
|
|
167
|
+
"@dxos/plugin-automation": "0.8.4-main.43cb759274",
|
|
168
|
+
"@dxos/plugin-graph": "0.8.4-main.43cb759274",
|
|
169
|
+
"@dxos/plugin-markdown": "0.8.4-main.43cb759274",
|
|
170
|
+
"@dxos/react-client": "0.8.4-main.43cb759274",
|
|
171
|
+
"@dxos/react-ui-attention": "0.8.4-main.43cb759274",
|
|
172
|
+
"@dxos/plugin-space": "0.8.4-main.43cb759274",
|
|
173
|
+
"@dxos/react-ui-components": "0.8.4-main.43cb759274",
|
|
174
|
+
"@dxos/protocols": "0.8.4-main.43cb759274",
|
|
175
|
+
"@dxos/react-ui-editor": "0.8.4-main.43cb759274",
|
|
176
|
+
"@dxos/react-ui-stack": "0.8.4-main.43cb759274",
|
|
177
|
+
"@dxos/plugin-explorer": "0.8.4-main.43cb759274",
|
|
178
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.43cb759274",
|
|
179
|
+
"@dxos/rpc": "0.8.4-main.43cb759274",
|
|
180
|
+
"@dxos/rpc-tunnel": "0.8.4-main.43cb759274",
|
|
181
|
+
"@dxos/types": "0.8.4-main.43cb759274",
|
|
182
|
+
"@dxos/schema": "0.8.4-main.43cb759274",
|
|
183
|
+
"@dxos/ui": "0.8.4-main.43cb759274",
|
|
184
|
+
"@dxos/ui-editor": "0.8.4-main.43cb759274",
|
|
185
|
+
"@dxos/util": "0.8.4-main.43cb759274",
|
|
186
|
+
"@dxos/react-ui-menu": "0.8.4-main.43cb759274",
|
|
187
|
+
"@dxos/react-ui-form": "0.8.4-main.43cb759274"
|
|
188
188
|
},
|
|
189
189
|
"devDependencies": {
|
|
190
190
|
"@effect-atom/atom-react": "^0.5.0",
|
|
191
|
-
"@effect/ai": "0.
|
|
192
|
-
"@effect/ai-anthropic": "0.
|
|
193
|
-
"@effect/platform": "0.
|
|
191
|
+
"@effect/ai": "0.35.0",
|
|
192
|
+
"@effect/ai-anthropic": "0.25.0",
|
|
193
|
+
"@effect/platform": "0.96.1",
|
|
194
194
|
"@types/react": "~19.2.7",
|
|
195
195
|
"@types/react-dom": "~19.2.3",
|
|
196
196
|
"chess.js": "^1.0.0",
|
|
197
|
-
"effect": "3.
|
|
197
|
+
"effect": "3.21.2",
|
|
198
198
|
"react": "~19.2.3",
|
|
199
199
|
"react-dom": "~19.2.3",
|
|
200
|
-
"vite": "^8.0.
|
|
201
|
-
"@dxos/config": "0.8.4-main.
|
|
202
|
-
"@dxos/plugin-
|
|
203
|
-
"@dxos/plugin-
|
|
204
|
-
"@dxos/
|
|
205
|
-
"@dxos/
|
|
206
|
-
"@dxos/
|
|
207
|
-
"@dxos/
|
|
208
|
-
"@dxos/
|
|
200
|
+
"vite": "^8.0.14",
|
|
201
|
+
"@dxos/config": "0.8.4-main.43cb759274",
|
|
202
|
+
"@dxos/plugin-automation": "0.8.4-main.43cb759274",
|
|
203
|
+
"@dxos/plugin-chess": "0.8.4-main.43cb759274",
|
|
204
|
+
"@dxos/plugin-testing": "0.8.4-main.43cb759274",
|
|
205
|
+
"@dxos/random": "0.8.4-main.43cb759274",
|
|
206
|
+
"@dxos/react-ui": "0.8.4-main.43cb759274",
|
|
207
|
+
"@dxos/storybook-utils": "0.8.4-main.43cb759274",
|
|
208
|
+
"@dxos/ui-theme": "0.8.4-main.43cb759274"
|
|
209
209
|
},
|
|
210
210
|
"peerDependencies": {
|
|
211
211
|
"@effect-atom/atom-react": "^0.5.0",
|
|
212
|
-
"@effect/platform": "0.
|
|
213
|
-
"effect": "3.
|
|
212
|
+
"@effect/platform": "0.96.1",
|
|
213
|
+
"effect": "3.21.2",
|
|
214
214
|
"react": "~19.2.3",
|
|
215
215
|
"react-dom": "~19.2.3",
|
|
216
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
217
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
216
|
+
"@dxos/react-ui": "0.8.4-main.43cb759274",
|
|
217
|
+
"@dxos/ui-theme": "0.8.4-main.43cb759274"
|
|
218
218
|
},
|
|
219
219
|
"publishConfig": {
|
|
220
220
|
"access": "public"
|
package/src/ScriptPlugin.tsx
CHANGED
|
@@ -19,6 +19,9 @@ import { meta } from '#meta';
|
|
|
19
19
|
import { translations } from '#translations';
|
|
20
20
|
import { ScriptEvents } from '#types';
|
|
21
21
|
|
|
22
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
23
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
24
|
+
|
|
22
25
|
export const ScriptPlugin = Plugin.define(meta).pipe(
|
|
23
26
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
24
27
|
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
@@ -35,6 +38,9 @@ export const ScriptPlugin = Plugin.define(meta).pipe(
|
|
|
35
38
|
activatesOn: ScriptEvents.SetupCompiler,
|
|
36
39
|
activate: Compiler,
|
|
37
40
|
}),
|
|
41
|
+
AppPlugin.addPluginAssetModule({
|
|
42
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
43
|
+
}),
|
|
38
44
|
Plugin.make,
|
|
39
45
|
);
|
|
40
46
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
import { Script } from '@dxos/compute';
|
|
8
|
+
|
|
9
|
+
import { OperationHandler } from '#capabilities';
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
|
|
12
|
+
export const ScriptPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
14
|
+
AppPlugin.addSchemaModule({ schema: [Script.Script] }),
|
|
15
|
+
Plugin.make,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export default ScriptPlugin;
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
+
import { CollectionModel } from '@dxos/app-toolkit';
|
|
7
8
|
import { Script, Operation } from '@dxos/compute';
|
|
8
9
|
import { Database, Obj, Ref } from '@dxos/echo';
|
|
9
|
-
import { CollectionModel } from '@dxos/schema';
|
|
10
10
|
|
|
11
11
|
import { Create } from './definitions';
|
|
12
12
|
|
|
@@ -27,14 +27,14 @@ export default Create.pipe(
|
|
|
27
27
|
db.add(script);
|
|
28
28
|
|
|
29
29
|
const fn = Obj.make(Operation.PersistentOperation, {
|
|
30
|
+
[Obj.Meta]: { version: '0.0.0' },
|
|
30
31
|
name,
|
|
31
|
-
version: '0.0.0',
|
|
32
32
|
source: Ref.make(script),
|
|
33
33
|
});
|
|
34
34
|
yield* CollectionModel.add({ object: fn });
|
|
35
35
|
|
|
36
36
|
return {
|
|
37
|
-
function: Obj.
|
|
37
|
+
function: Obj.getURI(fn),
|
|
38
38
|
};
|
|
39
39
|
}),
|
|
40
40
|
),
|
|
@@ -6,7 +6,7 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
|
|
7
7
|
import { ClientService } from '@dxos/client';
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
|
-
import { Database, Feed, Ref } from '@dxos/echo';
|
|
9
|
+
import { Database, Feed, Ref, DXN } from '@dxos/echo';
|
|
10
10
|
import { trim } from '@dxos/util';
|
|
11
11
|
|
|
12
12
|
const FunctionRef = Ref.Ref(Operation.PersistentOperation).annotations({
|
|
@@ -28,7 +28,7 @@ const FUNCTION_FORMAT = trim`
|
|
|
28
28
|
|
|
29
29
|
const MyFunction = Operation.make({
|
|
30
30
|
meta: {
|
|
31
|
-
key: 'org.dxos.script.
|
|
31
|
+
key: DXN.make('org.dxos.script.myFunction'),
|
|
32
32
|
name: 'My Function',
|
|
33
33
|
},
|
|
34
34
|
input: Schema.Struct({
|
|
@@ -96,9 +96,10 @@ const AVAILABLE_PACKAGES = trim`
|
|
|
96
96
|
|
|
97
97
|
export const Create = Operation.make({
|
|
98
98
|
meta: {
|
|
99
|
-
key: 'org.dxos.function.script.create',
|
|
99
|
+
key: DXN.make('org.dxos.function.script.create'),
|
|
100
100
|
name: 'Create',
|
|
101
101
|
description: `Creates a new function with TypeScript source code and adds it to the space. ${FUNCTION_FORMAT} ${AVAILABLE_PACKAGES}`,
|
|
102
|
+
icon: 'ph--code--regular',
|
|
102
103
|
},
|
|
103
104
|
input: Schema.Struct({
|
|
104
105
|
name: Schema.String.annotations({
|
|
@@ -119,9 +120,10 @@ export const Create = Operation.make({
|
|
|
119
120
|
|
|
120
121
|
export const Read = Operation.make({
|
|
121
122
|
meta: {
|
|
122
|
-
key: 'org.dxos.function.script.read',
|
|
123
|
+
key: DXN.make('org.dxos.function.script.read'),
|
|
123
124
|
name: 'Read',
|
|
124
125
|
description: 'Reads the source code and metadata of a function.',
|
|
126
|
+
icon: 'ph--file-text--regular',
|
|
125
127
|
},
|
|
126
128
|
input: Schema.Struct({
|
|
127
129
|
function: FunctionRef,
|
|
@@ -148,9 +150,10 @@ const Edit = Schema.Struct({
|
|
|
148
150
|
|
|
149
151
|
export const Update = Operation.make({
|
|
150
152
|
meta: {
|
|
151
|
-
key: 'org.dxos.function.script.update',
|
|
153
|
+
key: DXN.make('org.dxos.function.script.update'),
|
|
152
154
|
name: 'Update',
|
|
153
155
|
description: `Updates the source code or metadata of a function. ${FUNCTION_FORMAT}`,
|
|
156
|
+
icon: 'ph--pencil--regular',
|
|
154
157
|
},
|
|
155
158
|
input: Schema.Struct({
|
|
156
159
|
function: FunctionRef,
|
|
@@ -172,9 +175,10 @@ export const Update = Operation.make({
|
|
|
172
175
|
|
|
173
176
|
export const Delete = Operation.make({
|
|
174
177
|
meta: {
|
|
175
|
-
key: 'org.dxos.function.script.delete',
|
|
178
|
+
key: DXN.make('org.dxos.function.script.delete'),
|
|
176
179
|
name: 'Delete',
|
|
177
180
|
description: 'Deletes a function and its source from the space.',
|
|
181
|
+
icon: 'ph--trash--regular',
|
|
178
182
|
},
|
|
179
183
|
input: Schema.Struct({
|
|
180
184
|
function: FunctionRef,
|
|
@@ -185,9 +189,10 @@ export const Delete = Operation.make({
|
|
|
185
189
|
|
|
186
190
|
export const Deploy = Operation.make({
|
|
187
191
|
meta: {
|
|
188
|
-
key: 'org.dxos.function.script.deploy',
|
|
192
|
+
key: DXN.make('org.dxos.function.script.deploy'),
|
|
189
193
|
name: 'Deploy',
|
|
190
194
|
description: `Deploys a function to the Edge runtime. The function source must follow the required format: a single export default of Operation.pipe(Operation.withHandler(Effect.fn(function* (...) { ... }))). See the Create operation description for a full example.`,
|
|
195
|
+
icon: 'ph--rocket-launch--regular',
|
|
191
196
|
},
|
|
192
197
|
input: Schema.Struct({
|
|
193
198
|
function: FunctionRef,
|
|
@@ -203,9 +208,10 @@ export const Deploy = Operation.make({
|
|
|
203
208
|
|
|
204
209
|
export const Invoke = Operation.make({
|
|
205
210
|
meta: {
|
|
206
|
-
key: 'org.dxos.function.script.invoke',
|
|
211
|
+
key: DXN.make('org.dxos.function.script.invoke'),
|
|
207
212
|
name: 'Invoke',
|
|
208
213
|
description: 'Invokes a deployed Edge function with the given payload.',
|
|
214
|
+
icon: 'ph--play--regular',
|
|
209
215
|
},
|
|
210
216
|
input: Schema.Struct({
|
|
211
217
|
function: FunctionRef,
|
|
@@ -244,9 +250,10 @@ const InvocationSpanSchema = Schema.Struct({
|
|
|
244
250
|
|
|
245
251
|
export const InspectInvocations = Operation.make({
|
|
246
252
|
meta: {
|
|
247
|
-
key: 'org.dxos.function.script.
|
|
253
|
+
key: DXN.make('org.dxos.function.script.inspectInvocations'),
|
|
248
254
|
name: 'InspectInvocations',
|
|
249
255
|
description: 'Queries the invocation trace feed for a function, returning its invocation history.',
|
|
256
|
+
icon: 'ph--magnifying-glass--regular',
|
|
250
257
|
},
|
|
251
258
|
input: Schema.Struct({
|
|
252
259
|
function: FunctionRef,
|
|
@@ -285,9 +292,10 @@ const DeployedFunctionSchema = Schema.Struct({
|
|
|
285
292
|
|
|
286
293
|
export const QueryDeployedFunctions = Operation.make({
|
|
287
294
|
meta: {
|
|
288
|
-
key: 'org.dxos.function.script.
|
|
295
|
+
key: DXN.make('org.dxos.function.script.queryDeployed'),
|
|
289
296
|
name: 'QueryDeployedFunctions',
|
|
290
297
|
description: 'Lists all functions deployed to the EDGE runtime. Use InstallFunction to add one to the space.',
|
|
298
|
+
icon: 'ph--list--regular',
|
|
291
299
|
},
|
|
292
300
|
input: Schema.Void,
|
|
293
301
|
output: Schema.Struct({
|
|
@@ -300,10 +308,11 @@ export const QueryDeployedFunctions = Operation.make({
|
|
|
300
308
|
|
|
301
309
|
export const InstallFunction = Operation.make({
|
|
302
310
|
meta: {
|
|
303
|
-
key: 'org.dxos.function.script.install',
|
|
311
|
+
key: DXN.make('org.dxos.function.script.install'),
|
|
304
312
|
name: 'InstallFunction',
|
|
305
313
|
description:
|
|
306
314
|
'Installs a deployed EDGE function into the current space by key. The returned function ID can be passed directly to Invoke.',
|
|
315
|
+
icon: 'ph--download--regular',
|
|
307
316
|
},
|
|
308
317
|
input: Schema.Struct({
|
|
309
318
|
key: Schema.String.annotations({
|
|
@@ -39,12 +39,13 @@ export default Deploy.pipe(
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const existingFunctionId = getUserFunctionIdInMetadata(Obj.getMeta(loaded));
|
|
42
|
+
const currentVersion = Obj.getMeta(loaded).version;
|
|
42
43
|
|
|
43
44
|
const functionsService = FunctionsServiceClient.fromClient(client);
|
|
44
45
|
const newFunction = yield* Effect.promise(() =>
|
|
45
46
|
functionsService.deploy(Context.default(), {
|
|
46
47
|
ownerPublicKey: space.key,
|
|
47
|
-
version:
|
|
48
|
+
version: currentVersion ? incrementSemverPatch(currentVersion) : '0.0.1',
|
|
48
49
|
functionId: existingFunctionId,
|
|
49
50
|
entryPoint: buildResult.entryPoint,
|
|
50
51
|
assets: buildResult.assets,
|
|
@@ -60,7 +61,7 @@ export default Deploy.pipe(
|
|
|
60
61
|
|
|
61
62
|
const edgeFunctionId = getUserFunctionIdInMetadata(Obj.getMeta(loaded));
|
|
62
63
|
return {
|
|
63
|
-
function: Obj.
|
|
64
|
+
function: Obj.getURI(loaded),
|
|
64
65
|
functionUrl: edgeFunctionId
|
|
65
66
|
? `${client.config.values.runtime?.services?.edge?.url ?? ''}/functions/${edgeFunctionId}`
|
|
66
67
|
: undefined,
|
|
@@ -34,7 +34,7 @@ export default InspectInvocations.pipe(
|
|
|
34
34
|
if (!span.invocationTarget || !functionId) {
|
|
35
35
|
return false;
|
|
36
36
|
}
|
|
37
|
-
const targetDxn = span.invocationTarget.
|
|
37
|
+
const targetDxn = span.invocationTarget.uri;
|
|
38
38
|
const uuidPart = targetDxn.split(':').pop();
|
|
39
39
|
return uuidPart === functionId;
|
|
40
40
|
});
|
|
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { ClientService } from '@dxos/client';
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
10
|
-
import {
|
|
10
|
+
import { Filter, Obj } from '@dxos/echo';
|
|
11
11
|
import { FunctionsServiceClient } from '@dxos/functions-runtime/edge';
|
|
12
12
|
|
|
13
13
|
import { InstallFunction } from './definitions';
|
|
@@ -19,7 +19,7 @@ export default InstallFunction.pipe(
|
|
|
19
19
|
const functionsService = FunctionsServiceClient.fromClient(client);
|
|
20
20
|
const deployed = yield* Effect.promise(() => functionsService.query(Context.default()));
|
|
21
21
|
|
|
22
|
-
const fn = deployed.findLast((entry) => entry.key === key);
|
|
22
|
+
const fn = deployed.findLast((entry) => Obj.getMeta(entry).key === key);
|
|
23
23
|
if (!fn) {
|
|
24
24
|
return yield* Effect.fail(new Error(`No deployed function found with key: ${key}`));
|
|
25
25
|
}
|
|
@@ -32,7 +32,7 @@ export default InstallFunction.pipe(
|
|
|
32
32
|
yield* Effect.promise(() => client.addTypes([Operation.PersistentOperation]));
|
|
33
33
|
|
|
34
34
|
const existingFunctions = yield* Effect.promise(() =>
|
|
35
|
-
space.db.query(
|
|
35
|
+
space.db.query(Filter.and(Filter.type(Operation.PersistentOperation), Filter.key(key))).run(),
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
let installed: Operation.PersistentOperation;
|
|
@@ -47,9 +47,9 @@ export default InstallFunction.pipe(
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
return {
|
|
50
|
-
function: Obj.
|
|
50
|
+
function: Obj.getURI(installed),
|
|
51
51
|
name: fn.name ?? 'Unnamed function',
|
|
52
|
-
version: fn.version ?? '0.0.0',
|
|
52
|
+
version: Obj.getMeta(fn).version ?? '0.0.0',
|
|
53
53
|
};
|
|
54
54
|
}),
|
|
55
55
|
),
|
|
@@ -7,9 +7,8 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { ClientService } from '@dxos/client';
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
10
|
-
import { Database } from '@dxos/echo';
|
|
10
|
+
import { Database, Obj } from '@dxos/echo';
|
|
11
11
|
import { FunctionsServiceClient } from '@dxos/functions-runtime/edge';
|
|
12
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
13
12
|
|
|
14
13
|
import { Invoke } from './definitions';
|
|
15
14
|
|
|
@@ -19,14 +18,14 @@ export default Invoke.pipe(
|
|
|
19
18
|
const loaded = yield* Database.load(fn);
|
|
20
19
|
const client = yield* ClientService;
|
|
21
20
|
|
|
22
|
-
const
|
|
23
|
-
if (!
|
|
21
|
+
const spaceId = Obj.getDatabase(loaded)?.spaceId;
|
|
22
|
+
if (!spaceId) {
|
|
24
23
|
return yield* Effect.fail(new Error('Function is not in a space.'));
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
const functionsService = FunctionsServiceClient.fromClient(client);
|
|
28
27
|
const result = yield* Effect.promise(() =>
|
|
29
|
-
functionsService.invoke(Context.default(), loaded, payload ?? {}, { spaceId
|
|
28
|
+
functionsService.invoke(Context.default(), loaded, payload ?? {}, { spaceId }),
|
|
30
29
|
);
|
|
31
30
|
|
|
32
31
|
return { response: result };
|
|
@@ -7,6 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { ClientService } from '@dxos/client';
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
10
11
|
import { FunctionsServiceClient } from '@dxos/functions-runtime/edge';
|
|
11
12
|
|
|
12
13
|
import { QueryDeployedFunctions } from './definitions';
|
|
@@ -18,13 +19,16 @@ export default QueryDeployedFunctions.pipe(
|
|
|
18
19
|
const functionsService = FunctionsServiceClient.fromClient(client);
|
|
19
20
|
const deployed = yield* Effect.promise(() => functionsService.query(Context.default()));
|
|
20
21
|
return {
|
|
21
|
-
functions: deployed.map((fn) =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
functions: deployed.map((fn) => {
|
|
23
|
+
const meta = Obj.getMeta(fn);
|
|
24
|
+
return {
|
|
25
|
+
key: meta.key,
|
|
26
|
+
name: fn.name ?? 'Unnamed function',
|
|
27
|
+
version: meta.version ?? '0.0.0',
|
|
28
|
+
description: fn.description,
|
|
29
|
+
updated: fn.updated,
|
|
30
|
+
};
|
|
31
|
+
}),
|
|
28
32
|
};
|
|
29
33
|
}),
|
|
30
34
|
),
|
|
@@ -6,6 +6,7 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { Operation, Script } from '@dxos/compute';
|
|
9
|
+
import { Type } from '@dxos/echo';
|
|
9
10
|
import { SpaceOperation } from '@dxos/plugin-space';
|
|
10
11
|
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
11
12
|
|
|
@@ -16,7 +17,7 @@ export default Capability.makeModule(
|
|
|
16
17
|
Effect.fnUntraced(function* () {
|
|
17
18
|
return [
|
|
18
19
|
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
19
|
-
id: Script.Script
|
|
20
|
+
id: Type.getTypename(Script.Script),
|
|
20
21
|
inputSchema: ScriptOperation.ScriptProps,
|
|
21
22
|
createObject: (props, options) =>
|
|
22
23
|
Effect.gen(function* () {
|
|
@@ -30,7 +31,7 @@ export default Capability.makeModule(
|
|
|
30
31
|
}),
|
|
31
32
|
}),
|
|
32
33
|
Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
33
|
-
id: Notebook.Notebook
|
|
34
|
+
id: Type.getTypename(Notebook.Notebook),
|
|
34
35
|
inputSchema: ScriptOperation.NotebookProps,
|
|
35
36
|
createObject: (props, options) =>
|
|
36
37
|
Effect.gen(function* () {
|