@dxos/plugin-script 0.8.4-main.7996785055 → 0.8.4-main.8baae0fced

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 (564) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/{browser/DeploymentDialog-LGEGIX64.mjs → neutral/DeploymentDialog-6DBF3V6C.mjs} +15 -27
  3. package/dist/lib/neutral/DeploymentDialog-6DBF3V6C.mjs.map +7 -0
  4. package/dist/lib/{browser/NotebookContainer-CC3G32Q5.mjs → neutral/NotebookArticle-VBBVX4BW.mjs} +48 -135
  5. package/dist/lib/neutral/NotebookArticle-VBBVX4BW.mjs.map +7 -0
  6. package/dist/lib/{browser/ScriptContainer-Z3MCPN2D.mjs → neutral/ScriptArticle-UBT27SB6.mjs} +10 -26
  7. package/dist/lib/neutral/ScriptArticle-UBT27SB6.mjs.map +7 -0
  8. package/dist/lib/neutral/ScriptPlugin.mjs +39 -0
  9. package/dist/lib/neutral/ScriptPlugin.mjs.map +7 -0
  10. package/dist/lib/neutral/ScriptPlugin.node.mjs +27 -0
  11. package/dist/lib/neutral/ScriptPlugin.node.mjs.map +7 -0
  12. package/dist/lib/neutral/ScriptPlugin.workerd.mjs +21 -0
  13. package/dist/lib/neutral/ScriptPlugin.workerd.mjs.map +7 -0
  14. package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs +31 -0
  15. package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs.map +7 -0
  16. package/dist/lib/neutral/ScriptProperties-RLXNAN3N.mjs +297 -0
  17. package/dist/lib/neutral/ScriptProperties-RLXNAN3N.mjs.map +7 -0
  18. package/dist/lib/{browser/TestContainer-ACNQMKVU.mjs → neutral/TestContainer-AFVTBYSJ.mjs} +9 -26
  19. package/dist/lib/neutral/TestContainer-AFVTBYSJ.mjs.map +7 -0
  20. package/dist/lib/neutral/app-graph-builder-7AWFCEQF.mjs +52 -0
  21. package/dist/lib/neutral/app-graph-builder-7AWFCEQF.mjs.map +7 -0
  22. package/dist/lib/{browser/blueprint-definition-MC264VR5.mjs → neutral/blueprint-definition-T33SBPP2.mjs} +4 -6
  23. package/dist/lib/neutral/blueprint-definition-T33SBPP2.mjs.map +7 -0
  24. package/dist/lib/{browser → neutral}/blueprints/index.mjs +3 -1
  25. package/dist/lib/neutral/capabilities/index.mjs +21 -0
  26. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  27. package/dist/lib/neutral/capabilities/node.mjs +17 -0
  28. package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
  29. package/dist/lib/{node-esm/chunk-JGN7TDJH.mjs → neutral/chunk-2REUEDUA.mjs} +10 -23
  30. package/dist/lib/neutral/chunk-2REUEDUA.mjs.map +7 -0
  31. package/dist/lib/{browser/chunk-37XPSUAH.mjs → neutral/chunk-436PZKYX.mjs} +2 -1
  32. package/dist/lib/neutral/chunk-436PZKYX.mjs.map +7 -0
  33. package/dist/lib/neutral/chunk-4OWPUMGN.mjs +8 -0
  34. package/dist/lib/neutral/chunk-4OWPUMGN.mjs.map +7 -0
  35. package/dist/lib/neutral/chunk-A4LRH25S.mjs +105 -0
  36. package/dist/lib/neutral/chunk-A4LRH25S.mjs.map +7 -0
  37. package/dist/lib/neutral/chunk-BDRB6ZX2.mjs +52 -0
  38. package/dist/lib/neutral/chunk-BDRB6ZX2.mjs.map +7 -0
  39. package/dist/lib/neutral/chunk-BMO5VOKL.mjs +125 -0
  40. package/dist/lib/neutral/chunk-BMO5VOKL.mjs.map +7 -0
  41. package/dist/lib/neutral/chunk-MI6X5CTJ.mjs +336 -0
  42. package/dist/lib/neutral/chunk-MI6X5CTJ.mjs.map +7 -0
  43. package/dist/lib/neutral/chunk-SNUWHNEW.mjs +8 -0
  44. package/dist/lib/neutral/chunk-SNUWHNEW.mjs.map +7 -0
  45. package/dist/lib/{browser/chunk-E6BQ4P6L.mjs → neutral/chunk-VXDJH6OL.mjs} +21 -50
  46. package/dist/lib/neutral/chunk-VXDJH6OL.mjs.map +7 -0
  47. package/dist/lib/{browser/compiler-MZKFKYCG.mjs → neutral/compiler-ODK4UA2N.mjs} +24 -21
  48. package/dist/lib/neutral/compiler-ODK4UA2N.mjs.map +7 -0
  49. package/dist/lib/{node-esm/chunk-SV742UH7.mjs → neutral/components/index.mjs} +75 -97
  50. package/dist/lib/neutral/components/index.mjs.map +7 -0
  51. package/dist/lib/neutral/containers/index.mjs +17 -0
  52. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  53. package/dist/lib/neutral/create-ZUHIXCBS.mjs +46 -0
  54. package/dist/lib/neutral/create-ZUHIXCBS.mjs.map +7 -0
  55. package/dist/lib/neutral/create-object-F2NWICFV.mjs +44 -0
  56. package/dist/lib/neutral/create-object-F2NWICFV.mjs.map +7 -0
  57. package/dist/lib/{browser/create-script-Z7J4HDV2.mjs → neutral/create-script-H5S4AO47.mjs} +6 -8
  58. package/dist/lib/neutral/create-script-H5S4AO47.mjs.map +7 -0
  59. package/dist/lib/neutral/delete-PAUWA2QM.mjs +21 -0
  60. package/dist/lib/neutral/delete-PAUWA2QM.mjs.map +7 -0
  61. package/dist/lib/neutral/deploy-M73G7HMP.mjs +63 -0
  62. package/dist/lib/neutral/deploy-M73G7HMP.mjs.map +7 -0
  63. package/dist/lib/{browser/chunk-DBEYGFVF.mjs → neutral/hooks/index.mjs} +49 -80
  64. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  65. package/dist/lib/neutral/index.mjs +41 -0
  66. package/dist/lib/neutral/inspect-invocations-UO27IPCL.mjs +59 -0
  67. package/dist/lib/neutral/inspect-invocations-UO27IPCL.mjs.map +7 -0
  68. package/dist/lib/neutral/install-function-MSWSC244.mjs +49 -0
  69. package/dist/lib/neutral/install-function-MSWSC244.mjs.map +7 -0
  70. package/dist/lib/neutral/invoke-V6XYXKLD.mjs +32 -0
  71. package/dist/lib/neutral/invoke-V6XYXKLD.mjs.map +7 -0
  72. package/dist/lib/neutral/meta.json +1 -0
  73. package/dist/lib/neutral/meta.mjs +10 -0
  74. package/dist/lib/neutral/operation-handler-KIZ7XZ5G.mjs +18 -0
  75. package/dist/lib/neutral/operation-handler-KIZ7XZ5G.mjs.map +7 -0
  76. package/dist/lib/neutral/operations/index.mjs +8 -0
  77. package/dist/lib/neutral/plugin.mjs +16 -0
  78. package/dist/lib/neutral/plugin.mjs.map +7 -0
  79. package/dist/lib/neutral/query-deployed-functions-4MMKQ6BR.mjs +34 -0
  80. package/dist/lib/neutral/query-deployed-functions-4MMKQ6BR.mjs.map +7 -0
  81. package/dist/lib/neutral/react-surface-K4SSUR57.mjs +120 -0
  82. package/dist/lib/neutral/react-surface-K4SSUR57.mjs.map +7 -0
  83. package/dist/lib/neutral/read-FFOSK6A3.mjs +26 -0
  84. package/dist/lib/neutral/read-FFOSK6A3.mjs.map +7 -0
  85. package/dist/lib/{browser/settings-BV3KXROF.mjs → neutral/settings-VJBW4OMK.mjs} +6 -11
  86. package/dist/lib/neutral/settings-VJBW4OMK.mjs.map +7 -0
  87. package/dist/lib/{browser → neutral}/templates/index.mjs +1 -1
  88. package/dist/lib/neutral/translations.mjs +104 -0
  89. package/dist/lib/neutral/translations.mjs.map +7 -0
  90. package/dist/lib/neutral/types/index.mjs +17 -0
  91. package/dist/lib/neutral/update-PJS5GG3Y.mjs +63 -0
  92. package/dist/lib/neutral/update-PJS5GG3Y.mjs.map +7 -0
  93. package/dist/types/src/ScriptPlugin.d.ts +1 -0
  94. package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
  95. package/dist/types/src/ScriptPlugin.node.d.ts +4 -0
  96. package/dist/types/src/ScriptPlugin.node.d.ts.map +1 -0
  97. package/dist/types/src/ScriptPlugin.test.d.ts +2 -0
  98. package/dist/types/src/ScriptPlugin.test.d.ts.map +1 -0
  99. package/dist/types/src/ScriptPlugin.workerd.d.ts +4 -0
  100. package/dist/types/src/ScriptPlugin.workerd.d.ts.map +1 -0
  101. package/dist/types/src/blueprints/functions/create.d.ts +11 -0
  102. package/dist/types/src/blueprints/functions/create.d.ts.map +1 -0
  103. package/dist/types/src/blueprints/functions/definitions.d.ts +129 -0
  104. package/dist/types/src/blueprints/functions/definitions.d.ts.map +1 -0
  105. package/dist/types/src/blueprints/functions/delete.d.ts +16 -0
  106. package/dist/types/src/blueprints/functions/delete.d.ts.map +1 -0
  107. package/dist/types/src/blueprints/functions/deploy.d.ts +20 -0
  108. package/dist/types/src/blueprints/functions/deploy.d.ts.map +1 -0
  109. package/dist/types/src/blueprints/functions/index.d.ts +4 -0
  110. package/dist/types/src/blueprints/functions/index.d.ts.map +1 -0
  111. package/dist/types/src/blueprints/functions/inspect-invocations.d.ts +27 -0
  112. package/dist/types/src/blueprints/functions/inspect-invocations.d.ts.map +1 -0
  113. package/dist/types/src/blueprints/functions/install-function.d.ts +11 -0
  114. package/dist/types/src/blueprints/functions/install-function.d.ts.map +1 -0
  115. package/dist/types/src/blueprints/functions/invoke.d.ts +20 -0
  116. package/dist/types/src/blueprints/functions/invoke.d.ts.map +1 -0
  117. package/dist/types/src/blueprints/functions/query-deployed-functions.d.ts +13 -0
  118. package/dist/types/src/blueprints/functions/query-deployed-functions.d.ts.map +1 -0
  119. package/dist/types/src/blueprints/functions/read.d.ts +20 -0
  120. package/dist/types/src/blueprints/functions/read.d.ts.map +1 -0
  121. package/dist/types/src/blueprints/functions/update.d.ts +25 -0
  122. package/dist/types/src/blueprints/functions/update.d.ts.map +1 -0
  123. package/dist/types/src/blueprints/script-blueprint.d.ts +2 -2
  124. package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -1
  125. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  126. package/dist/types/src/capabilities/artifact-definition.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/operation-handler.d.ts → operation-handler.d.ts} +1 -1
  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/FramePanel/FramePanel.d.ts.map +1 -1
  144. package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +1 -1
  145. package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
  146. package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +1 -1
  147. package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -1
  148. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +2 -6
  149. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
  150. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +219 -231
  151. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
  152. package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -1
  153. package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -1
  154. package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts +8 -0
  155. package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +1 -0
  156. package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts +241 -0
  157. package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts.map +1 -0
  158. package/dist/types/src/components/ScriptPluginSettings/index.d.ts +2 -0
  159. package/dist/types/src/components/ScriptPluginSettings/index.d.ts.map +1 -0
  160. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +3 -7
  161. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
  162. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +219 -231
  163. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
  164. package/dist/types/src/components/TestPanel/TestPanel.d.ts +1 -5
  165. package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
  166. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +3 -6
  167. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
  168. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +1 -5
  169. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
  170. package/dist/types/src/components/index.d.ts +2 -0
  171. package/dist/types/src/components/index.d.ts.map +1 -1
  172. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
  173. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +219 -231
  174. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
  175. package/dist/types/src/containers/DeploymentDialog/index.d.ts +1 -2
  176. package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -1
  177. package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts +7 -0
  178. package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts.map +1 -0
  179. package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts +7 -0
  180. package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts.map +1 -0
  181. package/dist/types/src/containers/NotebookArticle/index.d.ts +2 -0
  182. package/dist/types/src/containers/NotebookArticle/index.d.ts.map +1 -0
  183. package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts +10 -0
  184. package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -0
  185. package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts +242 -0
  186. package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts.map +1 -0
  187. package/dist/types/src/containers/ScriptArticle/index.d.ts +2 -0
  188. package/dist/types/src/containers/ScriptArticle/index.d.ts.map +1 -0
  189. package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts +7 -0
  190. package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts.map +1 -0
  191. package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts +7 -0
  192. package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts.map +1 -0
  193. package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts +7 -0
  194. package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts.map +1 -0
  195. package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +4 -5
  196. package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -1
  197. package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts +242 -0
  198. package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -0
  199. package/dist/types/src/containers/ScriptProperties/index.d.ts +1 -2
  200. package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -1
  201. package/dist/types/src/containers/TestContainer/TestContainer.d.ts +1 -1
  202. package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -1
  203. package/dist/types/src/containers/TestContainer/index.d.ts +1 -2
  204. package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -1
  205. package/dist/types/src/containers/index.d.ts +2 -4
  206. package/dist/types/src/containers/index.d.ts.map +1 -1
  207. package/dist/types/src/hooks/deploy.d.ts +14 -5
  208. package/dist/types/src/hooks/deploy.d.ts.map +1 -1
  209. package/dist/types/src/hooks/format.d.ts +1 -1
  210. package/dist/types/src/hooks/format.d.ts.map +1 -1
  211. package/dist/types/src/hooks/template.d.ts +1 -1
  212. package/dist/types/src/hooks/template.d.ts.map +1 -1
  213. package/dist/types/src/hooks/useCompiler.d.ts.map +1 -1
  214. package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
  215. package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
  216. package/dist/types/src/index.d.ts +2 -4
  217. package/dist/types/src/index.d.ts.map +1 -1
  218. package/dist/types/src/meta.d.ts.map +1 -1
  219. package/dist/types/src/notebook/compute-graph.d.ts +1 -1
  220. package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
  221. package/dist/types/src/notebook/eval.d.ts.map +1 -1
  222. package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -1
  223. package/dist/types/src/operations/create-script.d.ts +3 -3
  224. package/dist/types/src/operations/create-script.d.ts.map +1 -1
  225. package/dist/types/src/operations/index.d.ts +1 -2
  226. package/dist/types/src/operations/index.d.ts.map +1 -1
  227. package/dist/types/src/plugin.d.ts +4 -0
  228. package/dist/types/src/plugin.d.ts.map +1 -0
  229. package/dist/types/src/templates/anthropic.d.ts +1 -1
  230. package/dist/types/src/templates/anthropic.d.ts.map +1 -1
  231. package/dist/types/src/templates/chat.d.ts.map +1 -1
  232. package/dist/types/src/templates/chess-bot.d.ts +5 -11
  233. package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
  234. package/dist/types/src/templates/commentary.d.ts +5 -11
  235. package/dist/types/src/templates/commentary.d.ts.map +1 -1
  236. package/dist/types/src/templates/data-generator.d.ts.map +1 -1
  237. package/dist/types/src/templates/discord.d.ts.map +1 -1
  238. package/dist/types/src/templates/email.d.ts.map +1 -1
  239. package/dist/types/src/templates/forex-effect.d.ts +1 -1
  240. package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
  241. package/dist/types/src/templates/forex.d.ts +1 -1
  242. package/dist/types/src/templates/forex.d.ts.map +1 -1
  243. package/dist/types/src/templates/gmail.d.ts.map +1 -1
  244. package/dist/types/src/templates/index.d.ts +29 -29
  245. package/dist/types/src/templates/index.d.ts.map +1 -1
  246. package/dist/types/src/templates/ping.d.ts +1 -1
  247. package/dist/types/src/templates/ping.d.ts.map +1 -1
  248. package/dist/types/src/testing/index.d.ts +2 -1
  249. package/dist/types/src/testing/index.d.ts.map +1 -1
  250. package/dist/types/src/testing/test-notebook.d.ts +3 -0
  251. package/dist/types/src/testing/test-notebook.d.ts.map +1 -0
  252. package/dist/types/src/testing/test-script.d.ts +7 -0
  253. package/dist/types/src/testing/test-script.d.ts.map +1 -0
  254. package/dist/types/src/translations.d.ts +222 -94
  255. package/dist/types/src/translations.d.ts.map +1 -1
  256. package/dist/types/src/types/Notebook.d.ts +37 -29
  257. package/dist/types/src/types/Notebook.d.ts.map +1 -1
  258. package/dist/types/src/types/ScriptCapabilities.d.ts +6 -0
  259. package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -0
  260. package/dist/types/src/types/ScriptEvents.d.ts +3 -0
  261. package/dist/types/src/types/ScriptEvents.d.ts.map +1 -0
  262. package/dist/types/src/types/ScriptOperation.d.ts +29 -0
  263. package/dist/types/src/types/ScriptOperation.d.ts.map +1 -0
  264. package/dist/types/src/types/Settings.d.ts +7 -0
  265. package/dist/types/src/types/Settings.d.ts.map +1 -0
  266. package/dist/types/src/types/index.d.ts +4 -3
  267. package/dist/types/src/types/index.d.ts.map +1 -1
  268. package/dist/types/src/types/types.d.ts +1 -5
  269. package/dist/types/src/types/types.d.ts.map +1 -1
  270. package/dist/types/src/util/deploy.d.ts +1 -2
  271. package/dist/types/src/util/deploy.d.ts.map +1 -1
  272. package/dist/types/src/util/functions.d.ts +1 -2
  273. package/dist/types/src/util/functions.d.ts.map +1 -1
  274. package/dist/types/tsconfig.tsbuildinfo +1 -1
  275. package/package.json +153 -113
  276. package/src/ScriptPlugin.node.ts +21 -0
  277. package/src/ScriptPlugin.test.ts +31 -0
  278. package/src/ScriptPlugin.tsx +9 -56
  279. package/src/ScriptPlugin.workerd.ts +18 -0
  280. package/src/blueprints/functions/create.ts +47 -0
  281. package/src/blueprints/functions/definitions.ts +323 -0
  282. package/src/blueprints/functions/delete.ts +23 -0
  283. package/src/blueprints/functions/deploy.ts +71 -0
  284. package/src/blueprints/functions/index.ts +19 -0
  285. package/src/blueprints/functions/inspect-invocations.ts +56 -0
  286. package/src/blueprints/functions/install-function.ts +56 -0
  287. package/src/blueprints/functions/invoke.ts +34 -0
  288. package/src/blueprints/functions/query-deployed-functions.ts +35 -0
  289. package/src/blueprints/functions/read.ts +29 -0
  290. package/src/blueprints/functions/update.ts +68 -0
  291. package/src/blueprints/script-blueprint.ts +32 -5
  292. package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +13 -22
  293. package/src/capabilities/{artifact-definition/artifact-definition.ts → artifact-definition.ts} +4 -5
  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 +48 -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 +22 -11
  304. package/src/components/NotebookStack/NotebookMenu.tsx +7 -7
  305. package/src/components/NotebookStack/NotebookStack.stories.tsx +4 -4
  306. package/src/components/NotebookStack/NotebookStack.tsx +4 -4
  307. package/src/components/QueryEditor/QueryEditor.stories.tsx +3 -3
  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 +6 -6
  313. package/src/components/ScriptToolbar/ScriptToolbar.tsx +4 -4
  314. package/src/components/TestPanel/TestPanel.tsx +5 -9
  315. package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +3 -3
  316. package/src/components/TypescriptEditor/TypescriptEditor.tsx +2 -2
  317. package/src/components/index.ts +4 -0
  318. package/src/constants.ts +1 -1
  319. package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +4 -4
  320. package/src/containers/DeploymentDialog/DeploymentDialog.tsx +14 -13
  321. package/src/containers/DeploymentDialog/index.ts +1 -3
  322. package/src/containers/{NotebookContainer/NotebookContainer.stories.tsx → NotebookArticle/NotebookArticle.stories.tsx} +15 -14
  323. package/src/containers/{NotebookContainer/NotebookContainer.tsx → NotebookArticle/NotebookArticle.tsx} +32 -45
  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} +12 -12
  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 +7 -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 +2 -2
  338. package/src/e2e/deploy.test.ts +3 -2
  339. package/src/hooks/deploy.ts +8 -7
  340. package/src/hooks/format.ts +4 -4
  341. package/src/hooks/template.ts +6 -5
  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 +1 -0
  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 +3 -4
  350. package/src/operations/index.ts +2 -7
  351. package/src/plugin.ts +11 -0
  352. package/src/templates/anthropic.ts +1 -1
  353. package/src/templates/chess-bot.ts +11 -9
  354. package/src/templates/commentary.ts +27 -22
  355. package/src/templates/discord.ts +1 -1
  356. package/src/templates/forex-effect.ts +1 -1
  357. package/src/templates/forex.ts +1 -1
  358. package/src/templates/gmail.ts +1 -1
  359. package/src/templates/ping.ts +1 -1
  360. package/src/testing/index.ts +2 -1
  361. package/src/testing/simulator.test.ts +3 -4
  362. package/src/testing/{data.ts → test-notebook.ts} +11 -12
  363. package/src/testing/test-script.ts +28 -0
  364. package/src/translations.ts +86 -89
  365. package/src/types/Notebook.ts +3 -3
  366. package/src/types/ScriptCapabilities.ts +18 -0
  367. package/src/types/ScriptEvents.ts +11 -0
  368. package/src/{operations/definitions.ts → types/ScriptOperation.ts} +5 -3
  369. package/src/types/Settings.ts +20 -0
  370. package/src/types/index.ts +5 -3
  371. package/src/types/types.ts +1 -11
  372. package/src/util/deploy.ts +7 -7
  373. package/src/util/functions.ts +11 -11
  374. package/dist/lib/browser/DeploymentDialog-LGEGIX64.mjs.map +0 -7
  375. package/dist/lib/browser/NotebookContainer-CC3G32Q5.mjs.map +0 -7
  376. package/dist/lib/browser/ScriptContainer-Z3MCPN2D.mjs.map +0 -7
  377. package/dist/lib/browser/ScriptObjectSettings-LST7DUAN.mjs +0 -297
  378. package/dist/lib/browser/ScriptObjectSettings-LST7DUAN.mjs.map +0 -7
  379. package/dist/lib/browser/ScriptPluginSettings-IKWRISC3.mjs +0 -55
  380. package/dist/lib/browser/ScriptPluginSettings-IKWRISC3.mjs.map +0 -7
  381. package/dist/lib/browser/ScriptProperties-ZCRTZTAK.mjs +0 -28
  382. package/dist/lib/browser/ScriptProperties-ZCRTZTAK.mjs.map +0 -7
  383. package/dist/lib/browser/TestContainer-ACNQMKVU.mjs.map +0 -7
  384. package/dist/lib/browser/access-token-created-ZHVVOEL7.mjs +0 -36
  385. package/dist/lib/browser/access-token-created-ZHVVOEL7.mjs.map +0 -7
  386. package/dist/lib/browser/app-graph-builder-QPXX4YK5.mjs +0 -63
  387. package/dist/lib/browser/app-graph-builder-QPXX4YK5.mjs.map +0 -7
  388. package/dist/lib/browser/blueprint-definition-MC264VR5.mjs.map +0 -7
  389. package/dist/lib/browser/chunk-37XPSUAH.mjs.map +0 -7
  390. package/dist/lib/browser/chunk-4XJSGCAS.mjs +0 -742
  391. package/dist/lib/browser/chunk-4XJSGCAS.mjs.map +0 -7
  392. package/dist/lib/browser/chunk-7JI376EM.mjs +0 -20
  393. package/dist/lib/browser/chunk-7JI376EM.mjs.map +0 -7
  394. package/dist/lib/browser/chunk-ATTZUDT7.mjs +0 -67
  395. package/dist/lib/browser/chunk-ATTZUDT7.mjs.map +0 -7
  396. package/dist/lib/browser/chunk-BHRCZLLU.mjs +0 -105
  397. package/dist/lib/browser/chunk-BHRCZLLU.mjs.map +0 -7
  398. package/dist/lib/browser/chunk-CMHREENI.mjs +0 -8
  399. package/dist/lib/browser/chunk-CMHREENI.mjs.map +0 -7
  400. package/dist/lib/browser/chunk-DBEYGFVF.mjs.map +0 -7
  401. package/dist/lib/browser/chunk-E6BQ4P6L.mjs.map +0 -7
  402. package/dist/lib/browser/chunk-GB2HL4ZE.mjs +0 -26
  403. package/dist/lib/browser/chunk-GB2HL4ZE.mjs.map +0 -7
  404. package/dist/lib/browser/chunk-NQJRENSK.mjs +0 -75
  405. package/dist/lib/browser/chunk-NQJRENSK.mjs.map +0 -7
  406. package/dist/lib/browser/chunk-QLFFA4Y4.mjs +0 -52
  407. package/dist/lib/browser/chunk-QLFFA4Y4.mjs.map +0 -7
  408. package/dist/lib/browser/chunk-X44CJ7F5.mjs +0 -11
  409. package/dist/lib/browser/chunk-X44CJ7F5.mjs.map +0 -7
  410. package/dist/lib/browser/compiler-MZKFKYCG.mjs.map +0 -7
  411. package/dist/lib/browser/create-script-Z7J4HDV2.mjs.map +0 -7
  412. package/dist/lib/browser/index.mjs +0 -268
  413. package/dist/lib/browser/index.mjs.map +0 -7
  414. package/dist/lib/browser/meta.json +0 -1
  415. package/dist/lib/browser/operation-handler-76AHUB5G.mjs +0 -18
  416. package/dist/lib/browser/operation-handler-76AHUB5G.mjs.map +0 -7
  417. package/dist/lib/browser/operations/index.mjs +0 -14
  418. package/dist/lib/browser/react-surface-2VVUIV66.mjs +0 -145
  419. package/dist/lib/browser/react-surface-2VVUIV66.mjs.map +0 -7
  420. package/dist/lib/browser/settings-BV3KXROF.mjs.map +0 -7
  421. package/dist/lib/browser/types/index.mjs +0 -15
  422. package/dist/lib/node-esm/DeploymentDialog-XSP2EDU2.mjs +0 -125
  423. package/dist/lib/node-esm/DeploymentDialog-XSP2EDU2.mjs.map +0 -7
  424. package/dist/lib/node-esm/NotebookContainer-LNWMJD2D.mjs +0 -851
  425. package/dist/lib/node-esm/NotebookContainer-LNWMJD2D.mjs.map +0 -7
  426. package/dist/lib/node-esm/ScriptContainer-TSU4DBGA.mjs +0 -96
  427. package/dist/lib/node-esm/ScriptContainer-TSU4DBGA.mjs.map +0 -7
  428. package/dist/lib/node-esm/ScriptObjectSettings-OGY7X3UE.mjs +0 -298
  429. package/dist/lib/node-esm/ScriptObjectSettings-OGY7X3UE.mjs.map +0 -7
  430. package/dist/lib/node-esm/ScriptPluginSettings-HIUSAHCP.mjs +0 -56
  431. package/dist/lib/node-esm/ScriptPluginSettings-HIUSAHCP.mjs.map +0 -7
  432. package/dist/lib/node-esm/ScriptProperties-I6SC4P3R.mjs +0 -29
  433. package/dist/lib/node-esm/ScriptProperties-I6SC4P3R.mjs.map +0 -7
  434. package/dist/lib/node-esm/TestContainer-WKISNRNU.mjs +0 -62
  435. package/dist/lib/node-esm/TestContainer-WKISNRNU.mjs.map +0 -7
  436. package/dist/lib/node-esm/access-token-created-7CGU7FXD.mjs +0 -37
  437. package/dist/lib/node-esm/access-token-created-7CGU7FXD.mjs.map +0 -7
  438. package/dist/lib/node-esm/app-graph-builder-GNGOYXIU.mjs +0 -64
  439. package/dist/lib/node-esm/app-graph-builder-GNGOYXIU.mjs.map +0 -7
  440. package/dist/lib/node-esm/blueprint-definition-DTRGTRZA.mjs +0 -18
  441. package/dist/lib/node-esm/blueprint-definition-DTRGTRZA.mjs.map +0 -7
  442. package/dist/lib/node-esm/blueprints/index.mjs +0 -9
  443. package/dist/lib/node-esm/chunk-2NGQCFVE.mjs +0 -28
  444. package/dist/lib/node-esm/chunk-2NGQCFVE.mjs.map +0 -7
  445. package/dist/lib/node-esm/chunk-4YAEFFW2.mjs +0 -12
  446. package/dist/lib/node-esm/chunk-4YAEFFW2.mjs.map +0 -7
  447. package/dist/lib/node-esm/chunk-C3GH2SDF.mjs +0 -76
  448. package/dist/lib/node-esm/chunk-C3GH2SDF.mjs.map +0 -7
  449. package/dist/lib/node-esm/chunk-CKYUNEE5.mjs +0 -10
  450. package/dist/lib/node-esm/chunk-CKYUNEE5.mjs.map +0 -7
  451. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  452. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
  453. package/dist/lib/node-esm/chunk-JGN7TDJH.mjs.map +0 -7
  454. package/dist/lib/node-esm/chunk-L3JLWXB5.mjs +0 -33
  455. package/dist/lib/node-esm/chunk-L3JLWXB5.mjs.map +0 -7
  456. package/dist/lib/node-esm/chunk-L55OBVT5.mjs +0 -53
  457. package/dist/lib/node-esm/chunk-L55OBVT5.mjs.map +0 -7
  458. package/dist/lib/node-esm/chunk-P4Q2BPBB.mjs +0 -22
  459. package/dist/lib/node-esm/chunk-P4Q2BPBB.mjs.map +0 -7
  460. package/dist/lib/node-esm/chunk-RN2SMYCL.mjs +0 -401
  461. package/dist/lib/node-esm/chunk-RN2SMYCL.mjs.map +0 -7
  462. package/dist/lib/node-esm/chunk-RTM3D4T5.mjs +0 -181
  463. package/dist/lib/node-esm/chunk-RTM3D4T5.mjs.map +0 -7
  464. package/dist/lib/node-esm/chunk-SV742UH7.mjs.map +0 -7
  465. package/dist/lib/node-esm/chunk-Y5VWHRVU.mjs +0 -107
  466. package/dist/lib/node-esm/chunk-Y5VWHRVU.mjs.map +0 -7
  467. package/dist/lib/node-esm/compiler-QBWP7ERK.mjs +0 -99
  468. package/dist/lib/node-esm/compiler-QBWP7ERK.mjs.map +0 -7
  469. package/dist/lib/node-esm/create-script-TAJHVROB.mjs +0 -48
  470. package/dist/lib/node-esm/create-script-TAJHVROB.mjs.map +0 -7
  471. package/dist/lib/node-esm/index.mjs +0 -269
  472. package/dist/lib/node-esm/index.mjs.map +0 -7
  473. package/dist/lib/node-esm/meta.json +0 -1
  474. package/dist/lib/node-esm/operation-handler-OUROH3T7.mjs +0 -19
  475. package/dist/lib/node-esm/operation-handler-OUROH3T7.mjs.map +0 -7
  476. package/dist/lib/node-esm/operations/index.mjs +0 -15
  477. package/dist/lib/node-esm/react-surface-OJ55GFCP.mjs +0 -146
  478. package/dist/lib/node-esm/react-surface-OJ55GFCP.mjs.map +0 -7
  479. package/dist/lib/node-esm/settings-2TK3XPLD.mjs +0 -36
  480. package/dist/lib/node-esm/settings-2TK3XPLD.mjs.map +0 -7
  481. package/dist/lib/node-esm/templates/index.mjs +0 -11
  482. package/dist/lib/node-esm/templates/index.mjs.map +0 -7
  483. package/dist/lib/node-esm/types/index.mjs +0 -16
  484. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  485. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  486. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  487. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  488. package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +0 -1
  489. package/dist/types/src/capabilities/artifact-definition/index.d.ts +0 -3
  490. package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +0 -1
  491. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
  492. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  493. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
  494. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  495. package/dist/types/src/capabilities/compiler/compiler.d.ts +0 -6
  496. package/dist/types/src/capabilities/compiler/compiler.d.ts.map +0 -1
  497. package/dist/types/src/capabilities/compiler/index.d.ts +0 -3
  498. package/dist/types/src/capabilities/compiler/index.d.ts.map +0 -1
  499. package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -4
  500. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
  501. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
  502. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  503. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  504. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  505. package/dist/types/src/capabilities/settings/index.d.ts +0 -7
  506. package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
  507. package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
  508. package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts +0 -7
  509. package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +0 -1
  510. package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts +0 -7
  511. package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +0 -1
  512. package/dist/types/src/containers/NotebookContainer/index.d.ts +0 -3
  513. package/dist/types/src/containers/NotebookContainer/index.d.ts.map +0 -1
  514. package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts +0 -10
  515. package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +0 -1
  516. package/dist/types/src/containers/ScriptContainer/index.d.ts +0 -3
  517. package/dist/types/src/containers/ScriptContainer/index.d.ts.map +0 -1
  518. package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts +0 -7
  519. package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts.map +0 -1
  520. package/dist/types/src/containers/ScriptObjectSettings/index.d.ts +0 -3
  521. package/dist/types/src/containers/ScriptObjectSettings/index.d.ts.map +0 -1
  522. package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts +0 -8
  523. package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +0 -1
  524. package/dist/types/src/containers/ScriptPluginSettings/index.d.ts +0 -3
  525. package/dist/types/src/containers/ScriptPluginSettings/index.d.ts.map +0 -1
  526. package/dist/types/src/operations/access-token-created.d.ts +0 -5
  527. package/dist/types/src/operations/access-token-created.d.ts.map +0 -1
  528. package/dist/types/src/operations/definitions.d.ts +0 -28
  529. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  530. package/dist/types/src/testing/data.d.ts +0 -3
  531. package/dist/types/src/testing/data.d.ts.map +0 -1
  532. package/dist/types/src/types/capabilities.d.ts +0 -12
  533. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  534. package/dist/types/src/types/events.d.ts +0 -5
  535. package/dist/types/src/types/events.d.ts.map +0 -1
  536. package/src/capabilities/app-graph-builder/index.ts +0 -7
  537. package/src/capabilities/artifact-definition/index.ts +0 -7
  538. package/src/capabilities/blueprint-definition/index.ts +0 -7
  539. package/src/capabilities/compiler/index.ts +0 -7
  540. package/src/capabilities/operation-handler/index.ts +0 -11
  541. package/src/capabilities/operation-handler/operation-handler.ts +0 -16
  542. package/src/capabilities/react-surface/index.ts +0 -7
  543. package/src/capabilities/react-surface/react-surface.tsx +0 -138
  544. package/src/capabilities/settings/index.ts +0 -7
  545. package/src/containers/NotebookContainer/index.ts +0 -7
  546. package/src/containers/ScriptContainer/index.ts +0 -7
  547. package/src/containers/ScriptObjectSettings/ScriptObjectSettings.tsx +0 -295
  548. package/src/containers/ScriptObjectSettings/index.ts +0 -7
  549. package/src/containers/ScriptPluginSettings/ScriptPluginSettings.tsx +0 -66
  550. package/src/containers/ScriptPluginSettings/index.ts +0 -7
  551. package/src/operations/access-token-created.ts +0 -36
  552. package/src/types/capabilities.ts +0 -17
  553. package/src/types/events.ts +0 -11
  554. /package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
  555. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  556. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  557. /package/dist/lib/{browser/operations → neutral}/index.mjs.map +0 -0
  558. /package/dist/lib/{browser/templates/index.mjs.map → neutral/meta.mjs.map} +0 -0
  559. /package/dist/lib/{browser/types → neutral/operations}/index.mjs.map +0 -0
  560. /package/dist/lib/{node-esm/blueprints → neutral/templates}/index.mjs.map +0 -0
  561. /package/dist/lib/{node-esm/operations → neutral/types}/index.mjs.map +0 -0
  562. /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
  563. /package/dist/types/src/capabilities/{artifact-definition/artifact-definition.d.ts → artifact-definition.d.ts} +0 -0
  564. /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.
@@ -1,14 +1,3 @@
1
- import {
2
- useCreateAndDeployScriptTemplates
3
- } from "./chunk-DBEYGFVF.mjs";
4
- import "./chunk-E6BQ4P6L.mjs";
5
- import "./chunk-CMHREENI.mjs";
6
- import "./chunk-NQJRENSK.mjs";
7
- import "./chunk-QLFFA4Y4.mjs";
8
- import {
9
- meta
10
- } from "./chunk-37XPSUAH.mjs";
11
- import "./chunk-BHRCZLLU.mjs";
12
1
  import "./chunk-J5LGTIGS.mjs";
13
2
 
14
3
  // src/containers/DeploymentDialog/DeploymentDialog.tsx
@@ -17,6 +6,8 @@ import { useOperationInvoker } from "@dxos/app-framework/ui";
17
6
  import { LayoutOperation } from "@dxos/app-toolkit";
18
7
  import { getSpace } from "@dxos/react-client/echo";
19
8
  import { Button, Dialog, useTranslation } from "@dxos/react-ui";
9
+ import { useCreateAndDeployScriptTemplates } from "#hooks";
10
+ import { meta } from "#meta";
20
11
  var DeploymentDialog = ({ accessToken, scriptTemplates }) => {
21
12
  const { t } = useTranslation(meta.id);
22
13
  const space = useMemo(() => getSpace(accessToken), [
@@ -31,21 +22,21 @@ var DeploymentDialog = ({ accessToken, scriptTemplates }) => {
31
22
  icon: "ph--check--regular",
32
23
  duration: Infinity,
33
24
  title: [
34
- "script deployment toast label",
25
+ "script-deployment-toast.label",
35
26
  {
36
27
  ns: meta.id,
37
28
  count: scriptTemplates.length
38
29
  }
39
30
  ],
40
31
  description: [
41
- "script deployment toast description",
32
+ "script-deployment-toast.description",
42
33
  {
43
34
  ns: meta.id,
44
35
  count: scriptTemplates.length
45
36
  }
46
37
  ],
47
38
  closeLabel: [
48
- "script deployment toast close label",
39
+ "script-deployment-toast-close.label",
49
40
  {
50
41
  ns: meta.id,
51
42
  count: scriptTemplates.length
@@ -65,21 +56,21 @@ var DeploymentDialog = ({ accessToken, scriptTemplates }) => {
65
56
  icon: "ph--warning--regular",
66
57
  duration: Infinity,
67
58
  title: [
68
- "script deployment error toast label",
59
+ "script-deployment-error-toast.label",
69
60
  {
70
61
  ns: meta.id,
71
62
  count: scriptTemplates.length
72
63
  }
73
64
  ],
74
65
  description: [
75
- "script deployment error toast description",
66
+ "script-deployment-error-toast.description",
76
67
  {
77
68
  ns: meta.id,
78
69
  count: scriptTemplates.length
79
70
  }
80
71
  ],
81
72
  closeLabel: [
82
- "script deployment error toast close label",
73
+ "script-deployment-error-toast-close.label",
83
74
  {
84
75
  ns: meta.id,
85
76
  count: scriptTemplates.length
@@ -91,9 +82,9 @@ var DeploymentDialog = ({ accessToken, scriptTemplates }) => {
91
82
  status,
92
83
  invokePromise
93
84
  ]);
94
- return /* @__PURE__ */ React.createElement(Dialog.Content, null, /* @__PURE__ */ React.createElement(Dialog.Header, null, /* @__PURE__ */ React.createElement(Dialog.Title, null, t("deployment dialog title")), /* @__PURE__ */ React.createElement(Dialog.Close, {
85
+ return /* @__PURE__ */ React.createElement(Dialog.Content, null, /* @__PURE__ */ React.createElement(Dialog.Header, null, /* @__PURE__ */ React.createElement(Dialog.Title, null, t("deployment-dialog.title")), /* @__PURE__ */ React.createElement(Dialog.Close, {
95
86
  asChild: true
96
- }, /* @__PURE__ */ React.createElement(Dialog.CloseIconButton, null))), /* @__PURE__ */ React.createElement(Dialog.Body, null, /* @__PURE__ */ React.createElement("p", null, t("deployment dialog scripts found message", {
87
+ }, /* @__PURE__ */ React.createElement(Dialog.CloseIconButton, null))), /* @__PURE__ */ React.createElement(Dialog.Body, null, /* @__PURE__ */ React.createElement("p", null, t("deployment-dialog-scripts-found.message", {
97
88
  count: scriptTemplates.length
98
89
  })), /* @__PURE__ */ React.createElement("ul", {
99
90
  className: "pt-2"
@@ -105,20 +96,17 @@ var DeploymentDialog = ({ accessToken, scriptTemplates }) => {
105
96
  asChild: true
106
97
  }, /* @__PURE__ */ React.createElement(Button, {
107
98
  disabled: status === "pending"
108
- }, t("deployment dialog skip button label"))), /* @__PURE__ */ React.createElement(Button, {
99
+ }, t("deployment-dialog-skip-button.label"))), /* @__PURE__ */ React.createElement(Button, {
109
100
  variant: "primary",
110
101
  onClick: handleCreateAndDeployScripts,
111
102
  disabled: status === "pending"
112
- }, status === "pending" ? t("deployment dialog deploy functions pending button label", {
103
+ }, status === "pending" ? t("deployment-dialog-deploy-functions-pending-button.label", {
113
104
  count: scriptTemplates.length
114
- }) : t("deployment dialog deploy functions button label", {
105
+ }) : t("deployment-dialog-deploy-functions-button.label", {
115
106
  count: scriptTemplates.length
116
107
  }))));
117
108
  };
118
-
119
- // src/containers/DeploymentDialog/index.ts
120
- var DeploymentDialog_default = DeploymentDialog;
121
109
  export {
122
- DeploymentDialog_default as default
110
+ DeploymentDialog as default
123
111
  };
124
- //# sourceMappingURL=DeploymentDialog-LGEGIX64.mjs.map
112
+ //# sourceMappingURL=DeploymentDialog-6DBF3V6C.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/DeploymentDialog/DeploymentDialog.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useEffect, useMemo } from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { Button, Dialog, useTranslation } from '@dxos/react-ui';\nimport { type AccessToken } from '@dxos/types';\n\nimport { useCreateAndDeployScriptTemplates } from '#hooks';\nimport { meta } from '#meta';\n\nimport { type Template } from '../../templates';\n\n// TODO(ZaymonFC):\n// - Show activity and feedback to the user.\n// - Only take an array of templateIds and get the name from the data.\n// - Pending / onError states.\n\nexport type DeploymentDialogProps = {\n accessToken: AccessToken.AccessToken;\n scriptTemplates: Template[];\n};\n\nexport const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDialogProps) => {\n const { t } = useTranslation(meta.id);\n const space = useMemo(() => getSpace(accessToken), [accessToken]);\n\n // TODO(ZaymonFC): Thinking further. All of this should get moved to intents to run async in the background.\n // Deployment shouldn't be tied to the lifecycle of the dialogue component.\n const { handleCreateAndDeployScripts, status } = useCreateAndDeployScriptTemplates(space, scriptTemplates);\n const { invokePromise } = useOperationInvoker();\n\n useEffect(() => {\n if (status === 'success') {\n // TODO(ZaymonFC): We can probably re-use this toast for normal script deployment.\n void invokePromise(LayoutOperation.AddToast, {\n id: `${meta.id}.deployment-success`,\n icon: 'ph--check--regular',\n duration: Infinity,\n title: ['script-deployment-toast.label', { ns: meta.id, count: scriptTemplates.length }],\n description: ['script-deployment-toast.description', { ns: meta.id, count: scriptTemplates.length }],\n closeLabel: ['script-deployment-toast-close.label', { ns: meta.id, count: scriptTemplates.length }],\n });\n void invokePromise(LayoutOperation.UpdateDialog, { state: false });\n }\n if (status === 'error') {\n void invokePromise(LayoutOperation.UpdateDialog, { state: false });\n void invokePromise(LayoutOperation.AddToast, {\n id: `${meta.id}.deployment-error`,\n icon: 'ph--warning--regular',\n duration: Infinity,\n title: ['script-deployment-error-toast.label', { ns: meta.id, count: scriptTemplates.length }],\n description: ['script-deployment-error-toast.description', { ns: meta.id, count: scriptTemplates.length }],\n closeLabel: ['script-deployment-error-toast-close.label', { ns: meta.id, count: scriptTemplates.length }],\n });\n }\n }, [status, invokePromise]);\n\n return (\n <Dialog.Content>\n <Dialog.Header>\n <Dialog.Title>{t('deployment-dialog.title')}</Dialog.Title>\n <Dialog.Close asChild>\n <Dialog.CloseIconButton />\n </Dialog.Close>\n </Dialog.Header>\n <Dialog.Body>\n <p>\n {t('deployment-dialog-scripts-found.message', {\n count: scriptTemplates.length,\n })}\n </p>\n <ul className='pt-2'>\n {scriptTemplates.map((template) => {\n return <li key={template.id}>{template.name}</li>;\n })}\n </ul>\n </Dialog.Body>\n <Dialog.ActionBar>\n <Dialog.Close asChild>\n <Button disabled={status === 'pending'}>{t('deployment-dialog-skip-button.label')}</Button>\n </Dialog.Close>\n <Button variant='primary' onClick={handleCreateAndDeployScripts} disabled={status === 'pending'}>\n {status === 'pending'\n ? t('deployment-dialog-deploy-functions-pending-button.label', {\n count: scriptTemplates.length,\n })\n : t('deployment-dialog-deploy-functions-button.label', {\n count: scriptTemplates.length,\n })}\n </Button>\n </Dialog.ActionBar>\n </Dialog.Content>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,SAASC,WAAWC,eAAe;AAE1C,SAASC,2BAA2B;AACpC,SAASC,uBAAuB;AAChC,SAASC,gBAAgB;AACzB,SAASC,QAAQC,QAAQC,sBAAsB;AAG/C,SAASC,yCAAyC;AAClD,SAASC,YAAY;AAcd,IAAMC,mBAAmB,CAAC,EAAEC,aAAaC,gBAAe,MAAyB;AACtF,QAAM,EAAEC,EAAC,IAAKN,eAAeE,KAAKK,EAAE;AACpC,QAAMC,QAAQd,QAAQ,MAAMG,SAASO,WAAAA,GAAc;IAACA;GAAY;AAIhE,QAAM,EAAEK,8BAA8BC,OAAM,IAAKT,kCAAkCO,OAAOH,eAAAA;AAC1F,QAAM,EAAEM,cAAa,IAAKhB,oBAAAA;AAE1BF,YAAU,MAAA;AACR,QAAIiB,WAAW,WAAW;AAExB,WAAKC,cAAcf,gBAAgBgB,UAAU;QAC3CL,IAAI,GAAGL,KAAKK,EAAE;QACdM,MAAM;QACNC,UAAUC;QACVC,OAAO;UAAC;UAAiC;YAAEC,IAAIf,KAAKK;YAAIW,OAAOb,gBAAgBc;UAAO;;QACtFC,aAAa;UAAC;UAAuC;YAAEH,IAAIf,KAAKK;YAAIW,OAAOb,gBAAgBc;UAAO;;QAClGE,YAAY;UAAC;UAAuC;YAAEJ,IAAIf,KAAKK;YAAIW,OAAOb,gBAAgBc;UAAO;;MACnG,CAAA;AACA,WAAKR,cAAcf,gBAAgB0B,cAAc;QAAEC,OAAO;MAAM,CAAA;IAClE;AACA,QAAIb,WAAW,SAAS;AACtB,WAAKC,cAAcf,gBAAgB0B,cAAc;QAAEC,OAAO;MAAM,CAAA;AAChE,WAAKZ,cAAcf,gBAAgBgB,UAAU;QAC3CL,IAAI,GAAGL,KAAKK,EAAE;QACdM,MAAM;QACNC,UAAUC;QACVC,OAAO;UAAC;UAAuC;YAAEC,IAAIf,KAAKK;YAAIW,OAAOb,gBAAgBc;UAAO;;QAC5FC,aAAa;UAAC;UAA6C;YAAEH,IAAIf,KAAKK;YAAIW,OAAOb,gBAAgBc;UAAO;;QACxGE,YAAY;UAAC;UAA6C;YAAEJ,IAAIf,KAAKK;YAAIW,OAAOb,gBAAgBc;UAAO;;MACzG,CAAA;IACF;EACF,GAAG;IAACT;IAAQC;GAAc;AAE1B,SACE,sBAAA,cAACZ,OAAOyB,SAAO,MACb,sBAAA,cAACzB,OAAO0B,QAAM,MACZ,sBAAA,cAAC1B,OAAO2B,OAAK,MAAEpB,EAAE,yBAAA,CAAA,GACjB,sBAAA,cAACP,OAAO4B,OAAK;IAACC,SAAAA;KACZ,sBAAA,cAAC7B,OAAO8B,iBAAe,IAAA,CAAA,CAAA,GAG3B,sBAAA,cAAC9B,OAAO+B,MAAI,MACV,sBAAA,cAACC,KAAAA,MACEzB,EAAE,2CAA2C;IAC5CY,OAAOb,gBAAgBc;EACzB,CAAA,CAAA,GAEF,sBAAA,cAACa,MAAAA;IAAGC,WAAU;KACX5B,gBAAgB6B,IAAI,CAACC,aAAAA;AACpB,WAAO,sBAAA,cAACC,MAAAA;MAAGC,KAAKF,SAAS5B;OAAK4B,SAASG,IAAI;EAC7C,CAAA,CAAA,CAAA,GAGJ,sBAAA,cAACvC,OAAOwC,WAAS,MACf,sBAAA,cAACxC,OAAO4B,OAAK;IAACC,SAAAA;KACZ,sBAAA,cAAC9B,QAAAA;IAAO0C,UAAU9B,WAAW;KAAYJ,EAAE,qCAAA,CAAA,CAAA,GAE7C,sBAAA,cAACR,QAAAA;IAAO2C,SAAQ;IAAUC,SAASjC;IAA8B+B,UAAU9B,WAAW;KACnFA,WAAW,YACRJ,EAAE,2DAA2D;IAC3DY,OAAOb,gBAAgBc;EACzB,CAAA,IACAb,EAAE,mDAAmD;IACnDY,OAAOb,gBAAgBc;EACzB,CAAA,CAAA,CAAA,CAAA;AAKd;",
6
+ "names": ["React", "useEffect", "useMemo", "useOperationInvoker", "LayoutOperation", "getSpace", "Button", "Dialog", "useTranslation", "useCreateAndDeployScriptTemplates", "meta", "DeploymentDialog", "accessToken", "scriptTemplates", "t", "id", "space", "handleCreateAndDeployScripts", "status", "invokePromise", "AddToast", "icon", "duration", "Infinity", "title", "ns", "count", "length", "description", "closeLabel", "UpdateDialog", "state", "Content", "Header", "Title", "Close", "asChild", "CloseIconButton", "Body", "p", "ul", "className", "map", "template", "li", "key", "name", "ActionBar", "disabled", "variant", "onClick"]
7
+ }
@@ -1,38 +1,26 @@
1
- import {
2
- NotebookMenu,
3
- NotebookStack
4
- } from "./chunk-4XJSGCAS.mjs";
5
- import "./chunk-ATTZUDT7.mjs";
6
- import "./chunk-DBEYGFVF.mjs";
7
- import "./chunk-E6BQ4P6L.mjs";
8
- import "./chunk-CMHREENI.mjs";
9
- import "./chunk-NQJRENSK.mjs";
10
- import "./chunk-QLFFA4Y4.mjs";
11
- import {
12
- meta
13
- } from "./chunk-37XPSUAH.mjs";
14
- import "./chunk-BHRCZLLU.mjs";
15
1
  import "./chunk-J5LGTIGS.mjs";
16
2
 
17
- // src/containers/NotebookContainer/NotebookContainer.tsx
3
+ // src/containers/NotebookArticle/NotebookArticle.tsx
18
4
  import { RegistryContext } from "@effect-atom/atom-react";
19
5
  import * as Cause from "effect/Cause";
20
6
  import * as Effect from "effect/Effect";
21
7
  import * as Exit from "effect/Exit";
22
8
  import React, { useCallback, useContext, useMemo, useState } from "react";
9
+ import { useSpaceCallback } from "@dxos/app-framework/ui";
23
10
  import { AgentPrompt } from "@dxos/assistant-toolkit";
24
- import { Blueprint, Prompt } from "@dxos/blueprints";
11
+ import { Blueprint, Routine } from "@dxos/compute";
12
+ import { Operation } from "@dxos/compute";
25
13
  import { Filter, Obj, Query, Ref } from "@dxos/echo";
26
14
  import { QueryBuilder } from "@dxos/echo-query";
27
- import { FunctionInvocationService, TracingService } from "@dxos/functions";
28
15
  import { invariant as invariant2 } from "@dxos/invariant";
29
16
  import { log as log2 } from "@dxos/log";
30
- import { useComputeRuntimeCallback } from "@dxos/plugin-automation";
31
- import { Graph } from "@dxos/plugin-explorer/types";
17
+ import { Graph } from "@dxos/plugin-explorer";
32
18
  import { DropdownMenu, IconButton, Panel, Toolbar, useTranslation } from "@dxos/react-ui";
33
19
  import { useAttention } from "@dxos/react-ui-attention";
34
20
  import { Text, ViewModel } from "@dxos/schema";
35
21
  import { isNonNullable } from "@dxos/util";
22
+ import { NotebookMenu, NotebookStack } from "#components";
23
+ import { meta } from "#meta";
36
24
 
37
25
  // src/notebook/compute-graph.ts
38
26
  import { Atom } from "@effect-atom/atom-react";
@@ -129,6 +117,7 @@ var VirtualTypeScriptParser = class {
129
117
  compilerOptions = {
130
118
  target: ts.ScriptTarget.ES2020,
131
119
  module: ts.ModuleKind.ESNext,
120
+ moduleResolution: ts.ModuleResolutionKind.Bundler,
132
121
  strict: true,
133
122
  esModuleInterop: true,
134
123
  skipLibCheck: true,
@@ -140,15 +129,7 @@ var VirtualTypeScriptParser = class {
140
129
  * Parse a single expression or statement.
141
130
  */
142
131
  parseExpression(input) {
143
- invariant(input.trim() !== "", "input must not be empty", {
144
- F: __dxlog_file,
145
- L: 57,
146
- S: this,
147
- A: [
148
- "input.trim() !== ''",
149
- "'input must not be empty'"
150
- ]
151
- });
132
+ invariant(input.trim() !== "", "input must not be empty", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 34, S: this, A: ["input.trim() !== ''", "'input must not be empty'"] });
152
133
  const files = [
153
134
  {
154
135
  filename: "/temp.ts",
@@ -188,7 +169,9 @@ var VirtualTypeScriptParser = class {
188
169
  const typeChecker = env.languageService.getProgram()?.getTypeChecker();
189
170
  files.forEach((file) => {
190
171
  const sourceFile = env.getSourceFile(file.filename);
191
- if (!sourceFile || !typeChecker) return;
172
+ if (!sourceFile || !typeChecker) {
173
+ return;
174
+ }
192
175
  const fileResults = this.analyzeSourceFile(sourceFile, typeChecker);
193
176
  results.push(...fileResults);
194
177
  });
@@ -272,7 +255,9 @@ var VirtualTypeScriptParser = class {
272
255
  * Extract parameter information from a signature.
273
256
  */
274
257
  extractParameters(signature, typeChecker) {
275
- if (!signature) return [];
258
+ if (!signature) {
259
+ return [];
260
+ }
276
261
  return signature.parameters.map((param) => ({
277
262
  name: param.getName(),
278
263
  type: typeChecker.typeToString(typeChecker.getTypeOfSymbolAtLocation(param, param.valueDeclaration))
@@ -460,24 +445,14 @@ var ComputeGraph = class {
460
445
  if (!expr) {
461
446
  log.error("no expression for cell", {
462
447
  cellId
463
- }, {
464
- F: __dxlog_file2,
465
- L: 105,
466
- S: this,
467
- C: (f, a) => f(...a)
468
- });
448
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 78, S: this });
469
449
  continue;
470
450
  }
471
451
  const cellSource = this._notebook.cells.find((cell) => cell.id === cellId)?.source?.target?.content;
472
452
  if (!cellSource) {
473
453
  log.error("no source for cell", {
474
454
  cellId
475
- }, {
476
- F: __dxlog_file2,
477
- L: 111,
478
- S: this,
479
- C: (f, a) => f(...a)
480
- });
455
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 85, S: this });
481
456
  continue;
482
457
  }
483
458
  try {
@@ -505,12 +480,7 @@ var ComputeGraph = class {
505
480
  log.error("error evaluating cell", {
506
481
  cellId,
507
482
  error
508
- }, {
509
- F: __dxlog_file2,
510
- L: 147,
511
- S: this,
512
- C: (f, a) => f(...a)
513
- });
483
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 120, S: this });
514
484
  }
515
485
  }
516
486
  this._registry.set(this._valuesByCellIdAtom, valuesByCellId);
@@ -574,14 +544,14 @@ var ComputeGraph = class {
574
544
  }
575
545
  };
576
546
 
577
- // src/containers/NotebookContainer/NotebookContainer.tsx
578
- var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-script/src/containers/NotebookContainer/NotebookContainer.tsx";
547
+ // src/containers/NotebookArticle/NotebookArticle.tsx
548
+ var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-script/src/containers/NotebookArticle/NotebookArticle.tsx";
579
549
  var INCLUDE_BLUEPRINTS = [
580
550
  "org.dxos.blueprint.assistant",
581
551
  "org.dxos.blueprint.database",
582
552
  "org.dxos.blueprint.markdown"
583
553
  ];
584
- var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
554
+ var NotebookArticle = ({ role, subject: notebook, attendableId, env }) => {
585
555
  const { t } = useTranslation(meta.id);
586
556
  const registry = useContext(RegistryContext);
587
557
  const db = Obj.getDatabase(notebook);
@@ -592,15 +562,7 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
592
562
  ]);
593
563
  const [queryValues, setQueryValues] = useState({});
594
564
  const handleExecQueries = useCallback(async () => {
595
- invariant2(db, void 0, {
596
- F: __dxlog_file3,
597
- L: 55,
598
- S: void 0,
599
- A: [
600
- "db",
601
- ""
602
- ]
603
- });
565
+ invariant2(db, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 43, S: void 0, A: ["db", ""] });
604
566
  const builder = new QueryBuilder();
605
567
  for (const cell of notebook?.cells ?? []) {
606
568
  if (cell.type === "query") {
@@ -620,7 +582,7 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
620
582
  },
621
583
  view
622
584
  });
623
- Obj.change(notebook, (obj) => {
585
+ Obj.update(notebook, (obj) => {
624
586
  const c = obj.cells.find((c2) => c2.id === cell.id);
625
587
  if (c) {
626
588
  c.graph = Ref.make(newGraph);
@@ -628,8 +590,8 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
628
590
  }
629
591
  });
630
592
  } else {
631
- Obj.change(graph2, (obj) => {
632
- obj.query.ast = ast;
593
+ Obj.update(graph2, (graph3) => {
594
+ graph3.query.ast = ast;
633
595
  });
634
596
  }
635
597
  }
@@ -652,16 +614,8 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
652
614
  graph
653
615
  ]);
654
616
  const [promptResults, setPromptResults] = useState({});
655
- const handleExecPrompts = useComputeRuntimeCallback(db?.spaceId, Effect.fnUntraced(function* () {
656
- invariant2(graph, void 0, {
657
- F: __dxlog_file3,
658
- L: 99,
659
- S: this,
660
- A: [
661
- "graph",
662
- ""
663
- ]
664
- });
617
+ const handleExecPrompts = useSpaceCallback(db?.spaceId, [], Effect.fnUntraced(function* () {
618
+ invariant2(graph, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 96, S: this, A: ["graph", ""] });
665
619
  const prompts = notebook?.cells.filter((cell) => cell.type === "prompt").map((cell) => cell.prompt).filter(isNonNullable) ?? [];
666
620
  for (const prompt of prompts) {
667
621
  yield* runPrompt({
@@ -691,22 +645,14 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
691
645
  handleExecPrompts
692
646
  ]);
693
647
  const handleRearrange = useCallback((source, target) => {
694
- invariant2(notebook, void 0, {
695
- F: __dxlog_file3,
696
- L: 132,
697
- S: void 0,
698
- A: [
699
- "notebook",
700
- ""
701
- ]
702
- });
648
+ invariant2(notebook, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 128, S: void 0, A: ["notebook", ""] });
703
649
  const from = notebook.cells.findIndex((cell) => cell.id === source.id);
704
650
  const to = notebook.cells.findIndex((cell) => cell.id === target.id);
705
651
  if (from != null && to != null) {
706
- Obj.change(notebook, (obj) => {
707
- const cell = obj.cells.splice(from, 1)[0];
652
+ Obj.update(notebook, (notebook2) => {
653
+ const cell = notebook2.cells.splice(from, 1)[0];
708
654
  if (cell) {
709
- obj.cells.splice(to, 0, cell);
655
+ notebook2.cells.splice(to, 0, cell);
710
656
  }
711
657
  });
712
658
  }
@@ -714,15 +660,7 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
714
660
  notebook
715
661
  ]);
716
662
  const handleCellInsert = useCallback(async (type, after) => {
717
- invariant2(notebook, void 0, {
718
- F: __dxlog_file3,
719
- L: 149,
720
- S: void 0,
721
- A: [
722
- "notebook",
723
- ""
724
- ]
725
- });
663
+ invariant2(notebook, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 143, S: void 0, A: ["notebook", ""] });
726
664
  const cell = {
727
665
  id: crypto.randomUUID(),
728
666
  type
@@ -737,8 +675,11 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
737
675
  case "prompt": {
738
676
  if (db) {
739
677
  const objects = await db.query(Query.select(Filter.type(Blueprint.Blueprint))).run();
740
- const blueprints = objects.filter((blueprint) => INCLUDE_BLUEPRINTS.includes(blueprint.key)).map((blueprint) => Ref.make(blueprint));
741
- cell.prompt = Ref.make(Prompt.make({
678
+ const blueprints = objects.filter((blueprint) => {
679
+ const key = Obj.getMeta(blueprint).key;
680
+ return key !== void 0 && INCLUDE_BLUEPRINTS.includes(key);
681
+ }).map((blueprint) => Ref.make(blueprint));
682
+ cell.prompt = Ref.make(Routine.make({
742
683
  instructions: "",
743
684
  blueprints
744
685
  }));
@@ -747,27 +688,19 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
747
688
  }
748
689
  }
749
690
  const idx = after ? notebook.cells.findIndex((cell2) => cell2.id === after) : notebook.cells.length;
750
- Obj.change(notebook, (obj) => {
751
- obj.cells.splice(idx, 0, cell);
691
+ Obj.update(notebook, (notebook2) => {
692
+ notebook2.cells.splice(idx, 0, cell);
752
693
  });
753
694
  }, [
754
695
  db,
755
696
  notebook
756
697
  ]);
757
698
  const handleCellDelete = useCallback((id) => {
758
- invariant2(notebook, void 0, {
759
- F: __dxlog_file3,
760
- L: 181,
761
- S: void 0,
762
- A: [
763
- "notebook",
764
- ""
765
- ]
766
- });
699
+ invariant2(notebook, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 181, S: void 0, A: ["notebook", ""] });
767
700
  const idx = notebook.cells.findIndex((cell) => cell.id === id);
768
701
  if (idx !== -1) {
769
- Obj.change(notebook, (obj) => {
770
- obj.cells.splice(idx, 1);
702
+ Obj.update(notebook, (notebook2) => {
703
+ notebook2.cells.splice(idx, 1);
771
704
  });
772
705
  }
773
706
  }, [
@@ -785,13 +718,13 @@ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
785
718
  }, /* @__PURE__ */ React.createElement(IconButton, {
786
719
  icon: "ph--plus--regular",
787
720
  iconOnly: true,
788
- label: t("notebook cell insert label")
721
+ label: t("notebook-cell-insert.label")
789
722
  })), /* @__PURE__ */ React.createElement(NotebookMenu, {
790
723
  onCellInsert: handleCellInsert
791
724
  })), /* @__PURE__ */ React.createElement(Toolbar.IconButton, {
792
725
  icon: "ph--play--fill",
793
726
  iconOnly: true,
794
- label: t("compute label"),
727
+ label: t("compute.label"),
795
728
  classNames: "text-success-text",
796
729
  onClick: handleCompute
797
730
  }))), /* @__PURE__ */ React.createElement(Panel.Content, {
@@ -812,39 +745,19 @@ var runPrompt = Effect.fn(function* ({ prompt, input, onResult }) {
812
745
  prompt,
813
746
  input
814
747
  };
815
- const tracer = yield* TracingService;
816
- const trace = yield* tracer.traceInvocationStart({
817
- target: void 0,
818
- payload: {
819
- data: {}
820
- }
821
- });
822
- const result = yield* FunctionInvocationService.invokeFunction(AgentPrompt, inputData).pipe(Effect.provide(trace.invocationTraceQueue ? TracingService.layerInvocation(trace) : TracingService.layerNoop), Effect.exit);
748
+ const result = yield* Operation.invoke(AgentPrompt, inputData).pipe(Effect.orDie, Effect.exit);
823
749
  Exit.match(result, {
824
750
  onFailure: (cause) => {
825
751
  const error = Cause.prettyErrors(cause)[0];
826
- log2.error(error.message, error.cause ?? error.stack, {
827
- F: __dxlog_file3,
828
- L: 255,
829
- S: this,
830
- C: (f, a) => f(...a)
831
- });
752
+ log2.error(error.message, error.cause ?? error.stack, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 236, S: this });
832
753
  onResult(error.message);
833
754
  },
834
755
  onSuccess: (result2) => {
835
756
  onResult(result2.note);
836
757
  }
837
758
  });
838
- yield* tracer.traceInvocationEnd({
839
- trace,
840
- // TODO(dmaretskyi): Might miss errors.
841
- exception: Exit.isFailure(result) ? Cause.prettyErrors(result.cause)[0] : void 0
842
- });
843
759
  });
844
-
845
- // src/containers/NotebookContainer/index.ts
846
- var NotebookContainer_default = NotebookContainer;
847
760
  export {
848
- NotebookContainer_default as default
761
+ NotebookArticle as default
849
762
  };
850
- //# sourceMappingURL=NotebookContainer-CC3G32Q5.mjs.map
763
+ //# sourceMappingURL=NotebookArticle-VBBVX4BW.mjs.map