@dxos/plugin-script 0.8.4-main.67995b8 → 0.8.4-main.6fa680abb7

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 (511) hide show
  1. package/README.md +15 -13
  2. package/dist/lib/browser/DeploymentDialog-J34VKLNR.mjs +138 -0
  3. package/dist/lib/browser/DeploymentDialog-J34VKLNR.mjs.map +7 -0
  4. package/dist/lib/browser/NotebookContainer-EL6AHDB7.mjs +849 -0
  5. package/dist/lib/browser/NotebookContainer-EL6AHDB7.mjs.map +7 -0
  6. package/dist/lib/browser/ScriptContainer-YCS6M5LS.mjs +93 -0
  7. package/dist/lib/browser/ScriptContainer-YCS6M5LS.mjs.map +7 -0
  8. package/dist/lib/browser/ScriptObjectSettings-X4WV5TBD.mjs +294 -0
  9. package/dist/lib/browser/ScriptObjectSettings-X4WV5TBD.mjs.map +7 -0
  10. package/dist/lib/browser/ScriptPluginSettings-5WUKIWCC.mjs +55 -0
  11. package/dist/lib/browser/ScriptPluginSettings-5WUKIWCC.mjs.map +7 -0
  12. package/dist/lib/browser/ScriptProperties-5YERQAL2.mjs +28 -0
  13. package/dist/lib/browser/ScriptProperties-5YERQAL2.mjs.map +7 -0
  14. package/dist/lib/browser/TestContainer-NZ4YZOYT.mjs +39 -0
  15. package/dist/lib/browser/TestContainer-NZ4YZOYT.mjs.map +7 -0
  16. package/dist/lib/browser/app-graph-builder-QPXX4YK5.mjs +63 -0
  17. package/dist/lib/browser/app-graph-builder-QPXX4YK5.mjs.map +7 -0
  18. package/dist/lib/browser/blueprint-definition-2UX353LT.mjs +17 -0
  19. package/dist/lib/browser/blueprint-definition-2UX353LT.mjs.map +7 -0
  20. package/dist/lib/browser/blueprints/index.mjs +8 -0
  21. package/dist/lib/browser/{chunk-QYAREHGH.mjs → chunk-37XPSUAH.mjs} +9 -6
  22. package/dist/lib/browser/chunk-37XPSUAH.mjs.map +7 -0
  23. package/dist/lib/browser/chunk-3KBF2IW7.mjs +20 -0
  24. package/dist/lib/browser/chunk-3KBF2IW7.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-7LHEB2QO.mjs +397 -0
  26. package/dist/lib/browser/chunk-7LHEB2QO.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-7SXHORK4.mjs +105 -0
  28. package/dist/lib/browser/chunk-7SXHORK4.mjs.map +7 -0
  29. package/dist/lib/browser/{compiler-CXCUA4UQ.mjs → chunk-ATTZUDT7.mjs} +17 -32
  30. package/dist/lib/browser/chunk-ATTZUDT7.mjs.map +7 -0
  31. package/dist/lib/browser/chunk-G3XIOLLI.mjs +174 -0
  32. package/dist/lib/browser/chunk-G3XIOLLI.mjs.map +7 -0
  33. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  34. package/dist/lib/browser/chunk-MVIWELNH.mjs +789 -0
  35. package/dist/lib/browser/chunk-MVIWELNH.mjs.map +7 -0
  36. package/dist/lib/browser/chunk-MYSQ4VH5.mjs +29 -0
  37. package/dist/lib/browser/chunk-MYSQ4VH5.mjs.map +7 -0
  38. package/dist/lib/browser/chunk-QUKW7YWV.mjs +113 -0
  39. package/dist/lib/browser/chunk-QUKW7YWV.mjs.map +7 -0
  40. package/dist/lib/browser/chunk-X44CJ7F5.mjs +11 -0
  41. package/dist/lib/browser/chunk-X44CJ7F5.mjs.map +7 -0
  42. package/dist/lib/browser/compiler-4JVZK3D2.mjs +99 -0
  43. package/dist/lib/browser/compiler-4JVZK3D2.mjs.map +7 -0
  44. package/dist/lib/browser/index.mjs +147 -106
  45. package/dist/lib/browser/index.mjs.map +4 -4
  46. package/dist/lib/browser/meta.json +1 -1
  47. package/dist/lib/browser/operation-resolver-GU3NMGIL.mjs +79 -0
  48. package/dist/lib/browser/operation-resolver-GU3NMGIL.mjs.map +7 -0
  49. package/dist/lib/browser/react-surface-JEDP6MPG.mjs +142 -0
  50. package/dist/lib/browser/react-surface-JEDP6MPG.mjs.map +7 -0
  51. package/dist/lib/browser/settings-EEXY6JM7.mjs +36 -0
  52. package/dist/lib/browser/settings-EEXY6JM7.mjs.map +7 -0
  53. package/dist/lib/browser/templates/index.mjs +2 -1
  54. package/dist/lib/browser/types/index.mjs +14 -6
  55. package/dist/lib/node-esm/DeploymentDialog-AU5IG3AN.mjs +139 -0
  56. package/dist/lib/node-esm/DeploymentDialog-AU5IG3AN.mjs.map +7 -0
  57. package/dist/lib/node-esm/NotebookContainer-2J3TNVUY.mjs +850 -0
  58. package/dist/lib/node-esm/NotebookContainer-2J3TNVUY.mjs.map +7 -0
  59. package/dist/lib/node-esm/ScriptContainer-67PHQKMM.mjs +94 -0
  60. package/dist/lib/node-esm/ScriptContainer-67PHQKMM.mjs.map +7 -0
  61. package/dist/lib/node-esm/ScriptObjectSettings-RPY2ZLDJ.mjs +295 -0
  62. package/dist/lib/node-esm/ScriptObjectSettings-RPY2ZLDJ.mjs.map +7 -0
  63. package/dist/lib/node-esm/ScriptPluginSettings-H4ESISSG.mjs +56 -0
  64. package/dist/lib/node-esm/ScriptPluginSettings-H4ESISSG.mjs.map +7 -0
  65. package/dist/lib/node-esm/ScriptProperties-NNDYQTOW.mjs +29 -0
  66. package/dist/lib/node-esm/ScriptProperties-NNDYQTOW.mjs.map +7 -0
  67. package/dist/lib/node-esm/TestContainer-5TMMG7HV.mjs +40 -0
  68. package/dist/lib/node-esm/TestContainer-5TMMG7HV.mjs.map +7 -0
  69. package/dist/lib/node-esm/app-graph-builder-GNGOYXIU.mjs +64 -0
  70. package/dist/lib/node-esm/app-graph-builder-GNGOYXIU.mjs.map +7 -0
  71. package/dist/lib/node-esm/blueprint-definition-4UDBPYRQ.mjs +18 -0
  72. package/dist/lib/node-esm/blueprint-definition-4UDBPYRQ.mjs.map +7 -0
  73. package/dist/lib/node-esm/blueprints/index.mjs +9 -0
  74. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-3EV4C6GW.mjs +107 -0
  76. package/dist/lib/node-esm/chunk-3EV4C6GW.mjs.map +7 -0
  77. package/dist/lib/node-esm/chunk-4YAEFFW2.mjs +12 -0
  78. package/dist/lib/node-esm/chunk-4YAEFFW2.mjs.map +7 -0
  79. package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs +176 -0
  80. package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs.map +7 -0
  81. package/dist/lib/node-esm/chunk-CPJJOBC3.mjs +790 -0
  82. package/dist/lib/node-esm/chunk-CPJJOBC3.mjs.map +7 -0
  83. package/dist/lib/node-esm/chunk-DQMM7ZL5.mjs +31 -0
  84. package/dist/lib/node-esm/chunk-DQMM7ZL5.mjs.map +7 -0
  85. package/dist/lib/node-esm/chunk-EP474OF4.mjs +398 -0
  86. package/dist/lib/node-esm/chunk-EP474OF4.mjs.map +7 -0
  87. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  88. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  89. package/dist/lib/node-esm/{compiler-EPFKQXPE.mjs → chunk-JGN7TDJH.mjs} +17 -31
  90. package/dist/lib/node-esm/chunk-JGN7TDJH.mjs.map +7 -0
  91. package/dist/lib/node-esm/{chunk-AHXJ6NQU.mjs → chunk-L3JLWXB5.mjs} +9 -6
  92. package/dist/lib/node-esm/chunk-L3JLWXB5.mjs.map +7 -0
  93. package/dist/lib/node-esm/chunk-QZOKU2JW.mjs +22 -0
  94. package/dist/lib/node-esm/chunk-QZOKU2JW.mjs.map +7 -0
  95. package/dist/lib/node-esm/chunk-WZ4YV7VB.mjs +114 -0
  96. package/dist/lib/node-esm/chunk-WZ4YV7VB.mjs.map +7 -0
  97. package/dist/lib/node-esm/compiler-QOSDBXG2.mjs +100 -0
  98. package/dist/lib/node-esm/compiler-QOSDBXG2.mjs.map +7 -0
  99. package/dist/lib/node-esm/index.mjs +147 -106
  100. package/dist/lib/node-esm/index.mjs.map +4 -4
  101. package/dist/lib/node-esm/meta.json +1 -1
  102. package/dist/lib/node-esm/operation-resolver-YAT75MET.mjs +80 -0
  103. package/dist/lib/node-esm/operation-resolver-YAT75MET.mjs.map +7 -0
  104. package/dist/lib/node-esm/react-surface-SABRQNVU.mjs +143 -0
  105. package/dist/lib/node-esm/react-surface-SABRQNVU.mjs.map +7 -0
  106. package/dist/lib/node-esm/settings-QMDXGZCI.mjs +37 -0
  107. package/dist/lib/node-esm/settings-QMDXGZCI.mjs.map +7 -0
  108. package/dist/lib/node-esm/templates/index.mjs +2 -1
  109. package/dist/lib/node-esm/types/index.mjs +14 -6
  110. package/dist/types/src/ScriptPlugin.d.ts +2 -1
  111. package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
  112. package/dist/types/src/blueprints/index.d.ts +2 -0
  113. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  114. package/dist/types/src/blueprints/script-blueprint.d.ts +4 -0
  115. package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -0
  116. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  117. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  118. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  119. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  120. package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +12 -0
  121. package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +1 -0
  122. package/dist/types/src/capabilities/artifact-definition/index.d.ts +3 -0
  123. package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +1 -0
  124. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +6 -0
  125. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
  126. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
  127. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
  128. package/dist/types/src/capabilities/compiler/compiler.d.ts +6 -0
  129. package/dist/types/src/capabilities/compiler/compiler.d.ts.map +1 -0
  130. package/dist/types/src/capabilities/compiler/index.d.ts +3 -0
  131. package/dist/types/src/capabilities/compiler/index.d.ts.map +1 -0
  132. package/dist/types/src/capabilities/index.d.ts +6 -7
  133. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  134. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  135. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  136. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  137. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  138. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  139. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  140. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  141. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  142. package/dist/types/src/capabilities/settings/index.d.ts +7 -0
  143. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  144. package/dist/types/src/capabilities/settings/settings.d.ts +10 -0
  145. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  146. package/dist/types/src/compiler/compiler.d.ts +1 -1
  147. package/dist/types/src/compiler/compiler.d.ts.map +1 -1
  148. package/dist/types/src/components/FramePanel/FramePanel.d.ts +12 -0
  149. package/dist/types/src/components/FramePanel/FramePanel.d.ts.map +1 -0
  150. package/dist/types/src/components/FramePanel/index.d.ts +2 -0
  151. package/dist/types/src/components/FramePanel/index.d.ts.map +1 -0
  152. package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +15 -0
  153. package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -0
  154. package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +9 -0
  155. package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -0
  156. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +14 -0
  157. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -0
  158. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +252 -0
  159. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -0
  160. package/dist/types/src/components/NotebookStack/index.d.ts +3 -0
  161. package/dist/types/src/components/NotebookStack/index.d.ts.map +1 -0
  162. package/dist/types/src/components/QueryEditor/QueryEditor.d.ts +5 -0
  163. package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -0
  164. package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +13 -0
  165. package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -0
  166. package/dist/types/src/components/QueryEditor/index.d.ts +2 -0
  167. package/dist/types/src/components/QueryEditor/index.d.ts.map +1 -0
  168. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +8 -8
  169. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
  170. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +249 -10
  171. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
  172. package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
  173. package/dist/types/src/components/TestPanel/index.d.ts +0 -1
  174. package/dist/types/src/components/TestPanel/index.d.ts.map +1 -1
  175. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +5 -2
  176. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
  177. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +11 -4
  178. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
  179. package/dist/types/src/components/index.d.ts +5 -7
  180. package/dist/types/src/components/index.d.ts.map +1 -1
  181. package/dist/types/src/constants.d.ts +2 -0
  182. package/dist/types/src/constants.d.ts.map +1 -0
  183. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts +9 -0
  184. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -0
  185. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +252 -0
  186. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -0
  187. package/dist/types/src/containers/DeploymentDialog/index.d.ts +3 -0
  188. package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -0
  189. package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts +7 -0
  190. package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +1 -0
  191. package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts +7 -0
  192. package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +1 -0
  193. package/dist/types/src/containers/NotebookContainer/index.d.ts +3 -0
  194. package/dist/types/src/containers/NotebookContainer/index.d.ts.map +1 -0
  195. package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts +10 -0
  196. package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +1 -0
  197. package/dist/types/src/containers/ScriptContainer/index.d.ts +3 -0
  198. package/dist/types/src/containers/ScriptContainer/index.d.ts.map +1 -0
  199. package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts +7 -0
  200. package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts.map +1 -0
  201. package/dist/types/src/containers/ScriptObjectSettings/index.d.ts +3 -0
  202. package/dist/types/src/containers/ScriptObjectSettings/index.d.ts.map +1 -0
  203. package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts +8 -0
  204. package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +1 -0
  205. package/dist/types/src/containers/ScriptPluginSettings/index.d.ts +3 -0
  206. package/dist/types/src/containers/ScriptPluginSettings/index.d.ts.map +1 -0
  207. package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +7 -0
  208. package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -0
  209. package/dist/types/src/containers/ScriptProperties/index.d.ts +3 -0
  210. package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -0
  211. package/dist/types/src/containers/TestContainer/TestContainer.d.ts +8 -0
  212. package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -0
  213. package/dist/types/src/containers/TestContainer/index.d.ts +3 -0
  214. package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -0
  215. package/dist/types/src/containers/index.d.ts +9 -0
  216. package/dist/types/src/containers/index.d.ts.map +1 -0
  217. package/dist/types/src/e2e/ai.test.d.ts +2 -0
  218. package/dist/types/src/e2e/ai.test.d.ts.map +1 -0
  219. package/dist/types/src/e2e/deploy.test.d.ts +2 -0
  220. package/dist/types/src/e2e/deploy.test.d.ts.map +1 -0
  221. package/dist/types/src/hooks/deploy.d.ts +20 -33
  222. package/dist/types/src/hooks/deploy.d.ts.map +1 -1
  223. package/dist/types/src/hooks/format.d.ts +5 -4
  224. package/dist/types/src/hooks/format.d.ts.map +1 -1
  225. package/dist/types/src/hooks/index.d.ts +1 -0
  226. package/dist/types/src/hooks/index.d.ts.map +1 -1
  227. package/dist/types/src/hooks/template.d.ts +7 -16
  228. package/dist/types/src/hooks/template.d.ts.map +1 -1
  229. package/dist/types/src/hooks/useCompiler.d.ts +7 -0
  230. package/dist/types/src/hooks/useCompiler.d.ts.map +1 -0
  231. package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
  232. package/dist/types/src/hooks/useToolbarState.d.ts +8 -1
  233. package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
  234. package/dist/types/src/index.d.ts +3 -1
  235. package/dist/types/src/index.d.ts.map +1 -1
  236. package/dist/types/src/meta.d.ts +2 -3
  237. package/dist/types/src/meta.d.ts.map +1 -1
  238. package/dist/types/src/notebook/compute-graph.d.ts +58 -0
  239. package/dist/types/src/notebook/compute-graph.d.ts.map +1 -0
  240. package/dist/types/src/notebook/compute-graph.test.d.ts +2 -0
  241. package/dist/types/src/notebook/compute-graph.test.d.ts.map +1 -0
  242. package/dist/types/src/notebook/eval.d.ts +13 -0
  243. package/dist/types/src/notebook/eval.d.ts.map +1 -0
  244. package/dist/types/src/notebook/index.d.ts +2 -0
  245. package/dist/types/src/notebook/index.d.ts.map +1 -0
  246. package/dist/types/src/notebook/vfs-parser.d.ts +74 -0
  247. package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -0
  248. package/dist/types/src/notebook/vfs-parser.test.d.ts +2 -0
  249. package/dist/types/src/notebook/vfs-parser.test.d.ts.map +1 -0
  250. package/dist/types/src/templates/anthropic.d.ts +8 -0
  251. package/dist/types/src/templates/anthropic.d.ts.map +1 -0
  252. package/dist/types/src/templates/chess-bot.d.ts +16 -0
  253. package/dist/types/src/templates/chess-bot.d.ts.map +1 -0
  254. package/dist/types/src/templates/commentary.d.ts +16 -0
  255. package/dist/types/src/templates/commentary.d.ts.map +1 -0
  256. package/dist/types/src/templates/data-generator.d.ts.map +1 -1
  257. package/dist/types/src/templates/discord.d.ts.map +1 -1
  258. package/dist/types/src/templates/forex-effect.d.ts +4 -1
  259. package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
  260. package/dist/types/src/templates/forex.d.ts +4 -1
  261. package/dist/types/src/templates/forex.d.ts.map +1 -1
  262. package/dist/types/src/templates/gmail.d.ts.map +1 -1
  263. package/dist/types/src/templates/index.d.ts +52 -1
  264. package/dist/types/src/templates/index.d.ts.map +1 -1
  265. package/dist/types/src/templates/ping.d.ts +3 -0
  266. package/dist/types/src/templates/ping.d.ts.map +1 -0
  267. package/dist/types/src/testing/data.d.ts +3 -0
  268. package/dist/types/src/testing/data.d.ts.map +1 -0
  269. package/dist/types/src/testing/index.d.ts +2 -0
  270. package/dist/types/src/testing/index.d.ts.map +1 -0
  271. package/dist/types/src/testing/simulator.test.d.ts +2 -0
  272. package/dist/types/src/testing/simulator.test.d.ts.map +1 -0
  273. package/dist/types/src/translations.d.ts +34 -5
  274. package/dist/types/src/translations.d.ts.map +1 -1
  275. package/dist/types/src/types/Notebook.d.ts +108 -0
  276. package/dist/types/src/types/Notebook.d.ts.map +1 -0
  277. package/dist/types/src/types/actions.d.ts +40 -0
  278. package/dist/types/src/types/actions.d.ts.map +1 -0
  279. package/dist/types/src/types/capabilities.d.ts +12 -0
  280. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  281. package/dist/types/src/types/events.d.ts +5 -0
  282. package/dist/types/src/types/events.d.ts.map +1 -0
  283. package/dist/types/src/types/index.d.ts +5 -1
  284. package/dist/types/src/types/index.d.ts.map +1 -1
  285. package/dist/types/src/types/types.d.ts +6 -0
  286. package/dist/types/src/types/types.d.ts.map +1 -0
  287. package/dist/types/src/util/deploy.d.ts +7 -7
  288. package/dist/types/src/util/deploy.d.ts.map +1 -1
  289. package/dist/types/src/util/functions.d.ts +6 -3
  290. package/dist/types/src/util/functions.d.ts.map +1 -1
  291. package/dist/types/tsconfig.tsbuildinfo +1 -1
  292. package/package.json +122 -86
  293. package/src/ScriptPlugin.tsx +55 -76
  294. package/src/blueprints/index.ts +5 -0
  295. package/src/blueprints/script-blueprint.ts +31 -0
  296. package/src/capabilities/app-graph-builder/app-graph-builder.ts +56 -0
  297. package/src/capabilities/app-graph-builder/index.ts +7 -0
  298. package/src/capabilities/{artifact-definition.ts → artifact-definition/artifact-definition.ts} +103 -98
  299. package/src/capabilities/artifact-definition/index.ts +7 -0
  300. package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -0
  301. package/src/capabilities/blueprint-definition/index.ts +7 -0
  302. package/src/capabilities/compiler/compiler.ts +103 -0
  303. package/src/capabilities/compiler/index.ts +7 -0
  304. package/src/capabilities/index.ts +6 -10
  305. package/src/capabilities/operation-resolver/index.ts +7 -0
  306. package/src/capabilities/operation-resolver/operation-resolver.ts +75 -0
  307. package/src/capabilities/react-surface/index.ts +7 -0
  308. package/src/capabilities/react-surface/react-surface.tsx +129 -0
  309. package/src/capabilities/settings/index.ts +7 -0
  310. package/src/capabilities/settings/settings.ts +33 -0
  311. package/src/compiler/compiler.ts +11 -4
  312. package/src/components/{FrameContainer/FrameContainer.tsx → FramePanel/FramePanel.tsx} +10 -8
  313. package/src/components/{FrameContainer → FramePanel}/index.ts +1 -1
  314. package/src/components/NotebookStack/NotebookCell.tsx +215 -0
  315. package/src/components/NotebookStack/NotebookMenu.tsx +47 -0
  316. package/src/components/NotebookStack/NotebookStack.stories.tsx +54 -0
  317. package/src/components/NotebookStack/NotebookStack.tsx +86 -0
  318. package/src/components/NotebookStack/index.ts +6 -0
  319. package/src/components/QueryEditor/QueryEditor.stories.tsx +102 -0
  320. package/src/components/QueryEditor/QueryEditor.tsx +47 -0
  321. package/src/components/QueryEditor/index.ts +5 -0
  322. package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +56 -17
  323. package/src/components/ScriptToolbar/ScriptToolbar.tsx +38 -34
  324. package/src/components/TestPanel/TestPanel.tsx +67 -42
  325. package/src/components/TestPanel/index.ts +0 -1
  326. package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +89 -34
  327. package/src/components/TypescriptEditor/TypescriptEditor.tsx +84 -81
  328. package/src/components/index.ts +5 -7
  329. package/src/constants.ts +7 -0
  330. package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +61 -0
  331. package/src/containers/DeploymentDialog/DeploymentDialog.tsx +99 -0
  332. package/src/containers/DeploymentDialog/index.ts +7 -0
  333. package/src/containers/NotebookContainer/NotebookContainer.stories.tsx +87 -0
  334. package/src/containers/NotebookContainer/NotebookContainer.tsx +267 -0
  335. package/src/containers/NotebookContainer/index.ts +7 -0
  336. package/src/containers/ScriptContainer/ScriptContainer.tsx +84 -0
  337. package/src/containers/ScriptContainer/index.ts +7 -0
  338. package/src/containers/ScriptObjectSettings/ScriptObjectSettings.tsx +291 -0
  339. package/src/containers/ScriptObjectSettings/index.ts +7 -0
  340. package/src/containers/ScriptPluginSettings/ScriptPluginSettings.tsx +66 -0
  341. package/src/containers/ScriptPluginSettings/index.ts +7 -0
  342. package/src/containers/ScriptProperties/ScriptProperties.tsx +33 -0
  343. package/src/containers/ScriptProperties/index.ts +7 -0
  344. package/src/containers/TestContainer/TestContainer.tsx +28 -0
  345. package/src/containers/TestContainer/index.ts +7 -0
  346. package/src/containers/index.ts +13 -0
  347. package/src/e2e/ai.test.ts +92 -0
  348. package/src/e2e/deploy.test.ts +64 -0
  349. package/src/hooks/deploy.ts +52 -45
  350. package/src/hooks/format.ts +10 -5
  351. package/src/hooks/index.ts +1 -0
  352. package/src/hooks/template.ts +22 -25
  353. package/src/hooks/useCompiler.ts +24 -0
  354. package/src/hooks/useCreateAndDeployScriptTemplates.ts +15 -16
  355. package/src/hooks/useToolbarState.ts +29 -4
  356. package/src/index.ts +3 -1
  357. package/src/meta.ts +10 -8
  358. package/src/notebook/compute-graph.test.ts +82 -0
  359. package/src/notebook/compute-graph.ts +230 -0
  360. package/src/notebook/eval.ts +105 -0
  361. package/src/notebook/index.ts +5 -0
  362. package/src/notebook/vfs-parser.test.ts +149 -0
  363. package/src/notebook/vfs-parser.ts +451 -0
  364. package/src/templates/anthropic.ts +42 -0
  365. package/src/templates/chat.ts +1 -1
  366. package/src/templates/chess-bot.ts +58 -0
  367. package/src/templates/commentary.ts +231 -0
  368. package/src/templates/data-generator.ts +10 -4
  369. package/src/templates/discord.ts +14 -6
  370. package/src/templates/forex-effect.ts +24 -25
  371. package/src/templates/forex.ts +9 -6
  372. package/src/templates/gmail.ts +37 -67
  373. package/src/templates/index.ts +36 -23
  374. package/src/templates/ping.ts +17 -0
  375. package/src/testing/data.ts +72 -0
  376. package/src/testing/index.ts +5 -0
  377. package/src/testing/simulator.test.ts +40 -0
  378. package/src/translations.ts +37 -7
  379. package/src/types/Notebook.ts +41 -0
  380. package/src/types/actions.ts +45 -0
  381. package/src/types/capabilities.ts +17 -0
  382. package/src/types/events.ts +11 -0
  383. package/src/types/index.ts +5 -1
  384. package/src/types/types.ts +15 -0
  385. package/src/util/deploy.ts +38 -61
  386. package/src/util/functions.ts +58 -25
  387. package/src/vite-env.d.ts +2 -0
  388. package/dist/lib/browser/DeploymentDialog-M4QIHTDR.mjs +0 -12
  389. package/dist/lib/browser/ScriptContainer-Z6SIGRRC.mjs +0 -262
  390. package/dist/lib/browser/ScriptContainer-Z6SIGRRC.mjs.map +0 -7
  391. package/dist/lib/browser/app-graph-builder-HLQ7K3BT.mjs +0 -64
  392. package/dist/lib/browser/app-graph-builder-HLQ7K3BT.mjs.map +0 -7
  393. package/dist/lib/browser/artifact-definition-CK3BIBSI.mjs +0 -247
  394. package/dist/lib/browser/artifact-definition-CK3BIBSI.mjs.map +0 -7
  395. package/dist/lib/browser/chunk-3U6DTUH3.mjs +0 -283
  396. package/dist/lib/browser/chunk-3U6DTUH3.mjs.map +0 -7
  397. package/dist/lib/browser/chunk-5TVBECWH.mjs +0 -15
  398. package/dist/lib/browser/chunk-5TVBECWH.mjs.map +0 -7
  399. package/dist/lib/browser/chunk-FIM2MVNJ.mjs +0 -555
  400. package/dist/lib/browser/chunk-FIM2MVNJ.mjs.map +0 -7
  401. package/dist/lib/browser/chunk-FMDXKOP7.mjs +0 -233
  402. package/dist/lib/browser/chunk-FMDXKOP7.mjs.map +0 -7
  403. package/dist/lib/browser/chunk-IS4OG2UW.mjs +0 -39
  404. package/dist/lib/browser/chunk-IS4OG2UW.mjs.map +0 -7
  405. package/dist/lib/browser/chunk-P4HQKUCP.mjs +0 -153
  406. package/dist/lib/browser/chunk-P4HQKUCP.mjs.map +0 -7
  407. package/dist/lib/browser/chunk-QYAREHGH.mjs.map +0 -7
  408. package/dist/lib/browser/chunk-R4R7VOFY.mjs +0 -88
  409. package/dist/lib/browser/chunk-R4R7VOFY.mjs.map +0 -7
  410. package/dist/lib/browser/compiler-CXCUA4UQ.mjs.map +0 -7
  411. package/dist/lib/browser/intent-resolver-S3H2SMUY.mjs +0 -89
  412. package/dist/lib/browser/intent-resolver-S3H2SMUY.mjs.map +0 -7
  413. package/dist/lib/browser/react-surface-FYYXZA7C.mjs +0 -104
  414. package/dist/lib/browser/react-surface-FYYXZA7C.mjs.map +0 -7
  415. package/dist/lib/browser/settings-KCTBK5TY.mjs +0 -24
  416. package/dist/lib/browser/settings-KCTBK5TY.mjs.map +0 -7
  417. package/dist/lib/node-esm/DeploymentDialog-3KPRWFE7.mjs +0 -13
  418. package/dist/lib/node-esm/ScriptContainer-KPU75HHI.mjs +0 -263
  419. package/dist/lib/node-esm/ScriptContainer-KPU75HHI.mjs.map +0 -7
  420. package/dist/lib/node-esm/app-graph-builder-7EYIHWH4.mjs +0 -65
  421. package/dist/lib/node-esm/app-graph-builder-7EYIHWH4.mjs.map +0 -7
  422. package/dist/lib/node-esm/artifact-definition-YCBV4YX2.mjs +0 -248
  423. package/dist/lib/node-esm/artifact-definition-YCBV4YX2.mjs.map +0 -7
  424. package/dist/lib/node-esm/chunk-35M3CHYE.mjs +0 -16
  425. package/dist/lib/node-esm/chunk-35M3CHYE.mjs.map +0 -7
  426. package/dist/lib/node-esm/chunk-7NMI4CEU.mjs +0 -556
  427. package/dist/lib/node-esm/chunk-7NMI4CEU.mjs.map +0 -7
  428. package/dist/lib/node-esm/chunk-AHXJ6NQU.mjs.map +0 -7
  429. package/dist/lib/node-esm/chunk-F5GFJ3PY.mjs +0 -90
  430. package/dist/lib/node-esm/chunk-F5GFJ3PY.mjs.map +0 -7
  431. package/dist/lib/node-esm/chunk-JIPFLBYA.mjs +0 -40
  432. package/dist/lib/node-esm/chunk-JIPFLBYA.mjs.map +0 -7
  433. package/dist/lib/node-esm/chunk-QKK3NDHW.mjs +0 -154
  434. package/dist/lib/node-esm/chunk-QKK3NDHW.mjs.map +0 -7
  435. package/dist/lib/node-esm/chunk-RT43MACC.mjs +0 -284
  436. package/dist/lib/node-esm/chunk-RT43MACC.mjs.map +0 -7
  437. package/dist/lib/node-esm/chunk-XJPK3IYI.mjs +0 -234
  438. package/dist/lib/node-esm/chunk-XJPK3IYI.mjs.map +0 -7
  439. package/dist/lib/node-esm/compiler-EPFKQXPE.mjs.map +0 -7
  440. package/dist/lib/node-esm/intent-resolver-OHKNJFCC.mjs +0 -90
  441. package/dist/lib/node-esm/intent-resolver-OHKNJFCC.mjs.map +0 -7
  442. package/dist/lib/node-esm/react-surface-V32NWHKN.mjs +0 -105
  443. package/dist/lib/node-esm/react-surface-V32NWHKN.mjs.map +0 -7
  444. package/dist/lib/node-esm/settings-DXZ334A3.mjs +0 -25
  445. package/dist/lib/node-esm/settings-DXZ334A3.mjs.map +0 -7
  446. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  447. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  448. package/dist/types/src/capabilities/artifact-definition.d.ts +0 -11
  449. package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
  450. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  451. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  452. package/dist/types/src/capabilities/compiler.d.ts +0 -4
  453. package/dist/types/src/capabilities/compiler.d.ts.map +0 -1
  454. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  455. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  456. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  457. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  458. package/dist/types/src/capabilities/settings.d.ts +0 -4
  459. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  460. package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts +0 -11
  461. package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +0 -1
  462. package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +0 -18
  463. package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +0 -1
  464. package/dist/types/src/components/DeploymentDialog/index.d.ts +0 -4
  465. package/dist/types/src/components/DeploymentDialog/index.d.ts.map +0 -1
  466. package/dist/types/src/components/FrameContainer/FrameContainer.d.ts +0 -12
  467. package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +0 -1
  468. package/dist/types/src/components/FrameContainer/frame.d.ts +0 -2
  469. package/dist/types/src/components/FrameContainer/frame.d.ts.map +0 -1
  470. package/dist/types/src/components/FrameContainer/index.d.ts +0 -2
  471. package/dist/types/src/components/FrameContainer/index.d.ts.map +0 -1
  472. package/dist/types/src/components/ScriptContainer.d.ts +0 -12
  473. package/dist/types/src/components/ScriptContainer.d.ts.map +0 -1
  474. package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts +0 -8
  475. package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +0 -1
  476. package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +0 -6
  477. package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +0 -1
  478. package/dist/types/src/components/Settings/index.d.ts +0 -3
  479. package/dist/types/src/components/Settings/index.d.ts.map +0 -1
  480. package/dist/types/src/components/TestPanel/TestContainer.d.ts +0 -8
  481. package/dist/types/src/components/TestPanel/TestContainer.d.ts.map +0 -1
  482. package/dist/types/src/events.d.ts +0 -4
  483. package/dist/types/src/events.d.ts.map +0 -1
  484. package/dist/types/src/templates/chess.d.ts +0 -3
  485. package/dist/types/src/templates/chess.d.ts.map +0 -1
  486. package/dist/types/src/templates/echo.d.ts +0 -6
  487. package/dist/types/src/templates/echo.d.ts.map +0 -1
  488. package/dist/types/src/types/schema.d.ts +0 -38
  489. package/dist/types/src/types/schema.d.ts.map +0 -1
  490. package/src/capabilities/app-graph-builder.ts +0 -64
  491. package/src/capabilities/capabilities.ts +0 -12
  492. package/src/capabilities/compiler.ts +0 -33
  493. package/src/capabilities/intent-resolver.ts +0 -77
  494. package/src/capabilities/react-surface.tsx +0 -89
  495. package/src/capabilities/settings.ts +0 -21
  496. package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +0 -39
  497. package/src/components/DeploymentDialog/DeploymentDialog.tsx +0 -112
  498. package/src/components/DeploymentDialog/index.ts +0 -9
  499. package/src/components/FrameContainer/frame.html +0 -25
  500. package/src/components/FrameContainer/frame.tsx +0 -51
  501. package/src/components/ScriptContainer.tsx +0 -68
  502. package/src/components/Settings/ScriptObjectSettings.tsx +0 -206
  503. package/src/components/Settings/ScriptPluginSettings.tsx +0 -71
  504. package/src/components/Settings/index.ts +0 -6
  505. package/src/components/TestPanel/TestContainer.tsx +0 -26
  506. package/src/events.ts +0 -11
  507. package/src/templates/chess.ts +0 -47
  508. package/src/templates/echo.ts +0 -8
  509. package/src/types/schema.ts +0 -37
  510. /package/dist/lib/browser/{DeploymentDialog-M4QIHTDR.mjs.map → blueprints/index.mjs.map} +0 -0
  511. /package/dist/lib/{node-esm/DeploymentDialog-3KPRWFE7.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
@@ -0,0 +1,849 @@
1
+ import {
2
+ NotebookMenu,
3
+ NotebookStack
4
+ } from "./chunk-MVIWELNH.mjs";
5
+ import "./chunk-ATTZUDT7.mjs";
6
+ import "./chunk-7LHEB2QO.mjs";
7
+ import "./chunk-G3XIOLLI.mjs";
8
+ import "./chunk-QUKW7YWV.mjs";
9
+ import "./chunk-7SXHORK4.mjs";
10
+ import {
11
+ meta
12
+ } from "./chunk-37XPSUAH.mjs";
13
+ import "./chunk-J5LGTIGS.mjs";
14
+
15
+ // src/containers/NotebookContainer/NotebookContainer.tsx
16
+ import { RegistryContext } from "@effect-atom/atom-react";
17
+ import * as Cause from "effect/Cause";
18
+ import * as Effect from "effect/Effect";
19
+ import * as Exit from "effect/Exit";
20
+ import React, { useCallback, useContext, useMemo, useState } from "react";
21
+ import { AgentFunctions } from "@dxos/assistant-toolkit";
22
+ import { Blueprint, Prompt } from "@dxos/blueprints";
23
+ import { Filter, Obj, Query, Ref } from "@dxos/echo";
24
+ import { QueryBuilder } from "@dxos/echo-query";
25
+ import { FunctionInvocationService, TracingService } from "@dxos/functions";
26
+ import { invariant as invariant2 } from "@dxos/invariant";
27
+ import { log as log2 } from "@dxos/log";
28
+ import { useComputeRuntimeCallback } from "@dxos/plugin-automation";
29
+ import { Graph } from "@dxos/plugin-explorer/types";
30
+ import { DropdownMenu, IconButton, Panel, Toolbar, useTranslation } from "@dxos/react-ui";
31
+ import { useAttention } from "@dxos/react-ui-attention";
32
+ import { Text, ViewModel } from "@dxos/schema";
33
+ import { isNonNullable } from "@dxos/util";
34
+
35
+ // src/notebook/compute-graph.ts
36
+ import { Atom } from "@effect-atom/atom-react";
37
+ import { log } from "@dxos/log";
38
+
39
+ // src/notebook/eval.ts
40
+ import { trim } from "@dxos/util";
41
+ var evalScript = async (code, deps = {}) => {
42
+ const sandbox = {
43
+ ...deps,
44
+ // Block access to global objects.
45
+ console: void 0,
46
+ document: void 0,
47
+ global: void 0,
48
+ globalThis: void 0,
49
+ self: void 0,
50
+ window: void 0,
51
+ // Allow some safe globals.
52
+ Array,
53
+ Boolean,
54
+ Date,
55
+ Error,
56
+ JSON,
57
+ Map,
58
+ Math,
59
+ Number,
60
+ Object,
61
+ Promise,
62
+ RegExp,
63
+ Set,
64
+ String,
65
+ // Functions.
66
+ isFinite,
67
+ isNaN,
68
+ parseFloat,
69
+ parseInt
70
+ };
71
+ const sandboxKeys = Object.keys(sandbox);
72
+ const sandboxValues = Object.values(sandbox);
73
+ const fn2 = new Function(...sandboxKeys, trim`
74
+ 'use strict';
75
+ return ${code};
76
+ `);
77
+ return fn2(...sandboxValues);
78
+ };
79
+ var builtIns = /* @__PURE__ */ new Set([
80
+ // Types.
81
+ "Array",
82
+ "Date",
83
+ "Error",
84
+ "JSON",
85
+ "Map",
86
+ "Math",
87
+ "Number",
88
+ "Object",
89
+ "Promise",
90
+ "RegExp",
91
+ "Set",
92
+ "String",
93
+ // Functions.
94
+ "isFinite",
95
+ "isNaN",
96
+ "parseFloat",
97
+ "parseInt"
98
+ ]);
99
+ var systemDefinitions = trim`
100
+ interface Array<T> { length: number; [n: number]: T; }
101
+ interface Boolean {}
102
+ interface Function {}
103
+ interface IArguments {}
104
+ interface Number {}
105
+ interface Object {}
106
+ interface RegExp {}
107
+ interface String { length: number; }
108
+
109
+ interface CallableFunction extends Function {}
110
+ interface NewableFunction extends Function {}
111
+
112
+ declare var console: { log(...args: any[]): void };
113
+ `;
114
+
115
+ // src/notebook/vfs-parser.ts
116
+ import { createSystem, createVirtualTypeScriptEnvironment } from "@typescript/vfs";
117
+ import ts from "typescript";
118
+ import { invariant } from "@dxos/invariant";
119
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-script/src/notebook/vfs-parser.ts";
120
+ var systemFiles = [
121
+ {
122
+ filename: "/lib.d.ts",
123
+ content: systemDefinitions
124
+ }
125
+ ];
126
+ var VirtualTypeScriptParser = class {
127
+ compilerOptions = {
128
+ target: ts.ScriptTarget.ES2020,
129
+ module: ts.ModuleKind.ESNext,
130
+ strict: true,
131
+ esModuleInterop: true,
132
+ skipLibCheck: true,
133
+ forceConsistentCasingInfilenames: true,
134
+ jsx: ts.JsxEmit.React,
135
+ noLib: true
136
+ };
137
+ /**
138
+ * Parse a single expression or statement.
139
+ */
140
+ parseExpression(input) {
141
+ invariant(input.trim() !== "", "input must not be empty", {
142
+ F: __dxlog_file,
143
+ L: 57,
144
+ S: this,
145
+ A: [
146
+ "input.trim() !== ''",
147
+ "'input must not be empty'"
148
+ ]
149
+ });
150
+ const files = [
151
+ {
152
+ filename: "/temp.ts",
153
+ content: input
154
+ }
155
+ ];
156
+ const analysis = this.analyzeFiles(files);
157
+ if (analysis.length === 0) {
158
+ const sourcefilename = "/temp.ts";
159
+ const env = this.createEnvironment([
160
+ {
161
+ filename: sourcefilename,
162
+ content: input
163
+ }
164
+ ]);
165
+ const sourceFile = env.getSourceFile(sourcefilename);
166
+ const typeChecker = env.languageService.getProgram()?.getTypeChecker();
167
+ if (sourceFile && typeChecker) {
168
+ const assignmentInfo = this.findAssignmentExpression(sourceFile, typeChecker);
169
+ if (assignmentInfo) {
170
+ return assignmentInfo;
171
+ }
172
+ const references = this.findAllReferences(sourceFile, typeChecker);
173
+ return {
174
+ references
175
+ };
176
+ }
177
+ }
178
+ return analysis[0];
179
+ }
180
+ /**
181
+ * Analyze multiple files with full type information.
182
+ */
183
+ analyzeFiles(files) {
184
+ const env = this.createEnvironment(files);
185
+ const results = [];
186
+ const typeChecker = env.languageService.getProgram()?.getTypeChecker();
187
+ files.forEach((file) => {
188
+ const sourceFile = env.getSourceFile(file.filename);
189
+ if (!sourceFile || !typeChecker) return;
190
+ const fileResults = this.analyzeSourceFile(sourceFile, typeChecker);
191
+ results.push(...fileResults);
192
+ });
193
+ return results;
194
+ }
195
+ /**
196
+ * Analyze a source file with type information.
197
+ */
198
+ analyzeSourceFile(sourceFile, typeChecker) {
199
+ const results = [];
200
+ const visit = (node) => {
201
+ if (ts.isFunctionDeclaration(node) && node.name) {
202
+ const symbol = typeChecker.getSymbolAtLocation(node.name);
203
+ const type = symbol && typeChecker.getTypeOfSymbolAtLocation(symbol, node);
204
+ const signature = type && typeChecker.getSignaturesOfType(type, ts.SignatureKind.Call)[0];
205
+ results.push({
206
+ name: node.name.text,
207
+ type: "function",
208
+ parameters: this.extractParameters(signature, typeChecker),
209
+ returnType: signature ? typeChecker.typeToString(signature.getReturnType()) : "any",
210
+ references: this.findReferences(node, sourceFile, typeChecker)
211
+ });
212
+ } else if (ts.isVariableStatement(node)) {
213
+ node.declarationList.declarations.forEach((declaration) => {
214
+ if (ts.isIdentifier(declaration.name)) {
215
+ const symbol = typeChecker.getSymbolAtLocation(declaration.name);
216
+ const type = symbol && typeChecker.getTypeOfSymbolAtLocation(symbol, declaration);
217
+ let kind = "variable";
218
+ let parameters;
219
+ let returnType;
220
+ let value;
221
+ const typeString = type ? typeChecker.typeToString(type) : "any";
222
+ if (declaration.initializer) {
223
+ if (ts.isArrowFunction(declaration.initializer) || ts.isFunctionExpression(declaration.initializer)) {
224
+ kind = "function";
225
+ const funcType = typeChecker.getTypeAtLocation(declaration.initializer);
226
+ const signature = typeChecker.getSignaturesOfType(funcType, ts.SignatureKind.Call)[0];
227
+ if (signature) {
228
+ parameters = this.extractParameters(signature, typeChecker);
229
+ returnType = typeChecker.typeToString(signature.getReturnType());
230
+ }
231
+ } else {
232
+ if (ts.isNumericLiteral(declaration.initializer)) {
233
+ value = Number(declaration.initializer.text);
234
+ } else if (ts.isStringLiteral(declaration.initializer)) {
235
+ value = declaration.initializer.text;
236
+ }
237
+ }
238
+ }
239
+ const refs = declaration.initializer ? this.findReferences(declaration.initializer, sourceFile, typeChecker) : [];
240
+ results.push({
241
+ name: declaration.name.text,
242
+ type: kind,
243
+ valueType: typeString,
244
+ value,
245
+ parameters,
246
+ returnType,
247
+ references: refs
248
+ });
249
+ }
250
+ });
251
+ } else if (ts.isClassDeclaration(node) && node.name) {
252
+ results.push({
253
+ name: node.name.text,
254
+ type: "class",
255
+ references: this.findReferences(node, sourceFile, typeChecker)
256
+ });
257
+ } else if (ts.isInterfaceDeclaration(node)) {
258
+ results.push({
259
+ name: node.name.text,
260
+ type: "interface",
261
+ references: this.findReferences(node, sourceFile, typeChecker)
262
+ });
263
+ }
264
+ ts.forEachChild(node, visit);
265
+ };
266
+ visit(sourceFile);
267
+ return results;
268
+ }
269
+ /**
270
+ * Extract parameter information from a signature.
271
+ */
272
+ extractParameters(signature, typeChecker) {
273
+ if (!signature) return [];
274
+ return signature.parameters.map((param) => ({
275
+ name: param.getName(),
276
+ type: typeChecker.typeToString(typeChecker.getTypeOfSymbolAtLocation(param, param.valueDeclaration))
277
+ }));
278
+ }
279
+ /**
280
+ * Find all references to variables used in a node.
281
+ */
282
+ findReferences(node, _sourceFile, _typeChecker) {
283
+ const references = /* @__PURE__ */ new Set();
284
+ const localSymbols = /* @__PURE__ */ new Set();
285
+ const collectLocalSymbols = (node2) => {
286
+ if (ts.isFunctionDeclaration(node2) || ts.isArrowFunction(node2) || ts.isFunctionExpression(node2)) {
287
+ node2.parameters.forEach((param) => {
288
+ if (ts.isIdentifier(param.name)) {
289
+ localSymbols.add(param.name.text);
290
+ }
291
+ });
292
+ }
293
+ if (ts.isVariableDeclaration(node2) && ts.isIdentifier(node2.name)) {
294
+ localSymbols.add(node2.name.text);
295
+ }
296
+ ts.forEachChild(node2, collectLocalSymbols);
297
+ };
298
+ collectLocalSymbols(node);
299
+ const findRefs = (node2) => {
300
+ if (ts.isIdentifier(node2)) {
301
+ if (!localSymbols.has(node2.text)) {
302
+ const parent = node2.parent;
303
+ const isDeclaration = ts.isVariableDeclaration(parent) && parent.name === node2 || ts.isFunctionDeclaration(parent) && parent.name === node2 || ts.isParameter(parent) && parent.name === node2;
304
+ if (!isDeclaration && !this.isBuiltIn(node2.text)) {
305
+ references.add(node2.text);
306
+ }
307
+ }
308
+ }
309
+ ts.forEachChild(node2, findRefs);
310
+ };
311
+ findRefs(node);
312
+ return Array.from(references);
313
+ }
314
+ /**
315
+ * Check if a name is a built-in global.
316
+ */
317
+ isBuiltIn(name) {
318
+ return builtIns.has(name);
319
+ }
320
+ /**
321
+ * Find assignment expressions in a source file.
322
+ */
323
+ findAssignmentExpression(sourceFile, typeChecker) {
324
+ let result = null;
325
+ const visit = (node) => {
326
+ if (ts.isExpressionStatement(node) && ts.isBinaryExpression(node.expression)) {
327
+ const expr = node.expression;
328
+ if (expr.operatorToken.kind === ts.SyntaxKind.EqualsToken && ts.isIdentifier(expr.left)) {
329
+ const type = typeChecker.getTypeAtLocation(expr.right);
330
+ const typeString = typeChecker.typeToString(type);
331
+ let value;
332
+ if (ts.isNumericLiteral(expr.right)) {
333
+ value = Number(expr.right.text);
334
+ } else if (ts.isStringLiteral(expr.right)) {
335
+ value = expr.right.text;
336
+ }
337
+ const references = this.findReferences(expr.right, sourceFile, typeChecker);
338
+ result = {
339
+ name: expr.left.text,
340
+ type: "variable",
341
+ valueType: typeString,
342
+ value,
343
+ references
344
+ };
345
+ }
346
+ }
347
+ if (!result) {
348
+ ts.forEachChild(node, visit);
349
+ }
350
+ };
351
+ visit(sourceFile);
352
+ return result;
353
+ }
354
+ /**
355
+ * Find all identifier references in a source file.
356
+ */
357
+ findAllReferences(sourceFile, _typeChecker) {
358
+ const references = /* @__PURE__ */ new Set();
359
+ const visit = (node) => {
360
+ if (ts.isIdentifier(node)) {
361
+ const parent = node.parent;
362
+ const isDeclaration = ts.isVariableDeclaration(parent) && parent.name === node || ts.isFunctionDeclaration(parent) && parent.name === node || ts.isParameter(parent) && parent.name === node;
363
+ const isAssignmentTarget = ts.isBinaryExpression(parent) && parent.operatorToken.kind === ts.SyntaxKind.EqualsToken && parent.left === node;
364
+ if (!isDeclaration && !isAssignmentTarget && !this.isBuiltIn(node.text)) {
365
+ references.add(node.text);
366
+ }
367
+ }
368
+ ts.forEachChild(node, visit);
369
+ };
370
+ visit(sourceFile);
371
+ return Array.from(references);
372
+ }
373
+ createEnvironment(files) {
374
+ const allFiles = [
375
+ ...systemFiles,
376
+ ...files
377
+ ];
378
+ const fileMap = /* @__PURE__ */ new Map();
379
+ allFiles.forEach(({ filename, content }) => {
380
+ fileMap.set(filename, content);
381
+ });
382
+ const system = createSystem(fileMap);
383
+ return createVirtualTypeScriptEnvironment(system, allFiles.map(({ filename }) => filename), ts, this.compilerOptions);
384
+ }
385
+ };
386
+
387
+ // src/notebook/compute-graph.ts
388
+ var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-script/src/notebook/compute-graph.ts";
389
+ var ComputeGraph = class {
390
+ _notebook;
391
+ _registry;
392
+ _parser = new VirtualTypeScriptParser();
393
+ _expressionsAtom = Atom.make({});
394
+ _valuesByCellIdAtom = Atom.make({});
395
+ _valuesByNameAtom = Atom.make({});
396
+ constructor(_notebook, _registry) {
397
+ this._notebook = _notebook;
398
+ this._registry = _registry;
399
+ }
400
+ /**
401
+ * Atom for parsed expressions by cell ID.
402
+ */
403
+ get expressions() {
404
+ return this._expressionsAtom;
405
+ }
406
+ /**
407
+ * Get current expressions by cell ID.
408
+ */
409
+ getExpressions() {
410
+ return this._registry.get(this._expressionsAtom);
411
+ }
412
+ /**
413
+ * Atom for computed values by cell ID.
414
+ */
415
+ get values() {
416
+ return this._valuesByCellIdAtom;
417
+ }
418
+ /**
419
+ * Get computed values by cell ID.
420
+ */
421
+ getValues() {
422
+ return this._registry.get(this._valuesByCellIdAtom);
423
+ }
424
+ /**
425
+ * Atom for computed values by name.
426
+ */
427
+ get valuesByName() {
428
+ return this._valuesByNameAtom;
429
+ }
430
+ /**
431
+ * Get current values by name.
432
+ */
433
+ getValuesByName() {
434
+ return this._registry.get(this._valuesByNameAtom);
435
+ }
436
+ /**
437
+ * Get computed value by cell ID.
438
+ */
439
+ getValue(cellId) {
440
+ return this._registry.get(this._valuesByCellIdAtom)[cellId];
441
+ }
442
+ /**
443
+ * Compute values.
444
+ */
445
+ async evaluate() {
446
+ const { expressions, dependencyGraph } = this.parse();
447
+ this._registry.set(this._valuesByCellIdAtom, {});
448
+ this._registry.set(this._valuesByNameAtom, {});
449
+ const cellExpressions = /* @__PURE__ */ new Map();
450
+ Object.entries(expressions).forEach(([id, expr]) => {
451
+ cellExpressions.set(id, expr);
452
+ });
453
+ const evaluationOrder = this.topologicalSort(Object.keys(expressions), dependencyGraph);
454
+ const valuesByName = {};
455
+ const valuesByCellId = {};
456
+ for (const cellId of evaluationOrder) {
457
+ const expr = cellExpressions.get(cellId);
458
+ if (!expr) {
459
+ log.error("no expression for cell", {
460
+ cellId
461
+ }, {
462
+ F: __dxlog_file2,
463
+ L: 105,
464
+ S: this,
465
+ C: (f, a) => f(...a)
466
+ });
467
+ continue;
468
+ }
469
+ const cellSource = this._notebook.cells.find((cell) => cell.id === cellId)?.source?.target?.content;
470
+ if (!cellSource) {
471
+ log.error("no source for cell", {
472
+ cellId
473
+ }, {
474
+ F: __dxlog_file2,
475
+ L: 111,
476
+ S: this,
477
+ C: (f, a) => f(...a)
478
+ });
479
+ continue;
480
+ }
481
+ try {
482
+ if (expr.name && expr.value !== void 0) {
483
+ valuesByName[expr.name] = expr.value;
484
+ valuesByCellId[cellId] = expr.value;
485
+ } else if (expr.name) {
486
+ const equalIndex = cellSource.indexOf("=");
487
+ if (equalIndex !== -1) {
488
+ let rhs = cellSource.substring(equalIndex + 1).trim();
489
+ if (rhs.endsWith(";")) {
490
+ rhs = rhs.slice(0, -1).trim();
491
+ }
492
+ const result = await this.eval(rhs, valuesByName);
493
+ valuesByName[expr.name] = result;
494
+ if (typeof result !== "function") {
495
+ valuesByCellId[cellId] = result;
496
+ }
497
+ }
498
+ } else {
499
+ const result = await this.eval(cellSource, valuesByName);
500
+ valuesByCellId[cellId] = result;
501
+ }
502
+ } catch (error) {
503
+ log.error("error evaluating cell", {
504
+ cellId,
505
+ error
506
+ }, {
507
+ F: __dxlog_file2,
508
+ L: 147,
509
+ S: this,
510
+ C: (f, a) => f(...a)
511
+ });
512
+ }
513
+ }
514
+ this._registry.set(this._valuesByCellIdAtom, valuesByCellId);
515
+ this._registry.set(this._valuesByNameAtom, valuesByName);
516
+ return valuesByCellId;
517
+ }
518
+ async eval(source, values) {
519
+ return evalScript(source, values);
520
+ }
521
+ /**
522
+ * Parse expressions.
523
+ */
524
+ parse() {
525
+ const expressions = this._notebook.cells.filter((cell) => cell.type === "script").reduce((acc, cell) => {
526
+ const text = cell.source?.target?.content.trim();
527
+ if (text) {
528
+ const parsed = this._parser.parseExpression(text);
529
+ acc[cell.id] = parsed;
530
+ }
531
+ return acc;
532
+ }, {});
533
+ const dependencyGraph = this.buildDependencyGraph(expressions);
534
+ this._registry.set(this._expressionsAtom, expressions);
535
+ return {
536
+ expressions,
537
+ dependencyGraph
538
+ };
539
+ }
540
+ topologicalSort(nodes, dependencies) {
541
+ const visited = /* @__PURE__ */ new Set();
542
+ const result = [];
543
+ const visit = (node) => {
544
+ if (visited.has(node)) {
545
+ return;
546
+ }
547
+ visited.add(node);
548
+ const deps = dependencies[node] || [];
549
+ deps.forEach((dep) => visit(dep));
550
+ result.push(node);
551
+ };
552
+ nodes.forEach((node) => visit(node));
553
+ return result;
554
+ }
555
+ buildDependencyGraph(expressions) {
556
+ const nameToCellId = /* @__PURE__ */ new Map();
557
+ Object.entries(expressions).forEach(([id, expr]) => {
558
+ if (expr.name) {
559
+ nameToCellId.set(expr.name, id);
560
+ }
561
+ });
562
+ const graph = {};
563
+ Object.entries(expressions).forEach(([id, expr]) => {
564
+ if (expr.references && expr.references.length > 0) {
565
+ const dependencyCellIds = expr.references.map((ref) => nameToCellId.get(ref)).filter((cellId) => cellId !== void 0 && cellId !== id);
566
+ if (dependencyCellIds.length > 0) {
567
+ graph[id] = dependencyCellIds;
568
+ }
569
+ }
570
+ });
571
+ return graph;
572
+ }
573
+ };
574
+
575
+ // src/containers/NotebookContainer/NotebookContainer.tsx
576
+ var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-script/src/containers/NotebookContainer/NotebookContainer.tsx";
577
+ var INCLUDE_BLUEPRINTS = [
578
+ "org.dxos.blueprint.assistant",
579
+ "org.dxos.blueprint.database",
580
+ "org.dxos.blueprint.markdown"
581
+ ];
582
+ var NotebookContainer = ({ role, subject: notebook, attendableId, env }) => {
583
+ const { t } = useTranslation(meta.id);
584
+ const registry = useContext(RegistryContext);
585
+ const db = Obj.getDatabase(notebook);
586
+ const { hasAttention } = useAttention(attendableId);
587
+ const graph = useMemo(() => notebook && new ComputeGraph(notebook, registry), [
588
+ notebook,
589
+ registry
590
+ ]);
591
+ const [queryValues, setQueryValues] = useState({});
592
+ const handleExecQueries = useCallback(async () => {
593
+ invariant2(db, void 0, {
594
+ F: __dxlog_file3,
595
+ L: 54,
596
+ S: void 0,
597
+ A: [
598
+ "db",
599
+ ""
600
+ ]
601
+ });
602
+ const builder = new QueryBuilder();
603
+ for (const cell of notebook?.cells ?? []) {
604
+ if (cell.type === "query") {
605
+ if (cell.source?.target) {
606
+ const source = cell.source.target.content;
607
+ const { name, filter } = builder.build(source);
608
+ if (filter) {
609
+ const ast = Query.select(filter).ast;
610
+ const graph2 = cell.graph?.target;
611
+ if (!graph2) {
612
+ const { view } = await ViewModel.makeFromDatabase({
613
+ db
614
+ });
615
+ const newGraph = Graph.make({
616
+ query: {
617
+ ast
618
+ },
619
+ view
620
+ });
621
+ Obj.change(notebook, (n) => {
622
+ const c = n.cells.find((c2) => c2.id === cell.id);
623
+ if (c) {
624
+ c.graph = Ref.make(newGraph);
625
+ c.name = name;
626
+ }
627
+ });
628
+ } else {
629
+ Obj.change(graph2, (g) => {
630
+ g.query.ast = ast;
631
+ });
632
+ }
633
+ }
634
+ }
635
+ if (cell.name && cell.graph?.target) {
636
+ const graph2 = Obj.getSnapshot(cell.graph?.target);
637
+ const query = Query.fromAst(graph2.query.ast);
638
+ const objects = await db.query(query).run();
639
+ const objectIds = objects?.map((obj) => obj.id);
640
+ setQueryValues((prev) => ({
641
+ ...prev,
642
+ [cell.name]: objectIds
643
+ }));
644
+ }
645
+ }
646
+ }
647
+ }, [
648
+ db,
649
+ notebook,
650
+ graph
651
+ ]);
652
+ const [promptResults, setPromptResults] = useState({});
653
+ const handleExecPrompts = useComputeRuntimeCallback(db?.spaceId, Effect.fnUntraced(function* () {
654
+ invariant2(graph, void 0, {
655
+ F: __dxlog_file3,
656
+ L: 98,
657
+ S: this,
658
+ A: [
659
+ "graph",
660
+ ""
661
+ ]
662
+ });
663
+ const prompts = notebook?.cells.filter((cell) => cell.type === "prompt").map((cell) => cell.prompt).filter(isNonNullable) ?? [];
664
+ for (const prompt of prompts) {
665
+ yield* runPrompt({
666
+ prompt,
667
+ input: {
668
+ ...queryValues,
669
+ ...graph.getValuesByName()
670
+ },
671
+ onResult: (result) => setPromptResults((prev) => ({
672
+ ...prev,
673
+ [prompt.dxn.toString()]: result
674
+ }))
675
+ });
676
+ }
677
+ }), [
678
+ notebook,
679
+ graph,
680
+ queryValues
681
+ ]);
682
+ const handleCompute = useCallback(async () => {
683
+ await graph?.evaluate();
684
+ await handleExecQueries();
685
+ await handleExecPrompts();
686
+ }, [
687
+ graph,
688
+ handleExecQueries,
689
+ handleExecPrompts
690
+ ]);
691
+ const handleRearrange = useCallback((source, target) => {
692
+ invariant2(notebook, void 0, {
693
+ F: __dxlog_file3,
694
+ L: 131,
695
+ S: void 0,
696
+ A: [
697
+ "notebook",
698
+ ""
699
+ ]
700
+ });
701
+ const from = notebook.cells.findIndex((cell) => cell.id === source.id);
702
+ const to = notebook.cells.findIndex((cell) => cell.id === target.id);
703
+ if (from != null && to != null) {
704
+ Obj.change(notebook, (n) => {
705
+ const cell = n.cells.splice(from, 1)[0];
706
+ if (cell) {
707
+ n.cells.splice(to, 0, cell);
708
+ }
709
+ });
710
+ }
711
+ }, [
712
+ notebook
713
+ ]);
714
+ const handleCellInsert = useCallback(async (type, after) => {
715
+ invariant2(notebook, void 0, {
716
+ F: __dxlog_file3,
717
+ L: 148,
718
+ S: void 0,
719
+ A: [
720
+ "notebook",
721
+ ""
722
+ ]
723
+ });
724
+ const cell = {
725
+ id: crypto.randomUUID(),
726
+ type
727
+ };
728
+ switch (type) {
729
+ case "markdown":
730
+ case "script":
731
+ case "query": {
732
+ cell.source = Ref.make(Text.make());
733
+ break;
734
+ }
735
+ case "prompt": {
736
+ if (db) {
737
+ const objects = await db.query(Query.select(Filter.type(Blueprint.Blueprint))).run();
738
+ const blueprints = objects.filter((blueprint) => INCLUDE_BLUEPRINTS.includes(blueprint.key)).map((blueprint) => Ref.make(blueprint));
739
+ cell.prompt = Ref.make(Prompt.make({
740
+ instructions: "",
741
+ blueprints
742
+ }));
743
+ }
744
+ break;
745
+ }
746
+ }
747
+ const idx = after ? notebook.cells.findIndex((cell2) => cell2.id === after) : notebook.cells.length;
748
+ Obj.change(notebook, (n) => {
749
+ n.cells.splice(idx, 0, cell);
750
+ });
751
+ }, [
752
+ db,
753
+ notebook
754
+ ]);
755
+ const handleCellDelete = useCallback((id) => {
756
+ invariant2(notebook, void 0, {
757
+ F: __dxlog_file3,
758
+ L: 180,
759
+ S: void 0,
760
+ A: [
761
+ "notebook",
762
+ ""
763
+ ]
764
+ });
765
+ const idx = notebook.cells.findIndex((cell) => cell.id === id);
766
+ if (idx !== -1) {
767
+ Obj.change(notebook, (n) => {
768
+ n.cells.splice(idx, 1);
769
+ });
770
+ }
771
+ }, [
772
+ notebook
773
+ ]);
774
+ return /* @__PURE__ */ React.createElement(Panel.Root, {
775
+ role,
776
+ className: "dx-article"
777
+ }, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
778
+ asChild: true
779
+ }, /* @__PURE__ */ React.createElement(Toolbar.Root, {
780
+ disabled: !hasAttention,
781
+ textBlockWidth: true
782
+ }, /* @__PURE__ */ React.createElement(DropdownMenu.Root, null, /* @__PURE__ */ React.createElement(DropdownMenu.Trigger, {
783
+ asChild: true
784
+ }, /* @__PURE__ */ React.createElement(IconButton, {
785
+ icon: "ph--plus--regular",
786
+ iconOnly: true,
787
+ label: t("notebook cell insert label")
788
+ })), /* @__PURE__ */ React.createElement(NotebookMenu, {
789
+ onCellInsert: handleCellInsert
790
+ })), /* @__PURE__ */ React.createElement(Toolbar.IconButton, {
791
+ icon: "ph--play--fill",
792
+ iconOnly: true,
793
+ label: t("compute label"),
794
+ classNames: "text-success-text",
795
+ onClick: handleCompute
796
+ }))), /* @__PURE__ */ React.createElement(Panel.Content, {
797
+ asChild: true
798
+ }, /* @__PURE__ */ React.createElement(NotebookStack, {
799
+ db,
800
+ notebook,
801
+ graph,
802
+ env,
803
+ promptResults,
804
+ onRearrange: handleRearrange,
805
+ onCellInsert: handleCellInsert,
806
+ onCellDelete: handleCellDelete
807
+ })));
808
+ };
809
+ var runPrompt = Effect.fn(function* ({ prompt, input, onResult }) {
810
+ const inputData = {
811
+ prompt,
812
+ input
813
+ };
814
+ const tracer = yield* TracingService;
815
+ const trace = yield* tracer.traceInvocationStart({
816
+ target: void 0,
817
+ payload: {
818
+ data: {}
819
+ }
820
+ });
821
+ const result = yield* FunctionInvocationService.invokeFunction(AgentFunctions.Prompt, inputData).pipe(Effect.provide(trace.invocationTraceQueue ? TracingService.layerInvocation(trace) : TracingService.layerNoop), Effect.exit);
822
+ Exit.match(result, {
823
+ onFailure: (cause) => {
824
+ const error = Cause.prettyErrors(cause)[0];
825
+ log2.error(error.message, error.cause ?? error.stack, {
826
+ F: __dxlog_file3,
827
+ L: 254,
828
+ S: this,
829
+ C: (f, a) => f(...a)
830
+ });
831
+ onResult(error.message);
832
+ },
833
+ onSuccess: (result2) => {
834
+ onResult(result2.note);
835
+ }
836
+ });
837
+ yield* tracer.traceInvocationEnd({
838
+ trace,
839
+ // TODO(dmaretskyi): Might miss errors.
840
+ exception: Exit.isFailure(result) ? Cause.prettyErrors(result.cause)[0] : void 0
841
+ });
842
+ });
843
+
844
+ // src/containers/NotebookContainer/index.ts
845
+ var NotebookContainer_default = NotebookContainer;
846
+ export {
847
+ NotebookContainer_default as default
848
+ };
849
+ //# sourceMappingURL=NotebookContainer-EL6AHDB7.mjs.map