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

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