@dxos/plugin-script 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (566) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +515 -0
  3. package/dist/lib/{browser/DeploymentDialog-IIOXAS47.mjs → neutral/DeploymentDialog-M3AFYQHC.mjs} +24 -48
  4. package/dist/lib/neutral/DeploymentDialog-M3AFYQHC.mjs.map +7 -0
  5. package/dist/lib/{browser/NotebookContainer-VVZOKGRC.mjs → neutral/NotebookArticle-NV4AHOOS.mjs} +58 -145
  6. package/dist/lib/neutral/NotebookArticle-NV4AHOOS.mjs.map +7 -0
  7. package/dist/lib/{browser/ScriptContainer-A5SSIUH6.mjs → neutral/ScriptArticle-UBT27SB6.mjs} +14 -28
  8. package/dist/lib/neutral/ScriptArticle-UBT27SB6.mjs.map +7 -0
  9. package/dist/lib/neutral/ScriptPlugin.mjs +51 -0
  10. package/dist/lib/neutral/ScriptPlugin.mjs.map +7 -0
  11. package/dist/lib/neutral/ScriptPlugin.node.mjs +27 -0
  12. package/dist/lib/neutral/ScriptPlugin.node.mjs.map +7 -0
  13. package/dist/lib/neutral/ScriptPlugin.workerd.mjs +21 -0
  14. package/dist/lib/neutral/ScriptPlugin.workerd.mjs.map +7 -0
  15. package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs +31 -0
  16. package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs.map +7 -0
  17. package/dist/lib/neutral/ScriptProperties-RLXNAN3N.mjs +297 -0
  18. package/dist/lib/neutral/ScriptProperties-RLXNAN3N.mjs.map +7 -0
  19. package/dist/lib/neutral/TestContainer-AFVTBYSJ.mjs +44 -0
  20. package/dist/lib/neutral/TestContainer-AFVTBYSJ.mjs.map +7 -0
  21. package/dist/lib/neutral/app-graph-builder-7AWFCEQF.mjs +52 -0
  22. package/dist/lib/neutral/app-graph-builder-7AWFCEQF.mjs.map +7 -0
  23. package/dist/lib/{browser/blueprint-definition-YMZEJBAZ.mjs → neutral/blueprint-definition-T33SBPP2.mjs} +4 -6
  24. package/dist/lib/neutral/blueprint-definition-T33SBPP2.mjs.map +7 -0
  25. package/dist/lib/{browser → neutral}/blueprints/index.mjs +3 -1
  26. package/dist/lib/neutral/capabilities/index.mjs +21 -0
  27. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  28. package/dist/lib/neutral/capabilities/node.mjs +17 -0
  29. package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
  30. package/dist/lib/{node-esm/chunk-JGN7TDJH.mjs → neutral/chunk-2REUEDUA.mjs} +10 -23
  31. package/dist/lib/neutral/chunk-2REUEDUA.mjs.map +7 -0
  32. package/dist/lib/neutral/chunk-BDHDBPVM.mjs +52 -0
  33. package/dist/lib/neutral/chunk-BDHDBPVM.mjs.map +7 -0
  34. package/dist/lib/neutral/chunk-C4O7EV6M.mjs +123 -0
  35. package/dist/lib/neutral/chunk-C4O7EV6M.mjs.map +7 -0
  36. package/dist/lib/neutral/chunk-H2BRWQMY.mjs +96 -0
  37. package/dist/lib/neutral/chunk-H2BRWQMY.mjs.map +7 -0
  38. package/dist/lib/neutral/chunk-LHEJXJEL.mjs +8 -0
  39. package/dist/lib/neutral/chunk-LHEJXJEL.mjs.map +7 -0
  40. package/dist/lib/neutral/chunk-NQOIENTU.mjs +8 -0
  41. package/dist/lib/neutral/chunk-NQOIENTU.mjs.map +7 -0
  42. package/dist/lib/neutral/chunk-TRKXIP2Q.mjs +345 -0
  43. package/dist/lib/neutral/chunk-TRKXIP2Q.mjs.map +7 -0
  44. package/dist/lib/neutral/chunk-UA3BWOCZ.mjs +38 -0
  45. package/dist/lib/neutral/chunk-UA3BWOCZ.mjs.map +7 -0
  46. package/dist/lib/{browser/chunk-G3XIOLLI.mjs → neutral/chunk-VXDJH6OL.mjs} +24 -48
  47. package/dist/lib/neutral/chunk-VXDJH6OL.mjs.map +7 -0
  48. package/dist/lib/{browser/compiler-53G6ZHQM.mjs → neutral/compiler-ODK4UA2N.mjs} +24 -22
  49. package/dist/lib/neutral/compiler-ODK4UA2N.mjs.map +7 -0
  50. package/dist/lib/neutral/components/index.mjs +664 -0
  51. package/dist/lib/neutral/components/index.mjs.map +7 -0
  52. package/dist/lib/neutral/containers/index.mjs +17 -0
  53. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  54. package/dist/lib/neutral/create-WQJXMOUE.mjs +46 -0
  55. package/dist/lib/neutral/create-WQJXMOUE.mjs.map +7 -0
  56. package/dist/lib/neutral/create-object-FZM5ASWM.mjs +45 -0
  57. package/dist/lib/neutral/create-object-FZM5ASWM.mjs.map +7 -0
  58. package/dist/lib/neutral/create-script-66DO3UJO.mjs +45 -0
  59. package/dist/lib/neutral/create-script-66DO3UJO.mjs.map +7 -0
  60. package/dist/lib/neutral/delete-HCQIQFVP.mjs +21 -0
  61. package/dist/lib/neutral/delete-HCQIQFVP.mjs.map +7 -0
  62. package/dist/lib/neutral/deploy-7JVMMHSH.mjs +63 -0
  63. package/dist/lib/neutral/deploy-7JVMMHSH.mjs.map +7 -0
  64. package/dist/lib/{browser/chunk-MUEVLYXJ.mjs → neutral/hooks/index.mjs} +52 -80
  65. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  66. package/dist/lib/neutral/index.mjs +41 -0
  67. package/dist/lib/neutral/inspect-invocations-6MW73SDV.mjs +59 -0
  68. package/dist/lib/neutral/inspect-invocations-6MW73SDV.mjs.map +7 -0
  69. package/dist/lib/neutral/install-function-FJIE2JAI.mjs +49 -0
  70. package/dist/lib/neutral/install-function-FJIE2JAI.mjs.map +7 -0
  71. package/dist/lib/neutral/invoke-3HVWY2KF.mjs +32 -0
  72. package/dist/lib/neutral/invoke-3HVWY2KF.mjs.map +7 -0
  73. package/dist/lib/neutral/meta.json +1 -0
  74. package/dist/lib/neutral/meta.mjs +10 -0
  75. package/dist/lib/neutral/operation-handler-X44IGZXS.mjs +18 -0
  76. package/dist/lib/neutral/operation-handler-X44IGZXS.mjs.map +7 -0
  77. package/dist/lib/neutral/operations/index.mjs +8 -0
  78. package/dist/lib/neutral/plugin.mjs +16 -0
  79. package/dist/lib/neutral/plugin.mjs.map +7 -0
  80. package/dist/lib/neutral/query-deployed-functions-F4FHJNWO.mjs +34 -0
  81. package/dist/lib/neutral/query-deployed-functions-F4FHJNWO.mjs.map +7 -0
  82. package/dist/lib/neutral/react-surface-ACNZ35FV.mjs +121 -0
  83. package/dist/lib/neutral/react-surface-ACNZ35FV.mjs.map +7 -0
  84. package/dist/lib/neutral/read-RQESBAQI.mjs +26 -0
  85. package/dist/lib/neutral/read-RQESBAQI.mjs.map +7 -0
  86. package/dist/lib/{browser/settings-76UM7442.mjs → neutral/settings-VJBW4OMK.mjs} +6 -12
  87. package/dist/lib/neutral/settings-VJBW4OMK.mjs.map +7 -0
  88. package/dist/lib/{browser → neutral}/templates/index.mjs +1 -1
  89. package/dist/lib/neutral/translations.mjs +105 -0
  90. package/dist/lib/neutral/translations.mjs.map +7 -0
  91. package/dist/lib/neutral/types/index.mjs +17 -0
  92. package/dist/lib/neutral/update-JZUNJYZM.mjs +63 -0
  93. package/dist/lib/neutral/update-JZUNJYZM.mjs.map +7 -0
  94. package/dist/types/src/ScriptPlugin.d.ts +1 -0
  95. package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
  96. package/dist/types/src/ScriptPlugin.node.d.ts +4 -0
  97. package/dist/types/src/ScriptPlugin.node.d.ts.map +1 -0
  98. package/dist/types/src/ScriptPlugin.test.d.ts +2 -0
  99. package/dist/types/src/ScriptPlugin.test.d.ts.map +1 -0
  100. package/dist/types/src/ScriptPlugin.workerd.d.ts +4 -0
  101. package/dist/types/src/ScriptPlugin.workerd.d.ts.map +1 -0
  102. package/dist/types/src/blueprints/functions/create.d.ts +11 -0
  103. package/dist/types/src/blueprints/functions/create.d.ts.map +1 -0
  104. package/dist/types/src/blueprints/functions/definitions.d.ts +135 -0
  105. package/dist/types/src/blueprints/functions/definitions.d.ts.map +1 -0
  106. package/dist/types/src/blueprints/functions/delete.d.ts +17 -0
  107. package/dist/types/src/blueprints/functions/delete.d.ts.map +1 -0
  108. package/dist/types/src/blueprints/functions/deploy.d.ts +21 -0
  109. package/dist/types/src/blueprints/functions/deploy.d.ts.map +1 -0
  110. package/dist/types/src/blueprints/functions/index.d.ts +4 -0
  111. package/dist/types/src/blueprints/functions/index.d.ts.map +1 -0
  112. package/dist/types/src/blueprints/functions/inspect-invocations.d.ts +28 -0
  113. package/dist/types/src/blueprints/functions/inspect-invocations.d.ts.map +1 -0
  114. package/dist/types/src/blueprints/functions/install-function.d.ts +11 -0
  115. package/dist/types/src/blueprints/functions/install-function.d.ts.map +1 -0
  116. package/dist/types/src/blueprints/functions/invoke.d.ts +21 -0
  117. package/dist/types/src/blueprints/functions/invoke.d.ts.map +1 -0
  118. package/dist/types/src/blueprints/functions/query-deployed-functions.d.ts +13 -0
  119. package/dist/types/src/blueprints/functions/query-deployed-functions.d.ts.map +1 -0
  120. package/dist/types/src/blueprints/functions/read.d.ts +21 -0
  121. package/dist/types/src/blueprints/functions/read.d.ts.map +1 -0
  122. package/dist/types/src/blueprints/functions/update.d.ts +26 -0
  123. package/dist/types/src/blueprints/functions/update.d.ts.map +1 -0
  124. package/dist/types/src/blueprints/script-blueprint.d.ts +2 -2
  125. package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -1
  126. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
  128. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  129. package/dist/types/src/capabilities/compiler.d.ts +6 -0
  130. package/dist/types/src/capabilities/compiler.d.ts.map +1 -0
  131. package/dist/types/src/capabilities/create-object.d.ts +16 -0
  132. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  133. package/dist/types/src/capabilities/index.d.ts +19 -6
  134. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  135. package/dist/types/src/capabilities/node.d.ts +18 -0
  136. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  137. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  138. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  139. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  140. package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -5
  141. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  142. package/dist/types/src/compiler/compiler.d.ts.map +1 -1
  143. package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +1 -1
  144. package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
  145. package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +1 -1
  146. package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -1
  147. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +4 -2
  148. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
  149. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +219 -228
  150. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
  151. package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -1
  152. package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -1
  153. package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts +8 -0
  154. package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +1 -0
  155. package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts +241 -0
  156. package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts.map +1 -0
  157. package/dist/types/src/components/ScriptPluginSettings/index.d.ts +2 -0
  158. package/dist/types/src/components/ScriptPluginSettings/index.d.ts.map +1 -0
  159. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +7 -6
  160. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
  161. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +219 -228
  162. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
  163. package/dist/types/src/components/TestPanel/TestPanel.d.ts +4 -2
  164. package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
  165. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +5 -2
  166. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
  167. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +3 -1
  168. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
  169. package/dist/types/src/components/index.d.ts +2 -1
  170. package/dist/types/src/components/index.d.ts.map +1 -1
  171. package/dist/types/src/constants.d.ts +2 -1
  172. package/dist/types/src/constants.d.ts.map +1 -1
  173. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
  174. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +219 -228
  175. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
  176. package/dist/types/src/containers/DeploymentDialog/index.d.ts +1 -2
  177. package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -1
  178. package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts +7 -0
  179. package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts.map +1 -0
  180. package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts +7 -0
  181. package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts.map +1 -0
  182. package/dist/types/src/containers/NotebookArticle/index.d.ts +2 -0
  183. package/dist/types/src/containers/NotebookArticle/index.d.ts.map +1 -0
  184. package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts +10 -0
  185. package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -0
  186. package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts +242 -0
  187. package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts.map +1 -0
  188. package/dist/types/src/containers/ScriptArticle/index.d.ts +2 -0
  189. package/dist/types/src/containers/ScriptArticle/index.d.ts.map +1 -0
  190. package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts +7 -0
  191. package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts.map +1 -0
  192. package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts +7 -0
  193. package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts.map +1 -0
  194. package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts +7 -0
  195. package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts.map +1 -0
  196. package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +4 -5
  197. package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -1
  198. package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts +242 -0
  199. package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -0
  200. package/dist/types/src/containers/ScriptProperties/index.d.ts +1 -2
  201. package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -1
  202. package/dist/types/src/containers/TestContainer/TestContainer.d.ts +1 -1
  203. package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -1
  204. package/dist/types/src/containers/TestContainer/index.d.ts +1 -2
  205. package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -1
  206. package/dist/types/src/containers/index.d.ts +2 -4
  207. package/dist/types/src/containers/index.d.ts.map +1 -1
  208. package/dist/types/src/hooks/deploy.d.ts +16 -5
  209. package/dist/types/src/hooks/deploy.d.ts.map +1 -1
  210. package/dist/types/src/hooks/format.d.ts +1 -1
  211. package/dist/types/src/hooks/format.d.ts.map +1 -1
  212. package/dist/types/src/hooks/template.d.ts +1 -1
  213. package/dist/types/src/hooks/template.d.ts.map +1 -1
  214. package/dist/types/src/hooks/useCompiler.d.ts.map +1 -1
  215. package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
  216. package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
  217. package/dist/types/src/index.d.ts +2 -4
  218. package/dist/types/src/index.d.ts.map +1 -1
  219. package/dist/types/src/meta.d.ts +1 -1
  220. package/dist/types/src/meta.d.ts.map +1 -1
  221. package/dist/types/src/notebook/compute-graph.d.ts +1 -1
  222. package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
  223. package/dist/types/src/notebook/eval.d.ts.map +1 -1
  224. package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -1
  225. package/dist/types/src/operations/create-script.d.ts +5 -0
  226. package/dist/types/src/operations/create-script.d.ts.map +1 -0
  227. package/dist/types/src/operations/index.d.ts +3 -0
  228. package/dist/types/src/operations/index.d.ts.map +1 -0
  229. package/dist/types/src/plugin.d.ts +4 -0
  230. package/dist/types/src/plugin.d.ts.map +1 -0
  231. package/dist/types/src/templates/anthropic.d.ts +4 -5
  232. package/dist/types/src/templates/anthropic.d.ts.map +1 -1
  233. package/dist/types/src/templates/chess-bot.d.ts +8 -10
  234. package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
  235. package/dist/types/src/templates/commentary.d.ts +9 -10
  236. package/dist/types/src/templates/commentary.d.ts.map +1 -1
  237. package/dist/types/src/templates/data-generator.d.ts.map +1 -1
  238. package/dist/types/src/templates/discord.d.ts.map +1 -1
  239. package/dist/types/src/templates/email.d.ts.map +1 -1
  240. package/dist/types/src/templates/forex-effect.d.ts +3 -2
  241. package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
  242. package/dist/types/src/templates/forex.d.ts +3 -2
  243. package/dist/types/src/templates/forex.d.ts.map +1 -1
  244. package/dist/types/src/templates/gmail.d.ts.map +1 -1
  245. package/dist/types/src/templates/index.d.ts +26 -31
  246. package/dist/types/src/templates/index.d.ts.map +1 -1
  247. package/dist/types/src/templates/ping.d.ts +2 -1
  248. package/dist/types/src/templates/ping.d.ts.map +1 -1
  249. package/dist/types/src/testing/index.d.ts +2 -1
  250. package/dist/types/src/testing/index.d.ts.map +1 -1
  251. package/dist/types/src/testing/test-notebook.d.ts +3 -0
  252. package/dist/types/src/testing/test-notebook.d.ts.map +1 -0
  253. package/dist/types/src/testing/test-script.d.ts +7 -0
  254. package/dist/types/src/testing/test-script.d.ts.map +1 -0
  255. package/dist/types/src/translations.d.ts +222 -92
  256. package/dist/types/src/translations.d.ts.map +1 -1
  257. package/dist/types/src/types/Notebook.d.ts +53 -60
  258. package/dist/types/src/types/Notebook.d.ts.map +1 -1
  259. package/dist/types/src/types/ScriptCapabilities.d.ts +6 -0
  260. package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -0
  261. package/dist/types/src/types/ScriptEvents.d.ts +3 -0
  262. package/dist/types/src/types/ScriptEvents.d.ts.map +1 -0
  263. package/dist/types/src/types/ScriptOperation.d.ts +29 -0
  264. package/dist/types/src/types/ScriptOperation.d.ts.map +1 -0
  265. package/dist/types/src/types/Settings.d.ts +7 -0
  266. package/dist/types/src/types/Settings.d.ts.map +1 -0
  267. package/dist/types/src/types/index.d.ts +4 -4
  268. package/dist/types/src/types/index.d.ts.map +1 -1
  269. package/dist/types/src/types/types.d.ts +1 -5
  270. package/dist/types/src/types/types.d.ts.map +1 -1
  271. package/dist/types/src/util/deploy.d.ts +2 -2
  272. package/dist/types/src/util/deploy.d.ts.map +1 -1
  273. package/dist/types/src/util/functions.d.ts +2 -2
  274. package/dist/types/src/util/functions.d.ts.map +1 -1
  275. package/dist/types/tsconfig.tsbuildinfo +1 -1
  276. package/package.json +167 -118
  277. package/src/ScriptPlugin.node.ts +21 -0
  278. package/src/ScriptPlugin.test.ts +31 -0
  279. package/src/ScriptPlugin.tsx +17 -43
  280. package/src/ScriptPlugin.workerd.ts +18 -0
  281. package/src/blueprints/functions/create.ts +47 -0
  282. package/src/blueprints/functions/definitions.ts +332 -0
  283. package/src/blueprints/functions/delete.ts +23 -0
  284. package/src/blueprints/functions/deploy.ts +71 -0
  285. package/src/blueprints/functions/index.ts +19 -0
  286. package/src/blueprints/functions/inspect-invocations.ts +56 -0
  287. package/src/blueprints/functions/install-function.ts +56 -0
  288. package/src/blueprints/functions/invoke.ts +34 -0
  289. package/src/blueprints/functions/query-deployed-functions.ts +35 -0
  290. package/src/blueprints/functions/read.ts +29 -0
  291. package/src/blueprints/functions/update.ts +68 -0
  292. package/src/blueprints/script-blueprint.ts +32 -8
  293. package/src/capabilities/app-graph-builder.ts +47 -0
  294. package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +3 -1
  295. package/src/capabilities/{compiler/compiler.ts → compiler.ts} +17 -9
  296. package/src/capabilities/create-object.ts +49 -0
  297. package/src/capabilities/index.ts +14 -6
  298. package/src/capabilities/node.ts +16 -0
  299. package/src/capabilities/operation-handler.ts +21 -0
  300. package/src/capabilities/react-surface.tsx +130 -0
  301. package/src/capabilities/{settings/settings.ts → settings.ts} +4 -4
  302. package/src/compiler/compiler.ts +12 -1
  303. package/src/components/NotebookStack/NotebookCell.tsx +25 -14
  304. package/src/components/NotebookStack/NotebookMenu.tsx +7 -7
  305. package/src/components/NotebookStack/NotebookStack.stories.tsx +8 -9
  306. package/src/components/NotebookStack/NotebookStack.tsx +24 -13
  307. package/src/components/QueryEditor/QueryEditor.stories.tsx +5 -11
  308. package/src/components/QueryEditor/QueryEditor.tsx +3 -1
  309. package/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.tsx +32 -0
  310. package/src/components/ScriptPluginSettings/ScriptPluginSettings.tsx +42 -0
  311. package/src/components/ScriptPluginSettings/index.ts +5 -0
  312. package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +7 -7
  313. package/src/components/ScriptToolbar/ScriptToolbar.tsx +24 -26
  314. package/src/components/TestPanel/TestPanel.tsx +91 -176
  315. package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +4 -4
  316. package/src/components/TypescriptEditor/TypescriptEditor.tsx +25 -18
  317. package/src/components/index.ts +4 -1
  318. package/src/constants.ts +4 -2
  319. package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +7 -5
  320. package/src/containers/DeploymentDialog/DeploymentDialog.tsx +26 -26
  321. package/src/containers/DeploymentDialog/index.ts +1 -3
  322. package/src/containers/NotebookArticle/NotebookArticle.stories.tsx +85 -0
  323. package/src/containers/{NotebookContainer/NotebookContainer.tsx → NotebookArticle/NotebookArticle.tsx} +43 -56
  324. package/src/containers/NotebookArticle/index.ts +5 -0
  325. package/src/containers/ScriptArticle/ScriptArticle.stories.tsx +107 -0
  326. package/src/containers/{ScriptContainer/ScriptContainer.tsx → ScriptArticle/ScriptArticle.tsx} +15 -14
  327. package/src/containers/ScriptArticle/index.ts +5 -0
  328. package/src/containers/ScriptProperties/BlueprintEditor.tsx +102 -0
  329. package/src/containers/ScriptProperties/FunctionBinding.tsx +83 -0
  330. package/src/containers/ScriptProperties/FunctionPublishing.tsx +121 -0
  331. package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +76 -0
  332. package/src/containers/ScriptProperties/ScriptProperties.tsx +12 -21
  333. package/src/containers/ScriptProperties/index.ts +1 -3
  334. package/src/containers/TestContainer/TestContainer.tsx +24 -8
  335. package/src/containers/TestContainer/index.ts +1 -3
  336. package/src/containers/index.ts +2 -4
  337. package/src/e2e/ai.test.ts +7 -6
  338. package/src/e2e/deploy.test.ts +6 -4
  339. package/src/hooks/deploy.ts +10 -8
  340. package/src/hooks/format.ts +5 -5
  341. package/src/hooks/template.ts +7 -6
  342. package/src/hooks/useCompiler.ts +3 -2
  343. package/src/hooks/useCreateAndDeployScriptTemplates.ts +4 -3
  344. package/src/index.ts +2 -5
  345. package/src/meta.ts +13 -7
  346. package/src/notebook/compute-graph.test.ts +7 -7
  347. package/src/notebook/compute-graph.ts +1 -1
  348. package/src/notebook/vfs-parser.ts +10 -3
  349. package/src/operations/create-script.ts +46 -0
  350. package/src/operations/index.ts +7 -0
  351. package/src/plugin.ts +11 -0
  352. package/src/templates/anthropic.ts +20 -12
  353. package/src/templates/chess-bot.ts +42 -37
  354. package/src/templates/commentary.ts +185 -165
  355. package/src/templates/data-generator.ts +2 -2
  356. package/src/templates/discord.ts +8 -8
  357. package/src/templates/forex-effect.ts +31 -19
  358. package/src/templates/forex.ts +25 -15
  359. package/src/templates/gmail.ts +9 -9
  360. package/src/templates/index.ts +16 -23
  361. package/src/templates/ping.ts +17 -8
  362. package/src/testing/index.ts +2 -1
  363. package/src/testing/simulator.test.ts +3 -4
  364. package/src/testing/{data.ts → test-notebook.ts} +12 -13
  365. package/src/testing/test-script.ts +28 -0
  366. package/src/translations.ts +89 -89
  367. package/src/types/Notebook.ts +8 -10
  368. package/src/types/ScriptCapabilities.ts +18 -0
  369. package/src/types/ScriptEvents.ts +11 -0
  370. package/src/types/ScriptOperation.ts +42 -0
  371. package/src/types/Settings.ts +20 -0
  372. package/src/types/index.ts +5 -4
  373. package/src/types/types.ts +1 -11
  374. package/src/util/deploy.ts +14 -12
  375. package/src/util/functions.ts +12 -11
  376. package/src/vite-env.d.ts +5 -0
  377. package/dist/lib/browser/DeploymentDialog-IIOXAS47.mjs.map +0 -7
  378. package/dist/lib/browser/NotebookContainer-VVZOKGRC.mjs.map +0 -7
  379. package/dist/lib/browser/ScriptContainer-A5SSIUH6.mjs.map +0 -7
  380. package/dist/lib/browser/ScriptObjectSettings-HYYC7KXC.mjs +0 -294
  381. package/dist/lib/browser/ScriptObjectSettings-HYYC7KXC.mjs.map +0 -7
  382. package/dist/lib/browser/ScriptPluginSettings-UTWA7CBT.mjs +0 -55
  383. package/dist/lib/browser/ScriptPluginSettings-UTWA7CBT.mjs.map +0 -7
  384. package/dist/lib/browser/ScriptProperties-HREPUE65.mjs +0 -28
  385. package/dist/lib/browser/ScriptProperties-HREPUE65.mjs.map +0 -7
  386. package/dist/lib/browser/TestContainer-D4Y2K2TT.mjs +0 -39
  387. package/dist/lib/browser/TestContainer-D4Y2K2TT.mjs.map +0 -7
  388. package/dist/lib/browser/app-graph-builder-66ZDI72K.mjs +0 -69
  389. package/dist/lib/browser/app-graph-builder-66ZDI72K.mjs.map +0 -7
  390. package/dist/lib/browser/blueprint-definition-YMZEJBAZ.mjs.map +0 -7
  391. package/dist/lib/browser/chunk-6IXFDTAI.mjs +0 -113
  392. package/dist/lib/browser/chunk-6IXFDTAI.mjs.map +0 -7
  393. package/dist/lib/browser/chunk-ATTZUDT7.mjs +0 -67
  394. package/dist/lib/browser/chunk-ATTZUDT7.mjs.map +0 -7
  395. package/dist/lib/browser/chunk-G3XIOLLI.mjs.map +0 -7
  396. package/dist/lib/browser/chunk-J7PGML5B.mjs +0 -105
  397. package/dist/lib/browser/chunk-J7PGML5B.mjs.map +0 -7
  398. package/dist/lib/browser/chunk-MUEVLYXJ.mjs.map +0 -7
  399. package/dist/lib/browser/chunk-PLDBKKYO.mjs +0 -789
  400. package/dist/lib/browser/chunk-PLDBKKYO.mjs.map +0 -7
  401. package/dist/lib/browser/chunk-Q66L5EUR.mjs +0 -20
  402. package/dist/lib/browser/chunk-Q66L5EUR.mjs.map +0 -7
  403. package/dist/lib/browser/chunk-TW27W3EL.mjs +0 -29
  404. package/dist/lib/browser/chunk-TW27W3EL.mjs.map +0 -7
  405. package/dist/lib/browser/chunk-WYR4QHPE.mjs +0 -31
  406. package/dist/lib/browser/chunk-WYR4QHPE.mjs.map +0 -7
  407. package/dist/lib/browser/chunk-ZYU2LP6U.mjs +0 -11
  408. package/dist/lib/browser/chunk-ZYU2LP6U.mjs.map +0 -7
  409. package/dist/lib/browser/compiler-53G6ZHQM.mjs.map +0 -7
  410. package/dist/lib/browser/index.mjs +0 -250
  411. package/dist/lib/browser/index.mjs.map +0 -7
  412. package/dist/lib/browser/meta.json +0 -1
  413. package/dist/lib/browser/operation-resolver-CYEISDDK.mjs +0 -79
  414. package/dist/lib/browser/operation-resolver-CYEISDDK.mjs.map +0 -7
  415. package/dist/lib/browser/react-surface-26P6HAFD.mjs +0 -141
  416. package/dist/lib/browser/react-surface-26P6HAFD.mjs.map +0 -7
  417. package/dist/lib/browser/settings-76UM7442.mjs.map +0 -7
  418. package/dist/lib/browser/types/index.mjs +0 -18
  419. package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs +0 -139
  420. package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs.map +0 -7
  421. package/dist/lib/node-esm/NotebookContainer-ZLWTNMQA.mjs +0 -851
  422. package/dist/lib/node-esm/NotebookContainer-ZLWTNMQA.mjs.map +0 -7
  423. package/dist/lib/node-esm/ScriptContainer-S4UKQAWP.mjs +0 -94
  424. package/dist/lib/node-esm/ScriptContainer-S4UKQAWP.mjs.map +0 -7
  425. package/dist/lib/node-esm/ScriptObjectSettings-C5QBRERY.mjs +0 -295
  426. package/dist/lib/node-esm/ScriptObjectSettings-C5QBRERY.mjs.map +0 -7
  427. package/dist/lib/node-esm/ScriptPluginSettings-MFACDW4R.mjs +0 -56
  428. package/dist/lib/node-esm/ScriptPluginSettings-MFACDW4R.mjs.map +0 -7
  429. package/dist/lib/node-esm/ScriptProperties-FMNIX3KU.mjs +0 -29
  430. package/dist/lib/node-esm/ScriptProperties-FMNIX3KU.mjs.map +0 -7
  431. package/dist/lib/node-esm/TestContainer-AO45YPGV.mjs +0 -40
  432. package/dist/lib/node-esm/TestContainer-AO45YPGV.mjs.map +0 -7
  433. package/dist/lib/node-esm/app-graph-builder-IGAZTJ45.mjs +0 -70
  434. package/dist/lib/node-esm/app-graph-builder-IGAZTJ45.mjs.map +0 -7
  435. package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.mjs +0 -18
  436. package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.mjs.map +0 -7
  437. package/dist/lib/node-esm/blueprints/index.mjs +0 -9
  438. package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs +0 -176
  439. package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs.map +0 -7
  440. package/dist/lib/node-esm/chunk-5HSJPAK7.mjs +0 -33
  441. package/dist/lib/node-esm/chunk-5HSJPAK7.mjs.map +0 -7
  442. package/dist/lib/node-esm/chunk-H46R2RS5.mjs +0 -790
  443. package/dist/lib/node-esm/chunk-H46R2RS5.mjs.map +0 -7
  444. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  445. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
  446. package/dist/lib/node-esm/chunk-JGN7TDJH.mjs.map +0 -7
  447. package/dist/lib/node-esm/chunk-QG6ANK4B.mjs +0 -107
  448. package/dist/lib/node-esm/chunk-QG6ANK4B.mjs.map +0 -7
  449. package/dist/lib/node-esm/chunk-S7DSCLOW.mjs +0 -31
  450. package/dist/lib/node-esm/chunk-S7DSCLOW.mjs.map +0 -7
  451. package/dist/lib/node-esm/chunk-TZ2EBTPQ.mjs +0 -22
  452. package/dist/lib/node-esm/chunk-TZ2EBTPQ.mjs.map +0 -7
  453. package/dist/lib/node-esm/chunk-UFBVE33O.mjs +0 -12
  454. package/dist/lib/node-esm/chunk-UFBVE33O.mjs.map +0 -7
  455. package/dist/lib/node-esm/chunk-WWD5LUU6.mjs +0 -114
  456. package/dist/lib/node-esm/chunk-WWD5LUU6.mjs.map +0 -7
  457. package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs +0 -398
  458. package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs.map +0 -7
  459. package/dist/lib/node-esm/compiler-HHQW7EP3.mjs +0 -100
  460. package/dist/lib/node-esm/compiler-HHQW7EP3.mjs.map +0 -7
  461. package/dist/lib/node-esm/index.mjs +0 -251
  462. package/dist/lib/node-esm/index.mjs.map +0 -7
  463. package/dist/lib/node-esm/meta.json +0 -1
  464. package/dist/lib/node-esm/operation-resolver-HFFDXWND.mjs +0 -80
  465. package/dist/lib/node-esm/operation-resolver-HFFDXWND.mjs.map +0 -7
  466. package/dist/lib/node-esm/react-surface-THCIK266.mjs +0 -142
  467. package/dist/lib/node-esm/react-surface-THCIK266.mjs.map +0 -7
  468. package/dist/lib/node-esm/settings-CCHDPLFJ.mjs +0 -37
  469. package/dist/lib/node-esm/settings-CCHDPLFJ.mjs.map +0 -7
  470. package/dist/lib/node-esm/templates/index.mjs +0 -11
  471. package/dist/lib/node-esm/types/index.mjs +0 -19
  472. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  473. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  474. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  475. package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +0 -12
  476. package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +0 -1
  477. package/dist/types/src/capabilities/artifact-definition/index.d.ts +0 -3
  478. package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +0 -1
  479. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
  480. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  481. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
  482. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  483. package/dist/types/src/capabilities/compiler/compiler.d.ts +0 -6
  484. package/dist/types/src/capabilities/compiler/compiler.d.ts.map +0 -1
  485. package/dist/types/src/capabilities/compiler/index.d.ts +0 -3
  486. package/dist/types/src/capabilities/compiler/index.d.ts.map +0 -1
  487. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  488. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  489. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  490. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  491. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  492. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  493. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  494. package/dist/types/src/capabilities/settings/index.d.ts +0 -7
  495. package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
  496. package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
  497. package/dist/types/src/components/FrameContainer/FrameContainer.d.ts +0 -12
  498. package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +0 -1
  499. package/dist/types/src/components/FrameContainer/frame.d.ts +0 -2
  500. package/dist/types/src/components/FrameContainer/frame.d.ts.map +0 -1
  501. package/dist/types/src/components/FrameContainer/index.d.ts +0 -2
  502. package/dist/types/src/components/FrameContainer/index.d.ts.map +0 -1
  503. package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts +0 -7
  504. package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +0 -1
  505. package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts +0 -7
  506. package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +0 -1
  507. package/dist/types/src/containers/NotebookContainer/index.d.ts +0 -3
  508. package/dist/types/src/containers/NotebookContainer/index.d.ts.map +0 -1
  509. package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts +0 -10
  510. package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +0 -1
  511. package/dist/types/src/containers/ScriptContainer/index.d.ts +0 -3
  512. package/dist/types/src/containers/ScriptContainer/index.d.ts.map +0 -1
  513. package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts +0 -7
  514. package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts.map +0 -1
  515. package/dist/types/src/containers/ScriptObjectSettings/index.d.ts +0 -3
  516. package/dist/types/src/containers/ScriptObjectSettings/index.d.ts.map +0 -1
  517. package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts +0 -8
  518. package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +0 -1
  519. package/dist/types/src/containers/ScriptPluginSettings/index.d.ts +0 -3
  520. package/dist/types/src/containers/ScriptPluginSettings/index.d.ts.map +0 -1
  521. package/dist/types/src/templates/chat.d.ts +0 -6
  522. package/dist/types/src/templates/chat.d.ts.map +0 -1
  523. package/dist/types/src/testing/data.d.ts +0 -3
  524. package/dist/types/src/testing/data.d.ts.map +0 -1
  525. package/dist/types/src/types/actions.d.ts +0 -40
  526. package/dist/types/src/types/actions.d.ts.map +0 -1
  527. package/dist/types/src/types/capabilities.d.ts +0 -12
  528. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  529. package/dist/types/src/types/events.d.ts +0 -5
  530. package/dist/types/src/types/events.d.ts.map +0 -1
  531. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -56
  532. package/src/capabilities/app-graph-builder/index.ts +0 -7
  533. package/src/capabilities/artifact-definition/artifact-definition.ts +0 -227
  534. package/src/capabilities/artifact-definition/index.ts +0 -7
  535. package/src/capabilities/blueprint-definition/index.ts +0 -7
  536. package/src/capabilities/compiler/index.ts +0 -7
  537. package/src/capabilities/operation-resolver/index.ts +0 -7
  538. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -75
  539. package/src/capabilities/react-surface/index.ts +0 -7
  540. package/src/capabilities/react-surface/react-surface.tsx +0 -121
  541. package/src/capabilities/settings/index.ts +0 -7
  542. package/src/components/FrameContainer/FrameContainer.tsx +0 -85
  543. package/src/components/FrameContainer/frame.html +0 -25
  544. package/src/components/FrameContainer/frame.tsx +0 -51
  545. package/src/components/FrameContainer/index.ts +0 -5
  546. package/src/containers/NotebookContainer/NotebookContainer.stories.tsx +0 -87
  547. package/src/containers/NotebookContainer/index.ts +0 -7
  548. package/src/containers/ScriptContainer/index.ts +0 -7
  549. package/src/containers/ScriptObjectSettings/ScriptObjectSettings.tsx +0 -291
  550. package/src/containers/ScriptObjectSettings/index.ts +0 -7
  551. package/src/containers/ScriptPluginSettings/ScriptPluginSettings.tsx +0 -66
  552. package/src/containers/ScriptPluginSettings/index.ts +0 -7
  553. package/src/templates/chat.ts +0 -96
  554. package/src/types/actions.ts +0 -45
  555. package/src/types/capabilities.ts +0 -17
  556. package/src/types/events.ts +0 -11
  557. /package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
  558. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  559. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  560. /package/dist/lib/{browser/templates → neutral}/index.mjs.map +0 -0
  561. /package/dist/lib/{browser/types/index.mjs.map → neutral/meta.mjs.map} +0 -0
  562. /package/dist/lib/{node-esm/blueprints → neutral/operations}/index.mjs.map +0 -0
  563. /package/dist/lib/{node-esm → neutral}/templates/index.mjs.map +0 -0
  564. /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
  565. /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
  566. /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/LICENSE CHANGED
@@ -1,8 +1,105 @@
1
- MIT License
2
- Copyright (c) 2022 DXOS
1
+ # Functional Source License, Version 1.1, ALv2 Future License
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ ## Abbreviation
5
4
 
6
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ FSL-1.1-Apache-2.0
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ ## Notice
8
+
9
+ Copyright 2026 DXOS
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/PLUGIN.mdl ADDED
@@ -0,0 +1,515 @@
1
+ ---
2
+ id: org.dxos.plugin.script
3
+ name: ScriptPlugin
4
+ version: 0.1.0
5
+ ---
6
+
7
+ A scripting plugin for `DXOS` Composer that lets users write, deploy, and run custom TypeScript functions as
8
+ ECHO objects inside their spaces.
9
+ Scripts execute on the Cloudflare Workers-based EDGE runtime and can call DXOS SDK packages, Effect-TS,
10
+ and a curated set of third-party libraries.
11
+ An AI assistant blueprint wires CRUD, deploy, invoke, and inspection operations as tools so an agent can
12
+ scaffold, iterate, and test scripts entirely within a chat session.
13
+
14
+ ## Extensions
15
+
16
+ The following extension dialects are used in this document.
17
+ Each extension is defined in the Appendix or resolved via its URI.
18
+
19
+ | Term | URI |
20
+ |-------------|--------------------------------|
21
+ | `type` | `org.dxos.mdl.type@1.0` |
22
+ | `feat` | `org.dxos.mdl.feat@1.0` |
23
+ | `test` | `org.dxos.mdl.test@1.0` |
24
+ | `component` | `org.dxos.mdl.component@1.0` |
25
+ | `op` | `org.dxos.mdl.op@1.0` |
26
+
27
+ ## Types
28
+
29
+ ```mdl
30
+ type Script
31
+ desc: |
32
+ Root ECHO object (typename from @dxos/compute Script.Script).
33
+ Represents a single deployable TypeScript function.
34
+ fields:
35
+ name?: string
36
+ source: string # TypeScript source, must follow Operation pattern
37
+ description?: string
38
+ ```
39
+
40
+ ```mdl
41
+ type Notebook
42
+ desc: |
43
+ Root ECHO object for a multi-cell notebook view.
44
+ Each cell is a Script; the Notebook provides a sequential execution surface.
45
+ fields:
46
+ name?: string
47
+ ```
48
+
49
+ ```mdl
50
+ type Settings
51
+ desc: Plugin-scoped settings atom. Persisted across sessions.
52
+ fields:
53
+ editorInputMode?: EditorInputMode # default, vim, or emacs keybindings
54
+ ```
55
+
56
+ ```mdl
57
+ type InvocationSpan
58
+ desc: A single function invocation record from the EDGE trace feed.
59
+ fields:
60
+ id: string
61
+ timestamp: number # epoch ms
62
+ duration: number # ms
63
+ outcome: success | failure | pending
64
+ input: object
65
+ error?: object
66
+ ```
67
+
68
+ ```mdl
69
+ type DeployedFunction
70
+ desc: Metadata about a function already deployed to the EDGE runtime.
71
+ fields:
72
+ key?: string # unique key; pass to InstallFunction
73
+ name: string
74
+ version: string
75
+ description?: string
76
+ updated?: string # ISO timestamp
77
+ ```
78
+
79
+ ## Components
80
+
81
+ ```mdl
82
+ component ScriptArticle
83
+ desc: |
84
+ Primary editor surface for a Script object. Rendered for the Article and
85
+ Section roles. Shows a TypeScript CodeMirror editor with syntax highlight,
86
+ lint, and completion. Companion panels (Execute and Logs) are available
87
+ via the app graph for running and inspecting the script.
88
+ props:
89
+ role: string
90
+ subject: Script
91
+ attendableId?: string
92
+ settings?: Settings
93
+ env?: CompilerEnvironment
94
+ layout: |
95
+ ┌──────────────────────────────────────┐
96
+ │ ScriptToolbar (run, deploy, …) │
97
+ ├──────────────────────────────────────┤
98
+ │ TypescriptEditor (CodeMirror) │
99
+ │ │
100
+ │ // script source │
101
+ └──────────────────────────────────────┘
102
+ ```
103
+
104
+ ```mdl
105
+ component NotebookArticle
106
+ desc: |
107
+ Multi-cell notebook surface for a Notebook object. Each cell renders a
108
+ ScriptArticle in Section role. Cells can be added, removed, and reordered.
109
+ props:
110
+ role: string
111
+ subject: Notebook
112
+ attendableId?: string
113
+ env?: CompilerEnvironment
114
+ ```
115
+
116
+ ```mdl
117
+ component TestContainer
118
+ desc: |
119
+ Execute companion panel. Renders a form driven by the script's Operation
120
+ input schema; submits the form to invoke the script and shows the response.
121
+ props:
122
+ script: Script
123
+ role: string
124
+ ```
125
+
126
+ ```mdl
127
+ component DeploymentDialog
128
+ desc: |
129
+ Dialog for deploying or redeploying a Script to the EDGE runtime.
130
+ Shows current deployment status and lets the user trigger a new deployment.
131
+ props:
132
+ script: Script
133
+ ```
134
+
135
+ ```mdl
136
+ component ScriptPluginSettings
137
+ desc: Plugin settings panel; exposes editor keybinding mode selector.
138
+ props:
139
+ settings: Settings
140
+ onSettingsChange: (settings: Settings) → void
141
+ onAuthenticate: () → Promise<void>
142
+ ```
143
+
144
+ ## Operations
145
+
146
+ Blueprint operations (called by the Script assistant via its tool set).
147
+
148
+ ```mdl
149
+ op create
150
+ desc: |
151
+ Creates a new Script ECHO object with the given name and TypeScript source,
152
+ and adds it to the space. Optionally seeds from a built-in template or a
153
+ GitHub Gist URL. Returns a function reference ID.
154
+ input:
155
+ name: string
156
+ source?: string
157
+ templateId?: string
158
+ output: { function: string }
159
+ effects: [echo:write]
160
+ note: Operation key `org.dxos.function.script.create`.
161
+ ```
162
+
163
+ ```mdl
164
+ op read
165
+ desc: Reads the name, source code, and description of an existing Script.
166
+ input:
167
+ function: Ref<Script>
168
+ output: { name?: string, source: string, description?: string }
169
+ effects: [echo:read]
170
+ note: Operation key `org.dxos.function.script.read`.
171
+ ```
172
+
173
+ ```mdl
174
+ op update
175
+ desc: |
176
+ Applies one or more string edits (find/replace pairs) to a Script's source
177
+ and optionally updates its name and description.
178
+ input:
179
+ function: Ref<Script>
180
+ name?: string
181
+ description?: string
182
+ edits?: { oldString: string, newString: string, replaceAll?: boolean }[]
183
+ output: { function: string }
184
+ effects: [echo:read, echo:write]
185
+ note: Operation key `org.dxos.function.script.update`.
186
+ ```
187
+
188
+ ```mdl
189
+ op delete
190
+ desc: Permanently removes a Script and its source from the space.
191
+ input:
192
+ function: Ref<Script>
193
+ output: void
194
+ effects: [echo:read, echo:write]
195
+ note: Operation key `org.dxos.function.script.delete`.
196
+ ```
197
+
198
+ ```mdl
199
+ op deploy
200
+ desc: |
201
+ Compiles and deploys a Script to the EDGE (Cloudflare Workers) runtime.
202
+ The source must export a single Operation handler as default.
203
+ Returns the deployed function ID and optional public URL.
204
+ input:
205
+ function: Ref<Script>
206
+ output: { function: string, functionUrl?: string }
207
+ effects: [echo:read, http]
208
+ errors:
209
+ CompileError: TypeScript source fails to compile
210
+ DeploymentFailed: EDGE runtime rejected the deployment
211
+ note: Operation key `org.dxos.function.script.deploy`.
212
+ ```
213
+
214
+ ```mdl
215
+ op invoke
216
+ desc: Calls a deployed EDGE function with an optional JSON payload.
217
+ input:
218
+ function: Ref<Script>
219
+ payload?: unknown
220
+ output: { response: unknown }
221
+ effects: [http]
222
+ errors:
223
+ NotDeployed: function has not been deployed
224
+ InvocationError: function threw at runtime
225
+ note: Operation key `org.dxos.function.script.invoke`.
226
+ ```
227
+
228
+ ```mdl
229
+ op inspectInvocations
230
+ desc: |
231
+ Queries the EDGE invocation trace feed for a function and returns
232
+ recent invocation spans (id, timestamp, duration, outcome, input, error).
233
+ input:
234
+ function: Ref<Script>
235
+ limit?: number # default 20
236
+ output: { invocations: InvocationSpan[], total: number }
237
+ effects: [echo:read]
238
+ note: Operation key `org.dxos.function.script.inspect-invocations`.
239
+ ```
240
+
241
+ ```mdl
242
+ op queryDeployedFunctions
243
+ desc: Lists all functions currently deployed to the EDGE runtime.
244
+ input:
245
+ (none)
246
+ output: { functions: DeployedFunction[] }
247
+ effects: [http]
248
+ note: Operation key `org.dxos.function.script.query-deployed`.
249
+ ```
250
+
251
+ ```mdl
252
+ op installFunction
253
+ desc: |
254
+ Installs a globally-deployed EDGE function into the current space by key.
255
+ Creates a Script ECHO object backed by the remote function.
256
+ The returned function ID can be passed directly to op:invoke.
257
+ input:
258
+ key: string
259
+ output: { function: string, name: string, version: string }
260
+ effects: [echo:write, http]
261
+ note: Operation key `org.dxos.function.script.install`.
262
+ ```
263
+
264
+ UI-facing operation (creates Script via the navtree / "create object" flow).
265
+
266
+ ```mdl
267
+ op createScript
268
+ desc: Creates a new Script ECHO object via the Composer create-object flow.
269
+ input:
270
+ name?: string
271
+ gistUrl?: string
272
+ initialTemplateId?: string
273
+ db: Database
274
+ output: { object: Script }
275
+ effects: [echo:write]
276
+ note: Operation key `org.dxos.plugin.script.operation.create-script`.
277
+ ```
278
+
279
+ ## Features
280
+
281
+ ```mdl
282
+ feat F-1: Script ECHO Object
283
+
284
+ req F-1.1: Script objects are registered via `addSchemaModule` and visible in space object lists.
285
+ req F-1.2: Script objects can be created from the navtree "+" menu.
286
+ req F-1.3:
287
+ when: user creates a Script without a template
288
+ then: source is seeded from the default template
289
+ req F-1.4:
290
+ when: user provides a GitHub Gist URL
291
+ then: gist content is fetched and used as initial source
292
+ ```
293
+
294
+ ```mdl
295
+ feat F-2: Script Editor
296
+
297
+ req F-2.1: ScriptArticle renders a TypeScript-aware CodeMirror editor for the Article role.
298
+ req F-2.2: Editor keybinding mode (default/vim/emacs) is configurable via plugin settings.
299
+ req F-2.3: Changes to source are persisted to the Script ECHO object reactively.
300
+ req F-2.4:
301
+ when: script object changes externally (peer edit)
302
+ then: editor content updates without losing cursor position if possible
303
+ ```
304
+
305
+ ```mdl
306
+ feat F-3: Deploy to EDGE
307
+
308
+ req F-3.1: A Deploy button in the ScriptToolbar opens the DeploymentDialog.
309
+ req F-3.2:
310
+ when: user confirms deployment
311
+ then: op:deploy is called; script compiled and sent to EDGE runtime
312
+ req F-3.3:
313
+ when: compilation fails
314
+ then: error messages are surfaced to the user; no deployment occurs
315
+ req F-3.4:
316
+ when: deployment succeeds
317
+ then: dialog shows the function URL (if available)
318
+ ```
319
+
320
+ ```mdl
321
+ feat F-4: Execute Companion
322
+
323
+ req F-4.1: An "Execute" companion node is added to every Script in the app graph.
324
+ req F-4.2: TestContainer renders a form derived from the script's Operation input schema.
325
+ req F-4.3:
326
+ when: user submits the form
327
+ then: op:invoke is called with the form payload; response displayed
328
+ req F-4.4: A "Logs" companion node shows the invocation trace via InvocationTraceContainer.
329
+ ```
330
+
331
+ ```mdl
332
+ feat F-5: Script Blueprint
333
+
334
+ req F-5.1: A blueprint with key `org.dxos.blueprint.script` is contributed via `addBlueprintDefinitionModule`.
335
+ req F-5.2: Blueprint tool set includes: create, read, update, delete, deploy, invoke,
336
+ inspectInvocations, queryDeployedFunctions, installFunction.
337
+ req F-5.3: System instructions describe the EDGE Operation pattern, required export format,
338
+ and available packages.
339
+ req F-5.4: Blueprint is agent-enabled; the assistant can activate it autonomously.
340
+ ```
341
+
342
+ ```mdl
343
+ feat F-6: Notebook
344
+
345
+ req F-6.1: Notebook objects are registered and can be created from the navtree.
346
+ req F-6.2: NotebookArticle renders each linked Script as a sequential cell.
347
+ req F-6.3: Cells can be added and removed independently.
348
+ ```
349
+
350
+ ```mdl
351
+ feat F-7: Plugin Settings
352
+
353
+ req F-7.1: ScriptPluginSettings is rendered via the app settings surface.
354
+ req F-7.2: Editor input mode is persisted in the Settings atom.
355
+ req F-7.3: An Authenticate button lets the user write an access credential to HALO.
356
+ ```
357
+
358
+ ## Acceptance
359
+
360
+ ```mdl
361
+ test T-1: Create script from default template
362
+ given: a space is open and plugin-script is loaded
363
+ when: user creates a new Script without template selection
364
+ then:
365
+ - a Script object appears in the space
366
+ - its source contains the default template code
367
+ - ScriptArticle renders the source in the editor
368
+ ```
369
+
370
+ ```mdl
371
+ test T-2: Create script from Gist
372
+ given: a public GitHub Gist URL is known
373
+ when: user creates a Script with the Gist URL
374
+ then:
375
+ - gist content is fetched and stored as the script source
376
+ - editor shows the fetched content
377
+ ```
378
+
379
+ ```mdl
380
+ test T-3: Edit and persist source
381
+ given: a Script is open in ScriptArticle
382
+ when: user edits the source
383
+ then:
384
+ - the Script ECHO object's source field is updated
385
+ - closing and reopening the article shows the same content
386
+ ```
387
+
388
+ ```mdl
389
+ test T-4: Deploy script
390
+ given: a Script with valid source following the Operation pattern
391
+ when: user opens DeploymentDialog and confirms
392
+ then:
393
+ - op:deploy succeeds
394
+ - dialog shows success state and function URL
395
+ ```
396
+
397
+ ```mdl
398
+ test T-5: Invoke deployed function
399
+ given: a Script is deployed
400
+ when: user opens the Execute companion and submits a payload
401
+ then:
402
+ - op:invoke is called with the payload
403
+ - response is displayed in TestContainer
404
+ ```
405
+
406
+ ```mdl
407
+ test T-6: Inspect invocations
408
+ given: a Script has been invoked at least once
409
+ when: user opens the Logs companion
410
+ then:
411
+ - InvocationTraceContainer shows at least one invocation span
412
+ - span includes timestamp, duration, and outcome
413
+ ```
414
+
415
+ ```mdl
416
+ test T-7: Blueprint tools resolve
417
+ given: composer-app with plugin-script loaded
418
+ when: AppCapabilities.BlueprintDefinition is queried for `org.dxos.blueprint.script`
419
+ then:
420
+ - blueprint is present
421
+ - tool set includes create, read, update, delete, deploy, invoke,
422
+ inspectInvocations, queryDeployedFunctions, and installFunction
423
+ ```
424
+
425
+ ```mdl
426
+ test T-8: Agent creates and deploys script
427
+ given: a Script assistant session is active
428
+ when: agent calls op:create with a name and source
429
+ then: a Script object is created in the space
430
+ when: agent calls op:deploy
431
+ then: function is deployed; op returns a function ID
432
+ when: agent calls op:invoke with a payload
433
+ then: response is returned without error
434
+ ```
435
+
436
+ ```mdl
437
+ test T-9: QueryDeployedFunctions and install
438
+ given: at least one function is deployed to the EDGE runtime
439
+ when: op:queryDeployedFunctions is called
440
+ then:
441
+ - result contains at least one DeployedFunction entry
442
+ when: op:installFunction is called with that entry's key
443
+ then:
444
+ - a new Script ECHO object appears in the space
445
+ - op returns the function ID, name, and version
446
+ ```
447
+
448
+ ---
449
+
450
+ ## Appendix: Extension Definitions
451
+
452
+ Extension block types used in this document are defined below using
453
+ the core `ext` primitive — the only construct the base language provides.
454
+
455
+ ```mdl
456
+ ext type
457
+ uri: org.dxos.mdl.type@1.0
458
+ desc: A named data structure with typed fields and optional literals.
459
+ fields:
460
+ desc?: Prose
461
+ fields?: FieldMap # name[?]: TypeExpr (# inline comment)
462
+ literals?: UnionList # a | b | c
463
+ extends?: TypeRef[]
464
+ ```
465
+
466
+ ```mdl
467
+ ext feat
468
+ uri: org.dxos.mdl.feat@1.0
469
+ desc: A named feature grouping one or more requirements.
470
+ fields:
471
+ desc?: Prose
472
+ req: RequirementList
473
+ nesting: self # feat blocks may contain feat blocks
474
+ ```
475
+
476
+ ```mdl
477
+ ext test
478
+ uri: org.dxos.mdl.test@1.0
479
+ desc: An acceptance scenario expressed as given / when / then steps.
480
+ fields:
481
+ given?: Step | Step[]
482
+ when?: Step | Step[]
483
+ then: Step | Step[]
484
+ tags?: TagList
485
+ ```
486
+
487
+ ```mdl
488
+ ext component
489
+ uri: org.dxos.mdl.component@1.0
490
+ desc: A UI component with props, internal state, slots, actions, and events.
491
+ fields:
492
+ desc?: Prose
493
+ props?: FieldMap # external inputs (immutable inside component)
494
+ state?: FieldMap # internal reactive state
495
+ slots?: FieldMap # named ReactNode injection points
496
+ actions?: ActionMap # methods the component exposes or handles
497
+ emits?: EventMap # events the component raises to its parent
498
+ layout?: CodeBlock # ASCII sketch of visual structure (non-normative)
499
+ ```
500
+
501
+ ```mdl
502
+ ext op
503
+ uri: org.dxos.mdl.op@1.0
504
+ desc: |
505
+ A named operation with typed inputs, outputs, and declared errors.
506
+ Pure ops have no effects or requires. Effectful ops declare both.
507
+ fields:
508
+ desc?: Prose
509
+ input?: FieldMap # named input parameters
510
+ output?: TypeExpr # return type
511
+ errors?: ErrorMap # name: Prose (when this error occurs)
512
+ effects?: EffectList # echo:read | echo:write | http | fs | ...
513
+ requires?: ServiceList # injected service dependencies
514
+ note?: Prose # implementation guidance (non-normative)
515
+ ```