@dxos/plugin-script 0.12.0-next-2800d0376abcc62d5544afdd744b16b2b960434e → 0.13.0

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 (329) hide show
  1. package/PLUGIN.mdl +93 -17
  2. package/README.md +1 -1
  3. package/dist/lib/Notebook.mjs +4 -5
  4. package/dist/lib/Notebook.mjs.map +1 -1
  5. package/dist/lib/ScriptCapabilities.mjs.map +1 -1
  6. package/dist/lib/ScriptOperation.mjs +1 -1
  7. package/dist/lib/ScriptOperation.mjs.map +1 -1
  8. package/dist/lib/ScriptOperationHandlerSet.mjs.map +1 -1
  9. package/dist/lib/ScriptSkill.mjs +1 -1
  10. package/dist/lib/ScriptSkill.mjs.map +1 -1
  11. package/dist/lib/capabilities.browser.mjs +51 -0
  12. package/dist/lib/capabilities.browser.mjs.map +1 -0
  13. package/dist/lib/capabilities.mjs +17 -7
  14. package/dist/lib/capabilities.mjs.map +1 -1
  15. package/dist/lib/capabilities.node.mjs +16 -4
  16. package/dist/lib/capabilities.node.mjs.map +1 -1
  17. package/dist/lib/capabilities.tauri.mjs +51 -0
  18. package/dist/lib/capabilities.tauri.mjs.map +1 -0
  19. package/dist/lib/capabilities.workerd.mjs +1 -1
  20. package/dist/lib/capabilities.workerd.mjs.map +1 -1
  21. package/dist/lib/chunk-DeploymentDialog.mjs +12 -9
  22. package/dist/lib/chunk-DeploymentDialog.mjs.map +1 -1
  23. package/dist/lib/chunk-NotebookArticle.mjs +37 -36
  24. package/dist/lib/chunk-NotebookArticle.mjs.map +1 -1
  25. package/dist/lib/chunk-PLUGIN.mjs +6 -0
  26. package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
  27. package/dist/lib/chunk-ScriptArticle.mjs +14 -15
  28. package/dist/lib/chunk-ScriptArticle.mjs.map +1 -1
  29. package/dist/lib/chunk-ScriptProperties.mjs +91 -94
  30. package/dist/lib/chunk-ScriptProperties.mjs.map +1 -1
  31. package/dist/lib/chunk-ScriptSettings.mjs +11 -8
  32. package/dist/lib/chunk-ScriptSettings.mjs.map +1 -1
  33. package/dist/lib/chunk-TestContainer.mjs +5 -5
  34. package/dist/lib/chunk-TestContainer.mjs.map +1 -1
  35. package/dist/lib/chunk-app-graph-builder.mjs +2 -0
  36. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
  37. package/dist/lib/chunk-compiler.mjs +87 -4
  38. package/dist/lib/chunk-compiler.mjs.map +1 -1
  39. package/dist/lib/chunk-create-object.mjs +1 -1
  40. package/dist/lib/chunk-create-script.mjs.map +1 -1
  41. package/dist/lib/chunk-create.mjs +4 -4
  42. package/dist/lib/chunk-create.mjs.map +1 -1
  43. package/dist/lib/chunk-definitions.mjs +246 -0
  44. package/dist/lib/chunk-definitions.mjs.map +1 -0
  45. package/dist/lib/chunk-delete.mjs +2 -2
  46. package/dist/lib/chunk-delete.mjs.map +1 -1
  47. package/dist/lib/chunk-deploy.mjs +16 -12
  48. package/dist/lib/chunk-deploy.mjs.map +1 -1
  49. package/dist/lib/chunk-errors.mjs +8 -0
  50. package/dist/lib/chunk-errors.mjs.map +1 -0
  51. package/dist/lib/chunk-functions.mjs +66 -246
  52. package/dist/lib/chunk-functions.mjs.map +1 -1
  53. package/dist/lib/chunk-inspect-invocations.mjs +3 -3
  54. package/dist/lib/chunk-inspect-invocations.mjs.map +1 -1
  55. package/dist/lib/chunk-install-function.mjs +11 -11
  56. package/dist/lib/chunk-install-function.mjs.map +1 -1
  57. package/dist/lib/chunk-invoke.mjs +6 -6
  58. package/dist/lib/chunk-invoke.mjs.map +1 -1
  59. package/dist/lib/chunk-operation-handler.mjs +16 -2
  60. package/dist/lib/chunk-operation-handler.mjs.map +1 -1
  61. package/dist/lib/chunk-query-deployed-functions.mjs +5 -6
  62. package/dist/lib/chunk-query-deployed-functions.mjs.map +1 -1
  63. package/dist/lib/chunk-react-surface.mjs +14 -10
  64. package/dist/lib/chunk-react-surface.mjs.map +1 -1
  65. package/dist/lib/chunk-read.mjs +4 -3
  66. package/dist/lib/chunk-read.mjs.map +1 -1
  67. package/dist/lib/chunk-settings.mjs +2 -2
  68. package/dist/lib/chunk-settings.mjs.map +1 -1
  69. package/dist/lib/chunk-skill-definition.mjs +1 -1
  70. package/dist/lib/chunk-templates.mjs +3 -3
  71. package/dist/lib/chunk-update.mjs +4 -3
  72. package/dist/lib/chunk-update.mjs.map +1 -1
  73. package/dist/lib/components.mjs +114 -123
  74. package/dist/lib/components.mjs.map +1 -1
  75. package/dist/lib/containers.mjs.map +1 -1
  76. package/dist/lib/hooks.mjs +96 -16
  77. package/dist/lib/hooks.mjs.map +1 -1
  78. package/dist/lib/index.mjs +5 -3
  79. package/dist/lib/meta.mjs.map +1 -1
  80. package/dist/lib/ns/ScriptFunction.mjs +12 -0
  81. package/dist/lib/ns/ScriptFunction.mjs.map +1 -0
  82. package/dist/lib/ns/Templates.mjs +11 -0
  83. package/dist/lib/ns/Templates.mjs.map +1 -0
  84. package/dist/lib/testing.mjs +1 -1
  85. package/dist/lib/translations.mjs +2 -1
  86. package/dist/lib/translations.mjs.map +1 -1
  87. package/dist/types/src/ScriptFunction.d.ts +2 -0
  88. package/dist/types/src/ScriptFunction.d.ts.map +1 -0
  89. package/dist/types/src/Templates.d.ts +2 -0
  90. package/dist/types/src/Templates.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/ScriptSurfaces.d.ts.map +1 -1
  92. package/dist/types/src/capabilities/compiler.d.ts +2 -1
  93. package/dist/types/src/capabilities/compiler.d.ts.map +1 -1
  94. package/dist/types/src/capabilities/errors.d.ts +33 -0
  95. package/dist/types/src/capabilities/errors.d.ts.map +1 -0
  96. package/dist/types/src/capabilities/gen/browser.d.ts +12 -0
  97. package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
  98. package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/gen/tauri.d.ts +12 -0
  100. package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
  102. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  103. package/dist/types/src/compiler/index.d.ts +1 -1
  104. package/dist/types/src/compiler/index.d.ts.map +1 -1
  105. package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +3 -3
  106. package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
  107. package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -1
  108. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +4 -4
  109. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
  110. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +10 -0
  111. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
  112. package/dist/types/src/components/NotebookStack/index.d.ts +2 -2
  113. package/dist/types/src/components/NotebookStack/index.d.ts.map +1 -1
  114. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +2 -2
  115. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
  116. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +10 -0
  117. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
  118. package/dist/types/src/components/ScriptToolbar/index.d.ts +1 -1
  119. package/dist/types/src/components/ScriptToolbar/index.d.ts.map +1 -1
  120. package/dist/types/src/components/TestPanel/TestPanel.d.ts +2 -2
  121. package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
  122. package/dist/types/src/components/TestPanel/index.d.ts +1 -1
  123. package/dist/types/src/components/TestPanel/index.d.ts.map +1 -1
  124. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +2 -2
  125. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
  126. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +1 -1
  127. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
  128. package/dist/types/src/components/TypescriptEditor/index.d.ts +1 -1
  129. package/dist/types/src/components/TypescriptEditor/index.d.ts.map +1 -1
  130. package/dist/types/src/components/index.d.ts +4 -5
  131. package/dist/types/src/components/index.d.ts.map +1 -1
  132. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts +1 -1
  133. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
  134. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +10 -0
  135. package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
  136. package/dist/types/src/containers/DeploymentDialog/index.d.ts +1 -1
  137. package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -1
  138. package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts +1 -1
  139. package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts.map +1 -1
  140. package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts +1 -1
  141. package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts.map +1 -1
  142. package/dist/types/src/containers/NotebookArticle/index.d.ts +1 -1
  143. package/dist/types/src/containers/NotebookArticle/index.d.ts.map +1 -1
  144. package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts +1 -1
  145. package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -1
  146. package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts +10 -0
  147. package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts.map +1 -1
  148. package/dist/types/src/containers/ScriptArticle/index.d.ts +1 -1
  149. package/dist/types/src/containers/ScriptArticle/index.d.ts.map +1 -1
  150. package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts.map +1 -1
  151. package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts.map +1 -1
  152. package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +1 -1
  153. package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -1
  154. package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts +10 -0
  155. package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -1
  156. package/dist/types/src/containers/ScriptProperties/SkillEditor.d.ts.map +1 -1
  157. package/dist/types/src/containers/ScriptProperties/index.d.ts +1 -1
  158. package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -1
  159. package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts +2 -2
  160. package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts.map +1 -1
  161. package/dist/types/src/containers/ScriptSettings/ScriptSettings.stories.d.ts +11 -1
  162. package/dist/types/src/containers/ScriptSettings/ScriptSettings.stories.d.ts.map +1 -1
  163. package/dist/types/src/containers/ScriptSettings/index.d.ts +1 -1
  164. package/dist/types/src/containers/ScriptSettings/index.d.ts.map +1 -1
  165. package/dist/types/src/containers/TestContainer/index.d.ts +1 -1
  166. package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -1
  167. package/dist/types/src/containers/index.d.ts.map +1 -1
  168. package/dist/types/src/hooks/deploy.d.ts +3 -3
  169. package/dist/types/src/hooks/deploy.d.ts.map +1 -1
  170. package/dist/types/src/hooks/index.d.ts +6 -6
  171. package/dist/types/src/hooks/index.d.ts.map +1 -1
  172. package/dist/types/src/hooks/useCompiler.d.ts +1 -1
  173. package/dist/types/src/hooks/useCompiler.d.ts.map +1 -1
  174. package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts +1 -1
  175. package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
  176. package/dist/types/src/hooks/useToolbarState.d.ts +2 -2
  177. package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
  178. package/dist/types/src/index.d.ts +5 -3
  179. package/dist/types/src/index.d.ts.map +1 -1
  180. package/dist/types/src/notebook/compute-graph.d.ts +3 -3
  181. package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
  182. package/dist/types/src/notebook/index.d.ts +1 -1
  183. package/dist/types/src/notebook/index.d.ts.map +1 -1
  184. package/dist/types/src/operations/ScriptOperationHandlerSet.d.ts.map +1 -1
  185. package/dist/types/src/operations/index.d.ts +1 -1
  186. package/dist/types/src/operations/index.d.ts.map +1 -1
  187. package/dist/types/src/skills/ScriptSkill.d.ts.map +1 -1
  188. package/dist/types/src/skills/functions/definitions.d.ts +8 -6
  189. package/dist/types/src/skills/functions/definitions.d.ts.map +1 -1
  190. package/dist/types/src/skills/functions/deploy.d.ts +4 -2
  191. package/dist/types/src/skills/functions/deploy.d.ts.map +1 -1
  192. package/dist/types/src/skills/functions/errors.d.ts +33 -0
  193. package/dist/types/src/skills/functions/errors.d.ts.map +1 -0
  194. package/dist/types/src/skills/functions/index.d.ts +1 -1
  195. package/dist/types/src/skills/functions/index.d.ts.map +1 -1
  196. package/dist/types/src/skills/functions/install-function.d.ts +3 -2
  197. package/dist/types/src/skills/functions/install-function.d.ts.map +1 -1
  198. package/dist/types/src/skills/functions/invoke.d.ts +2 -2
  199. package/dist/types/src/skills/functions/invoke.d.ts.map +1 -1
  200. package/dist/types/src/skills/functions/query-deployed-functions.d.ts +2 -2
  201. package/dist/types/src/skills/functions/query-deployed-functions.d.ts.map +1 -1
  202. package/dist/types/src/skills/index.d.ts +1 -1
  203. package/dist/types/src/skills/index.d.ts.map +1 -1
  204. package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
  205. package/dist/types/src/testing/index.d.ts +2 -2
  206. package/dist/types/src/testing/index.d.ts.map +1 -1
  207. package/dist/types/src/translations.d.ts +10 -0
  208. package/dist/types/src/translations.d.ts.map +1 -1
  209. package/dist/types/src/types/Notebook.d.ts.map +1 -1
  210. package/dist/types/src/types/ScriptCapabilities.d.ts +3 -3
  211. package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -1
  212. package/dist/types/src/types/index.d.ts +5 -5
  213. package/dist/types/src/types/index.d.ts.map +1 -1
  214. package/dist/types/src/util/deploy.d.ts +6 -3
  215. package/dist/types/src/util/deploy.d.ts.map +1 -1
  216. package/dist/types/src/util/functions.d.ts +1 -1
  217. package/dist/types/src/util/functions.d.ts.map +1 -1
  218. package/dist/types/src/util/index.d.ts +2 -2
  219. package/dist/types/src/util/index.d.ts.map +1 -1
  220. package/dist/types/tsconfig.tsbuildinfo +1 -1
  221. package/package.json +106 -96
  222. package/src/ScriptFunction.ts +7 -0
  223. package/src/Templates.ts +7 -0
  224. package/src/capabilities/ScriptSurfaces.tsx +19 -10
  225. package/src/capabilities/app-graph-builder.ts +2 -0
  226. package/src/capabilities/compiler.ts +6 -5
  227. package/src/capabilities/errors.ts +8 -0
  228. package/src/capabilities/gen/browser.ts +62 -0
  229. package/src/capabilities/gen/node.ts +10 -10
  230. package/src/capabilities/gen/tauri.ts +62 -0
  231. package/src/capabilities/gen/workerd.ts +4 -4
  232. package/src/capabilities/index.ts +11 -11
  233. package/src/capabilities/operation-handler.ts +1 -1
  234. package/src/capabilities/react-surface.ts +4 -4
  235. package/src/capabilities/settings.ts +2 -2
  236. package/src/compiler/compiler.browser.test.ts +1 -1
  237. package/src/compiler/index.ts +1 -1
  238. package/src/components/NotebookStack/NotebookCell.tsx +35 -29
  239. package/src/components/NotebookStack/NotebookMenu.tsx +27 -26
  240. package/src/components/NotebookStack/NotebookStack.stories.tsx +3 -3
  241. package/src/components/NotebookStack/NotebookStack.tsx +20 -17
  242. package/src/components/NotebookStack/index.ts +2 -2
  243. package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +5 -5
  244. package/src/components/ScriptToolbar/ScriptToolbar.tsx +14 -15
  245. package/src/components/ScriptToolbar/index.ts +1 -1
  246. package/src/components/TestPanel/TestPanel.tsx +29 -23
  247. package/src/components/TestPanel/index.ts +1 -1
  248. package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +10 -8
  249. package/src/components/TypescriptEditor/TypescriptEditor.tsx +11 -7
  250. package/src/components/TypescriptEditor/index.ts +1 -1
  251. package/src/components/index.ts +4 -5
  252. package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +5 -7
  253. package/src/containers/DeploymentDialog/DeploymentDialog.tsx +18 -15
  254. package/src/containers/DeploymentDialog/index.ts +1 -1
  255. package/src/containers/NotebookArticle/NotebookArticle.stories.tsx +6 -6
  256. package/src/containers/NotebookArticle/NotebookArticle.tsx +25 -21
  257. package/src/containers/NotebookArticle/index.ts +1 -1
  258. package/src/containers/ScriptArticle/ScriptArticle.stories.tsx +3 -3
  259. package/src/containers/ScriptArticle/ScriptArticle.tsx +13 -11
  260. package/src/containers/ScriptArticle/index.ts +1 -1
  261. package/src/containers/ScriptProperties/FunctionBinding.tsx +18 -18
  262. package/src/containers/ScriptProperties/FunctionPublishing.tsx +22 -22
  263. package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +3 -3
  264. package/src/containers/ScriptProperties/ScriptProperties.tsx +10 -10
  265. package/src/containers/ScriptProperties/SkillEditor.tsx +16 -14
  266. package/src/containers/ScriptProperties/index.ts +1 -1
  267. package/src/containers/ScriptSettings/ScriptSettings.stories.tsx +1 -1
  268. package/src/containers/ScriptSettings/ScriptSettings.tsx +16 -11
  269. package/src/containers/ScriptSettings/index.ts +1 -1
  270. package/src/containers/TestContainer/TestContainer.tsx +4 -4
  271. package/src/containers/TestContainer/index.ts +1 -1
  272. package/src/containers/index.ts +6 -6
  273. package/src/e2e/ai.test.ts +1 -1
  274. package/src/hooks/deploy.ts +12 -5
  275. package/src/hooks/index.ts +6 -6
  276. package/src/hooks/template.ts +1 -1
  277. package/src/hooks/useCompiler.ts +8 -7
  278. package/src/hooks/useCreateAndDeployScriptTemplates.ts +10 -5
  279. package/src/hooks/useToolbarState.ts +4 -4
  280. package/src/index.ts +5 -3
  281. package/src/meta.ts +1 -1
  282. package/src/notebook/compute-graph.test.ts +2 -2
  283. package/src/notebook/compute-graph.ts +4 -4
  284. package/src/notebook/index.ts +1 -1
  285. package/src/notebook/vfs-parser.test.ts +1 -1
  286. package/src/notebook/vfs-parser.ts +1 -1
  287. package/src/operations/ScriptOperationHandlerSet.ts +3 -1
  288. package/src/operations/create-script.ts +1 -1
  289. package/src/operations/index.ts +1 -1
  290. package/src/plugin.test.ts +2 -2
  291. package/src/skills/ScriptSkill.ts +3 -1
  292. package/src/skills/functions/create.ts +4 -4
  293. package/src/skills/functions/definitions.ts +8 -6
  294. package/src/skills/functions/delete.ts +1 -1
  295. package/src/skills/functions/deploy.ts +13 -9
  296. package/src/skills/functions/errors.ts +8 -0
  297. package/src/skills/functions/index.ts +11 -11
  298. package/src/skills/functions/inspect-invocations.ts +1 -1
  299. package/src/skills/functions/install-function.ts +11 -14
  300. package/src/skills/functions/invoke.ts +5 -5
  301. package/src/skills/functions/query-deployed-functions.ts +3 -4
  302. package/src/skills/functions/read.ts +3 -2
  303. package/src/skills/functions/update.ts +3 -2
  304. package/src/skills/index.ts +1 -1
  305. package/src/templates/anthropic.ts +2 -2
  306. package/src/templates/commentary.ts +1 -1
  307. package/src/templates/forex-effect.ts +7 -4
  308. package/src/testing/index.ts +2 -2
  309. package/src/translations.ts +4 -2
  310. package/src/types/Notebook.ts +6 -4
  311. package/src/types/ScriptCapabilities.ts +3 -3
  312. package/src/types/ScriptOperation.ts +1 -1
  313. package/src/types/index.ts +5 -5
  314. package/src/util/deploy.ts +10 -7
  315. package/src/util/functions.ts +24 -15
  316. package/src/util/index.ts +2 -2
  317. package/dist/lib/chunk-compiler2.mjs +0 -76
  318. package/dist/lib/chunk-compiler2.mjs.map +0 -1
  319. package/dist/lib/chunk-util.mjs +0 -146
  320. package/dist/lib/chunk-util.mjs.map +0 -1
  321. package/dist/types/src/components/QueryEditor/QueryEditor.d.ts +0 -5
  322. package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +0 -1
  323. package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +0 -14
  324. package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +0 -1
  325. package/dist/types/src/components/QueryEditor/index.d.ts +0 -2
  326. package/dist/types/src/components/QueryEditor/index.d.ts.map +0 -1
  327. package/src/components/QueryEditor/QueryEditor.stories.tsx +0 -91
  328. package/src/components/QueryEditor/QueryEditor.tsx +0 -50
  329. package/src/components/QueryEditor/index.ts +0 -5
package/PLUGIN.mdl CHANGED
@@ -20,9 +20,10 @@ Each extension is defined in the Appendix or resolved via its URI.
20
20
  |-------------|--------------------------------|
21
21
  | `type` | `org.dxos.mdl.type@1.0` |
22
22
  | `feat` | `org.dxos.mdl.feat@1.0` |
23
- | `test` | `org.dxos.mdl.test@1.0` |
23
+ | `scenario` | `org.dxos.mdl.scenario@1.0` |
24
24
  | `component` | `org.dxos.mdl.component@1.0` |
25
- | `op` | `org.dxos.mdl.op@1.0` |
25
+ | `op` | `org.dxos.mdl.op@1.1` |
26
+ | `test` | `org.dxos.mdl.test@1.0` |
26
27
 
27
28
  ## Types
28
29
 
@@ -147,6 +148,7 @@ Skill operations (called by the Script assistant via its tool set).
147
148
 
148
149
  ```mdl
149
150
  op create
151
+ key: org.dxos.operation.script.createFunction
150
152
  desc: |
151
153
  Creates a new Script ECHO object with the given name and TypeScript source,
152
154
  and adds it to the space. Optionally seeds from a built-in template or a
@@ -157,11 +159,14 @@ op create
157
159
  templateId?: string
158
160
  output: { function: string }
159
161
  effects: [echo:write]
160
- note: Operation key `org.dxos.operation.script.create`.
162
+ note: Operation key `org.dxos.operation.script.createFunction` — NOT `.create`; that key belongs
163
+ to the UI-facing [op:createScript] below. The skill tool set and the navtree create action are
164
+ two different operations that happen to share a verb.
161
165
  ```
162
166
 
163
167
  ```mdl
164
168
  op read
169
+ key: org.dxos.operation.script.read
165
170
  desc: Reads the name, source code, and description of an existing Script.
166
171
  input:
167
172
  function: Ref<Script>
@@ -172,6 +177,7 @@ op read
172
177
 
173
178
  ```mdl
174
179
  op update
180
+ key: org.dxos.operation.script.update
175
181
  desc: |
176
182
  Applies one or more string edits (find/replace pairs) to a Script's source
177
183
  and optionally updates its name and description.
@@ -187,6 +193,7 @@ op update
187
193
 
188
194
  ```mdl
189
195
  op delete
196
+ key: org.dxos.operation.script.delete
190
197
  desc: Permanently removes a Script and its source from the space.
191
198
  input:
192
199
  function: Ref<Script>
@@ -197,6 +204,7 @@ op delete
197
204
 
198
205
  ```mdl
199
206
  op deploy
207
+ key: org.dxos.operation.script.deploy
200
208
  desc: |
201
209
  Compiles and deploys a Script to the EDGE (Cloudflare Workers) runtime.
202
210
  The source must export a single Operation handler as default.
@@ -213,6 +221,7 @@ op deploy
213
221
 
214
222
  ```mdl
215
223
  op invoke
224
+ key: org.dxos.operation.script.invoke
216
225
  desc: Calls a deployed EDGE function with an optional JSON payload.
217
226
  input:
218
227
  function: Ref<Script>
@@ -227,6 +236,7 @@ op invoke
227
236
 
228
237
  ```mdl
229
238
  op inspectInvocations
239
+ key: org.dxos.operation.script.inspectInvocations
230
240
  desc: |
231
241
  Queries the EDGE invocation trace feed for a function and returns
232
242
  recent invocation spans (id, timestamp, duration, outcome, input, error).
@@ -235,21 +245,23 @@ op inspectInvocations
235
245
  limit?: number # default 20
236
246
  output: { invocations: InvocationSpan[], total: number }
237
247
  effects: [echo:read]
238
- note: Operation key `org.dxos.function.script.inspect-invocations`.
248
+ note: Operation key `org.dxos.operation.script.inspectInvocations`.
239
249
  ```
240
250
 
241
251
  ```mdl
242
252
  op queryDeployedFunctions
253
+ key: org.dxos.operation.script.queryDeployed
243
254
  desc: Lists all functions currently deployed to the EDGE runtime.
244
255
  input:
245
256
  (none)
246
257
  output: { functions: DeployedFunction[] }
247
258
  effects: [http]
248
- note: Operation key `org.dxos.function.script.query-deployed`.
259
+ note: Operation key `org.dxos.operation.script.queryDeployed`.
249
260
  ```
250
261
 
251
262
  ```mdl
252
263
  op installFunction
264
+ key: org.dxos.operation.script.install
253
265
  desc: |
254
266
  Installs a globally-deployed EDGE function into the current space by key.
255
267
  Creates a Script ECHO object backed by the remote function.
@@ -265,6 +277,7 @@ UI-facing operation (creates Script via the navtree / "create object" flow).
265
277
 
266
278
  ```mdl
267
279
  op createScript
280
+ key: org.dxos.operation.script.create
268
281
  desc: Creates a new Script ECHO object via the Composer create-object flow.
269
282
  input:
270
283
  name?: string
@@ -273,7 +286,7 @@ op createScript
273
286
  db: Database
274
287
  output: { object: Script }
275
288
  effects: [echo:write]
276
- note: Operation key `org.dxos.plugin.script.operation.create-script`.
289
+ note: Operation key `org.dxos.operation.script.create` — corrected from `org.dxos.plugin.script.operation.create-script`, which does not exist in source.
277
290
  ```
278
291
 
279
292
  ## Features
@@ -358,7 +371,7 @@ feat F-7: Plugin Settings
358
371
  ## Acceptance
359
372
 
360
373
  ```mdl
361
- test T-1: Create script from default template
374
+ scenario T-1: Create script from default template
362
375
  given: a space is open and plugin-script is loaded
363
376
  when: user creates a new Script without template selection
364
377
  then:
@@ -368,7 +381,7 @@ test T-1: Create script from default template
368
381
  ```
369
382
 
370
383
  ```mdl
371
- test T-2: Create script from Gist
384
+ scenario T-2: Create script from Gist
372
385
  given: a public GitHub Gist URL is known
373
386
  when: user creates a Script with the Gist URL
374
387
  then:
@@ -377,7 +390,7 @@ test T-2: Create script from Gist
377
390
  ```
378
391
 
379
392
  ```mdl
380
- test T-3: Edit and persist source
393
+ scenario T-3: Edit and persist source
381
394
  given: a Script is open in ScriptArticle
382
395
  when: user edits the source
383
396
  then:
@@ -386,7 +399,7 @@ test T-3: Edit and persist source
386
399
  ```
387
400
 
388
401
  ```mdl
389
- test T-4: Deploy script
402
+ scenario T-4: Deploy script
390
403
  given: a Script with valid source following the Operation pattern
391
404
  when: user opens DeploymentDialog and confirms
392
405
  then:
@@ -395,7 +408,7 @@ test T-4: Deploy script
395
408
  ```
396
409
 
397
410
  ```mdl
398
- test T-5: Invoke deployed function
411
+ scenario T-5: Invoke deployed function
399
412
  given: a Script is deployed
400
413
  when: user opens the Execute companion and submits a payload
401
414
  then:
@@ -404,7 +417,7 @@ test T-5: Invoke deployed function
404
417
  ```
405
418
 
406
419
  ```mdl
407
- test T-6: Inspect invocations
420
+ scenario T-6: Inspect invocations
408
421
  given: a Script has been invoked at least once
409
422
  when: user opens the Logs companion
410
423
  then:
@@ -413,7 +426,7 @@ test T-6: Inspect invocations
413
426
  ```
414
427
 
415
428
  ```mdl
416
- test T-7: Skill tools resolve
429
+ scenario T-7: Skill tools resolve
417
430
  given: composer-app with plugin-script loaded
418
431
  when: AppCapabilities.SkillDefinition is queried for `org.dxos.skill.script`
419
432
  then:
@@ -423,7 +436,7 @@ test T-7: Skill tools resolve
423
436
  ```
424
437
 
425
438
  ```mdl
426
- test T-8: Agent creates and deploys script
439
+ scenario T-8: Agent creates and deploys script
427
440
  given: a Script assistant session is active
428
441
  when: agent calls op:create with a name and source
429
442
  then: a Script object is created in the space
@@ -434,7 +447,7 @@ test T-8: Agent creates and deploys script
434
447
  ```
435
448
 
436
449
  ```mdl
437
- test T-9: QueryDeployedFunctions and install
450
+ scenario T-9: QueryDeployedFunctions and install
438
451
  given: at least one function is deployed to the EDGE runtime
439
452
  when: op:queryDeployedFunctions is called
440
453
  then:
@@ -447,6 +460,69 @@ test T-9: QueryDeployedFunctions and install
447
460
 
448
461
  ---
449
462
 
463
+ ## QA
464
+
465
+ Executable tests. Each step carries a human instruction (`do`) and, where the step maps to an
466
+ invocable operation, an agent binding (`invoke`). Report failures by test and step number.
467
+
468
+ ```mdl
469
+ test QA-1: Create, edit, deploy and invoke a script
470
+ desc: The core script round-trip through the running app — the UI creates via [op:createScript];
471
+ the skill's own create/read/update path is a SEPARATE operation ([op:create], key
472
+ `org.dxos.operation.script.createFunction`) that this test does not exercise.
473
+ actors: both
474
+ covers: [F-1.2, F-2.3, F-3.2, F-4.3, T-1, T-3, T-4, T-5]
475
+ status: unverified
476
+ given:
477
+ - an identity exists
478
+ - space: a space is open
479
+ - collection: a collection in that space, to create into
480
+ - plugin-script is enabled — it is OFF by default (not in `getDefaults`); it must be enabled
481
+ via Settings -> plugin registry before "Script" appears in the create menu
482
+ - no Script named "QA Script" exists — ABORT rather than reusing one this test did not create
483
+ steps:
484
+ - name: Create the script
485
+ do: In the navtree, click + on a collection and choose Script. Name it "QA Script".
486
+ invoke: [op:createScript] { name: "QA Script", db: $given.space.db }
487
+ capture: created
488
+ expect: a Script named "QA Script" now exists, seeded from the default template
489
+ assert: return !!$created.object
490
+
491
+ - name: Place it in the collection
492
+ do: (no separate gesture — the navtree create action places it)
493
+ invoke: org.dxos.operation.space.addObject { object: $created.object, target: $given.collection }
494
+ expect: "QA Script" appears as a row under the collection
495
+
496
+ - name: Edit the source
497
+ do: In ScriptArticle, change the exported Operation's `name` field to "QA Script Op".
498
+ invoke: [op:update] { function: $created.object, edits: [{ oldString: "name: 'My Function'", newString: "name: 'QA Script Op'" }] }
499
+ expect: the editor shows the edited source
500
+ note: |
501
+ [op:update]'s runtime key is `org.dxos.operation.script.update` (skill-facing,
502
+ `services: [Database.Service]`) — distinct from the UI's own reactive `Obj.update` path a
503
+ human editing in CodeMirror actually triggers (F-2.3). Both converge on the same source field.
504
+
505
+ - name: Deploy it
506
+ do: Click Deploy in the ScriptToolbar and confirm in DeploymentDialog.
507
+ invoke: org.dxos.operation.script.deploy { function: $created.object }
508
+ capture: deployed
509
+ expect: the dialog shows a success state and, if available, a function URL
510
+ assert: return !!$deployed.function
511
+
512
+ - name: Invoke it
513
+ do: Open the Execute companion and submit an empty payload.
514
+ invoke: org.dxos.operation.script.invoke { function: $created.object, payload: {} }
515
+ expect: TestContainer displays the function's response
516
+ assert: return $result.response !== undefined
517
+ after:
518
+ - name: Delete the script
519
+ do: Right-click "QA Script" in the navtree and choose Delete.
520
+ invoke: org.dxos.operation.space.removeObjects { objects: [$created.object], target: $given.collection }
521
+ expect: the row leaves the navtree and its plank closes if it was open
522
+ ```
523
+
524
+ ---
525
+
450
526
  ## Appendix: Extension Definitions
451
527
 
452
528
  Extension block types used in this document are defined below using
@@ -474,8 +550,8 @@ ext feat
474
550
  ```
475
551
 
476
552
  ```mdl
477
- ext test
478
- uri: org.dxos.mdl.test@1.0
553
+ ext scenario
554
+ uri: org.dxos.mdl.scenario@1.0
479
555
  desc: An acceptance scenario expressed as given / when / then steps.
480
556
  fields:
481
557
  given?: Step | Step[]
package/README.md CHANGED
@@ -10,7 +10,7 @@ version: 1
10
10
  runtime:
11
11
  client:
12
12
  edgeFeatures:
13
- echoReplicator: true
13
+ subductionReplicator: true
14
14
  services:
15
15
  edge:
16
16
  url: https://edge.dxos.workers.dev/
@@ -1,9 +1,8 @@
1
1
  import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import * as Schema from "effect/Schema";
3
2
  import { Annotation, DXN, Obj, Ref, Type } from "@dxos/echo";
3
+ import * as Schema from "effect/Schema";
4
4
  import * as Instructions from "@dxos/compute/Instructions";
5
5
  import { Text } from "@dxos/schema";
6
- import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/Annotation";
7
6
  import * as Graph from "@dxos/plugin-explorer/Graph";
8
7
  //#region src/types/Notebook.ts
9
8
  var Notebook_exports = /* @__PURE__ */ __exportAll({
@@ -21,11 +20,11 @@ var Cell = Schema.Struct({
21
20
  });
22
21
  var Notebook = class extends Type.makeObject(DXN.make("org.dxos.type.notebook", "0.1.0"))(Schema.Struct({
23
22
  name: Schema.String.pipe(Schema.optional),
24
- cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false))
25
- }).pipe(LabelAnnotation.set(["name"]), Annotation.IconAnnotation.set({
23
+ cells: Cell.pipe(Schema.Array, Annotation.FormInputAnnotation.set(false))
24
+ }).pipe(Annotation.LabelAnnotation.set(["name"]), Annotation.IconAnnotation.set({
26
25
  icon: "ph--notebook--regular",
27
26
  hue: "sky"
28
- }))) {};
27
+ }), Annotation.UserType.set())) {};
29
28
  var make = (props = { cells: [] }) => Obj.make(Notebook, props);
30
29
  //#endregion
31
30
  export { Cell, Notebook, make, Notebook_exports as t };
@@ -1 +1 @@
1
- {"version":3,"file":"Notebook.mjs","names":[],"sources":["../../src/types/Notebook.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport * as Instructions from '@dxos/compute/Instructions';\nimport { Annotation, DXN, Obj, Ref, Type } from '@dxos/echo';\nimport { FormInputAnnotation } from '@dxos/echo/Annotation';\nimport { LabelAnnotation } from '@dxos/echo/Annotation';\nimport * as Graph from '@dxos/plugin-explorer/Graph';\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(Instructions.Instructions)),\n graph: Schema.optional(Ref.Ref(Graph.Graph)),\n});\n\nexport type Cell = Schema.Schema.Type<typeof Cell>;\n\nexport class Notebook extends Type.makeObject<Notebook>(DXN.make('org.dxos.type.notebook', '0.1.0'))(\n Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false)),\n }).pipe(LabelAnnotation.set(['name']), Annotation.IconAnnotation.set({ icon: 'ph--notebook--regular', hue: 'sky' })),\n) {}\n\nexport const make = (props: Obj.MakeProps<typeof Notebook> = { cells: [] }): Notebook => Obj.make(Notebook, props);\n"],"mappings":";;;;;;;;;;;;;AAeA,IAAa,OAAO,OAAO,OAAO;CAChC,IAAI,OAAO;CACX,MAAM,OAAO;CACb,MAAM,OAAO,SAAS,OAAO,MAAM;CAEnC,QAAQ,OAAO,SAAS,IAAI,IAAI,KAAK,IAAI,CAAC;CAC1C,QAAQ,OAAO,SAAS,IAAI,IAAI,aAAa,YAAY,CAAC;CAC1D,OAAO,OAAO,SAAS,IAAI,IAAI,MAAM,KAAK,CAAC;AAC7C,CAAC;AAID,IAAa,WAAb,cAA8B,KAAK,WAAqB,IAAI,KAAK,0BAA0B,OAAO,CAAC,CAAC,CAClG,OAAO,OAAO;CACZ,MAAM,OAAO,OAAO,KAAK,OAAO,QAAQ;CACxC,OAAO,KAAK,KAAK,OAAO,OAAO,oBAAoB,IAAI,KAAK,CAAC;AAC/D,CAAC,CAAC,CAAC,KAAK,gBAAgB,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,eAAe,IAAI;CAAE,MAAM;CAAyB,KAAK;AAAM,CAAC,CAAC,CACrH,CAAC,CAAC,CAAC;AAEH,IAAa,QAAQ,QAAwC,EAAE,OAAO,CAAC,EAAE,MAAgB,IAAI,KAAK,UAAU,KAAK"}
1
+ {"version":3,"file":"Notebook.mjs","names":[],"sources":["../../src/types/Notebook.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport * as Instructions from '@dxos/compute/Instructions';\nimport { Annotation, DXN, Obj, Ref, Type } from '@dxos/echo';\nimport * as Graph from '@dxos/plugin-explorer/Graph';\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(Instructions.Instructions)),\n graph: Schema.optional(Ref.Ref(Graph.Graph)),\n});\n\nexport type Cell = Schema.Schema.Type<typeof Cell>;\n\nexport class Notebook extends Type.makeObject<Notebook>(DXN.make('org.dxos.type.notebook', '0.1.0'))(\n Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n cells: Cell.pipe(Schema.Array, Annotation.FormInputAnnotation.set(false)),\n }).pipe(\n Annotation.LabelAnnotation.set(['name']),\n Annotation.IconAnnotation.set({ icon: 'ph--notebook--regular', hue: 'sky' }),\n Annotation.UserType.set(),\n ),\n) {}\n\nexport const make = (props: Obj.MakeProps<typeof Notebook> = { cells: [] }): Notebook => Obj.make(Notebook, props);\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,OAAO,OAAO,OAAO;CAChC,IAAI,OAAO;CACX,MAAM,OAAO;CACb,MAAM,OAAO,SAAS,OAAO,MAAM;CAEnC,QAAQ,OAAO,SAAS,IAAI,IAAI,KAAK,IAAI,CAAC;CAC1C,QAAQ,OAAO,SAAS,IAAI,IAAI,aAAa,YAAY,CAAC;CAC1D,OAAO,OAAO,SAAS,IAAI,IAAI,MAAM,KAAK,CAAC;AAC7C,CAAC;AAID,IAAa,WAAb,cAA8B,KAAK,WAAqB,IAAI,KAAK,0BAA0B,OAAO,CAAC,CAAC,CAClG,OAAO,OAAO;CACZ,MAAM,OAAO,OAAO,KAAK,OAAO,QAAQ;CACxC,OAAO,KAAK,KAAK,OAAO,OAAO,WAAW,oBAAoB,IAAI,KAAK,CAAC;AAC1E,CAAC,CAAC,CAAC,KACD,WAAW,gBAAgB,IAAI,CAAC,MAAM,CAAC,GACvC,WAAW,eAAe,IAAI;CAAE,MAAM;CAAyB,KAAK;AAAM,CAAC,GAC3E,WAAW,SAAS,IAAI,CAC1B,CACF,CAAC,CAAC,CAAC;AAEH,IAAa,QAAQ,QAAwC,EAAE,OAAO,CAAC,EAAE,MAAgB,IAAI,KAAK,UAAU,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScriptCapabilities.mjs","names":[],"sources":["../../src/types/ScriptCapabilities.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport type * as Atom from 'effect/unstable/reactivity/Atom';\n\nimport * as Capability from '@dxos/app-framework/Capability';\n\nimport { meta } from '#meta';\n\nimport { type Compiler as CompilerType } from '../compiler';\n\n// Inline import to avoid `Settings` namespace alias colliding with the\n// `Settings` capability export below.\nexport const Settings = Capability.makeSingleton<Atom.Writable<import('./Settings').Settings>>()(\n `${meta.profile.key}.capability.settings`,\n);\nexport const Compiler = Capability.makeSingleton<CompilerType>()(`${meta.profile.key}.capability.compiler`);\n"],"mappings":";;;;;;;;AAgBA,IAAa,WAAW,WAAW,cAA4D,CAAC,CAC9F,GAAG,KAAK,QAAQ,IAAI,qBACtB;AACA,IAAa,WAAW,WAAW,cAA4B,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,qBAAqB"}
1
+ {"version":3,"file":"ScriptCapabilities.mjs","names":[],"sources":["../../src/types/ScriptCapabilities.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport type * as Atom from 'effect/reactivity/Atom';\n\nimport * as Capability from '@dxos/app-framework/Capability';\n\nimport { meta } from '#meta';\n\nimport { type Compiler as CompilerType } from '../compiler/index.ts';\n\n// Inline import to avoid `Settings` namespace alias colliding with the\n// `Settings` capability export below.\nexport const Settings = Capability.makeSingleton<Atom.Writable<import('./Settings.ts').Settings>>()(\n `${meta.profile.key}.capability.settings`,\n);\nexport const Compiler = Capability.makeSingleton<CompilerType>()(`${meta.profile.key}.capability.compiler`);\n"],"mappings":";;;;;;;;AAgBA,IAAa,WAAW,WAAW,cAA+D,CAAC,CACjG,GAAG,KAAK,QAAQ,IAAI,qBACtB;AACA,IAAa,WAAW,WAAW,cAA4B,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,qBAAqB"}
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
2
  import { t as templates } from "./chunk-templates.mjs";
3
+ import { DXN, Database, Type } from "@dxos/echo";
3
4
  import * as Operation from "@dxos/compute/Operation";
4
5
  import * as Schema from "effect/Schema";
5
- import { DXN, Database, Type } from "@dxos/echo";
6
6
  import * as Script from "@dxos/compute/Script";
7
7
  import * as Struct from "effect/Struct";
8
8
  //#region src/types/ScriptOperation.ts
@@ -1 +1 @@
1
- {"version":3,"file":"ScriptOperation.mjs","names":[],"sources":["../../src/types/ScriptOperation.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\nimport * as Struct from 'effect/Struct';\n\nimport * as Operation from '@dxos/compute/Operation';\nimport * as Script from '@dxos/compute/Script';\nimport { Database, DXN, Type } from '@dxos/echo';\n\nimport { templates } from '../templates';\n\nexport const ScriptProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n gistUrl: Schema.optional(Schema.String.annotate({ title: 'Import from Gist (url)' })),\n initialTemplateId: Schema.Literals(templates.map(({ id }) => id)).pipe(\n Schema.annotate({ 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: {\n key: DXN.make('org.dxos.operation.script.create'),\n name: 'Create Script',\n icon: 'ph--code--regular',\n },\n input: ScriptProps.mapFields(\n Struct.assign({\n db: Database.Database,\n }),\n ),\n output: Schema.Struct({\n object: Type.getSchema(Script.Script),\n }),\n});\n"],"mappings":";;;;;;;;;;;;;AAeA,IAAa,cAAc,OAAO,OAAO;CACvC,MAAM,OAAO,SAAS,OAAO,MAAM;CACnC,SAAS,OAAO,SAAS,OAAO,OAAO,SAAS,EAAE,OAAO,yBAAyB,CAAC,CAAC;CACpF,mBAAmB,OAAO,SAAS,UAAU,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,KAChE,OAAO,SAAS,EAAE,OAAO,WAAW,CAAC,GACrC,OAAO,QACT;AACF,CAAC;AAED,IAAa,gBAAgB,OAAO,OAAO,EACzC,MAAM,OAAO,SAAS,OAAO,MAAM,EACrC,CAAC;AAED,IAAa,eAAe,UAAU,KAAK;CACzC,MAAM;EACJ,KAAK,IAAI,KAAK,kCAAkC;EAChD,MAAM;EACN,MAAM;CACR;CACA,OAAO,YAAY,UACjB,OAAO,OAAO,EACZ,IAAI,SAAS,SACf,CAAC,CACH;CACA,QAAQ,OAAO,OAAO,EACpB,QAAQ,KAAK,UAAU,OAAO,MAAM,EACtC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"ScriptOperation.mjs","names":[],"sources":["../../src/types/ScriptOperation.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\nimport * as Struct from 'effect/Struct';\n\nimport * as Operation from '@dxos/compute/Operation';\nimport * as Script from '@dxos/compute/Script';\nimport { Database, DXN, Type } from '@dxos/echo';\n\nimport { templates } from '../templates/index.ts';\n\nexport const ScriptProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n gistUrl: Schema.optional(Schema.String.annotate({ title: 'Import from Gist (url)' })),\n initialTemplateId: Schema.Literals(templates.map(({ id }) => id)).pipe(\n Schema.annotate({ 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: {\n key: DXN.make('org.dxos.operation.script.create'),\n name: 'Create Script',\n icon: 'ph--code--regular',\n },\n input: ScriptProps.mapFields(\n Struct.assign({\n db: Database.Database,\n }),\n ),\n output: Schema.Struct({\n object: Type.getSchema(Script.Script),\n }),\n});\n"],"mappings":";;;;;;;;;;;;;AAeA,IAAa,cAAc,OAAO,OAAO;CACvC,MAAM,OAAO,SAAS,OAAO,MAAM;CACnC,SAAS,OAAO,SAAS,OAAO,OAAO,SAAS,EAAE,OAAO,yBAAyB,CAAC,CAAC;CACpF,mBAAmB,OAAO,SAAS,UAAU,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,KAChE,OAAO,SAAS,EAAE,OAAO,WAAW,CAAC,GACrC,OAAO,QACT;AACF,CAAC;AAED,IAAa,gBAAgB,OAAO,OAAO,EACzC,MAAM,OAAO,SAAS,OAAO,MAAM,EACrC,CAAC;AAED,IAAa,eAAe,UAAU,KAAK;CACzC,MAAM;EACJ,KAAK,IAAI,KAAK,kCAAkC;EAChD,MAAM;EACN,MAAM;CACR;CACA,OAAO,YAAY,UACjB,OAAO,OAAO,EACZ,IAAI,SAAS,SACf,CAAC,CACH;CACA,QAAQ,OAAO,OAAO,EACpB,QAAQ,KAAK,UAAU,OAAO,MAAM,EACtC,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScriptOperationHandlerSet.mjs","names":[],"sources":["../../src/operations/ScriptOperationHandlerSet.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Operation from '@dxos/compute/Operation';\nimport * as OperationHandlerSet from '@dxos/compute/OperationHandlerSet';\n\nimport { ScriptOperation } from '#types';\n\nexport const handlers = OperationHandlerSet.lazy([\n ScriptOperation.CreateScript.pipe(Operation.lazyHandler(() => import('./create-script'))),\n]);\n"],"mappings":";;;;;;AASA,IAAa,WAAW,oBAAoB,KAAK,CAC/C,gBAAgB,aAAa,KAAK,UAAU,kBAAkB,OAAO,4BAAkB,CAAC,CAC1F,CAAC"}
1
+ {"version":3,"file":"ScriptOperationHandlerSet.mjs","names":[],"sources":["../../src/operations/ScriptOperationHandlerSet.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Operation from '@dxos/compute/Operation';\nimport * as OperationHandlerSet from '@dxos/compute/OperationHandlerSet';\n\nimport { ScriptOperation } from '#types';\n\nexport const handlers = OperationHandlerSet.lazy([\n ScriptOperation.CreateScript.pipe(Operation.lazyHandler(() => import('./create-script.ts'))),\n]);\n"],"mappings":";;;;;;AAWA,IAAa,WAAW,oBAAoB,KAAK,CAC/C,gBAAgB,aAAa,KAAK,UAAU,kBAAkB,OAAO,4BAAqB,CAAC,CAC7F,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
- import { a as InspectInvocations, c as QueryDeployedFunctions, i as Deploy, l as Read, n as Create, o as InstallFunction, r as Delete, s as Invoke, u as Update } from "./chunk-functions.mjs";
2
+ import { a as InstallFunction, c as Read, i as InspectInvocations, l as Update, n as Delete, o as Invoke, r as Deploy, s as QueryDeployedFunctions, t as Create } from "./chunk-definitions.mjs";
3
3
  import * as Skill from "@dxos/compute/Skill";
4
4
  import * as Template from "@dxos/compute/Template";
5
5
  import { trim } from "@dxos/util";
@@ -1 +1 @@
1
- {"version":3,"file":"ScriptSkill.mjs","names":[],"sources":["../../src/skills/ScriptSkill.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Skill from '@dxos/compute/Skill';\nimport * as Template from '@dxos/compute/Template';\nimport { trim } from '@dxos/util';\n\nimport {\n Create,\n Delete,\n Deploy,\n InspectInvocations,\n InstallFunction,\n Invoke,\n QueryDeployedFunctions,\n Read,\n Update,\n} from './functions';\n\nconst SKILL_KEY = 'org.dxos.skill.script';\n\nexport const key = SKILL_KEY;\n\nexport const make = (): Skill.Skill =>\n Skill.make({\n key: SKILL_KEY,\n name: 'Script',\n agentCanEnable: true,\n tools: Skill.toolDefinitions({\n operations: [\n Create,\n Read,\n Update,\n Delete,\n Deploy,\n Invoke,\n InspectInvocations,\n QueryDeployedFunctions,\n InstallFunction,\n ],\n }),\n instructions: Template.make({\n source: trim`\n You can create, read, update, and delete scripts which contain TypeScript code.\n You can deploy scripts to the Edge runtime and invoke deployed scripts.\n You can inspect the invocation history of a deployed script.\n You can query all functions deployed to the EDGE runtime and install them into the current space.\n `,\n }),\n });\n"],"mappings":";;;;;;;;;;AAoBA,IAAM,YAAY;AAElB,IAAa,MAAM;AAEnB,IAAa,aACX,MAAM,KAAK;CACT,KAAK;CACL,MAAM;CACN,gBAAgB;CAChB,OAAO,MAAM,gBAAgB,EAC3B,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EACF,CAAC;CACD,cAAc,SAAS,KAAK,EAC1B,QAAQ,IAAI;;;;;QAMd,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"ScriptSkill.mjs","names":[],"sources":["../../src/skills/ScriptSkill.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Skill from '@dxos/compute/Skill';\nimport * as Template from '@dxos/compute/Template';\nimport { trim } from '@dxos/util';\n\nimport {\n Create,\n Delete,\n Deploy,\n InspectInvocations,\n InstallFunction,\n Invoke,\n QueryDeployedFunctions,\n Read,\n Update,\n} from './functions/index.ts';\n\nconst SKILL_KEY = 'org.dxos.skill.script';\n\nexport const key = SKILL_KEY;\n\nexport const make = (): Skill.Skill =>\n Skill.make({\n key: SKILL_KEY,\n name: 'Script',\n agentCanEnable: true,\n tools: Skill.toolDefinitions({\n operations: [\n Create,\n Read,\n Update,\n Delete,\n Deploy,\n Invoke,\n InspectInvocations,\n QueryDeployedFunctions,\n InstallFunction,\n ],\n }),\n instructions: Template.make({\n source: trim`\n You can create, read, update, and delete scripts which contain TypeScript code.\n You can deploy scripts to the Edge runtime and invoke deployed scripts.\n You can inspect the invocation history of a deployed script.\n You can query all functions deployed to the EDGE runtime and install them into the current space.\n `,\n }),\n });\n"],"mappings":";;;;;;;;;;AAsBA,IAAM,YAAY;AAElB,IAAa,MAAM;AAEnB,IAAa,aACX,MAAM,KAAK;CACT,KAAK;CACL,MAAM;CACN,gBAAgB;CAChB,OAAO,MAAM,gBAAgB,EAC3B,YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EACF,CAAC;CACD,cAAc,SAAS,KAAK,EAC1B,QAAQ,IAAI;;;;;QAMd,CAAC;AACH,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
2
+ import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
3
+ import * as Capability from "@dxos/app-framework/Capability";
4
+ import * as AppCapability from "@dxos/app-toolkit/AppCapability";
5
+ import { translations } from "#translations";
6
+ import { ScriptCapabilities, ScriptEvents } from "#types";
7
+ import * as SpaceCapability from "@dxos/plugin-space/SpaceCapability";
8
+ import { meta } from "#meta";
9
+ //#region src/capabilities/gen/browser.ts
10
+ var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), { environments: [
11
+ "browser",
12
+ "node",
13
+ "tauri"
14
+ ] });
15
+ var Schema = AppCapability.schema(() => import("./chunk-schema.mjs"));
16
+ var SkillDefinition = AppCapability.skillDefinition(() => import("./chunk-skill-definition.mjs"), { environments: [
17
+ "browser",
18
+ "node",
19
+ "tauri"
20
+ ] });
21
+ var CreateObject = SpaceCapability.createObject(() => import("./chunk-create-object.mjs"), { environments: [
22
+ "browser",
23
+ "node",
24
+ "tauri"
25
+ ] });
26
+ var Compiler = Capability.lazyModule("Compiler", {
27
+ provides: [ScriptCapabilities.Compiler],
28
+ activatesOn: ScriptEvents.SetupCompiler
29
+ }, () => import("./chunk-compiler.mjs"));
30
+ var OperationHandler = AppCapability.operationHandler(() => import("./chunk-operation-handler.mjs"), { activatesOn: ActivationEvents.Idle });
31
+ var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: [
32
+ "org.dxos.role.article",
33
+ "org.dxos.role.dialog",
34
+ "org.dxos.role.objectProperties",
35
+ "org.dxos.role.section"
36
+ ] });
37
+ var ScriptSettings = AppCapability.settings(() => import("./chunk-settings.mjs"), {
38
+ activatesOn: ActivationEvents.Idle,
39
+ provides: [ScriptCapabilities.Settings]
40
+ });
41
+ var Translations = AppCapability.translations(translations);
42
+ var PluginAsset = AppCapability.pluginAsset({
43
+ pluginId: meta.profile.key,
44
+ path: "PLUGIN.mdl",
45
+ content: PLUGIN_default,
46
+ mimeType: "application/x-mdl"
47
+ });
48
+ //#endregion
49
+ export { AppGraphBuilder, Compiler, CreateObject, OperationHandler, PluginAsset, ReactSurface, Schema, ScriptSettings, SkillDefinition, Translations };
50
+
51
+ //# sourceMappingURL=capabilities.browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.browser.mjs","names":[],"sources":["../../src/capabilities/gen/browser.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { ScriptCapabilities, ScriptEvents } from '#types';\n\nimport pluginSpec from '../../../PLUGIN.mdl?raw';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const CreateObject = SpaceCapability.createObject(() => import('../create-object.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const Compiler = Capability.lazyModule(\n 'Compiler',\n {\n provides: [ScriptCapabilities.Compiler],\n // Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.\n activatesOn: ScriptEvents.SetupCompiler,\n },\n () => import('../compiler.ts'),\n);\n\nexport const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {\n activatesOn: ActivationEvents.Idle,\n});\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.role.article', 'org.dxos.role.dialog', 'org.dxos.role.objectProperties', 'org.dxos.role.section'],\n});\n\nexport const ScriptSettings = AppCapability.settings(() => import('../settings.ts'), {\n activatesOn: ActivationEvents.Idle,\n provides: [ScriptCapabilities.Settings],\n});\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n"],"mappings":";;;;;;;;;AAiBA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA4B,EACpG,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,iCAA2B,EACnG,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AAED,IAAa,eAAe,gBAAgB,mBAAmB,OAAO,8BAAwB,EAC5F,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AAED,IAAa,WAAW,WAAW,WACjC,YACA;CACE,UAAU,CAAC,mBAAmB,QAAQ;CAEtC,aAAa,aAAa;AAC5B,SACM,OAAO,uBACf;AAEA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAA4B,EACtG,aAAa,iBAAiB,KAChC,CAAC;AAED,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAwB,EACrF,OAAO;CAAC;CAAyB;CAAwB;CAAkC;AAAuB,EACpH,CAAC;AAED,IAAa,iBAAiB,cAAc,eAAe,OAAO,yBAAmB;CACnF,aAAa,iBAAiB;CAC9B,UAAU,CAAC,mBAAmB,QAAQ;AACxC,CAAC;AAED,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
1
2
  import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
2
3
  import * as Capability from "@dxos/app-framework/Capability";
3
4
  import * as AppCapability from "@dxos/app-toolkit/AppCapability";
@@ -5,18 +6,27 @@ import { translations } from "#translations";
5
6
  import { ScriptCapabilities, ScriptEvents } from "#types";
6
7
  import * as SpaceCapability from "@dxos/plugin-space/SpaceCapability";
7
8
  import { meta } from "#meta";
8
- //#region PLUGIN.mdl?raw
9
- var PLUGIN_default = "---\nid: org.dxos.plugin.script\nname: ScriptPlugin\nversion: 0.1.0\n---\n\nA scripting plugin for `DXOS` Composer that lets users write, deploy, and run custom TypeScript functions as\nECHO objects inside their spaces.\nScripts execute on the Cloudflare Workers-based EDGE runtime and can call DXOS SDK packages, Effect-TS,\nand a curated set of third-party libraries.\nAn AI assistant skill wires CRUD, deploy, invoke, and inspection operations as tools so an agent can\nscaffold, iterate, and test scripts entirely within a chat session.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Script\n desc: |\n Root ECHO object (typename from @dxos/compute Script.Script).\n Represents a single deployable TypeScript function.\n fields:\n name?: string\n source: string # TypeScript source, must follow Operation pattern\n description?: string\n```\n\n```mdl\ntype Notebook\n desc: |\n Root ECHO object for a multi-cell notebook view.\n Each cell is a Script; the Notebook provides a sequential execution surface.\n fields:\n name?: string\n```\n\n```mdl\ntype Settings\n desc: Plugin-scoped settings atom. Persisted across sessions.\n fields:\n editorInputMode?: EditorInputMode # default, vim, or emacs keybindings\n```\n\n```mdl\ntype InvocationSpan\n desc: A single function invocation record from the EDGE trace feed.\n fields:\n id: string\n timestamp: number # epoch ms\n duration: number # ms\n outcome: success | failure | pending\n input: object\n error?: object\n```\n\n```mdl\ntype DeployedFunction\n desc: Metadata about a function already deployed to the EDGE runtime.\n fields:\n key?: string # unique key; pass to InstallFunction\n name: string\n version: string\n description?: string\n updated?: string # ISO timestamp\n```\n\n## Components\n\n```mdl\ncomponent ScriptArticle\n desc: |\n Primary editor surface for a Script object. Rendered for the Article and\n Section roles. Shows a TypeScript CodeMirror editor with syntax highlight,\n lint, and completion. Companion panels (Execute and Logs) are available\n via the app graph for running and inspecting the script.\n props:\n role: string\n subject: Script\n attendableId?: string\n settings?: Settings\n env?: CompilerEnvironment\n layout: |\n ┌──────────────────────────────────────┐\n │ ScriptToolbar (run, deploy, …) │\n ├──────────────────────────────────────┤\n │ TypescriptEditor (CodeMirror) │\n │ │\n │ // script source │\n └──────────────────────────────────────┘\n```\n\n```mdl\ncomponent NotebookArticle\n desc: |\n Multi-cell notebook surface for a Notebook object. Each cell renders a\n ScriptArticle in Section role. Cells can be added, removed, and reordered.\n props:\n role: string\n subject: Notebook\n attendableId?: string\n env?: CompilerEnvironment\n```\n\n```mdl\ncomponent TestContainer\n desc: |\n Execute companion panel. Renders a form driven by the script's Operation\n input schema; submits the form to invoke the script and shows the response.\n props:\n script: Script\n role: string\n```\n\n```mdl\ncomponent DeploymentDialog\n desc: |\n Dialog for deploying or redeploying a Script to the EDGE runtime.\n Shows current deployment status and lets the user trigger a new deployment.\n props:\n script: Script\n```\n\n```mdl\ncomponent ScriptPluginSettings\n desc: Plugin settings panel; exposes editor keybinding mode selector.\n props:\n settings: Settings\n onSettingsChange: (settings: Settings) → void\n onAuthenticate: () → Promise<void>\n```\n\n## Operations\n\nSkill operations (called by the Script assistant via its tool set).\n\n```mdl\nop create\n desc: |\n Creates a new Script ECHO object with the given name and TypeScript source,\n and adds it to the space. Optionally seeds from a built-in template or a\n GitHub Gist URL. Returns a function reference ID.\n input:\n name: string\n source?: string\n templateId?: string\n output: { function: string }\n effects: [echo:write]\n note: Operation key `org.dxos.operation.script.create`.\n```\n\n```mdl\nop read\n desc: Reads the name, source code, and description of an existing Script.\n input:\n function: Ref<Script>\n output: { name?: string, source: string, description?: string }\n effects: [echo:read]\n note: Operation key `org.dxos.operation.script.read`.\n```\n\n```mdl\nop update\n desc: |\n Applies one or more string edits (find/replace pairs) to a Script's source\n and optionally updates its name and description.\n input:\n function: Ref<Script>\n name?: string\n description?: string\n edits?: { oldString: string, newString: string, replaceAll?: boolean }[]\n output: { function: string }\n effects: [echo:read, echo:write]\n note: Operation key `org.dxos.operation.script.update`.\n```\n\n```mdl\nop delete\n desc: Permanently removes a Script and its source from the space.\n input:\n function: Ref<Script>\n output: void\n effects: [echo:read, echo:write]\n note: Operation key `org.dxos.operation.script.delete`.\n```\n\n```mdl\nop deploy\n desc: |\n Compiles and deploys a Script to the EDGE (Cloudflare Workers) runtime.\n The source must export a single Operation handler as default.\n Returns the deployed function ID and optional public URL.\n input:\n function: Ref<Script>\n output: { function: string, functionUrl?: string }\n effects: [echo:read, http]\n errors:\n CompileError: TypeScript source fails to compile\n DeploymentFailed: EDGE runtime rejected the deployment\n note: Operation key `org.dxos.operation.script.deploy`.\n```\n\n```mdl\nop invoke\n desc: Calls a deployed EDGE function with an optional JSON payload.\n input:\n function: Ref<Script>\n payload?: unknown\n output: { response: unknown }\n effects: [http]\n errors:\n NotDeployed: function has not been deployed\n InvocationError: function threw at runtime\n note: Operation key `org.dxos.operation.script.invoke`.\n```\n\n```mdl\nop inspectInvocations\n desc: |\n Queries the EDGE invocation trace feed for a function and returns\n recent invocation spans (id, timestamp, duration, outcome, input, error).\n input:\n function: Ref<Script>\n limit?: number # default 20\n output: { invocations: InvocationSpan[], total: number }\n effects: [echo:read]\n note: Operation key `org.dxos.function.script.inspect-invocations`.\n```\n\n```mdl\nop queryDeployedFunctions\n desc: Lists all functions currently deployed to the EDGE runtime.\n input:\n (none)\n output: { functions: DeployedFunction[] }\n effects: [http]\n note: Operation key `org.dxos.function.script.query-deployed`.\n```\n\n```mdl\nop installFunction\n desc: |\n Installs a globally-deployed EDGE function into the current space by key.\n Creates a Script ECHO object backed by the remote function.\n The returned function ID can be passed directly to op:invoke.\n input:\n key: string\n output: { function: string, name: string, version: string }\n effects: [echo:write, http]\n note: Operation key `org.dxos.operation.script.install`.\n```\n\nUI-facing operation (creates Script via the navtree / \"create object\" flow).\n\n```mdl\nop createScript\n desc: Creates a new Script ECHO object via the Composer create-object flow.\n input:\n name?: string\n gistUrl?: string\n initialTemplateId?: string\n db: Database\n output: { object: Script }\n effects: [echo:write]\n note: Operation key `org.dxos.plugin.script.operation.create-script`.\n```\n\n## Features\n\n```mdl\nfeat F-1: Script ECHO Object\n\n req F-1.1: Script objects are registered via `addSchemaModule` and visible in space object lists.\n req F-1.2: Script objects can be created from the navtree \"+\" menu.\n req F-1.3:\n when: user creates a Script without a template\n then: source is seeded from the default template\n req F-1.4:\n when: user provides a GitHub Gist URL\n then: gist content is fetched and used as initial source\n```\n\n```mdl\nfeat F-2: Script Editor\n\n req F-2.1: ScriptArticle renders a TypeScript-aware CodeMirror editor for the Article role.\n req F-2.2: Editor keybinding mode (default/vim/emacs) is configurable via plugin settings.\n req F-2.3: Changes to source are persisted to the Script ECHO object reactively.\n req F-2.4:\n when: script object changes externally (peer edit)\n then: editor content updates without losing cursor position if possible\n```\n\n```mdl\nfeat F-3: Deploy to EDGE\n\n req F-3.1: A Deploy button in the ScriptToolbar opens the DeploymentDialog.\n req F-3.2:\n when: user confirms deployment\n then: op:deploy is called; script compiled and sent to EDGE runtime\n req F-3.3:\n when: compilation fails\n then: error messages are surfaced to the user; no deployment occurs\n req F-3.4:\n when: deployment succeeds\n then: dialog shows the function URL (if available)\n```\n\n```mdl\nfeat F-4: Execute Companion\n\n req F-4.1: An \"Execute\" companion node is added to every Script in the app graph.\n req F-4.2: TestContainer renders a form derived from the script's Operation input schema.\n req F-4.3:\n when: user submits the form\n then: op:invoke is called with the form payload; response displayed\n req F-4.4: A \"Logs\" companion node shows the invocation trace via InvocationTraceContainer.\n```\n\n```mdl\nfeat F-5: Script Skill\n\n req F-5.1: A skill with key `org.dxos.skill.script` is contributed via `addSkillDefinitionModule`.\n req F-5.2: Skill tool set includes: create, read, update, delete, deploy, invoke,\n inspectInvocations, queryDeployedFunctions, installFunction.\n req F-5.3: System instructions describe the EDGE Operation pattern, required export format,\n and available packages.\n req F-5.4: Skill is agent-enabled; the assistant can activate it autonomously.\n```\n\n```mdl\nfeat F-6: Notebook\n\n req F-6.1: Notebook objects are registered and can be created from the navtree.\n req F-6.2: NotebookArticle renders each linked Script as a sequential cell.\n req F-6.3: Cells can be added and removed independently.\n```\n\n```mdl\nfeat F-7: Plugin Settings\n\n req F-7.1: ScriptPluginSettings is rendered via the app settings surface.\n req F-7.2: Editor input mode is persisted in the Settings atom.\n req F-7.3: An Authenticate button lets the user write an access credential to HALO.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Create script from default template\n given: a space is open and plugin-script is loaded\n when: user creates a new Script without template selection\n then:\n - a Script object appears in the space\n - its source contains the default template code\n - ScriptArticle renders the source in the editor\n```\n\n```mdl\ntest T-2: Create script from Gist\n given: a public GitHub Gist URL is known\n when: user creates a Script with the Gist URL\n then:\n - gist content is fetched and stored as the script source\n - editor shows the fetched content\n```\n\n```mdl\ntest T-3: Edit and persist source\n given: a Script is open in ScriptArticle\n when: user edits the source\n then:\n - the Script ECHO object's source field is updated\n - closing and reopening the article shows the same content\n```\n\n```mdl\ntest T-4: Deploy script\n given: a Script with valid source following the Operation pattern\n when: user opens DeploymentDialog and confirms\n then:\n - op:deploy succeeds\n - dialog shows success state and function URL\n```\n\n```mdl\ntest T-5: Invoke deployed function\n given: a Script is deployed\n when: user opens the Execute companion and submits a payload\n then:\n - op:invoke is called with the payload\n - response is displayed in TestContainer\n```\n\n```mdl\ntest T-6: Inspect invocations\n given: a Script has been invoked at least once\n when: user opens the Logs companion\n then:\n - InvocationTraceContainer shows at least one invocation span\n - span includes timestamp, duration, and outcome\n```\n\n```mdl\ntest T-7: Skill tools resolve\n given: composer-app with plugin-script loaded\n when: AppCapabilities.SkillDefinition is queried for `org.dxos.skill.script`\n then:\n - skill is present\n - tool set includes create, read, update, delete, deploy, invoke,\n inspectInvocations, queryDeployedFunctions, and installFunction\n```\n\n```mdl\ntest T-8: Agent creates and deploys script\n given: a Script assistant session is active\n when: agent calls op:create with a name and source\n then: a Script object is created in the space\n when: agent calls op:deploy\n then: function is deployed; op returns a function ID\n when: agent calls op:invoke with a payload\n then: response is returned without error\n```\n\n```mdl\ntest T-9: QueryDeployedFunctions and install\n given: at least one function is deployed to the EDGE runtime\n when: op:queryDeployedFunctions is called\n then:\n - result contains at least one DeployedFunction entry\n when: op:installFunction is called with that entry's key\n then:\n - a new Script ECHO object appears in the space\n - op returns the function ID, name, and version\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive — the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n";
10
- //#endregion
11
9
  //#region src/capabilities/index.ts
12
- var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), { environments: ["node"] });
10
+ var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), { environments: [
11
+ "browser",
12
+ "node",
13
+ "tauri"
14
+ ] });
13
15
  var Schema = AppCapability.schema(() => import("./chunk-schema.mjs"));
14
- var SkillDefinition = AppCapability.skillDefinition(() => import("./chunk-skill-definition.mjs"), { environments: ["node"] });
15
- var CreateObject = SpaceCapability.createObject(() => import("./chunk-create-object.mjs"), { environments: ["node"] });
16
+ var SkillDefinition = AppCapability.skillDefinition(() => import("./chunk-skill-definition.mjs"), { environments: [
17
+ "browser",
18
+ "node",
19
+ "tauri"
20
+ ] });
21
+ var CreateObject = SpaceCapability.createObject(() => import("./chunk-create-object.mjs"), { environments: [
22
+ "browser",
23
+ "node",
24
+ "tauri"
25
+ ] });
16
26
  var Compiler = Capability.lazyModule("Compiler", {
17
27
  provides: [ScriptCapabilities.Compiler],
18
28
  activatesOn: ScriptEvents.SetupCompiler
19
- }, () => import("./chunk-compiler2.mjs"));
29
+ }, () => import("./chunk-compiler.mjs"));
20
30
  var OperationHandler = AppCapability.operationHandler(() => import("./chunk-operation-handler.mjs"), { activatesOn: ActivationEvents.Idle });
21
31
  var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: [
22
32
  "org.dxos.role.article",
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { ScriptCapabilities, ScriptEvents } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../../PLUGIN.mdl?raw';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder'), {\n environments: ['node'],\n});\nexport const Schema = AppCapability.schema(() => import('./schema'));\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('./skill-definition'), {\n environments: ['node'],\n});\nexport const CreateObject = SpaceCapability.createObject(() => import('./create-object'), {\n environments: ['node'],\n});\nexport const Compiler = Capability.lazyModule(\n 'Compiler',\n {\n provides: [ScriptCapabilities.Compiler],\n // Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.\n activatesOn: ScriptEvents.SetupCompiler,\n },\n () => import('./compiler'),\n);\nexport const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler'), {\n activatesOn: ActivationEvents.Idle,\n});\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface'), {\n roles: ['org.dxos.role.article', 'org.dxos.role.dialog', 'org.dxos.role.objectProperties', 'org.dxos.role.section'],\n});\nexport const ScriptSettings = AppCapability.settings(() => import('./settings'), {\n activatesOn: ActivationEvents.Idle,\n provides: [ScriptCapabilities.Settings],\n});\nexport const Translations = AppCapability.translations(translations);\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n"],"mappings":";;;;;;;;;;;AAgBA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAAwB,EAChG,cAAc,CAAC,MAAM,EACvB,CAAC;AACD,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAW;AACnE,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,iCAAuB,EAC/F,cAAc,CAAC,MAAM,EACvB,CAAC;AACD,IAAa,eAAe,gBAAgB,mBAAmB,OAAO,8BAAoB,EACxF,cAAc,CAAC,MAAM,EACvB,CAAC;AACD,IAAa,WAAW,WAAW,WACjC,YACA;CACE,UAAU,CAAC,mBAAmB,QAAQ;CAEtC,aAAa,aAAa;AAC5B,SACM,OAAO,wBACf;AACA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAAwB,EAClG,aAAa,iBAAiB,KAChC,CAAC;AACD,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAoB,EACjF,OAAO;CAAC;CAAyB;CAAwB;CAAkC;AAAuB,EACpH,CAAC;AACD,IAAa,iBAAiB,cAAc,eAAe,OAAO,yBAAe;CAC/E,aAAa,iBAAiB;CAC9B,UAAU,CAAC,mBAAmB,QAAQ;AACxC,CAAC;AACD,IAAa,eAAe,cAAc,aAAa,YAAY;AACnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC"}
1
+ {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { ScriptCapabilities, ScriptEvents } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../../PLUGIN.mdl?raw';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\nexport const Schema = AppCapability.schema(() => import('./schema.ts'));\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('./skill-definition.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\nexport const CreateObject = SpaceCapability.createObject(() => import('./create-object.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\nexport const Compiler = Capability.lazyModule(\n 'Compiler',\n {\n provides: [ScriptCapabilities.Compiler],\n // Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.\n activatesOn: ScriptEvents.SetupCompiler,\n },\n () => import('./compiler.ts'),\n);\nexport const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler.ts'), {\n activatesOn: ActivationEvents.Idle,\n});\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface.ts'), {\n roles: ['org.dxos.role.article', 'org.dxos.role.dialog', 'org.dxos.role.objectProperties', 'org.dxos.role.section'],\n});\nexport const ScriptSettings = AppCapability.settings(() => import('./settings.ts'), {\n activatesOn: ActivationEvents.Idle,\n provides: [ScriptCapabilities.Settings],\n});\nexport const Translations = AppCapability.translations(translations);\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n"],"mappings":";;;;;;;;;AAgBA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA2B,EACnG,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AACD,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAc;AACtE,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,iCAA0B,EAClG,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AACD,IAAa,eAAe,gBAAgB,mBAAmB,OAAO,8BAAuB,EAC3F,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AACD,IAAa,WAAW,WAAW,WACjC,YACA;CACE,UAAU,CAAC,mBAAmB,QAAQ;CAEtC,aAAa,aAAa;AAC5B,SACM,OAAO,uBACf;AACA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAA2B,EACrG,aAAa,iBAAiB,KAChC,CAAC;AACD,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAuB,EACpF,OAAO;CAAC;CAAyB;CAAwB;CAAkC;AAAuB,EACpH,CAAC;AACD,IAAa,iBAAiB,cAAc,eAAe,OAAO,yBAAkB;CAClF,aAAa,iBAAiB;CAC9B,UAAU,CAAC,mBAAmB,QAAQ;AACxC,CAAC;AACD,IAAa,eAAe,cAAc,aAAa,YAAY;AACnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC"}
@@ -5,14 +5,26 @@ import { translations } from "#translations";
5
5
  import { ScriptCapabilities, ScriptEvents } from "#types";
6
6
  import * as SpaceCapability from "@dxos/plugin-space/SpaceCapability";
7
7
  //#region src/capabilities/gen/node.ts
8
- var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), { environments: ["node"] });
8
+ var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), { environments: [
9
+ "browser",
10
+ "node",
11
+ "tauri"
12
+ ] });
9
13
  var Schema = AppCapability.schema(() => import("./chunk-schema.mjs"));
10
- var SkillDefinition = AppCapability.skillDefinition(() => import("./chunk-skill-definition.mjs"), { environments: ["node"] });
11
- var CreateObject = SpaceCapability.createObject(() => import("./chunk-create-object.mjs"), { environments: ["node"] });
14
+ var SkillDefinition = AppCapability.skillDefinition(() => import("./chunk-skill-definition.mjs"), { environments: [
15
+ "browser",
16
+ "node",
17
+ "tauri"
18
+ ] });
19
+ var CreateObject = SpaceCapability.createObject(() => import("./chunk-create-object.mjs"), { environments: [
20
+ "browser",
21
+ "node",
22
+ "tauri"
23
+ ] });
12
24
  var Compiler = Capability.lazyModule("Compiler", {
13
25
  provides: [ScriptCapabilities.Compiler],
14
26
  activatesOn: ScriptEvents.SetupCompiler
15
- }, () => import("./chunk-compiler2.mjs"));
27
+ }, () => import("./chunk-compiler.mjs"));
16
28
  var OperationHandler = AppCapability.operationHandler(() => import("./chunk-operation-handler.mjs"), { activatesOn: ActivationEvents.Idle });
17
29
  var ScriptSettings = AppCapability.settings(() => import("./chunk-settings.mjs"), {
18
30
  activatesOn: ActivationEvents.Idle,
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.node.mjs","names":[],"sources":["../../src/capabilities/gen/node.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'node' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { translations } from '#translations';\nimport { ScriptCapabilities, ScriptEvents } from '#types';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder'), {\n environments: ['node'],\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema'));\n\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition'), {\n environments: ['node'],\n});\n\nexport const CreateObject = SpaceCapability.createObject(() => import('../create-object'), {\n environments: ['node'],\n});\n\nexport const Compiler = Capability.lazyModule(\n 'Compiler',\n {\n provides: [ScriptCapabilities.Compiler],\n // Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.\n activatesOn: ScriptEvents.SetupCompiler,\n },\n () => import('../compiler'),\n);\n\nexport const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler'), {\n activatesOn: ActivationEvents.Idle,\n});\n\nexport const ScriptSettings = AppCapability.settings(() => import('../settings'), {\n activatesOn: ActivationEvents.Idle,\n provides: [ScriptCapabilities.Settings],\n});\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const PluginAsset = undefined;\nexport const ReactSurface = undefined;\n"],"mappings":";;;;;;;AAcA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAAyB,EACjG,cAAc,CAAC,MAAM,EACvB,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAY;AAEpE,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,iCAAwB,EAChG,cAAc,CAAC,MAAM,EACvB,CAAC;AAED,IAAa,eAAe,gBAAgB,mBAAmB,OAAO,8BAAqB,EACzF,cAAc,CAAC,MAAM,EACvB,CAAC;AAED,IAAa,WAAW,WAAW,WACjC,YACA;CACE,UAAU,CAAC,mBAAmB,QAAQ;CAEtC,aAAa,aAAa;AAC5B,SACM,OAAO,wBACf;AAEA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAAyB,EACnG,aAAa,iBAAiB,KAChC,CAAC;AAED,IAAa,iBAAiB,cAAc,eAAe,OAAO,yBAAgB;CAChF,aAAa,iBAAiB;CAC9B,UAAU,CAAC,mBAAmB,QAAQ;AACxC,CAAC;AAED,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,cAAc,KAAA;AAC3B,IAAa,eAAe,KAAA"}
1
+ {"version":3,"file":"capabilities.node.mjs","names":[],"sources":["../../src/capabilities/gen/node.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'node' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as SpaceCapability from '@dxos/plugin-space/SpaceCapability';\n\nimport { translations } from '#translations';\nimport { ScriptCapabilities, ScriptEvents } from '#types';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const CreateObject = SpaceCapability.createObject(() => import('../create-object.ts'), {\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const Compiler = Capability.lazyModule(\n 'Compiler',\n {\n provides: [ScriptCapabilities.Compiler],\n // Genuine runtime event: the compiler is only loaded on demand (`hooks/useCompiler.ts`), not at startup.\n activatesOn: ScriptEvents.SetupCompiler,\n },\n () => import('../compiler.ts'),\n);\n\nexport const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {\n activatesOn: ActivationEvents.Idle,\n});\n\nexport const ScriptSettings = AppCapability.settings(() => import('../settings.ts'), {\n activatesOn: ActivationEvents.Idle,\n provides: [ScriptCapabilities.Settings],\n});\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const PluginAsset = undefined;\nexport const ReactSurface = undefined;\n"],"mappings":";;;;;;;AAcA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA4B,EACpG,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,iCAA2B,EACnG,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AAED,IAAa,eAAe,gBAAgB,mBAAmB,OAAO,8BAAwB,EAC5F,cAAc;CAAC;CAAW;CAAQ;AAAO,EAC3C,CAAC;AAED,IAAa,WAAW,WAAW,WACjC,YACA;CACE,UAAU,CAAC,mBAAmB,QAAQ;CAEtC,aAAa,aAAa;AAC5B,SACM,OAAO,uBACf;AAEA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAA4B,EACtG,aAAa,iBAAiB,KAChC,CAAC;AAED,IAAa,iBAAiB,cAAc,eAAe,OAAO,yBAAmB;CACnF,aAAa,iBAAiB;CAC9B,UAAU,CAAC,mBAAmB,QAAQ;AACxC,CAAC;AAED,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,cAAc,KAAA;AAC3B,IAAa,eAAe,KAAA"}