@dxos/plugin-script 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc

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 (316) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/{browser/NotebookContainer-RO4NJRYH.mjs → neutral/NotebookArticle-3TE4WBZC.mjs} +13 -10
  3. package/dist/lib/neutral/NotebookArticle-3TE4WBZC.mjs.map +7 -0
  4. package/dist/lib/{browser/ScriptContainer-2OPBAXFB.mjs → neutral/ScriptArticle-UBT27SB6.mjs} +4 -4
  5. package/dist/lib/{browser/ScriptContainer-2OPBAXFB.mjs.map → neutral/ScriptArticle-UBT27SB6.mjs.map} +4 -4
  6. package/dist/lib/neutral/ScriptPlugin.mjs +39 -0
  7. package/dist/lib/neutral/ScriptPlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/ScriptPlugin.node.mjs +27 -0
  9. package/dist/lib/neutral/ScriptPlugin.node.mjs.map +7 -0
  10. package/dist/lib/neutral/ScriptPlugin.workerd.mjs +21 -0
  11. package/dist/lib/neutral/ScriptPlugin.workerd.mjs.map +7 -0
  12. package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs +31 -0
  13. package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs.map +7 -0
  14. package/dist/lib/{browser/ScriptProperties-NRXG4PBX.mjs → neutral/ScriptProperties-RLXNAN3N.mjs} +9 -16
  15. package/dist/lib/neutral/ScriptProperties-RLXNAN3N.mjs.map +7 -0
  16. package/dist/lib/{browser/TestContainer-JNFPLAJX.mjs → neutral/TestContainer-AFVTBYSJ.mjs} +5 -5
  17. package/dist/lib/neutral/TestContainer-AFVTBYSJ.mjs.map +7 -0
  18. package/dist/lib/{browser/access-token-created-MSWZWZCT.mjs → neutral/access-token-created-XNDXOZ2U.mjs} +6 -9
  19. package/dist/lib/neutral/access-token-created-XNDXOZ2U.mjs.map +7 -0
  20. package/dist/lib/neutral/app-graph-builder-7AWFCEQF.mjs +52 -0
  21. package/dist/lib/neutral/app-graph-builder-7AWFCEQF.mjs.map +7 -0
  22. package/dist/lib/neutral/blueprint-definition-T33SBPP2.mjs +15 -0
  23. package/dist/lib/neutral/blueprint-definition-T33SBPP2.mjs.map +7 -0
  24. package/dist/lib/neutral/blueprints/index.mjs +10 -0
  25. package/dist/lib/neutral/capabilities/index.mjs +21 -0
  26. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  27. package/dist/lib/neutral/capabilities/node.mjs +17 -0
  28. package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-2REUEDUA.mjs +56 -0
  30. package/dist/lib/neutral/chunk-2REUEDUA.mjs.map +7 -0
  31. package/dist/lib/{browser/chunk-NSAF3763.mjs → neutral/chunk-A4LRH25S.mjs} +3 -3
  32. package/dist/lib/neutral/chunk-A4LRH25S.mjs.map +7 -0
  33. package/dist/lib/{browser/blueprints/index.mjs → neutral/chunk-BDRB6ZX2.mjs} +4 -10
  34. package/dist/lib/neutral/chunk-BDRB6ZX2.mjs.map +7 -0
  35. package/dist/lib/neutral/chunk-BMO5VOKL.mjs +125 -0
  36. package/dist/lib/neutral/chunk-BMO5VOKL.mjs.map +7 -0
  37. package/dist/lib/neutral/chunk-LYPVNW4K.mjs +8 -0
  38. package/dist/lib/neutral/chunk-LYPVNW4K.mjs.map +7 -0
  39. package/dist/lib/neutral/chunk-P2F3STZN.mjs +8 -0
  40. package/dist/lib/neutral/chunk-P2F3STZN.mjs.map +7 -0
  41. package/dist/lib/neutral/chunk-SNUWHNEW.mjs +8 -0
  42. package/dist/lib/neutral/chunk-SNUWHNEW.mjs.map +7 -0
  43. package/dist/lib/neutral/chunk-UYR3YH4Q.mjs +31 -0
  44. package/dist/lib/neutral/chunk-UYR3YH4Q.mjs.map +7 -0
  45. package/dist/lib/{browser/index.mjs → neutral/chunk-VXDJH6OL.mjs} +20 -63
  46. package/dist/lib/neutral/chunk-VXDJH6OL.mjs.map +7 -0
  47. package/dist/lib/neutral/compiler-ODK4UA2N.mjs +101 -0
  48. package/dist/lib/neutral/compiler-ODK4UA2N.mjs.map +7 -0
  49. package/dist/lib/neutral/components/index.mjs +721 -0
  50. package/dist/lib/neutral/components/index.mjs.map +7 -0
  51. package/dist/lib/neutral/containers/index.mjs +17 -0
  52. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  53. package/dist/lib/{browser/create-JDXWBARB.mjs → neutral/create-ZUHIXCBS.mjs} +4 -2
  54. package/dist/lib/{browser/create-JDXWBARB.mjs.map → neutral/create-ZUHIXCBS.mjs.map} +3 -3
  55. package/dist/lib/neutral/create-object-F2NWICFV.mjs +44 -0
  56. package/dist/lib/neutral/create-object-F2NWICFV.mjs.map +7 -0
  57. package/dist/lib/{browser/create-script-Q7B3CFAP.mjs → neutral/create-script-H5S4AO47.mjs} +5 -5
  58. package/dist/lib/neutral/create-script-H5S4AO47.mjs.map +7 -0
  59. package/dist/lib/{browser/deploy-CXVW54JJ.mjs → neutral/deploy-M73G7HMP.mjs} +4 -3
  60. package/dist/lib/{browser/deploy-CXVW54JJ.mjs.map → neutral/deploy-M73G7HMP.mjs.map} +3 -3
  61. package/dist/lib/neutral/hooks/index.mjs +369 -0
  62. package/dist/lib/neutral/hooks/index.mjs.map +7 -0
  63. package/dist/lib/neutral/index.mjs +41 -0
  64. package/dist/lib/{browser/inspect-invocations-LEOEP5I2.mjs → neutral/inspect-invocations-UO27IPCL.mjs} +3 -3
  65. package/dist/lib/{browser/inspect-invocations-LEOEP5I2.mjs.map → neutral/inspect-invocations-UO27IPCL.mjs.map} +2 -2
  66. package/dist/lib/{browser/install-function-5N24Q45W.mjs → neutral/install-function-MSWSC244.mjs} +5 -7
  67. package/dist/lib/neutral/install-function-MSWSC244.mjs.map +7 -0
  68. package/dist/lib/{browser/invoke-5QVEZ3X5.mjs → neutral/invoke-V6XYXKLD.mjs} +6 -7
  69. package/dist/lib/neutral/invoke-V6XYXKLD.mjs.map +7 -0
  70. package/dist/lib/neutral/meta.json +1 -0
  71. package/dist/lib/neutral/meta.mjs +10 -0
  72. package/dist/lib/neutral/operation-handler-KIZ7XZ5G.mjs +18 -0
  73. package/dist/lib/neutral/operation-handler-KIZ7XZ5G.mjs.map +7 -0
  74. package/dist/lib/neutral/operations/index.mjs +8 -0
  75. package/dist/lib/neutral/plugin.mjs +16 -0
  76. package/dist/lib/neutral/plugin.mjs.map +7 -0
  77. package/dist/lib/{browser/query-deployed-functions-FVD7NYPA.mjs → neutral/query-deployed-functions-4MMKQ6BR.mjs} +13 -9
  78. package/dist/lib/neutral/query-deployed-functions-4MMKQ6BR.mjs.map +7 -0
  79. package/dist/lib/neutral/react-surface-ZMU2CRJ7.mjs +117 -0
  80. package/dist/lib/neutral/react-surface-ZMU2CRJ7.mjs.map +7 -0
  81. package/dist/lib/neutral/settings-VJBW4OMK.mjs +30 -0
  82. package/dist/lib/neutral/settings-VJBW4OMK.mjs.map +7 -0
  83. package/dist/lib/{browser → neutral}/templates/index.mjs +1 -1
  84. package/dist/lib/neutral/types/index.mjs +17 -0
  85. package/dist/lib/neutral/types/index.mjs.map +7 -0
  86. package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
  87. package/dist/types/src/ScriptPlugin.node.d.ts.map +1 -1
  88. package/dist/types/src/ScriptPlugin.workerd.d.ts +4 -0
  89. package/dist/types/src/ScriptPlugin.workerd.d.ts.map +1 -0
  90. package/dist/types/src/blueprints/functions/definitions.d.ts +0 -12
  91. package/dist/types/src/blueprints/functions/definitions.d.ts.map +1 -1
  92. package/dist/types/src/blueprints/functions/delete.d.ts +0 -2
  93. package/dist/types/src/blueprints/functions/deploy.d.ts +0 -2
  94. package/dist/types/src/blueprints/functions/inspect-invocations.d.ts +0 -2
  95. package/dist/types/src/blueprints/functions/invoke.d.ts +2 -4
  96. package/dist/types/src/blueprints/functions/invoke.d.ts.map +1 -1
  97. package/dist/types/src/blueprints/functions/read.d.ts +0 -2
  98. package/dist/types/src/blueprints/functions/update.d.ts +0 -2
  99. package/dist/types/src/capabilities/create-object.d.ts +16 -0
  100. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/index.d.ts +11 -0
  102. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  103. package/dist/types/src/capabilities/node.d.ts +18 -0
  104. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  105. package/dist/types/src/compiler/compiler.d.ts.map +1 -1
  106. package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -1
  107. package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts +7 -0
  108. package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts.map +1 -0
  109. package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts +7 -0
  110. package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts.map +1 -0
  111. package/dist/types/src/containers/NotebookArticle/index.d.ts +2 -0
  112. package/dist/types/src/containers/{ScriptContainer → NotebookArticle}/index.d.ts.map +1 -1
  113. package/dist/types/src/containers/{ScriptContainer/ScriptContainer.d.ts → ScriptArticle/ScriptArticle.d.ts} +2 -2
  114. package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -0
  115. package/dist/types/src/containers/{ScriptContainer/ScriptContainer.stories.d.ts → ScriptArticle/ScriptArticle.stories.d.ts} +1 -1
  116. package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts.map +1 -0
  117. package/dist/types/src/containers/ScriptArticle/index.d.ts +2 -0
  118. package/dist/types/src/containers/ScriptArticle/index.d.ts.map +1 -0
  119. package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts.map +1 -1
  120. package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -1
  121. package/dist/types/src/containers/index.d.ts +2 -2
  122. package/dist/types/src/containers/index.d.ts.map +1 -1
  123. package/dist/types/src/hooks/deploy.d.ts +0 -2
  124. package/dist/types/src/hooks/deploy.d.ts.map +1 -1
  125. package/dist/types/src/index.d.ts +2 -3
  126. package/dist/types/src/index.d.ts.map +1 -1
  127. package/dist/types/src/operations/access-token-created.d.ts +1 -1
  128. package/dist/types/src/operations/access-token-created.d.ts.map +1 -1
  129. package/dist/types/src/operations/create-script.d.ts +2 -2
  130. package/dist/types/src/operations/create-script.d.ts.map +1 -1
  131. package/dist/types/src/operations/index.d.ts +0 -1
  132. package/dist/types/src/operations/index.d.ts.map +1 -1
  133. package/dist/types/src/plugin.d.ts +4 -0
  134. package/dist/types/src/plugin.d.ts.map +1 -0
  135. package/dist/types/src/templates/chess-bot.d.ts +3 -9
  136. package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
  137. package/dist/types/src/templates/commentary.d.ts +3 -9
  138. package/dist/types/src/templates/commentary.d.ts.map +1 -1
  139. package/dist/types/src/testing/test-script.d.ts.map +1 -1
  140. package/dist/types/src/types/Notebook.d.ts +13 -11
  141. package/dist/types/src/types/Notebook.d.ts.map +1 -1
  142. package/dist/types/src/types/ScriptCapabilities.d.ts +6 -0
  143. package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -0
  144. package/dist/types/src/types/ScriptEvents.d.ts +3 -0
  145. package/dist/types/src/types/ScriptEvents.d.ts.map +1 -0
  146. package/dist/types/src/{operations/definitions.d.ts → types/ScriptOperation.d.ts} +1 -1
  147. package/dist/types/src/types/ScriptOperation.d.ts.map +1 -0
  148. package/dist/types/src/types/index.d.ts +4 -3
  149. package/dist/types/src/types/index.d.ts.map +1 -1
  150. package/dist/types/tsconfig.tsbuildinfo +1 -1
  151. package/package.json +141 -111
  152. package/src/ScriptPlugin.node.ts +3 -52
  153. package/src/ScriptPlugin.test.ts +3 -3
  154. package/src/ScriptPlugin.tsx +2 -51
  155. package/src/ScriptPlugin.workerd.ts +18 -0
  156. package/src/blueprints/functions/create.ts +1 -1
  157. package/src/blueprints/functions/deploy.ts +2 -1
  158. package/src/blueprints/functions/inspect-invocations.ts +2 -2
  159. package/src/blueprints/functions/install-function.ts +4 -4
  160. package/src/blueprints/functions/invoke.ts +4 -5
  161. package/src/blueprints/functions/query-deployed-functions.ts +11 -7
  162. package/src/capabilities/artifact-definition.ts +2 -2
  163. package/src/capabilities/create-object.ts +48 -0
  164. package/src/capabilities/index.ts +1 -0
  165. package/src/capabilities/node.ts +16 -0
  166. package/src/capabilities/react-surface.tsx +5 -5
  167. package/src/compiler/compiler.ts +4 -0
  168. package/src/components/NotebookStack/NotebookStack.stories.tsx +2 -2
  169. package/src/components/QueryEditor/QueryEditor.stories.tsx +1 -1
  170. package/src/components/QueryEditor/QueryEditor.tsx +3 -1
  171. package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +1 -1
  172. package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +1 -1
  173. package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +1 -1
  174. package/src/containers/{NotebookContainer/NotebookContainer.stories.tsx → NotebookArticle/NotebookArticle.stories.tsx} +11 -11
  175. package/src/containers/{NotebookContainer/NotebookContainer.tsx → NotebookArticle/NotebookArticle.tsx} +7 -7
  176. package/src/containers/NotebookArticle/index.ts +5 -0
  177. package/src/containers/{ScriptContainer/ScriptContainer.stories.tsx → ScriptArticle/ScriptArticle.stories.tsx} +7 -6
  178. package/src/containers/{ScriptContainer/ScriptContainer.tsx → ScriptArticle/ScriptArticle.tsx} +1 -1
  179. package/src/containers/ScriptArticle/index.ts +5 -0
  180. package/src/containers/ScriptProperties/BlueprintEditor.tsx +10 -9
  181. package/src/containers/ScriptProperties/FunctionBinding.tsx +1 -1
  182. package/src/containers/ScriptProperties/FunctionPublishing.tsx +4 -4
  183. package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +3 -2
  184. package/src/containers/ScriptProperties/ScriptProperties.tsx +1 -1
  185. package/src/containers/TestContainer/TestContainer.tsx +4 -4
  186. package/src/containers/index.ts +2 -2
  187. package/src/e2e/deploy.test.ts +3 -1
  188. package/src/hooks/useCreateAndDeployScriptTemplates.ts +2 -2
  189. package/src/index.ts +2 -7
  190. package/src/operations/access-token-created.ts +1 -1
  191. package/src/operations/create-script.ts +2 -2
  192. package/src/operations/index.ts +0 -2
  193. package/src/plugin.ts +11 -0
  194. package/src/templates/chess-bot.ts +10 -8
  195. package/src/templates/commentary.ts +14 -14
  196. package/src/testing/test-notebook.ts +7 -7
  197. package/src/testing/test-script.ts +1 -2
  198. package/src/types/Notebook.ts +1 -1
  199. package/src/types/ScriptCapabilities.ts +18 -0
  200. package/src/types/ScriptEvents.ts +11 -0
  201. package/src/{operations/definitions.ts → types/ScriptOperation.ts} +2 -0
  202. package/src/types/index.ts +5 -3
  203. package/src/util/deploy.ts +1 -1
  204. package/src/util/functions.ts +4 -4
  205. package/dist/lib/browser/NotebookContainer-RO4NJRYH.mjs.map +0 -7
  206. package/dist/lib/browser/ScriptProperties-NRXG4PBX.mjs.map +0 -7
  207. package/dist/lib/browser/TestContainer-JNFPLAJX.mjs.map +0 -7
  208. package/dist/lib/browser/access-token-created-MSWZWZCT.mjs.map +0 -7
  209. package/dist/lib/browser/blueprints/index.mjs.map +0 -7
  210. package/dist/lib/browser/chunk-KF6H7J5N.mjs +0 -81
  211. package/dist/lib/browser/chunk-KF6H7J5N.mjs.map +0 -7
  212. package/dist/lib/browser/chunk-NSAF3763.mjs.map +0 -7
  213. package/dist/lib/browser/chunk-RQ5LDVFK.mjs +0 -49
  214. package/dist/lib/browser/chunk-RQ5LDVFK.mjs.map +0 -7
  215. package/dist/lib/browser/containers/index.mjs +0 -17
  216. package/dist/lib/browser/containers/index.mjs.map +0 -7
  217. package/dist/lib/browser/create-script-Q7B3CFAP.mjs.map +0 -7
  218. package/dist/lib/browser/index.mjs.map +0 -7
  219. package/dist/lib/browser/install-function-5N24Q45W.mjs.map +0 -7
  220. package/dist/lib/browser/invoke-5QVEZ3X5.mjs.map +0 -7
  221. package/dist/lib/browser/meta.json +0 -1
  222. package/dist/lib/browser/operations/index.mjs +0 -14
  223. package/dist/lib/browser/operations/index.mjs.map +0 -7
  224. package/dist/lib/browser/query-deployed-functions-FVD7NYPA.mjs.map +0 -7
  225. package/dist/lib/browser/types/index.mjs +0 -14
  226. package/dist/lib/node-esm/DeploymentDialog-A5BZHUJB.mjs +0 -113
  227. package/dist/lib/node-esm/DeploymentDialog-A5BZHUJB.mjs.map +0 -7
  228. package/dist/lib/node-esm/NotebookContainer-DPT65MA7.mjs +0 -761
  229. package/dist/lib/node-esm/NotebookContainer-DPT65MA7.mjs.map +0 -7
  230. package/dist/lib/node-esm/ScriptContainer-UKD7QORM.mjs +0 -80
  231. package/dist/lib/node-esm/ScriptContainer-UKD7QORM.mjs.map +0 -7
  232. package/dist/lib/node-esm/ScriptProperties-FQXEOJKG.mjs +0 -305
  233. package/dist/lib/node-esm/ScriptProperties-FQXEOJKG.mjs.map +0 -7
  234. package/dist/lib/node-esm/TestContainer-Y4XVV7KQ.mjs +0 -45
  235. package/dist/lib/node-esm/TestContainer-Y4XVV7KQ.mjs.map +0 -7
  236. package/dist/lib/node-esm/access-token-created-DCD6LYQC.mjs +0 -38
  237. package/dist/lib/node-esm/access-token-created-DCD6LYQC.mjs.map +0 -7
  238. package/dist/lib/node-esm/blueprints/index.mjs +0 -59
  239. package/dist/lib/node-esm/blueprints/index.mjs.map +0 -7
  240. package/dist/lib/node-esm/chunk-2DZNF5NG.mjs +0 -82
  241. package/dist/lib/node-esm/chunk-2DZNF5NG.mjs.map +0 -7
  242. package/dist/lib/node-esm/chunk-C55UYWN4.mjs +0 -50
  243. package/dist/lib/node-esm/chunk-C55UYWN4.mjs.map +0 -7
  244. package/dist/lib/node-esm/chunk-EW63XFRQ.mjs +0 -107
  245. package/dist/lib/node-esm/chunk-EW63XFRQ.mjs.map +0 -7
  246. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  247. package/dist/lib/node-esm/chunk-XFM2BEHY.mjs +0 -338
  248. package/dist/lib/node-esm/chunk-XFM2BEHY.mjs.map +0 -7
  249. package/dist/lib/node-esm/containers/index.mjs +0 -18
  250. package/dist/lib/node-esm/containers/index.mjs.map +0 -7
  251. package/dist/lib/node-esm/create-D2JDNXY6.mjs +0 -45
  252. package/dist/lib/node-esm/create-D2JDNXY6.mjs.map +0 -7
  253. package/dist/lib/node-esm/create-script-4AB4G7GQ.mjs +0 -46
  254. package/dist/lib/node-esm/create-script-4AB4G7GQ.mjs.map +0 -7
  255. package/dist/lib/node-esm/delete-YXLT7J27.mjs +0 -22
  256. package/dist/lib/node-esm/delete-YXLT7J27.mjs.map +0 -7
  257. package/dist/lib/node-esm/deploy-MXVZXAUC.mjs +0 -63
  258. package/dist/lib/node-esm/deploy-MXVZXAUC.mjs.map +0 -7
  259. package/dist/lib/node-esm/index.mjs +0 -194
  260. package/dist/lib/node-esm/index.mjs.map +0 -7
  261. package/dist/lib/node-esm/inspect-invocations-TVAKGYX5.mjs +0 -60
  262. package/dist/lib/node-esm/inspect-invocations-TVAKGYX5.mjs.map +0 -7
  263. package/dist/lib/node-esm/install-function-ST3VABJH.mjs +0 -52
  264. package/dist/lib/node-esm/install-function-ST3VABJH.mjs.map +0 -7
  265. package/dist/lib/node-esm/invoke-64WDU55Y.mjs +0 -34
  266. package/dist/lib/node-esm/invoke-64WDU55Y.mjs.map +0 -7
  267. package/dist/lib/node-esm/meta.json +0 -1
  268. package/dist/lib/node-esm/operations/index.mjs +0 -15
  269. package/dist/lib/node-esm/operations/index.mjs.map +0 -7
  270. package/dist/lib/node-esm/query-deployed-functions-2VCNGQ7X.mjs +0 -31
  271. package/dist/lib/node-esm/query-deployed-functions-2VCNGQ7X.mjs.map +0 -7
  272. package/dist/lib/node-esm/read-PECQUAPS.mjs +0 -27
  273. package/dist/lib/node-esm/read-PECQUAPS.mjs.map +0 -7
  274. package/dist/lib/node-esm/templates/index.mjs +0 -11
  275. package/dist/lib/node-esm/translations.mjs +0 -105
  276. package/dist/lib/node-esm/translations.mjs.map +0 -7
  277. package/dist/lib/node-esm/types/index.mjs +0 -15
  278. package/dist/lib/node-esm/update-XDFTGSPP.mjs +0 -64
  279. package/dist/lib/node-esm/update-XDFTGSPP.mjs.map +0 -7
  280. package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts +0 -7
  281. package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +0 -1
  282. package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts +0 -7
  283. package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +0 -1
  284. package/dist/types/src/containers/NotebookContainer/index.d.ts +0 -2
  285. package/dist/types/src/containers/NotebookContainer/index.d.ts.map +0 -1
  286. package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +0 -1
  287. package/dist/types/src/containers/ScriptContainer/ScriptContainer.stories.d.ts.map +0 -1
  288. package/dist/types/src/containers/ScriptContainer/index.d.ts +0 -2
  289. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  290. package/dist/types/src/types/capabilities.d.ts +0 -9
  291. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  292. package/dist/types/src/types/events.d.ts +0 -5
  293. package/dist/types/src/types/events.d.ts.map +0 -1
  294. package/src/containers/NotebookContainer/index.ts +0 -5
  295. package/src/containers/ScriptContainer/index.ts +0 -5
  296. package/src/types/capabilities.ts +0 -17
  297. package/src/types/events.ts +0 -11
  298. /package/dist/lib/{browser → neutral}/DeploymentDialog-6DBF3V6C.mjs +0 -0
  299. /package/dist/lib/{browser → neutral}/DeploymentDialog-6DBF3V6C.mjs.map +0 -0
  300. /package/dist/lib/{browser/templates → neutral/blueprints}/index.mjs.map +0 -0
  301. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  302. /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  303. /package/dist/lib/{browser → neutral}/chunk-MI6X5CTJ.mjs +0 -0
  304. /package/dist/lib/{browser → neutral}/chunk-MI6X5CTJ.mjs.map +0 -0
  305. /package/dist/lib/{browser → neutral}/delete-PAUWA2QM.mjs +0 -0
  306. /package/dist/lib/{browser → neutral}/delete-PAUWA2QM.mjs.map +0 -0
  307. /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
  308. /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
  309. /package/dist/lib/{node-esm/templates → neutral/operations}/index.mjs.map +0 -0
  310. /package/dist/lib/{browser → neutral}/read-FFOSK6A3.mjs +0 -0
  311. /package/dist/lib/{browser → neutral}/read-FFOSK6A3.mjs.map +0 -0
  312. /package/dist/lib/{node-esm/types → neutral/templates}/index.mjs.map +0 -0
  313. /package/dist/lib/{browser → neutral}/translations.mjs +0 -0
  314. /package/dist/lib/{browser → neutral}/translations.mjs.map +0 -0
  315. /package/dist/lib/{browser → neutral}/update-PJS5GG3Y.mjs +0 -0
  316. /package/dist/lib/{browser → neutral}/update-PJS5GG3Y.mjs.map +0 -0
@@ -1,81 +0,0 @@
1
- import {
2
- __export
3
- } from "./chunk-J5LGTIGS.mjs";
4
-
5
- // src/types/capabilities.ts
6
- import { Capability } from "@dxos/app-framework";
7
- import { meta } from "#meta";
8
- (function(ScriptCapabilities2) {
9
- ScriptCapabilities2.Settings = Capability.make(`${meta.id}.capability.settings`);
10
- ScriptCapabilities2.Compiler = Capability.make(`${meta.id}.capability.compiler`);
11
- })(ScriptCapabilities || (ScriptCapabilities = {}));
12
- var ScriptCapabilities;
13
-
14
- // src/types/events.ts
15
- import { ActivationEvent } from "@dxos/app-framework";
16
- import { meta as meta2 } from "#meta";
17
- (function(ScriptEvents2) {
18
- ScriptEvents2.SetupCompiler = ActivationEvent.make(`${meta2.id}.event.setup-compiler`);
19
- })(ScriptEvents || (ScriptEvents = {}));
20
- var ScriptEvents;
21
-
22
- // src/types/Notebook.ts
23
- var Notebook_exports = {};
24
- __export(Notebook_exports, {
25
- Cell: () => Cell,
26
- Notebook: () => Notebook,
27
- make: () => make
28
- });
29
- import * as Schema from "effect/Schema";
30
- import { Routine } from "@dxos/compute";
31
- import { Annotation, Obj, Ref, Type } from "@dxos/echo";
32
- import { FormInputAnnotation } from "@dxos/echo/internal";
33
- import { LabelAnnotation } from "@dxos/echo/internal";
34
- import { Graph } from "@dxos/plugin-explorer/types";
35
- import { Text } from "@dxos/schema";
36
- var Cell = Schema.Struct({
37
- id: Schema.String,
38
- type: Schema.String,
39
- name: Schema.optional(Schema.String),
40
- // TODO(burdon): Union type.
41
- source: Schema.optional(Ref.Ref(Text.Text)),
42
- prompt: Schema.optional(Ref.Ref(Routine.Routine)),
43
- graph: Schema.optional(Ref.Ref(Graph.Graph))
44
- });
45
- var Notebook = Schema.Struct({
46
- name: Schema.String.pipe(Schema.optional),
47
- cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false))
48
- }).pipe(Type.object({
49
- typename: "org.dxos.type.notebook",
50
- version: "0.1.0"
51
- }), LabelAnnotation.set([
52
- "name"
53
- ]), Annotation.IconAnnotation.set({
54
- icon: "ph--notebook--regular",
55
- hue: "sky"
56
- }));
57
- var make = (props = {
58
- cells: []
59
- }) => Obj.make(Notebook, props);
60
-
61
- // src/types/Settings.ts
62
- var Settings_exports = {};
63
- __export(Settings_exports, {
64
- Settings: () => Settings
65
- });
66
- import * as Schema2 from "effect/Schema";
67
- import { EditorInputMode } from "@dxos/ui-editor/types";
68
- var Settings = Schema2.mutable(Schema2.Struct({
69
- editorInputMode: EditorInputMode.annotations({
70
- title: "Editor input mode",
71
- description: "Choose the keybinding style for the script editor."
72
- })
73
- }));
74
-
75
- export {
76
- ScriptCapabilities,
77
- ScriptEvents,
78
- Notebook_exports,
79
- Settings_exports
80
- };
81
- //# sourceMappingURL=chunk-KF6H7J5N.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/Notebook.ts", "../../../src/types/Settings.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nimport { type Compiler } from '../compiler';\nimport * as Settings from './Settings';\n\nexport namespace ScriptCapabilities {\n export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);\n export const Compiler = Capability.make<Compiler>(`${meta.id}.capability.compiler`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport namespace ScriptEvents {\n export const SetupCompiler = ActivationEvent.make(`${meta.id}.event.setup-compiler`);\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Routine } from '@dxos/compute';\nimport { Annotation, Obj, Ref, Type } from '@dxos/echo';\nimport { FormInputAnnotation } from '@dxos/echo/internal';\nimport { LabelAnnotation } from '@dxos/echo/internal';\nimport { Graph } from '@dxos/plugin-explorer/types';\nimport { Text } from '@dxos/schema';\n\nexport type CellType = 'markdown' | 'script' | 'query' | 'prompt' | 'view';\n\nexport const Cell = Schema.Struct({\n id: Schema.String,\n type: Schema.String,\n name: Schema.optional(Schema.String),\n // TODO(burdon): Union type.\n source: Schema.optional(Ref.Ref(Text.Text)),\n prompt: Schema.optional(Ref.Ref(Routine.Routine)),\n graph: Schema.optional(Ref.Ref(Graph.Graph)),\n});\n\nexport interface Cell extends Schema.Schema.Type<typeof Cell> {}\n\nexport const Notebook = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false)),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.notebook',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({\n icon: 'ph--notebook--regular',\n hue: 'sky',\n }),\n);\n\nexport type Notebook = Schema.Schema.Type<typeof Notebook>;\n\nexport const make = (props: Obj.MakeProps<typeof Notebook> = { cells: [] }): Notebook => Obj.make(Notebook, props);\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { EditorInputMode } from '@dxos/ui-editor/types';\n\nexport const Settings = Schema.mutable(\n Schema.Struct({\n editorInputMode: EditorInputMode.annotations({\n title: 'Editor input mode',\n description: 'Choose the keybinding style for the script editor.',\n }),\n }),\n);\n\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n"],
5
- "mappings": ";;;;;AAMA,SAASA,kBAAkB;AAE3B,SAASC,YAAY;UAKJC,qBAAAA;sBACFC,WAAWH,WAAWI,KAAuC,GAAGH,KAAKI,EAAE,sBAAsB;sBAC7FC,WAAWN,WAAWI,KAAe,GAAGH,KAAKI,EAAE,sBAAsB;AACpF,GAHiBH,uBAAAA,qBAAAA,CAAAA,EAAAA;;;;ACTjB,SAASK,uBAAuB;AAEhC,SAASC,QAAAA,aAAY;UAEJC,eAAAA;gBACFC,gBAAgBH,gBAAgBI,KAAK,GAAGH,MAAKI,EAAE,uBAAuB;AACrF,GAFiBH,iBAAAA,eAAAA,CAAAA,EAAAA;;;;ACRjB;;;;;;AAIA,YAAYI,YAAY;AAExB,SAASC,eAAe;AACxB,SAASC,YAAYC,KAAKC,KAAKC,YAAY;AAC3C,SAASC,2BAA2B;AACpC,SAASC,uBAAuB;AAChC,SAASC,aAAa;AACtB,SAASC,YAAY;AAId,IAAMC,OAAcC,cAAO;EAChCC,IAAWC;EACXC,MAAaD;EACbE,MAAaC,gBAAgBH,aAAM;;EAEnCI,QAAeD,gBAASZ,IAAIA,IAAIK,KAAKA,IAAI,CAAA;EACzCS,QAAeF,gBAASZ,IAAIA,IAAIH,QAAQA,OAAO,CAAA;EAC/CkB,OAAcH,gBAASZ,IAAIA,IAAII,MAAMA,KAAK,CAAA;AAC5C,CAAA;AAIO,IAAMY,WAAkBT,cAAO;EACpCI,MAAaF,cAAOQ,KAAYL,eAAQ;EACxCM,OAAOZ,KAAKW,KAAYE,cAAOjB,oBAAoBkB,IAAI,KAAA,CAAA;AACzD,CAAA,EAAGH,KACDhB,KAAKoB,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACApB,gBAAgBiB,IAAI;EAAC;CAAO,GAC5BtB,WAAW0B,eAAeJ,IAAI;EAC5BK,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAKK,IAAMC,OAAO,CAACC,QAAwC;EAAEV,OAAO,CAAA;AAAG,MAAgBnB,IAAI4B,KAAKX,UAAUY,KAAAA;;;AC5C5G;;;;AAMA,YAAYC,aAAY;AAExB,SAASC,uBAAuB;AAEzB,IAAMC,WAAkBC,gBACtBC,eAAO;EACZC,iBAAiBJ,gBAAgBK,YAAY;IAC3CC,OAAO;IACPC,aAAa;EACf,CAAA;AACF,CAAA,CAAA;",
6
- "names": ["Capability", "meta", "ScriptCapabilities", "Settings", "make", "id", "Compiler", "ActivationEvent", "meta", "ScriptEvents", "SetupCompiler", "make", "id", "Schema", "Routine", "Annotation", "Obj", "Ref", "Type", "FormInputAnnotation", "LabelAnnotation", "Graph", "Text", "Cell", "Struct", "id", "String", "type", "name", "optional", "source", "prompt", "graph", "Notebook", "pipe", "cells", "Array", "set", "object", "typename", "version", "IconAnnotation", "icon", "hue", "make", "props", "Schema", "EditorInputMode", "Settings", "mutable", "Struct", "editorInputMode", "annotations", "title", "description"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/anthropic.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/chat.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/chess-bot.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/commentary.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/data-generator.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/discord.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/email.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/forex-effect.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/forex.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/gmail.ts?raw", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/ping.ts?raw", "../../../src/templates/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as LanguageModel from '@effect/ai/LanguageModel';\nimport * as Chunk from 'effect/Chunk';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\nimport * as Stream from 'effect/Stream';\n\nimport { AiService } from '@dxos/ai';\nimport { Operation } from '@dxos/compute';\n\nconst Anthropic = Operation.make({\n meta: {\n key: 'org.dxos.script.anthropic',\n name: 'Anthropic Chat',\n description: 'Chat with Anthropic',\n },\n input: Schema.Struct({\n message: Schema.String,\n }),\n output: Schema.Any,\n services: [AiService.AiService],\n});\n\nexport default Anthropic.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ message }) {\n const model = (yield* AiService.AiService).model('@anthropic/claude-sonnet-4-5');\n\n //\n // Basic example.\n //\n const { text } = yield* LanguageModel.generateText({ prompt: message }).pipe(Effect.provide(model));\n\n //\n // Streaming example.\n //\n const parts = yield* LanguageModel.streamText({\n prompt: 'Count from 1 to 5, one number per line.',\n }).pipe(Stream.runCollect, Effect.map(Chunk.toArray), Effect.provide(model));\n const textDeltas = parts.filter((p) => p.type === 'text-delta');\n const fullText = textDeltas.map((p) => (p as { delta: string }).delta).join('');\n\n return { response: text, streamText: fullText };\n }),\n ),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// @ts-ignore\nimport { transformServerSentEvents } from 'https://esm.sh/@dxos/script-toolbox?bundle=false';\n\n/**\n * Chatbot that answers questions based on the context data.\n */\nexport default async ({ data: { bodyText }, context: { space, ai } }: any) => {\n let parsedRequest: any;\n try {\n parsedRequest = JSON.parse(bodyText);\n } catch (err) {\n const answer = await ai.run('@cf/meta/llama-3.1-8b-instruct', {\n stream: true,\n prompt: `\n Using only the context data below to answer the user's question.\n If you cannot answer the question from the provided content, then reply with \"I don't know.\"\n\n CONTEXT:\n ${await getContext({ space })}\n\n QUESTION:\n ${bodyText}\n `,\n });\n return new Response(transformServerSentEvents(answer));\n }\n\n const promptId = parsedRequest.trigger.promptId;\n const promptObject = await space.crud.query({ id: promptId }).first();\n\n if (parsedRequest.data.objects.length !== 1) {\n return new Response('Message batches not supported.');\n }\n\n const messageId = parsedRequest.data.objects[0];\n let message;\n try {\n message = await space.crud.query({ id: messageId }).first();\n } catch (err) {\n return new Response('Message not replicated yet.', { status: 409 });\n }\n\n if (message.text.includes('--------')) {\n return new Response('Message was already processed.');\n }\n\n let prompt = promptObject.template;\n for (const input of promptObject.inputs) {\n let value: string | null = null;\n if (input.type === TemplateInputType.VALUE) {\n value = String(input.value);\n } else if (input.type === TemplateInputType.RETRIEVER) {\n value = await getContext({ space });\n } else if (input.type === TemplateInputType.PASS_THROUGH) {\n value = message.text;\n }\n if (value) {\n prompt = prompt.replaceAll(`{${input.name}}`, value);\n }\n }\n\n const answer = await ai.run('@cf/meta/llama-3.1-8b-instruct', {\n stream: false,\n prompt,\n });\n const response = { response: answer.response, prompt, message };\n const textWithAnswer = message.text + '\\n--------\\n\\n' + answer.response;\n await space.crud.update({ id: messageId }, { text: textWithAnswer });\n\n return new Response(JSON.stringify(response));\n};\n\nconst getContext = async ({ space }: any) => {\n let context = '';\n const { objects: docs } = await space.crud.query({ __typename: 'org.dxos.type.document' }).run();\n for (const doc of docs) {\n const { content } = await space.crud.query({ id: doc.content }).first();\n context += content + '\\n\\n';\n }\n return context;\n};\n\nenum TemplateInputType {\n VALUE = 0,\n PASS_THROUGH = 1,\n RETRIEVER = 2,\n FUNCTION = 3,\n QUERY = 4,\n RESOLVER = 5,\n CONTEXT = 6,\n SCHEMA = 7,\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess as ChessJS } from 'chess.js';\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/compute';\nimport { Database, Obj, Ref } from '@dxos/echo';\nimport { Chess } from '@dxos/plugin-chess/types';\n\nconst ChessBot = Operation.make({\n meta: {\n key: 'org.dxos.script.chess-bot',\n name: 'Chess Bot',\n description: 'Plays a random move in a chess game.',\n },\n input: Schema.Struct({\n game: Ref.Ref(Chess.Game).annotations({\n description: 'The chess game to comment on.',\n }),\n player: Schema.optional(Schema.Literal('white', 'black')).annotations({\n description: 'The player to play the game as.',\n }),\n }),\n output: Schema.Struct({\n state: Schema.String.annotations({\n description: 'The state of the game as an ASCII art board.',\n }),\n }),\n types: [Chess.Game],\n services: [Database.Service],\n});\n\nexport default ChessBot.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ game, player = 'black' }) {\n const loadedGame = yield* Database.load(game);\n const chess = new ChessJS();\n chess.loadPgn(loadedGame.pgn ?? '');\n if (chess.turn() !== (player === 'white' ? 'w' : 'b')) {\n return { state: chess.ascii() };\n }\n\n const moves = chess.moves({ verbose: true });\n const move = moves[Math.floor(Math.random() * moves.length)];\n if (!move) {\n return { state: chess.ascii() };\n }\n\n chess.move(move.san);\n const newPgn = chess.pgn();\n Obj.update(loadedGame, (loadedGame) => {\n loadedGame.pgn = newPgn;\n });\n yield* Database.flush();\n return { state: chess.ascii() };\n }),\n ),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as A from '@automerge/automerge';\nimport { Chess as ChessJS } from 'chess.js';\nimport * as Array from 'effect/Array';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Layer from 'effect/Layer';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from '@dxos/ai';\nimport { AiRequest, GenerationObserver } from '@dxos/assistant';\nimport { ArtifactId } from '@dxos/assistant';\nimport { Trace, Operation, OperationRegistry } from '@dxos/compute';\nimport { Database, Filter, Obj, Ref, Relation } from '@dxos/echo';\nimport { Collection } from '@dxos/echo';\nimport { createDocAccessor } from '@dxos/echo-db';\nimport { log } from '@dxos/log';\nimport { Chess } from '@dxos/plugin-chess/types';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { Text } from '@dxos/schema';\nimport { HasSubject } from '@dxos/types';\nimport { trim } from '@dxos/util';\n\nconst Commentary = Operation.make({\n meta: {\n key: 'org.dxos.function.chess.commentary',\n name: 'Commentary',\n description: 'Adds commentary about the most recent move to a markdown document associated with the chess game.',\n },\n input: Schema.Struct({\n game: Ref.Ref(Chess.Game).annotations({\n description: 'The chess game to comment on.',\n }),\n }),\n output: Schema.Union(\n Schema.Struct({\n documentId: ArtifactId.annotations({\n description: 'The ID of the markdown document that was updated or created.',\n }),\n commentary: Schema.String.annotations({\n description: 'The commentary that was added.',\n }),\n }),\n Schema.Void.annotations({\n description: 'Function did not find anything to comment on.',\n }),\n ),\n types: [Chess.Game, Markdown.Document, Text.Text, HasSubject.HasSubject, Collection.Collection],\n services: [AiService.AiService, Database.Service],\n});\n\nexport default Commentary.pipe(\n Operation.withHandler(\n Effect.fnUntraced(\n function* ({ game: gameRef }) {\n // Load the chess game\n log.info('load game', { gameRef });\n const chessGame = yield* Database.load(gameRef);\n\n // Load the chess position from PGN or FEN\n const chess = new ChessJS();\n if (chessGame.pgn) {\n chess.loadPgn(chessGame.pgn);\n } else if (chessGame.fen) {\n chess.load(chessGame.fen);\n } else {\n log.info('Early return: no pgn or fen');\n return;\n }\n\n // Get the most recent move\n const history = chess.history({ verbose: true });\n if (history.length === 0) {\n throw new Error('No moves have been played yet');\n }\n const lastMove = history[history.length - 1];\n const moveNumber = Math.ceil(history.length / 2);\n const isWhiteMove = history.length % 2 === 1;\n const player = isWhiteMove ? 'White' : 'Black';\n const moveNotation = lastMove.san;\n\n // Generate AI commentary about the move\n const result = yield* new AiRequest({\n observer: GenerationObserver.fromPrinter(new ConsolePrinter({ tag: 'chess-commentary' })),\n }).run({\n prompt:\n `Comment on this chess move as if you're commentating a live match for an audience:\\n\\n` +\n `Move ${moveNumber}: ${player} plays ${moveNotation} (${lastMove.from} to ${lastMove.to})${lastMove.captured ? `, capturing ${lastMove.captured}` : ''}\\n` +\n `Current position: ${chess.fen()}\\n` +\n `${chess.isCheck() ? 'The king is in check! ' : ''}` +\n `${chess.isCheckmate() ? 'CHECKMATE! ' : ''}` +\n `${chess.isStalemate() ? 'STALEMATE! ' : ''}` +\n `\\nGame so far:\\n${chess.pgn()}`,\n system: COMMENTARY_SYSTEM_PROMPT,\n history: [],\n });\n\n const commentaryText = Function.pipe(\n result,\n Array.findLast((msg) => msg.sender.role === 'assistant' && msg.blocks.some((block) => block._tag === 'text')),\n Option.flatMap((msg) =>\n Function.pipe(\n msg.blocks,\n Array.findLast((block) => block._tag === 'text'),\n Option.map((block) => block.text),\n ),\n ),\n Option.getOrThrowWith(() => new Error('No commentary generated')),\n );\n\n const commentary = `## Move ${moveNumber}: ${player} plays ${moveNotation}\\n\\n${commentaryText}\\n\\n`;\n log.info('commentary', { commentary });\n\n // TODO(wittjosiah): Functions currently don't support traversals.\n // const docs = yield* Database.runQuery(\n // Query.select(Filter.id(chessGame.id)).targetOf(HasSubject.HasSubject).source(),\n // ).pipe(Effect.map((objects) => objects.filter((object) => Obj.instanceOf(Markdown.Document, object))));\n const docs = yield* Database.runQuery(Filter.type(HasSubject.HasSubject)).pipe(\n Effect.map((relations) =>\n relations.filter((relation) => {\n // TODO(wittjosiah): This is a workaround for getTarget not handling deleted objects.\n try {\n log.info('relation', {\n source: Obj.getDXN(Relation.getTarget(relation)).toString(),\n game: Obj.getDXN(chessGame).toString(),\n });\n return Obj.getDXN(Relation.getTarget(relation)).toString() === Obj.getDXN(chessGame).toString();\n } catch {\n return false;\n }\n }),\n ),\n Effect.map((relations) =>\n relations\n .map((relation) => {\n // TODO(wittjosiah): This is a workaround for getSource not handling deleted objects.\n try {\n return Relation.getSource(relation);\n } catch {\n return undefined;\n }\n })\n .filter((source) => source !== undefined),\n ),\n Effect.map((sources) => {\n const docs = sources.filter((source) => Obj.instanceOf(Markdown.Document, source));\n log.info('docs', { sources, docs });\n return docs;\n }),\n );\n log.info('docs', { count: docs.length });\n\n let document: Markdown.Document;\n if (docs.length === 0) {\n // TODO(wittjosiah): Deploy fails if `SpaceProperties` schema is imported because its from `client-protocol`.\n const [properties] = yield* Database.runQuery(Filter.typename('org.dxos.type.spaceProperties'));\n const rootCollection = yield* Database.load<Collection.Collection>(\n properties[Collection.Collection.typename],\n );\n\n log.info('rootCollection', { rootCollection });\n\n // Create a new markdown document\n const gameName = chessGame.name || 'Chess Game';\n document = yield* Database.add(\n Markdown.make({\n name: `${gameName} Commentary`,\n content: `# ${gameName} Commentary\\n\\n${commentary}`,\n }),\n );\n\n const documentRef = Ref.make(document);\n Obj.update(rootCollection, (rootCollection) => {\n rootCollection.objects.push(documentRef);\n });\n\n // Create the HasSubject relation\n yield* Database.add(\n Relation.make(HasSubject.HasSubject, {\n [Relation.Source]: document,\n [Relation.Target]: chessGame,\n completedAt: new Date().toISOString(),\n }),\n );\n } else {\n document = docs[0];\n\n // Load the text content and append the commentary\n const text = yield* Database.load(document.content);\n const accessor = createDocAccessor(text, ['content']);\n accessor.handle.change((doc: A.Doc<Text.Text>) => {\n A.splice(doc, accessor.path.slice(), text.content.length, 0, commentary);\n });\n }\n\n log.info('result', { documentId: Obj.getDXN(document).toString(), commentary });\n\n yield* Database.flush();\n\n return {\n documentId: Obj.getDXN(document).toString(),\n commentary,\n };\n },\n Effect.provide(\n Layer.mergeAll(\n AiService.model('@anthropic/claude-haiku-4-5'),\n ToolResolverService.layerEmpty,\n ToolExecutionService.layerEmpty,\n Trace.writerLayerNoop,\n Database.notAvailable,\n Layer.succeed(Operation.Service, {\n invoke: () => Effect.die('Not available.'),\n schedule: () => Effect.die('Not available.'),\n invokePromise: async () => ({ error: new Error('Not available.') }),\n } as any),\n Layer.succeed(OperationRegistry.Service, { resolve: () => Effect.succeed(undefined) } as any),\n ),\n ),\n ),\n ),\n);\n\nconst COMMENTARY_SYSTEM_PROMPT = trim`\n You are a professional chess commentator providing live commentary for a chess match.\n\n # Style\n - Write in an engaging, enthusiastic style as if commentating for a live audience\n - Be concise but informative (2-4 sentences)\n - Explain the strategic implications of the move\n - Note any tactical elements (captures, threats, checks)\n - Comment on the position and what it means for the game\n\n # Format\n - Write in plain text (no markdown formatting in the commentary itself)\n - Be natural and conversational\n - Use chess terminology appropriately but keep it accessible\n\n # Special Situations\n - If it's checkmate, express excitement about the conclusion\n - If it's check, note the pressure on the king\n - If a piece is captured, mention the material exchange\n - Comment on the development of pieces and control of key squares when relevant\n`;\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @ts-ignore\nimport { Expando, S, create, defineFunction } from 'dxos:functions';\n// @ts-ignore\nimport { randText } from 'https://esm.sh/@ngneat/falso@7.1.1?bundle=false';\n\nexport default defineFunction({\n key: 'org.dxos.script.data-generator',\n name: 'Data Generator',\n inputSchema: S.Struct({\n documentAmount: S.optional(S.Number),\n textSize: S.optional(S.Number),\n mutationAmount: S.optional(S.Number),\n waitAfterCreation: S.optional(S.Number),\n }),\n\n outputSchema: S.Struct({}),\n\n handler: async ({\n data: { documentAmount = 1, textSize = 10, mutationAmount = 0, waitAfterCreation = 10_000 },\n context: { space },\n }: any) => {\n await space.db.graph.schemaRegistry.register([Expando]);\n const result: Record<string, any> = {};\n const objects: Expando[] = [];\n\n // Create objects.\n for (let i = 0; i < documentAmount; i++) {\n const obj = space.db.add(\n create(Expando, {\n name: 'scriptGenerated',\n content: randText({ charCount: textSize }),\n }),\n );\n objects.push(obj);\n const objectResult: any = {};\n // Mutate the object.\n for (let i = 0; i < mutationAmount; i++) {\n obj.content = randText({ charCount: textSize });\n }\n objectResult.mutations = mutationAmount;\n objectResult.contentLength = obj.content.length;\n result[obj.id] = objectResult;\n }\n\n // Flush and wait for data to propagate.\n await space.db.flush();\n await new Promise((resolve) => setTimeout(resolve, waitAfterCreation));\n return { createdObjects: objects.length };\n },\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @ts-ignore\nimport { DXN, EchoObject, Filter, ObjectId, S, create, defineFunction } from 'dxos:functions';\n// @ts-ignore\nimport { FetchHttpClient } from 'https://esm.sh/@effect/platform@0.89.0?deps=effect@3.17.0&bundle=false';\nimport {\n DiscordConfig,\n DiscordREST,\n DiscordRESTMemoryLive,\n // @ts-ignore\n} from 'https://esm.sh/dfx@0.113.0?deps=effect@3.17.0&bundle=false';\n// @ts-ignore\nimport * as Config from 'https://esm.sh/effect@3.17.0/Config?bundle=false';\n// @ts-ignore\nimport * as Effect from 'https://esm.sh/effect@3.17.0/Effect?bundle=false';\n// @ts-ignore\nimport * as Redacted from 'https://esm.sh/effect@3.17.0/Redacted?bundle=false';\n// @ts-ignore\nimport * as Ref from 'https://esm.sh/effect@3.17.0/Ref?bundle=false';\n\nconst MessageSchema = S.Struct({\n id: ObjectId,\n foreignId: S.Any, // bigint?\n from: S.String,\n created: S.String,\n content: S.String,\n}).pipe(\n EchoObject({\n typename: 'com.example.type.message',\n version: '0.1.0',\n }),\n);\n\nconst DEFAULT_AFTER = 1704067200; // 2024-01-01\n\nconst generateSnowflake = (unixTimestamp: number): bigint => {\n const discordEpoch = 1420070400000n; // Discord Epoch (ms)\n return (BigInt(unixTimestamp * 1000) - discordEpoch) << 22n;\n};\n\nexport default defineFunction({\n key: 'org.dxos.script.discord',\n name: 'Discord',\n inputSchema: S.Struct({\n // TODO(wittjosiah): Remove. This is used to provide a terminal for a cron trigger.\n tick: S.optional(S.String),\n channelId: S.String,\n after: S.optional(S.Number),\n pageSize: S.optional(S.Number),\n queueId: S.String,\n }),\n\n outputSchema: S.Struct({\n newMessages: S.Number,\n }),\n\n handler: ({ data: { channelId, queueId, after = DEFAULT_AFTER, pageSize = 5 }, context: { space } }: any) =>\n Effect.gen(function* () {\n const { token } = yield* Effect.tryPromise({\n try: () => space.db.query(Filter.typename('org.dxos.type.accessToken', { source: 'discord.com' })).first(),\n catch: (e: any) => e,\n });\n const { objects } = yield* Effect.tryPromise({\n try: () => space.queues.queryQueue(DXN.parse(queueId)),\n catch: (e: any) => e,\n });\n const backfill = objects.length === 0;\n const newMessages = yield* Ref.make(0);\n const lastMessage = yield* Ref.make(objects.at(-1));\n\n const enqueueMessages = Effect.gen(function* () {\n const rest = yield* DiscordREST;\n\n while (true) {\n const last = yield* Ref.get(lastMessage);\n const options = {\n after: backfill && !last ? `${generateSnowflake(after)}` : last?.foreignId,\n limit: pageSize,\n };\n const messages = yield* rest.getChannelMessages(channelId, options).pipe((res: any) => res.json);\n const queueMessages = messages\n .map((message: any) =>\n create(MessageSchema, {\n id: ObjectId.random(),\n foreignId: message.id,\n from: message.author.username,\n created: message.timestamp,\n content: message.content,\n }),\n )\n .toReversed();\n if (queueMessages.length > 0) {\n yield* Effect.tryPromise({\n try: () => space.queues.insertIntoQueue(DXN.parse(queueId), queueMessages),\n catch: (e: any) => e,\n });\n yield* Ref.update(newMessages, (n: any) => n + queueMessages.length);\n yield* Ref.update(lastMessage, (m: any) => queueMessages.at(-1));\n }\n if (messages.length < pageSize) {\n break;\n }\n }\n }).pipe(\n Effect.provide(DiscordRESTMemoryLive),\n Effect.provide(\n DiscordConfig.layerConfig({\n token: Config.succeed(Redacted.make(token)),\n }),\n ),\n Effect.provide(FetchHttpClient.layer),\n );\n\n yield* enqueueMessages;\n return { newMessages: yield* Ref.get(newMessages) };\n }),\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\n/**\n * Appends a message to the end of a Document configured through a trigger.\n * Trigger must have a targetDocumentId field set in Meta.\n */\nexport default async ({ data: { bodyText }, context: { space } }: any) => {\n const { email, targetDocumentId: documentId } = JSON.parse(bodyText) as RequestPayload;\n\n const document = await space.db.query({ id: documentId }).first();\n\n const contentId = document.content['/'].split(':')[3];\n const documentContent = await space.db.query({ id: contentId }).first();\n const modifiedContent = [\n documentContent.content,\n '',\n '---',\n `**From:** ${email.from}`,\n `**Subject:** ${email.subject}`,\n `**Date:** ${email.created}`,\n '',\n email.body,\n ].join('\\n');\n\n await space.db.update({ id: contentId }, { content: modifiedContent });\n\n return new Response(JSON.stringify({ success: true }));\n};\n\ntype RequestPayload = {\n email: { from: string; subject: string; created: string; body: string };\n targetDocumentId: string;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as HttpClient from '@effect/platform/HttpClient';\nimport * as HttpClientRequest from '@effect/platform/HttpClientRequest';\nimport * as Effect from 'effect/Effect';\nimport * as Schedule from 'effect/Schedule';\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/compute';\n\nconst ForexEffect = Operation.make({\n meta: {\n key: 'org.dxos.script.forex-effect',\n name: 'Forex Effect',\n description: 'Returns the exchange rate between two currencies.',\n },\n input: Schema.Struct({\n from: Schema.String.annotations({ description: 'The source currency' }),\n to: Schema.String.annotations({ description: 'The target currency' }),\n }),\n output: Schema.Any,\n});\n\nexport default ForexEffect.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ from: rawFrom, to: rawTo }) {\n const from = rawFrom.toUpperCase();\n const to = rawTo.toUpperCase();\n const json: any = yield* HttpClientRequest.get(`https://free.ratesdb.com/v1/rates?from=${from}&to=${to}`).pipe(\n HttpClient.execute,\n Effect.flatMap((response) => response.json),\n Effect.timeout('5 seconds'),\n Effect.retry(Schedule.exponential(1_000).pipe(Schedule.compose(Schedule.recurs(3)))),\n Effect.scoped,\n );\n\n const rate = json?.data?.rates?.[to];\n if (rate == null) {\n return yield* Effect.fail(new Error(`No rate found for ${from} -> ${to}`));\n }\n\n return rate.toString();\n }, Effect.provide(FetchHttpClient.layer)),\n ),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/compute';\n\nconst Forex = Operation.make({\n meta: {\n key: 'org.dxos.script.forex',\n name: 'Forex',\n description: 'Returns the exchange rate between two currencies.',\n },\n input: Schema.Struct({\n from: Schema.String.annotations({ description: 'The source currency' }),\n to: Schema.String.annotations({ description: 'The target currency' }),\n }),\n output: Schema.Any,\n});\n\nexport default Forex.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ from: rawFrom, to: rawTo }) {\n const from = rawFrom.toUpperCase();\n const to = rawTo.toUpperCase();\n const res = yield* Effect.promise(() => fetch(`https://free.ratesdb.com/v1/rates?from=${from}&to=${to}`));\n const {\n data: { rates },\n } = yield* Effect.promise(() => res.json());\n\n return rates[to].toString();\n }),\n ),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @ts-ignore\nimport { EchoObject, Filter, ObjectId, S, create, defineFunction } from 'dxos:functions';\n// @ts-ignore\nimport {\n FetchHttpClient,\n HttpClient,\n HttpClientRequest,\n // @ts-ignore\n} from 'https://esm.sh/@effect/platform@0.89.0?deps=effect@3.17.0&bundle=false';\n// @ts-ignore\nimport { format, subDays } from 'https://esm.sh/date-fns@3.3.1?bundle=false';\n// @ts-ignore\nimport * as Chunk from 'https://esm.sh/effect@3.17.0/Chunk?bundle=false';\n// @ts-ignore\nimport * as Effect from 'https://esm.sh/effect@3.17.0/Effect?bundle=false';\n// @ts-ignore\nimport * as Function from 'https://esm.sh/effect@3.17.0/Function?bundle=false';\n// @ts-ignore\nimport * as Ref from 'https://esm.sh/effect@3.17.0/Ref?bundle=false';\n// @ts-ignore\nimport * as Schedule from 'https://esm.sh/effect@3.17.0/Schedule?bundle=false';\n// @ts-ignore\nimport * as Stream from 'https://esm.sh/effect@3.17.0/Stream?bundle=false';\n\nexport default defineFunction({\n key: 'org.dxos.script.gmail',\n name: 'Gmail',\n inputSchema: S.Struct({\n mailboxId: S.String,\n userId: S.optional(S.String).pipe(S.withDecodingDefault(() => 'me')),\n after: S.optional(S.Union(S.Number, S.String)).pipe(\n S.withDecodingDefault(() => format(subDays(new Date(), 30), 'yyyy-MM-dd')),\n ),\n pageSize: S.optional(S.Number).pipe(S.withDecodingDefault(() => 100)),\n // TODO(wittjosiah): Remove. This is used to provide a terminal for a cron trigger.\n tick: S.optional(S.String),\n }),\n\n outputSchema: S.Struct({\n newMessages: S.Number,\n }),\n\n handler: ({ context: { space }, data: { mailboxId, userId, after, pageSize } }: any) =>\n Effect.gen(function* () {\n const { token } = yield* Effect.tryPromise({\n try: () => space.db.query(Filter.typename('org.dxos.type.accessToken', { source: 'gmail.com' })).first(),\n catch: (e: any) => e,\n });\n\n // NOTE: Google API bundles size is v. large and caused runtime issues.\n const makeRequest = (url: string) =>\n Function.pipe(\n url,\n HttpClientRequest.get,\n HttpClientRequest.setHeaders({ Authorization: `Bearer ${token}`, Accept: 'application/json' }),\n HttpClient.execute,\n Effect.flatMap((res: any) => res.json),\n Effect.timeout('1 second'),\n Effect.retry(Schedule.exponential(1000).pipe(Schedule.compose(Schedule.recurs(3)))),\n Effect.scoped,\n );\n\n const listMessages = (userId: string, q: string, pageSize: number, pageToken: string | null) =>\n makeRequest(getUrl(userId, undefined, { q, pageSize, pageToken }));\n\n const getMessage = (userId: string, messageId: string) => makeRequest(getUrl(userId, messageId));\n\n const mailbox = yield* Effect.tryPromise({\n try: () => space.db.query({ id: mailboxId }).first(),\n catch: (e: any) => e,\n });\n const { objects } = yield* Effect.tryPromise({\n try: () => space.queues.queryQueue(mailbox.queue.dxn),\n catch: (e: any) => e,\n });\n const newMessages = yield* Ref.make([]);\n const nextPage = yield* Ref.make(null);\n\n do {\n const last = objects.at(-1);\n const q = last\n ? `in:inbox after:${Math.floor(new Date(last.created).getTime() / 1000)}`\n : `in:inbox after:${after}`;\n const pageToken = yield* Ref.get(nextPage);\n const { messages, nextPageToken } = yield* listMessages(userId, q, pageSize, pageToken);\n yield* Ref.update(nextPage, () => nextPageToken);\n for (const message of messages) {\n const messageDetails = yield* getMessage(userId, message.id);\n const created = new Date(parseInt(messageDetails.internalDate)).toISOString();\n const from = messageDetails.payload.headers.find((h: any) => h.name === 'From');\n const sender = from && parseFromHeader(from.value);\n // TODO(wittjosiah): Improve parsing of email contents.\n const content =\n messageDetails.payload.body?.data ??\n messageDetails.payload.parts?.find((p: any) => p.mimeType === 'text/plain')?.body.data;\n // Skip the message if content or sender is missing.\n // Skip the message if it's the same as the last message.\n // TODO(wittjosiah): This comparison should be done via foreignId probably.\n if (!content || !sender || created === last?.created) {\n continue;\n }\n const subject = messageDetails.payload.headers.find((h: any) => h.name === 'Subject')?.value;\n const object = create(MessageType, {\n id: ObjectId.random(),\n created,\n sender,\n blocks: [\n {\n _tag: 'text',\n text: Buffer.from(content, 'base64').toString('utf-8'),\n },\n ],\n properties: {\n subject,\n threadId: message.threadId,\n },\n });\n // TODO(wittjosiah): Set foreignId in object meta.\n yield* Ref.update(newMessages, (n: any) => [object, ...n]);\n }\n } while (yield* Ref.get(nextPage));\n\n const queueMessages = yield* Ref.get(newMessages);\n if (queueMessages.length > 0) {\n yield* Function.pipe(\n queueMessages,\n Stream.fromIterable,\n Stream.grouped(10),\n Stream.flatMap((batch: any) =>\n Effect.tryPromise({\n try: () => space.queues.insertIntoQueue(mailbox.queue.dxn, Chunk.toReadonlyArray(batch)),\n catch: (e: any) => e,\n }),\n ),\n Stream.runDrain,\n );\n }\n\n return { newMessages: queueMessages.length };\n }).pipe(Effect.provide(FetchHttpClient.layer)),\n});\n\nconst getUrl = (userId: string, messageId?: string, params?: Record<string, any>) => {\n const api = new URL(\n [`https://gmail.googleapis.com/gmail/v1/users/${userId}/messages`, messageId].filter(Boolean).join('/'),\n );\n Object.entries(params ?? {})\n .filter(([_, value]) => value != null)\n .forEach(([key, value]) => api.searchParams.set(key, value));\n return api.toString();\n};\n\n/**\n * Parses an email string in the format \"Name <email@example.com>\" into separate name and email components.\n */\nconst parseFromHeader = (value: string): { name?: string; email: string } | undefined => {\n const EMAIL_REGEX = /^([^<]+?)\\s*<([^>]+@[^>]+)>$/;\n const removeOuterQuotes = (str: string) => str.replace(/^['\"]|['\"]$/g, '');\n const match = value.match(EMAIL_REGEX);\n if (match) {\n const [, name, email] = match;\n return {\n name: removeOuterQuotes(name.trim()),\n email: email.trim(),\n };\n }\n};\n\n//\n// Schemas\n// TODO(wittjosiah): These schemas should be imported from @dxos/schema.\n//\n\nconst ActorRole = S.Literal('user', 'assistant');\ntype ActorRole = S.Schema.Type<typeof ActorRole>;\n\nconst ActorSchema = S.Struct({\n identityKey: S.optional(S.String),\n email: S.optional(S.String),\n name: S.optional(S.String),\n role: S.optional(ActorRole),\n});\n\nconst Base = S.Struct({\n pending: S.optional(S.Boolean),\n});\ntype Base = S.Schema.Type<typeof Base>;\nconst Text = S.TaggedStruct('text', {\n mimeType: S.optional(S.String),\n text: S.String,\n ...Base.fields,\n}).pipe(S.mutable);\ninterface Text extends S.Schema.Type<typeof Text> {}\n\nconst MessageType = S.Struct({\n id: ObjectId,\n created: S.String.annotations({\n description: 'ISO date string when the message was sent.',\n }),\n sender: ActorSchema.annotations({\n description: 'Identity of the message sender.',\n }),\n blocks: S.Array(Text).annotations({\n description: 'Contents of the message.',\n }),\n properties: S.optional(\n S.mutable(\n S.Record({ key: S.String, value: S.Any }).annotations({\n description: 'Custom properties for specific message types (e.g. attention context, email subject, etc.).',\n }),\n ),\n ),\n}).pipe(\n EchoObject({\n typename: 'org.dxos.type.message',\n version: '0.1.0',\n }),\n);\ntype MessageType = S.Schema.Type<typeof MessageType>;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Operation } from '@dxos/compute';\n\nconst Ping = Operation.make({\n meta: {\n key: 'org.dxos.script.ping',\n name: 'Ping',\n },\n input: Schema.Any,\n output: Schema.Any,\n});\n\nexport default Ping.pipe(\n Operation.withHandler(\n Effect.fn(function* (data) {\n return data;\n }),\n ),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport anthropic from './anthropic.ts?raw';\nimport chat from './chat.ts?raw';\nimport chessBot from './chess-bot.ts?raw';\nimport commentary from './commentary.ts?raw';\nimport dataGenerator from './data-generator.ts?raw';\nimport discord from './discord.ts?raw';\nimport email from './email.ts?raw';\nimport forexEffect from './forex-effect.ts?raw';\nimport forex from './forex.ts?raw';\nimport gmail from './gmail.ts?raw';\nimport ping from './ping.ts?raw';\n\nconst removeHeader = (str: string) => str.split('\\n').slice(4).join('\\n');\n\nexport { dataGenerator };\n\nexport type Template = {\n id: string;\n name: string;\n source: string;\n presetId?: string;\n};\n\nexport const templates = [\n {\n id: 'org.dxos.script.ping',\n name: 'Ping',\n source: removeHeader(ping),\n },\n {\n id: 'org.dxos.script.forex',\n name: 'Forex',\n source: removeHeader(forex),\n },\n {\n id: 'org.dxos.script.forex-effect',\n name: 'Forex (Effect)',\n source: removeHeader(forexEffect),\n },\n {\n id: 'org.dxos.script.gpt',\n name: 'Gpt',\n source: removeHeader(chat),\n presetId: 'org.dxos.function.gpt',\n },\n {\n id: 'org.dxos.script.chess-bot',\n name: 'Chess Bot',\n source: removeHeader(chessBot),\n presetId: 'org.dxos.function.chess-bot',\n },\n {\n id: 'org.dxos.script.email',\n name: 'Email',\n source: removeHeader(email),\n presetId: 'org.dxos.function.email',\n },\n {\n id: 'org.dxos.script.discord',\n name: 'Discord',\n source: removeHeader(discord),\n presetId: 'org.dxos.function.discord',\n },\n {\n id: 'org.dxos.script.gmail',\n name: 'Gmail',\n source: removeHeader(gmail),\n presetId: 'org.dxos.function.gmail',\n },\n {\n id: 'org.dxos.script.data-generator',\n name: 'Data Generator',\n source: removeHeader(dataGenerator),\n presetId: 'org.dxos.function.data-generator',\n },\n {\n id: 'org.dxos.script.anthropic',\n name: 'Anthropic',\n source: removeHeader(anthropic),\n },\n {\n id: 'org.dxos.script.commentary',\n name: 'Commentary',\n source: removeHeader(commentary),\n presetId: 'org.dxos.function.chess.commentary',\n },\n] as const;\n"],
5
- "mappings": ";AAAA;;;ACAA;;;ACAA;;;ACAA;;;ACAA;;;ACAA;;;ACAA;;;ACAA;;;ACAA;;;ACAA;;;ACAA;;;ACgBA,IAAMA,eAAe,CAACC,QAAgBA,IAAIC,MAAM,IAAA,EAAMC,MAAM,CAAA,EAAGC,KAAK,IAAA;AAW7D,IAAMC,YAAY;EACvB;IACEC,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaC,YAAAA;EACvB;EACA;IACEJ,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaE,aAAAA;EACvB;EACA;IACEL,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaG,oBAAAA;EACvB;EACA;IACEN,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaI,YAAAA;IACrBC,UAAU;EACZ;EACA;IACER,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaM,iBAAAA;IACrBD,UAAU;EACZ;EACA;IACER,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaO,aAAAA;IACrBF,UAAU;EACZ;EACA;IACER,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaQ,eAAAA;IACrBH,UAAU;EACZ;EACA;IACER,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaS,aAAAA;IACrBJ,UAAU;EACZ;EACA;IACER,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaU,sBAAAA;IACrBL,UAAU;EACZ;EACA;IACER,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaW,iBAAAA;EACvB;EACA;IACEd,IAAI;IACJC,MAAM;IACNC,QAAQC,aAAaY,kBAAAA;IACrBP,UAAU;EACZ;;",
6
- "names": ["removeHeader", "str", "split", "slice", "join", "templates", "id", "name", "source", "removeHeader", "ping", "forex", "forexEffect", "chat", "presetId", "chessBot", "email", "discord", "gmail", "dataGenerator", "anthropic", "commentary"]
7
- }
@@ -1,49 +0,0 @@
1
- import {
2
- templates
3
- } from "./chunk-NSAF3763.mjs";
4
- import {
5
- __export
6
- } from "./chunk-J5LGTIGS.mjs";
7
-
8
- // src/operations/definitions.ts
9
- var definitions_exports = {};
10
- __export(definitions_exports, {
11
- CreateScript: () => CreateScript,
12
- NotebookProps: () => NotebookProps,
13
- ScriptProps: () => ScriptProps
14
- });
15
- import * as Schema from "effect/Schema";
16
- import { Script, Operation } from "@dxos/compute";
17
- import { Database } from "@dxos/echo";
18
- import { meta } from "#meta";
19
- var SCRIPT_OPERATION = `${meta.id}.operation`;
20
- var ScriptProps = Schema.Struct({
21
- name: Schema.optional(Schema.String),
22
- gistUrl: Schema.optional(Schema.String.annotations({
23
- title: "Import from Gist (url)"
24
- })),
25
- initialTemplateId: Schema.Literal(...templates.map(({ id }) => id)).pipe(Schema.annotations({
26
- title: "Template"
27
- }), Schema.optional)
28
- });
29
- var NotebookProps = Schema.Struct({
30
- name: Schema.optional(Schema.String)
31
- });
32
- var CreateScript = Operation.make({
33
- meta: {
34
- key: `${SCRIPT_OPERATION}.create-script`,
35
- name: "Create Script"
36
- },
37
- input: Schema.extend(ScriptProps, Schema.Struct({
38
- db: Database.Database
39
- })),
40
- output: Schema.Struct({
41
- object: Script.Script
42
- })
43
- });
44
-
45
- export {
46
- CreateScript,
47
- definitions_exports
48
- };
49
- //# sourceMappingURL=chunk-RQ5LDVFK.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/definitions.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Script, Operation } from '@dxos/compute';\nimport { Database } from '@dxos/echo';\n\nimport { meta } from '#meta';\n\nimport { templates } from '../templates';\n\nconst SCRIPT_OPERATION = `${meta.id}.operation`;\n\nexport const ScriptProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n gistUrl: Schema.optional(Schema.String.annotations({ title: 'Import from Gist (url)' })),\n initialTemplateId: Schema.Literal(...templates.map(({ id }) => id)).pipe(\n Schema.annotations({ title: 'Template' }),\n Schema.optional,\n ),\n});\n\nexport const NotebookProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n});\n\nexport const CreateScript = Operation.make({\n meta: { key: `${SCRIPT_OPERATION}.create-script`, name: 'Create Script' },\n input: Schema.extend(\n ScriptProps,\n Schema.Struct({\n db: Database.Database,\n }),\n ),\n output: Schema.Struct({\n object: Script.Script,\n }),\n});\n"],
5
- "mappings": ";;;;;;;;AAAA;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,QAAQC,iBAAiB;AAClC,SAASC,gBAAgB;AAEzB,SAASC,YAAY;AAIrB,IAAMC,mBAAmB,GAAGC,KAAKC,EAAE;AAE5B,IAAMC,cAAqBC,cAAO;EACvCC,MAAaC,gBAAgBC,aAAM;EACnCC,SAAgBF,gBAAgBC,cAAOE,YAAY;IAAEC,OAAO;EAAyB,CAAA,CAAA;EACrFC,mBAA0BC,eAAO,GAAIC,UAAUC,IAAI,CAAC,EAAEZ,GAAE,MAAOA,EAAAA,CAAAA,EAAKa,KAC3DN,mBAAY;IAAEC,OAAO;EAAW,CAAA,GAChCJ,eAAQ;AAEnB,CAAA;AAEO,IAAMU,gBAAuBZ,cAAO;EACzCC,MAAaC,gBAAgBC,aAAM;AACrC,CAAA;AAEO,IAAMU,eAAeC,UAAUC,KAAK;EACzClB,MAAM;IAAEmB,KAAK,GAAGpB,gBAAAA;IAAkCK,MAAM;EAAgB;EACxEgB,OAAcC,cACZnB,aACOC,cAAO;IACZmB,IAAIC,SAASA;EACf,CAAA,CAAA;EAEFC,QAAerB,cAAO;IACpBsB,QAAQC,OAAOA;EACjB,CAAA;AACF,CAAA;",
6
- "names": ["Schema", "Script", "Operation", "Database", "meta", "SCRIPT_OPERATION", "meta", "id", "ScriptProps", "Struct", "name", "optional", "String", "gistUrl", "annotations", "title", "initialTemplateId", "Literal", "templates", "map", "pipe", "NotebookProps", "CreateScript", "Operation", "make", "key", "input", "extend", "db", "Database", "output", "object", "Script"]
7
- }
@@ -1,17 +0,0 @@
1
- import "../chunk-J5LGTIGS.mjs";
2
-
3
- // src/containers/index.ts
4
- import { lazy } from "react";
5
- var DeploymentDialog = lazy(() => import("../DeploymentDialog-6DBF3V6C.mjs"));
6
- var NotebookContainer = lazy(() => import("../NotebookContainer-RO4NJRYH.mjs"));
7
- var ScriptContainer = lazy(() => import("../ScriptContainer-2OPBAXFB.mjs"));
8
- var ScriptProperties = lazy(() => import("../ScriptProperties-NRXG4PBX.mjs"));
9
- var TestContainer = lazy(() => import("../TestContainer-JNFPLAJX.mjs"));
10
- export {
11
- DeploymentDialog,
12
- NotebookContainer,
13
- ScriptContainer,
14
- ScriptProperties,
15
- TestContainer
16
- };
17
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/containers/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const DeploymentDialog: ComponentType<any> = lazy(() => import('./DeploymentDialog'));\nexport const NotebookContainer: ComponentType<any> = lazy(() => import('./NotebookContainer'));\nexport const ScriptContainer: ComponentType<any> = lazy(() => import('./ScriptContainer'));\nexport const ScriptProperties: ComponentType<any> = lazy(() => import('./ScriptProperties'));\nexport const TestContainer: ComponentType<any> = lazy(() => import('./TestContainer'));\n"],
5
- "mappings": ";;;AAIA,SAA6BA,YAAY;AAElC,IAAMC,mBAAuCD,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC/D,IAAME,oBAAwCF,KAAK,MAAM,OAAO,mCAAA,CAAA;AAChE,IAAMG,kBAAsCH,KAAK,MAAM,OAAO,iCAAA,CAAA;AAC9D,IAAMI,mBAAuCJ,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC/D,IAAMK,gBAAoCL,KAAK,MAAM,OAAO,+BAAA,CAAA;",
6
- "names": ["lazy", "DeploymentDialog", "NotebookContainer", "ScriptContainer", "ScriptProperties", "TestContainer"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/create-script.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Octokit } from '@octokit/core';\nimport * as Effect from 'effect/Effect';\n\nimport { Script, Operation } from '@dxos/compute';\n\nimport { templates } from '../templates';\nimport { CreateScript } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CreateScript> = CreateScript.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ name, gistUrl, initialTemplateId }) {\n let source = templates[0].source;\n let scriptName = name;\n\n const gistId = gistUrl?.split('/').at(-1);\n if (gistId) {\n const octokit = new Octokit();\n const response = yield* Effect.promise(() =>\n octokit.request('GET /gists/{gist_id}', {\n gist_id: gistId,\n }),\n );\n const gistContent = Object.values(response.data.files ?? {})[0]?.content;\n if (gistContent) {\n source = gistContent;\n }\n }\n\n if (initialTemplateId) {\n const template = templates.find((template) => template.id === initialTemplateId);\n if (template) {\n source = template.source;\n scriptName = scriptName || template.name;\n }\n }\n\n return { object: Script.make({ name: scriptName, source }) };\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;;AAIA,SAASA,eAAe;AACxB,YAAYC,YAAY;AAExB,SAASC,QAAQC,iBAAiB;AAKlC,IAAMC,UAAsDC,aAAaC,KACvEC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,MAAMC,SAASC,kBAAiB,GAAE;AAC/D,MAAIC,SAASC,UAAU,CAAA,EAAGD;AAC1B,MAAIE,aAAaL;AAEjB,QAAMM,SAASL,SAASM,MAAM,GAAA,EAAKC,GAAG,EAAC;AACvC,MAAIF,QAAQ;AACV,UAAMG,UAAU,IAAIC,QAAAA;AACpB,UAAMC,WAAW,OAAcC,eAAQ,MACrCH,QAAQI,QAAQ,wBAAwB;MACtCC,SAASR;IACX,CAAA,CAAA;AAEF,UAAMS,cAAcC,OAAOC,OAAON,SAASO,KAAKC,SAAS,CAAC,CAAA,EAAG,CAAA,GAAIC;AACjE,QAAIL,aAAa;AACfZ,eAASY;IACX;EACF;AAEA,MAAIb,mBAAmB;AACrB,UAAMmB,WAAWjB,UAAUkB,KAAK,CAACD,cAAaA,UAASE,OAAOrB,iBAAAA;AAC9D,QAAImB,UAAU;AACZlB,eAASkB,SAASlB;AAClBE,mBAAaA,cAAcgB,SAASrB;IACtC;EACF;AAEA,SAAO;IAAEwB,QAAQC,OAAOC,KAAK;MAAE1B,MAAMK;MAAYF;IAAO,CAAA;EAAG;AAC7D,CAAA,CAAA,CAAA;AAIJ,IAAA,wBAAeT;",
6
- "names": ["Octokit", "Effect", "Script", "Operation", "handler", "CreateScript", "pipe", "Operation", "withHandler", "fnUntraced", "name", "gistUrl", "initialTemplateId", "source", "templates", "scriptName", "gistId", "split", "at", "octokit", "Octokit", "response", "promise", "request", "gist_id", "gistContent", "Object", "values", "data", "files", "content", "template", "find", "id", "object", "Script", "make"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/index.ts", "../../../src/meta.ts", "../../../src/util/deploy.ts", "../../../src/util/functions.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const ScriptPlugin = Plugin.lazy(meta, () => import('#plugin'));\n\nexport { ScriptCapabilities, ScriptEvents } from './types';\nexport * from './meta';\nexport * from './util';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.script',\n name: 'Scripts',\n description: trim`\n Write and deploy custom JavaScript functions that extend your workspace capabilities.\n Create AI agent tools, spreadsheet formulas, and automation scripts that integrate seamlessly with other plugins.\n `,\n icon: 'ph--code--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-explorer',\n tags: ['labs'],\n screenshots: ['https://dxos.network/plugin-details-scripts-dark.png'],\n};\n\n// TODO(ZaymonFC): Configure by scopes?\nexport const defaultScriptsForIntegration: Record<string, string[]> = {\n // TODO(wittjosiah): Also include content extraction scripts in the default set.\n 'gmail.com': ['org.dxos.script.gmail'],\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Client } from '@dxos/client';\nimport { Script, Operation } from '@dxos/compute';\nimport { Context } from '@dxos/context';\nimport { Obj, Ref } from '@dxos/echo';\nimport { getUserFunctionIdInMetadata } from '@dxos/functions';\nimport { bundleFunction } from '@dxos/functions-runtime/bundler';\nimport { FunctionsServiceClient, incrementSemverPatch } from '@dxos/functions-runtime/edge';\nimport { log } from '@dxos/log';\nimport { FunctionRuntimeKind } from '@dxos/protocols';\nimport { type Space } from '@dxos/react-client/echo';\n\nexport const isScriptDeployed = ({ script, fn }: { script: Script.Script; fn: any }): boolean => {\n const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));\n return Boolean(existingFunctionId) && !script.changed;\n};\n\ntype DeployScriptProps = {\n script: Script.Script;\n client: Client;\n space: Space;\n fn?: Operation.PersistentOperation;\n existingFunctionId?: string;\n};\n\ntype DeployScriptResult = { success: boolean; error?: Error; functionId?: string };\n\n/**\n * Deploy a script to a space, handling bundling and uploading to the FaaS infrastructure.\n */\nexport const deployScript = async ({\n script,\n client,\n space,\n fn,\n existingFunctionId,\n}: DeployScriptProps): Promise<DeployScriptResult> => {\n const validationError = validateDeployInputs(script, space);\n if (validationError) {\n return { success: false, error: validationError };\n }\n\n try {\n const buildResult = await bundleFunction({\n source: script.source!.target!.content,\n });\n if ('error' in buildResult) {\n throw buildResult.error || new Error('Bundle creation failed');\n }\n\n const functionsServiceClient = FunctionsServiceClient.fromClient(client);\n const newFunction = await functionsServiceClient.deploy(Context.default(), {\n // TODO(dmaretskyi): Space key or identity key.\n ownerPublicKey: space.key,\n version: fn ? incrementSemverPatch(fn.version) : '0.0.1',\n functionId: existingFunctionId,\n entryPoint: buildResult.entryPoint,\n assets: buildResult.assets,\n runtime: FunctionRuntimeKind.enums.WORKER_LOADER,\n });\n\n const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, newFunction);\n Obj.update(script, (script) => {\n script.changed = false;\n });\n\n return { success: true, functionId: getUserFunctionIdInMetadata(Obj.getMeta(storedFunction)) };\n } catch (err: any) {\n log.catch(err);\n return { success: false, error: err };\n }\n};\n\n/**\n * Validate inputs for script deployment.\n */\nconst validateDeployInputs = (script: Script.Script, space: Space): Error | null => {\n if (!script.source || !space) {\n return new Error('Script source or space not available');\n }\n return null;\n};\n\nconst createOrUpdateFunctionInSpace = (\n space: Space,\n fn: Operation.PersistentOperation | undefined,\n script: Script.Script,\n newFunction: Operation.PersistentOperation,\n): Operation.PersistentOperation => {\n if (fn) {\n Operation.setFrom(fn, newFunction);\n return fn;\n } else {\n Obj.update(newFunction, (newFunction) => {\n newFunction.source = Ref.make(script);\n });\n return space.db.add(newFunction);\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Operation, Script } from '@dxos/compute';\nimport { Obj } from '@dxos/echo';\nimport { getUserFunctionIdInMetadata } from '@dxos/functions';\nimport { getInvocationUrl } from '@dxos/functions-runtime';\nimport { type PublicKey } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\nimport { getSpace } from '@dxos/react-client/echo';\n/**\n * Get the function URL for a given script and client configuration\n */\nexport const getFunctionUrl = ({\n script,\n fn,\n edgeUrl,\n}: {\n script: Script.Script;\n fn: any;\n edgeUrl: string;\n}): string | undefined => {\n const space = getSpace(script);\n const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));\n\n if (!existingFunctionId) {\n return undefined;\n }\n\n return getInvocationUrl(existingFunctionId, edgeUrl, {\n spaceId: space?.id,\n });\n};\n\nexport const updateFunctionMetadata = (\n script: Script.Script,\n storedFunction: Operation.PersistentOperation,\n meta: any,\n functionId: string,\n) => {\n Obj.update(storedFunction, (storedFunction) => {\n if (script.description !== undefined && script.description.trim() !== '') {\n storedFunction.description = script.description;\n } else if (meta.description) {\n storedFunction.description = meta.description;\n } else {\n log.verbose('no description in function metadata', { functionId });\n }\n\n if (meta.inputSchema) {\n storedFunction.inputSchema = meta.inputSchema;\n } else {\n log.verbose('no input schema in function metadata', { functionId });\n }\n\n if (meta.outputSchema) {\n storedFunction.outputSchema = meta.outputSchema;\n } else {\n log.verbose('no output schema in function metadata', { functionId });\n }\n\n if (meta.key) {\n storedFunction.key = meta.key;\n } else {\n log.verbose('no key in function metadata', { functionId });\n }\n });\n};\n\nexport const getAccessCredential = (identityKey: PublicKey): Credential => {\n return {\n issuer: identityKey,\n issuanceDate: new Date(),\n subject: {\n id: identityKey,\n assertion: {\n '@type': 'dxos.halo.credentials.ServiceAccess',\n serverName: 'hub.dxos.network',\n serverKey: identityKey,\n identityKey,\n capabilities: ['composer:beta'],\n },\n },\n };\n};\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;AAGO,IAAMC,+BAAyD;;EAEpE,aAAa;IAAC;;AAChB;;;ACpBA,SAAiBC,iBAAiB;AAClC,SAASC,eAAe;AACxB,SAASC,KAAKC,WAAW;AACzB,SAASC,mCAAmC;AAC5C,SAASC,sBAAsB;AAC/B,SAASC,wBAAwBC,4BAA4B;AAC7D,SAASC,WAAW;AACpB,SAASC,2BAA2B;AAGpC,IAAA,eAAaC;AAEX,IAAOC,mBAAQC,CAAAA,EAAAA,QAAwBC,GAAAA,MAAOC;AAC9C,QAAA,qBAAA,MAAA,4BAAA,IAAA,QAAA,EAAA,CAAA;AAYF,SAAA,QAAA,kBAAA,KAAA,CAAA,OAAA;;AAWMC,IAAAA,eAAiB,OAAA,EAAA,QAAA,QAAA,OAAA,IAAA,mBAAA,MAAA;QACnB,kBAAO,qBAAA,QAAA,KAAA;uBAAW;WAAOC;MAAuB,SAAA;MAClD,OAAA;IAEI;;;AAGF,UAAA,cAAA,MAAA,eAAA;MACI,QAAA,OAAWC,OAAAA,OAAa;;AAE5B,QAAA,WAAA,aAAA;AAEA,YAAMC,YAAAA,SAAyBZ,IAAAA,MAAAA,wBAAkCa;IACjE;UACE,yBAAA,uBAA+C,WAAA,MAAA;UAC/CC,cAAgBC,MAAMC,uBAAG,OAAA,QAAA,QAAA,QAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,GAAA,CAAA,GAAA;;MAEzBC,gBAAYX,MAAAA;MACZY,SAAAA,KAAYP,qBAAsB,GAAA,OAAA,IAAA;MAClCQ,YAAQR;MACRS,YAASjB,YAAAA;MACX,QAAA,YAAA;MAEA,SAAMkB,oBAAiBC,MAAAA;IACvB1B,CAAAA;UACEW,iBAAiB,8BAAA,OAAA,IAAA,QAAA,WAAA;AACnB,QAAA,OAAA,QAAA,CAAAA,YAAA;AAEA,MAAAA,QAAO,UAAA;;WAAiBU;MAAqE,SAAA;MAC7F,YAAiB,4BAAA,IAAA,QAAA,cAAA,CAAA;IACjBf;WACA,KAAO;QAAEqB,MAAAA,KAAS,QAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,OAAA,CAAA;WAAOb;MAAW,SAAA;MACtC,OAAA;IACA;EAEF;;IAKI,uBAAiB,CAAA,QAAA,UAAA;AACnB,MAAA,CAAA,OAAA,UAAA,CAAA,OAAA;AACA,WAAO,IAAA,MAAA,sCAAA;EACT;AAEA,SAAMY;;oCAOoBE,CAAAA,OAAAA,IAAAA,QAAAA,gBAAAA;MACtB,IAAA;AACF,cAAO,QAAA,IAAA,WAAA;AACL5B,WAAI6B;;AAEJ,QAAA,OAAA,aAAA,CAAAD,iBAAA;AACA,MAAAA,aAAgBE,SAAIF,IAAAA,KAAAA,MAAAA;IACtB,CAAA;AACF,WAAA,MAAA,GAAA,IAAA,WAAA;;;;;AChGA,SAASG,OAAAA,YAAW;AACpB,SAASC,+BAAAA,oCAAmC;AAC5C,SAASC,wBAAwB;AAEjC,SAASC,OAAAA,YAAW;AAEpB,SAASC,gBAAgB;AACzB,IAAAC,gBAAA;AAaQC,IAAAA,iBAAqBC,CAAAA,EAAMN,QAAAA,IAAAA,QAAAA,MAAAA;AAEjC,QAAKK,QAAAA,SAAAA,MAAoB;QACvB,qBAAOE,MAAAA,6BAAAA,KAAAA,QAAAA,EAAAA,CAAAA;AACT,MAAA,CAAA,oBAAA;AAEA,WAAON;;AAEP,SAAA,iBAAA,oBAAA,SAAA;IACA,SAAA,OAAA;EAEF,CAAA;;IAOQO,yBAAuBD,CAAAA,QAAAA,gBAAoBE,OAAYC,eAAe;cACxEC,gBAAeF,CAAAA,oBAAqBA;AACtC,QAAA,OAAWG,gBAAgB,UAAE,OAAA,YAAA,KAAA,MAAA,IAAA;AAC3BD,MAAAA,gBAAeF,cAAcG,OAAKH;IACpC,WAAOG,MAAA,aAAA;AACLV,MAAAA,gBAAY,cAAAU,MAAA;;AAAoD,MAAAV,KAAA,QAAA,uCAAA;QAClE;MAEIU,GAAAA,EAAAA,YAAKC,YAAa,GAAAT,eAAA,GAAA,IAAA,GAAA,OAAA,CAAA;;AAEtB,QAAAQ,MAAO,aAAA;AACLV,MAAAA,gBAAY,cAAAU,MAAA;;AAAqD,MAAAV,KAAA,QAAA,wCAAA;QACnE;MAEIU,GAAAA,EAAAA,YAAKE,YAAc,GAAAV,eAAA,GAAA,IAAA,GAAA,OAAA,CAAA;;AAEvB,QAAAQ,MAAO,cAAA;AACLV,MAAAA,gBAAY,eAAAU,MAAA;;AAAsD,MAAAV,KAAA,QAAA,yCAAA;QACpE;MAEIU,GAAAA,EAAAA,YAAU,YAAA,GAAAR,eAAA,GAAA,IAAA,GAAA,OAAA,CAAA;;AAEd,QAAAQ,MAAO,KAAA;AACLV,MAAAA,gBAAY,MAAAU,MAAA;;AAA4C,MAAAV,KAAA,QAAA,+BAAA;QAC1D;MACF,GAAA,EAAA,YAAA,YAAA,GAAAE,eAAA,GAAA,IAAA,GAAA,OAAA,CAAA;IACA;EAEF,CAAA;;IAEIW,sBAAQC,CAAAA,gBAAAA;SACRC;IACAC,QAAAA;kBACMF,oBAAAA,KAAAA;aACJG;UACE;iBACAC;QACAC,SAAAA;QACAL,YAAAA;QACAM,WAAAA;;sBAA+B;UACjC;QACF;MACF;IACA;;;;;AH9EK,IAAMC,eAAeC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
6
- "names": ["Plugin", "trim", "meta", "id", "name", "description", "icon", "iconHue", "source", "tags", "screenshots", "defaultScriptsForIntegration", "Operation", "Context", "Obj", "Ref", "getUserFunctionIdInMetadata", "bundleFunction", "FunctionsServiceClient", "incrementSemverPatch", "log", "FunctionRuntimeKind", "isScriptDeployed", "Boolean", "existingFunctionId", "script", "changed", "validationError", "error", "buildResult", "functionsServiceClient", "client", "ownerPublicKey", "space", "key", "functionId", "entryPoint", "assets", "runtime", "storedFunction", "createOrUpdateFunctionInSpace", "success", "newFunction", "update", "add", "Obj", "getUserFunctionIdInMetadata", "getInvocationUrl", "log", "getSpace", "__dxlog_file", "existingFunctionId", "fn", "undefined", "script", "description", "trim", "storedFunction", "meta", "inputSchema", "outputSchema", "issuer", "identityKey", "issuanceDate", "subject", "assertion", "serverName", "serverKey", "capabilities", "ScriptPlugin", "Plugin", "lazy", "meta"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/blueprints/functions/install-function.ts"],
4
- "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ClientService } from '@dxos/client';\nimport { Operation } from '@dxos/compute';\nimport { Context } from '@dxos/context';\nimport { Obj, Query } from '@dxos/echo';\nimport { FunctionsServiceClient } from '@dxos/functions-runtime/edge';\n\nimport { InstallFunction } from './definitions';\n\nexport default InstallFunction.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ key }) {\n const client = yield* ClientService;\n const functionsService = FunctionsServiceClient.fromClient(client);\n const deployed = yield* Effect.promise(() => functionsService.query(Context.default()));\n\n const fn = deployed.findLast((entry) => entry.key === key);\n if (!fn) {\n return yield* Effect.fail(new Error(`No deployed function found with key: ${key}`));\n }\n\n const space = client.spaces.get()[0];\n if (!space) {\n return yield* Effect.fail(new Error('No space available'));\n }\n\n yield* Effect.promise(() => client.addTypes([Operation.PersistentOperation]));\n\n const existingFunctions = yield* Effect.promise(() =>\n space.db.query(Query.type(Operation.PersistentOperation, { key })).run(),\n );\n\n let installed: Operation.PersistentOperation;\n if (existingFunctions.length > 0) {\n installed = existingFunctions[0];\n for (const existing of existingFunctions) {\n Operation.setFrom(existing, fn);\n }\n } else {\n installed = Obj.clone(fn);\n space.db.add(installed);\n }\n\n return {\n function: Obj.getDXN(installed).toString(),\n name: fn.name ?? 'Unnamed function',\n version: fn.version ?? '0.0.0',\n };\n }),\n ),\n);\n"],
5
- "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAC1B,SAASC,eAAe;AACxB,SAASC,KAAKC,aAAa;AAC3B,SAASC,8BAA8B;AAIvC,IAAA,eAAeC;IAIT,2BAAMC,gBAAmBC,KAAAA,UAAAA,YAAkCC,UAAAA,WAAAA,EAAAA,IAAAA,GAAAA;AAC3D,QAAMC,SAAAA,OAAW;AAEjB,QAAMC,mBAAcC,uBAA6B,WAAKC,MAAAA;AACtD,QAAKF,WAAI,OAAA,eAAA,MAAA,iBAAA,MAAA,QAAA,QAAA,QAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,GAAA,CAAA,CAAA,CAAA;QACPA,MAAO,SAAOG,SAAW,CAAC,UAAIC,MAAO,QAAA,GAAA;AACvC,MAAA,CAAAJ,KAAA;AAEA,WAAMK,OAAeC,YAAOC,IAAM,MAAE,wCAAA,GAAA,EAAA,CAAA;EACpC;QACE,QAAO,OAAOJ,OAAOK,IAAK,EAAIJ,CAAAA;AAChC,MAAA,CAAA,OAAA;AAEA,WAAOD,OAAe,YAAML,IAAOW,MAAAA,oBAAS,CAAA;;SAA+B,eAAA,MAAA,OAAA,SAAA;IAErEC,UAAAA;;QAC2D,oBAAO,OAAA,eAAA,MAAA,MAAA,GAAA,MAAA,MAAA,KAAA,UAAA,qBAAA;IAGpEC;EACAD,CAAAA,CAAAA,EAAAA,IAAAA,CAAAA;MACFC;MACA,kBAAWC,SAAYF,GAAAA;gBACrBG,kBAAkBD,CAAAA;AACpB,eAAA,YAAA,mBAAA;AACK,gBAAA,QAAA,UAAAZ,GAAA;IACLW;SACAN;AACF,gBAAA,IAAA,MAAAL,GAAA;AAEA,UAAO,GAAA,IAAA,SAAA;;SAELc;IACAC,UAASf,IAAGe,OAAO,SAAI,EAAA,SAAA;IACzB,MAAAf,IAAA,QAAA;IAGJ,SAAAA,IAAA,WAAA;;;",
6
- "names": ["Effect", "ClientService", "Operation", "Context", "Obj", "Query", "FunctionsServiceClient", "InstallFunction", "functionsService", "FunctionsServiceClient", "client", "deployed", "fn", "findLast", "key", "Effect", "Error", "space", "spaces", "get", "fail", "addTypes", "existingFunctions", "installed", "existing", "Operation", "name", "version"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/blueprints/functions/invoke.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ClientService } from '@dxos/client';\nimport { Operation } from '@dxos/compute';\nimport { Context } from '@dxos/context';\nimport { Database } from '@dxos/echo';\nimport { FunctionsServiceClient } from '@dxos/functions-runtime/edge';\nimport { getSpace } from '@dxos/react-client/echo';\n\nimport { Invoke } from './definitions';\n\nexport default Invoke.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ function: fn, payload }) {\n const loaded = yield* Database.load(fn);\n const client = yield* ClientService;\n\n const space = getSpace(loaded);\n if (!space) {\n return yield* Effect.fail(new Error('Function is not in a space.'));\n }\n\n const functionsService = FunctionsServiceClient.fromClient(client);\n const result = yield* Effect.promise(() =>\n functionsService.invoke(Context.default(), loaded, payload ?? {}, { spaceId: space.id }),\n );\n\n return { response: result };\n }),\n ),\n);\n"],
5
- "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAC1B,SAASC,eAAe;AACxB,SAASC,gBAAgB;AACzB,SAASC,8BAA8B;AACvC,SAASC,gBAAgB;AAIzB,IAAA,eAAeC;IAIT,iBAAMC,OAAS,KAAOC,UAAAA,YAAAA,UAAAA,WAAAA,EAAAA,UAAAA,KAAAA,QAAAA,GAAAA;AAEtB,QAAMC,SAAQC,OAAAA,SAASC,KAAAA,GAAAA;AACvB,QAAKF,SAAO,OAAA;QACV,QAAO,SAAOG,MAAW;AAC3B,MAAA,CAAA,OAAA;AAEA,WAAMC,OAAmBC,YAAAA,IAAAA,MAAAA,6BAAkCP,CAAAA;EAC3D;2BACuF,uBAAA,WAAA,MAAA;QAAC,SAAA,OAAA,eAAA,MAAA,iBAAA,OAAA,QAAA,QAAA,QAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,GAAA,CAAA,GAAA,QAAA,WAAA,CAAA,GAAA;IAGjF,SAAA,MAAA;EAAEQ,CAAAA,CAAAA;AAAiB,SAAA;IAG9B,UAAA;;;",
6
- "names": ["Effect", "ClientService", "Operation", "Context", "Database", "FunctionsServiceClient", "getSpace", "Invoke", "client", "ClientService", "space", "getSpace", "loaded", "Effect", "functionsService", "FunctionsServiceClient", "response"]
7
- }
@@ -1 +0,0 @@
1
- {"inputs":{"src/meta.ts":{"bytes":2850,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/capabilities.ts":{"bytes":1674,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/events.ts":{"bytes":1131,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/types/Notebook.ts":{"bytes":4960,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/plugin-explorer/types","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/Settings.ts":{"bytes":1642,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ui-editor/types","kind":"import-statement","external":true}],"format":"esm"},"src/types/types.ts":{"bytes":440,"imports":[{"path":"src/types/Settings.ts","kind":"import-statement","original":"./Settings"}],"format":"esm"},"src/types/index.ts":{"bytes":703,"imports":[{"path":"src/types/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/types/events.ts","kind":"import-statement","original":"./events"},{"path":"src/types/Notebook.ts","kind":"import-statement","original":"./Notebook"},{"path":"src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/util/deploy.ts":{"bytes":10842,"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/bundler","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true}],"format":"esm"},"src/util/functions.ts":{"bytes":8499,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"format":"esm"},"src/util/index.ts":{"bytes":463,"imports":[{"path":"src/util/deploy.ts","kind":"import-statement","original":"./deploy"},{"path":"src/util/functions.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/index.ts":{"bytes":1255,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/util/index.ts","kind":"import-statement","original":"./util"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/blueprints/functions/definitions.ts":{"bytes":34431,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/anthropic.ts?raw":{"bytes":1423,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/chat.ts?raw":{"bytes":2751,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/chess-bot.ts?raw":{"bytes":1740,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/commentary.ts?raw":{"bytes":9829,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/data-generator.ts?raw":{"bytes":1625,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/discord.ts?raw":{"bytes":3990,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/email.ts?raw":{"bytes":1032,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/forex-effect.ts?raw":{"bytes":1620,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/forex.ts?raw":{"bytes":984,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/gmail.ts?raw":{"bytes":8032,"imports":[]},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/ping.ts?raw":{"bytes":424,"imports":[]},"src/templates/index.ts":{"bytes":7089,"imports":[{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/anthropic.ts?raw","kind":"import-statement","original":"./anthropic.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/chat.ts?raw","kind":"import-statement","original":"./chat.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/chess-bot.ts?raw","kind":"import-statement","original":"./chess-bot.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/commentary.ts?raw","kind":"import-statement","original":"./commentary.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/data-generator.ts?raw","kind":"import-statement","original":"./data-generator.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/discord.ts?raw","kind":"import-statement","original":"./discord.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/email.ts?raw","kind":"import-statement","original":"./email.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/forex-effect.ts?raw","kind":"import-statement","original":"./forex-effect.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/forex.ts?raw","kind":"import-statement","original":"./forex.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/gmail.ts?raw","kind":"import-statement","original":"./gmail.ts?raw"},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/ping.ts?raw","kind":"import-statement","original":"./ping.ts?raw"}],"format":"esm"},"src/blueprints/functions/create.ts":{"bytes":4699,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/templates/index.ts","kind":"dynamic-import","original":"../../templates"}],"format":"esm"},"src/blueprints/functions/read.ts":{"bytes":2814,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/update.ts":{"bytes":8368,"imports":[{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/delete.ts":{"bytes":2130,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/deploy.ts":{"bytes":9798,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/bundler","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/invoke.ts":{"bytes":4113,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/inspect-invocations.ts":{"bytes":8237,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/query-deployed-functions.ts":{"bytes":3731,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/install-function.ts":{"bytes":6791,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/index.ts":{"bytes":1711,"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/blueprints/functions/create.ts","kind":"dynamic-import","original":"./create"},{"path":"src/blueprints/functions/read.ts","kind":"dynamic-import","original":"./read"},{"path":"src/blueprints/functions/update.ts","kind":"dynamic-import","original":"./update"},{"path":"src/blueprints/functions/delete.ts","kind":"dynamic-import","original":"./delete"},{"path":"src/blueprints/functions/deploy.ts","kind":"dynamic-import","original":"./deploy"},{"path":"src/blueprints/functions/invoke.ts","kind":"dynamic-import","original":"./invoke"},{"path":"src/blueprints/functions/inspect-invocations.ts","kind":"dynamic-import","original":"./inspect-invocations"},{"path":"src/blueprints/functions/query-deployed-functions.ts","kind":"dynamic-import","original":"./query-deployed-functions"},{"path":"src/blueprints/functions/install-function.ts","kind":"dynamic-import","original":"./install-function"}],"format":"esm"},"src/blueprints/script-blueprint.ts":{"bytes":4277,"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/blueprints/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/blueprints/index.ts":{"bytes":525,"imports":[{"path":"src/blueprints/script-blueprint.ts","kind":"import-statement","original":"./script-blueprint"}],"format":"esm"},"src/containers/DeploymentDialog/DeploymentDialog.tsx":{"bytes":14028,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/containers/DeploymentDialog/index.ts":{"bytes":530,"imports":[{"path":"src/containers/DeploymentDialog/DeploymentDialog.tsx","kind":"import-statement","original":"./DeploymentDialog"}],"format":"esm"},"src/notebook/eval.ts":{"bytes":6457,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/notebook/vfs-parser.ts":{"bytes":49874,"imports":[{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/notebook/eval.ts","kind":"import-statement","original":"./eval"}],"format":"esm"},"src/notebook/compute-graph.ts":{"bytes":24142,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/notebook/eval.ts","kind":"import-statement","original":"./eval"},{"path":"src/notebook/vfs-parser.ts","kind":"import-statement","original":"./vfs-parser"}],"format":"esm"},"src/notebook/index.ts":{"bytes":389,"imports":[{"path":"src/notebook/compute-graph.ts","kind":"import-statement","original":"./compute-graph"}],"format":"esm"},"src/containers/NotebookContainer/NotebookContainer.tsx":{"bytes":31772,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Cause","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Exit","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant-toolkit","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-query","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-automation/hooks","kind":"import-statement","external":true},{"path":"@dxos/plugin-explorer/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/notebook/index.ts","kind":"import-statement","original":"../../notebook"}],"format":"esm"},"src/containers/NotebookContainer/index.ts":{"bytes":536,"imports":[{"path":"src/containers/NotebookContainer/NotebookContainer.tsx","kind":"import-statement","original":"./NotebookContainer"}],"format":"esm"},"src/containers/ScriptContainer/ScriptContainer.tsx":{"bytes":8359,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true}],"format":"esm"},"src/containers/ScriptContainer/index.ts":{"bytes":524,"imports":[{"path":"src/containers/ScriptContainer/ScriptContainer.tsx","kind":"import-statement","original":"./ScriptContainer"}],"format":"esm"},"src/containers/ScriptProperties/BlueprintEditor.tsx":{"bytes":12907,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/containers/ScriptProperties/FunctionBinding.tsx":{"bytes":9290,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/containers/ScriptProperties/FunctionPublishing.tsx":{"bytes":15196,"imports":[{"path":"@octokit/core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/containers/ScriptProperties/ScriptProperties.tsx":{"bytes":2495,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/ScriptProperties/BlueprintEditor.tsx","kind":"import-statement","original":"./BlueprintEditor"},{"path":"src/containers/ScriptProperties/FunctionBinding.tsx","kind":"import-statement","original":"./FunctionBinding"},{"path":"src/containers/ScriptProperties/FunctionPublishing.tsx","kind":"import-statement","original":"./FunctionPublishing"}],"format":"esm"},"src/containers/ScriptProperties/index.ts":{"bytes":530,"imports":[{"path":"src/containers/ScriptProperties/ScriptProperties.tsx","kind":"import-statement","original":"./ScriptProperties"}],"format":"esm"},"src/containers/TestContainer/TestContainer.tsx":{"bytes":4956,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true}],"format":"esm"},"src/containers/TestContainer/index.ts":{"bytes":512,"imports":[{"path":"src/containers/TestContainer/TestContainer.tsx","kind":"import-statement","original":"./TestContainer"}],"format":"esm"},"src/containers/index.ts":{"bytes":1884,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/DeploymentDialog/index.ts","kind":"dynamic-import","original":"./DeploymentDialog"},{"path":"src/containers/NotebookContainer/index.ts","kind":"dynamic-import","original":"./NotebookContainer"},{"path":"src/containers/ScriptContainer/index.ts","kind":"dynamic-import","original":"./ScriptContainer"},{"path":"src/containers/ScriptProperties/index.ts","kind":"dynamic-import","original":"./ScriptProperties"},{"path":"src/containers/TestContainer/index.ts","kind":"dynamic-import","original":"./TestContainer"}],"format":"esm"},"src/operations/definitions.ts":{"bytes":4162,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/templates/index.ts","kind":"import-statement","original":"../templates"}],"format":"esm"},"src/constants.ts":{"bytes":683,"imports":[{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"},"src/operations/access-token-created.ts":{"bytes":4334,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/plugin-integration/operations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../constants"},{"path":"src/templates/index.ts","kind":"import-statement","original":"../templates"}],"format":"esm"},"src/operations/create-script.ts":{"bytes":4876,"imports":[{"path":"@octokit/core","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"src/templates/index.ts","kind":"import-statement","original":"../templates"},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/operations/index.ts":{"bytes":1175,"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"src/operations/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/operations/access-token-created.ts","kind":"dynamic-import","original":"./access-token-created"},{"path":"src/operations/create-script.ts","kind":"dynamic-import","original":"./create-script"}],"format":"esm"},"src/translations.ts":{"bytes":15289,"imports":[{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/browser/DeploymentDialog-6DBF3V6C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6844},"dist/lib/browser/DeploymentDialog-6DBF3V6C.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/DeploymentDialog/index.ts","inputs":{"src/containers/DeploymentDialog/DeploymentDialog.tsx":{"bytesInOutput":3813},"src/containers/DeploymentDialog/index.ts":{"bytesInOutput":0}},"bytes":3998},"dist/lib/browser/NotebookContainer-RO4NJRYH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":51086},"dist/lib/browser/NotebookContainer-RO4NJRYH.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Cause","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Exit","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant-toolkit","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-query","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-automation/hooks","kind":"import-statement","external":true},{"path":"@dxos/plugin-explorer/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/NotebookContainer/index.ts","inputs":{"src/containers/NotebookContainer/NotebookContainer.tsx":{"bytesInOutput":8206},"src/notebook/compute-graph.ts":{"bytesInOutput":5271},"src/notebook/eval.ts":{"bytesInOutput":1436},"src/notebook/vfs-parser.ts":{"bytesInOutput":9773},"src/notebook/index.ts":{"bytesInOutput":0},"src/containers/NotebookContainer/index.ts":{"bytesInOutput":0}},"bytes":25058},"dist/lib/browser/ScriptContainer-2OPBAXFB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4346},"dist/lib/browser/ScriptContainer-2OPBAXFB.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/ScriptContainer/index.ts","inputs":{"src/containers/ScriptContainer/ScriptContainer.tsx":{"bytesInOutput":2008},"src/containers/ScriptContainer/index.ts":{"bytesInOutput":0}},"bytes":2189},"dist/lib/browser/ScriptProperties-NRXG4PBX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20199},"dist/lib/browser/ScriptProperties-NRXG4PBX.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@octokit/core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"@dxos/types","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/ScriptProperties/index.ts","inputs":{"src/containers/ScriptProperties/ScriptProperties.tsx":{"bytesInOutput":446},"src/containers/ScriptProperties/BlueprintEditor.tsx":{"bytesInOutput":3431},"src/containers/ScriptProperties/FunctionBinding.tsx":{"bytesInOutput":2553},"src/containers/ScriptProperties/FunctionPublishing.tsx":{"bytesInOutput":4430},"src/containers/ScriptProperties/index.ts":{"bytesInOutput":0}},"bytes":11273},"dist/lib/browser/TestContainer-JNFPLAJX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2374},"dist/lib/browser/TestContainer-JNFPLAJX.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"#components","kind":"import-statement","external":true},{"path":"#hooks","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/TestContainer/index.ts","inputs":{"src/containers/TestContainer/TestContainer.tsx":{"bytesInOutput":1343},"src/containers/TestContainer/index.ts":{"bytesInOutput":0}},"bytes":1516},"dist/lib/browser/access-token-created-MSWZWZCT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2622},"dist/lib/browser/access-token-created-MSWZWZCT.mjs":{"imports":[{"path":"dist/lib/browser/chunk-NSAF3763.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Predicate","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/plugin-integration/operations","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/access-token-created.ts","inputs":{"src/operations/access-token-created.ts":{"bytesInOutput":913},"src/constants.ts":{"bytesInOutput":86}},"bytes":1302},"dist/lib/browser/create-script-Q7B3CFAP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2638},"dist/lib/browser/create-script-Q7B3CFAP.mjs":{"imports":[{"path":"dist/lib/browser/chunk-RQ5LDVFK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-NSAF3763.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@octokit/core","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/operations/create-script.ts","inputs":{"src/operations/create-script.ts":{"bytesInOutput":1028}},"bytes":1301},"dist/lib/browser/read-FFOSK6A3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1549},"dist/lib/browser/read-FFOSK6A3.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/blueprints/functions/read.ts","inputs":{"src/blueprints/functions/read.ts":{"bytesInOutput":577}},"bytes":773},"dist/lib/browser/update-PJS5GG3Y.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4472},"dist/lib/browser/update-PJS5GG3Y.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@automerge/automerge","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/blueprints/functions/update.ts","inputs":{"src/blueprints/functions/update.ts":{"bytesInOutput":1909}},"bytes":2113},"dist/lib/browser/delete-PAUWA2QM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1183},"dist/lib/browser/delete-PAUWA2QM.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/blueprints/functions/delete.ts","inputs":{"src/blueprints/functions/delete.ts":{"bytesInOutput":405}},"bytes":609},"dist/lib/browser/deploy-CXVW54JJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4952},"dist/lib/browser/deploy-CXVW54JJ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/bundler","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/blueprints/functions/deploy.ts","inputs":{"src/blueprints/functions/deploy.ts":{"bytesInOutput":2503}},"bytes":2707},"dist/lib/browser/invoke-5QVEZ3X5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2031},"dist/lib/browser/invoke-5QVEZ3X5.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/blueprints/functions/invoke.ts","inputs":{"src/blueprints/functions/invoke.ts":{"bytesInOutput":1065}},"bytes":1269},"dist/lib/browser/inspect-invocations-LEOEP5I2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4571},"dist/lib/browser/inspect-invocations-LEOEP5I2.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/client-protocol","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/blueprints/functions/inspect-invocations.ts","inputs":{"src/blueprints/functions/inspect-invocations.ts":{"bytesInOutput":1928}},"bytes":2183},"dist/lib/browser/query-deployed-functions-FVD7NYPA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1826},"dist/lib/browser/query-deployed-functions-FVD7NYPA.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/blueprints/functions/query-deployed-functions.ts","inputs":{"src/blueprints/functions/query-deployed-functions.ts":{"bytesInOutput":971}},"bytes":1245},"dist/lib/browser/install-function-5N24Q45W.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3317},"dist/lib/browser/install-function-5N24Q45W.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/blueprints/functions/install-function.ts","inputs":{"src/blueprints/functions/install-function.ts":{"bytesInOutput":1691}},"bytes":1934},"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11232},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-KF6H7J5N.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/bundler","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime/edge","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions-runtime","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["ScriptCapabilities","ScriptEvents","ScriptPlugin","defaultScriptsForIntegration","deployScript","getAccessCredential","getFunctionUrl","isScriptDeployed","meta","updateFunctionMetadata"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":109},"src/meta.ts":{"bytesInOutput":746},"src/util/deploy.ts":{"bytesInOutput":2635},"src/util/index.ts":{"bytesInOutput":0},"src/util/functions.ts":{"bytesInOutput":2384}},"bytes":6324},"dist/lib/browser/blueprints/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2950},"dist/lib/browser/blueprints/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"dist/lib/browser/create-JDXWBARB.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/read-FFOSK6A3.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/update-PJS5GG3Y.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/delete-PAUWA2QM.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/deploy-CXVW54JJ.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/invoke-5QVEZ3X5.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/inspect-invocations-LEOEP5I2.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/query-deployed-functions-FVD7NYPA.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/install-function-5N24Q45W.mjs","kind":"dynamic-import"}],"exports":["ScriptBlueprint"],"entryPoint":"src/blueprints/index.ts","inputs":{"src/blueprints/script-blueprint.ts":{"bytesInOutput":964},"src/blueprints/functions/index.ts":{"bytesInOutput":499},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":1869},"dist/lib/browser/containers/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1045},"dist/lib/browser/containers/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/browser/DeploymentDialog-6DBF3V6C.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/NotebookContainer-RO4NJRYH.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/ScriptContainer-2OPBAXFB.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/ScriptProperties-NRXG4PBX.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/TestContainer-JNFPLAJX.mjs","kind":"dynamic-import"}],"exports":["DeploymentDialog","NotebookContainer","ScriptContainer","ScriptProperties","TestContainer"],"entryPoint":"src/containers/index.ts","inputs":{"src/containers/index.ts":{"bytesInOutput":419}},"bytes":622},"dist/lib/browser/operations/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":589},"dist/lib/browser/operations/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-RQ5LDVFK.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-NSAF3763.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"dist/lib/browser/access-token-created-MSWZWZCT.mjs","kind":"dynamic-import"},{"path":"dist/lib/browser/create-script-Q7B3CFAP.mjs","kind":"dynamic-import"}],"exports":["ScriptOperation","ScriptOperationHandlerSet"],"entryPoint":"src/operations/index.ts","inputs":{"src/operations/index.ts":{"bytesInOutput":212}},"bytes":484},"dist/lib/browser/chunk-RQ5LDVFK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2182},"dist/lib/browser/chunk-RQ5LDVFK.mjs":{"imports":[{"path":"dist/lib/browser/chunk-NSAF3763.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["CreateScript","definitions_exports"],"inputs":{"src/operations/definitions.ts":{"bytesInOutput":1046}},"bytes":1278},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6860},"dist/lib/browser/translations.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":5156}},"bytes":5280},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-KF6H7J5N.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Notebook","ScriptCapabilities","ScriptEvents","Settings"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":298},"dist/lib/browser/chunk-KF6H7J5N.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4751},"dist/lib/browser/chunk-KF6H7J5N.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/plugin-explorer/types","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ui-editor/types","kind":"import-statement","external":true}],"exports":["Notebook_exports","ScriptCapabilities","ScriptEvents","Settings_exports"],"inputs":{"src/types/capabilities.ts":{"bytesInOutput":358},"src/types/index.ts":{"bytesInOutput":0},"src/types/events.ts":{"bytesInOutput":270},"src/types/Notebook.ts":{"bytesInOutput":1172},"src/types/Settings.ts":{"bytesInOutput":395},"src/types/types.ts":{"bytesInOutput":0}},"bytes":2486},"dist/lib/browser/templates/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/templates/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-NSAF3763.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["dataGenerator","templates"],"entryPoint":"src/templates/index.ts","inputs":{},"bytes":213},"dist/lib/browser/chunk-NSAF3763.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":38997},"dist/lib/browser/chunk-NSAF3763.mjs":{"imports":[],"exports":["data_generator_default","templates"],"inputs":{"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/anthropic.ts?raw":{"bytesInOutput":1500},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/chat.ts?raw":{"bytesInOutput":2877},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/chess-bot.ts?raw":{"bytesInOutput":1829},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/commentary.ts?raw":{"bytesInOutput":10118},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/data-generator.ts?raw":{"bytesInOutput":1712},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/discord.ts?raw":{"bytesInOutput":4136},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/email.ts?raw":{"bytesInOutput":1092},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/forex-effect.ts?raw":{"bytesInOutput":1699},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/forex.ts?raw":{"bytesInOutput":1044},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/gmail.ts?raw":{"bytesInOutput":8284},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-script/src/templates/ping.ts?raw":{"bytesInOutput":472},"src/templates/index.ts":{"bytesInOutput":1594}},"bytes":37475},"dist/lib/browser/create-JDXWBARB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2608},"dist/lib/browser/create-JDXWBARB.mjs":{"imports":[{"path":"dist/lib/browser/chunk-MI6X5CTJ.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"dist/lib/browser/templates/index.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/blueprints/functions/create.ts","inputs":{"src/blueprints/functions/create.ts":{"bytesInOutput":1043}},"bytes":1247},"dist/lib/browser/chunk-MI6X5CTJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16178},"dist/lib/browser/chunk-MI6X5CTJ.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["Create","Delete","Deploy","InspectInvocations","InstallFunction","Invoke","QueryDeployedFunctions","Read","Update"],"inputs":{"src/blueprints/functions/definitions.ts":{"bytesInOutput":10860}},"bytes":11084},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}