@dxos/app-framework 0.8.4-main.d05673bc65 → 0.8.4-main.dfabb4ec29

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 (328) hide show
  1. package/dist/lib/browser/{capability-LF3OXSCV.mjs → capability-5RRH3WIB.mjs} +11 -10
  2. package/dist/lib/browser/capability-5RRH3WIB.mjs.map +7 -0
  3. package/dist/lib/browser/{capability-6YMUBS54.mjs → capability-LUKGKUQH.mjs} +10 -9
  4. package/dist/lib/browser/{chunk-TIEBZMTF.mjs → chunk-23D4SJUE.mjs} +9 -11
  5. package/dist/lib/browser/{chunk-TIEBZMTF.mjs.map → chunk-23D4SJUE.mjs.map} +3 -3
  6. package/dist/lib/browser/{chunk-YNFPIQGB.mjs → chunk-3JWJXGLK.mjs} +5 -2
  7. package/dist/lib/browser/chunk-3JWJXGLK.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-M5IC326L.mjs → chunk-45CHLTBV.mjs} +5 -5
  9. package/dist/lib/browser/chunk-45CHLTBV.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-272IPLHQ.mjs → chunk-66IXTIVK.mjs} +3 -2
  11. package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
  12. package/dist/lib/browser/chunk-7VZJR2OA.mjs +581 -0
  13. package/dist/lib/browser/chunk-7VZJR2OA.mjs.map +7 -0
  14. package/dist/lib/browser/chunk-CZ4BIAHH.mjs +422 -0
  15. package/dist/lib/browser/chunk-CZ4BIAHH.mjs.map +7 -0
  16. package/dist/lib/browser/{chunk-TGX63LTL.mjs → chunk-FJ4765WW.mjs} +1 -1
  17. package/dist/lib/browser/{chunk-TGX63LTL.mjs.map → chunk-FJ4765WW.mjs.map} +2 -2
  18. package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
  19. package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
  20. package/dist/lib/browser/chunk-JD3Z5NEF.mjs +469 -0
  21. package/dist/lib/browser/chunk-JD3Z5NEF.mjs.map +7 -0
  22. package/dist/lib/browser/chunk-NBXPP7JR.mjs +1174 -0
  23. package/dist/lib/browser/chunk-NBXPP7JR.mjs.map +7 -0
  24. package/dist/lib/browser/{chunk-WEBSGU5L.mjs → chunk-WBHCSOBW.mjs} +5 -5
  25. package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
  26. package/dist/lib/browser/{chunk-7M4467QR.mjs → chunk-Z55LVAGN.mjs} +84 -16
  27. package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
  28. package/dist/lib/browser/{chunk-JGWCBVKJ.mjs → chunk-ZGJAZSNE.mjs} +9 -37
  29. package/dist/lib/browser/chunk-ZGJAZSNE.mjs.map +7 -0
  30. package/dist/lib/browser/cli/index.mjs +14 -27
  31. package/dist/lib/browser/cli/index.mjs.map +3 -3
  32. package/dist/lib/browser/common/activation-events.mjs +9 -8
  33. package/dist/lib/browser/common/capabilities.mjs +9 -8
  34. package/dist/lib/browser/core/activation-event.mjs +1 -1
  35. package/dist/lib/browser/core/capability.mjs +3 -1
  36. package/dist/lib/browser/core/plugin-manager.mjs +8 -4
  37. package/dist/lib/browser/core/plugin.mjs +14 -4
  38. package/dist/lib/browser/core/url-loader.mjs +24 -0
  39. package/dist/lib/browser/index.mjs +43 -22
  40. package/dist/lib/browser/index.mjs.map +3 -3
  41. package/dist/lib/browser/{invoker-capability-4AUGUMM5.mjs → invoker-capability-K4GHUFXF.mjs} +22 -14
  42. package/dist/lib/browser/invoker-capability-K4GHUFXF.mjs.map +7 -0
  43. package/dist/lib/browser/meta.json +1 -1
  44. package/dist/lib/browser/testing/index.mjs +180 -45
  45. package/dist/lib/browser/testing/index.mjs.map +4 -4
  46. package/dist/lib/browser/testing/react.mjs +78 -0
  47. package/dist/lib/browser/testing/react.mjs.map +7 -0
  48. package/dist/lib/browser/ui/index.mjs +18 -15
  49. package/dist/lib/node-esm/{capability-R5O2OYX4.mjs → capability-FCGZVIEG.mjs} +10 -9
  50. package/dist/lib/{browser/capability-6YMUBS54.mjs.map → node-esm/capability-FCGZVIEG.mjs.map} +1 -1
  51. package/dist/lib/node-esm/{capability-SA6LPYGL.mjs → capability-JOIQ2MQE.mjs} +11 -10
  52. package/dist/lib/node-esm/capability-JOIQ2MQE.mjs.map +7 -0
  53. package/dist/lib/node-esm/{chunk-FKE4Z3D6.mjs → chunk-37Z53PXZ.mjs} +1 -1
  54. package/dist/lib/node-esm/{chunk-FKE4Z3D6.mjs.map → chunk-37Z53PXZ.mjs.map} +2 -2
  55. package/dist/lib/node-esm/{chunk-NHXBSAQR.mjs → chunk-6XW6LET6.mjs} +5 -5
  56. package/dist/lib/node-esm/chunk-6XW6LET6.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-3D66SZHP.mjs → chunk-D347W3KO.mjs} +9 -37
  58. package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
  59. package/dist/lib/node-esm/chunk-DRZKO5UZ.mjs +470 -0
  60. package/dist/lib/node-esm/chunk-DRZKO5UZ.mjs.map +7 -0
  61. package/dist/lib/node-esm/{chunk-JHFY3HTS.mjs → chunk-HTBJU5FX.mjs} +84 -16
  62. package/dist/lib/node-esm/chunk-HTBJU5FX.mjs.map +7 -0
  63. package/dist/lib/node-esm/chunk-M3HKPRPO.mjs +423 -0
  64. package/dist/lib/node-esm/chunk-M3HKPRPO.mjs.map +7 -0
  65. package/dist/lib/node-esm/chunk-MUVUQC3G.mjs +1175 -0
  66. package/dist/lib/node-esm/chunk-MUVUQC3G.mjs.map +7 -0
  67. package/dist/lib/node-esm/{chunk-SCDGIGGU.mjs → chunk-SBS2YMPT.mjs} +9 -11
  68. package/dist/lib/node-esm/{chunk-SCDGIGGU.mjs.map → chunk-SBS2YMPT.mjs.map} +3 -3
  69. package/dist/lib/node-esm/{chunk-SB5ODNPX.mjs → chunk-SDJ4B2LU.mjs} +5 -2
  70. package/dist/lib/node-esm/chunk-SDJ4B2LU.mjs.map +7 -0
  71. package/dist/lib/node-esm/chunk-V24UWT36.mjs +582 -0
  72. package/dist/lib/node-esm/chunk-V24UWT36.mjs.map +7 -0
  73. package/dist/lib/node-esm/{chunk-SQICGJBW.mjs → chunk-WFSRZKBP.mjs} +5 -5
  74. package/dist/lib/node-esm/chunk-WFSRZKBP.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-WK7OIQKI.mjs +70 -0
  76. package/dist/lib/node-esm/chunk-WK7OIQKI.mjs.map +7 -0
  77. package/dist/lib/node-esm/{chunk-6REV5DE7.mjs → chunk-XOCUANHO.mjs} +3 -2
  78. package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +7 -0
  79. package/dist/lib/node-esm/cli/index.mjs +14 -27
  80. package/dist/lib/node-esm/cli/index.mjs.map +3 -3
  81. package/dist/lib/node-esm/common/activation-events.mjs +9 -8
  82. package/dist/lib/node-esm/common/capabilities.mjs +9 -8
  83. package/dist/lib/node-esm/core/activation-event.mjs +1 -1
  84. package/dist/lib/node-esm/core/capability.mjs +3 -1
  85. package/dist/lib/node-esm/core/plugin-manager.mjs +8 -4
  86. package/dist/lib/node-esm/core/plugin.mjs +14 -4
  87. package/dist/lib/node-esm/core/url-loader.mjs +25 -0
  88. package/dist/lib/node-esm/index.mjs +43 -22
  89. package/dist/lib/node-esm/index.mjs.map +3 -3
  90. package/dist/lib/node-esm/{invoker-capability-3YDIVDWV.mjs → invoker-capability-XEPW5LMJ.mjs} +22 -14
  91. package/dist/lib/node-esm/invoker-capability-XEPW5LMJ.mjs.map +7 -0
  92. package/dist/lib/node-esm/meta.json +1 -1
  93. package/dist/lib/node-esm/testing/index.mjs +180 -45
  94. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  95. package/dist/lib/node-esm/testing/react.mjs +79 -0
  96. package/dist/lib/node-esm/testing/react.mjs.map +7 -0
  97. package/dist/lib/node-esm/ui/index.mjs +18 -15
  98. package/dist/plugin/node-esm/index.mjs +893 -0
  99. package/dist/plugin/node-esm/index.mjs.map +7 -0
  100. package/dist/plugin/node-esm/meta.json +1 -0
  101. package/dist/types/src/common/activation-events.d.ts +1 -1
  102. package/dist/types/src/common/activation-events.d.ts.map +1 -1
  103. package/dist/types/src/common/annotations.d.ts +1 -0
  104. package/dist/types/src/common/annotations.d.ts.map +1 -0
  105. package/dist/types/src/common/capabilities.d.ts +4 -8
  106. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  107. package/dist/types/src/common/operations.d.ts +8 -22
  108. package/dist/types/src/common/operations.d.ts.map +1 -1
  109. package/dist/types/src/core/activation-event.d.ts +4 -4
  110. package/dist/types/src/core/activation-event.d.ts.map +1 -1
  111. package/dist/types/src/core/capability-manager.d.ts +5 -0
  112. package/dist/types/src/core/capability-manager.d.ts.map +1 -1
  113. package/dist/types/src/core/capability.d.ts +8 -2
  114. package/dist/types/src/core/capability.d.ts.map +1 -1
  115. package/dist/types/src/core/edge-registry-plugin-provider.d.ts +30 -0
  116. package/dist/types/src/core/edge-registry-plugin-provider.d.ts.map +1 -0
  117. package/dist/types/src/core/index.d.ts +6 -0
  118. package/dist/types/src/core/index.d.ts.map +1 -1
  119. package/dist/types/src/core/plugin-asset-cache.d.ts +71 -0
  120. package/dist/types/src/core/plugin-asset-cache.d.ts.map +1 -0
  121. package/dist/types/src/core/plugin-manager.d.ts +177 -4
  122. package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
  123. package/dist/types/src/core/plugin-manifest.d.ts +101 -0
  124. package/dist/types/src/core/plugin-manifest.d.ts.map +1 -0
  125. package/dist/types/src/core/plugin-manifest.test.d.ts +2 -0
  126. package/dist/types/src/core/plugin-manifest.test.d.ts.map +1 -0
  127. package/dist/types/src/core/plugin.d.ts +112 -6
  128. package/dist/types/src/core/plugin.d.ts.map +1 -1
  129. package/dist/types/src/core/registry.d.ts +101 -0
  130. package/dist/types/src/core/registry.d.ts.map +1 -0
  131. package/dist/types/src/core/url-loader.d.ts +127 -0
  132. package/dist/types/src/core/url-loader.d.ts.map +1 -0
  133. package/dist/types/src/core/url-loader.test.d.ts +2 -0
  134. package/dist/types/src/core/url-loader.test.d.ts.map +1 -0
  135. package/dist/types/src/helpers.d.ts.map +1 -1
  136. package/dist/types/src/plugin-operation/OperationPlugin.d.ts.map +1 -1
  137. package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -1
  138. package/dist/types/src/plugin-operation/history/errors.d.ts +30 -3
  139. package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -1
  140. package/dist/types/src/plugin-operation/history/history-tracker.d.ts +1 -1
  141. package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -1
  142. package/dist/types/src/plugin-operation/history/types.d.ts +1 -1
  143. package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -1
  144. package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +1 -1
  145. package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -1
  146. package/dist/types/src/plugin-operation/history/undo-registry.d.ts +1 -1
  147. package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -1
  148. package/dist/types/src/plugin-operation/invoker-capability.d.ts +1 -1
  149. package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -1
  150. package/dist/types/src/plugin-operation/meta.d.ts.map +1 -1
  151. package/dist/types/src/plugin-operation/testing.d.ts +27 -77
  152. package/dist/types/src/plugin-operation/testing.d.ts.map +1 -1
  153. package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -1
  154. package/dist/types/src/plugin-runtime/capability.d.ts +1 -1
  155. package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -1
  156. package/dist/types/src/plugin-runtime/meta.d.ts.map +1 -1
  157. package/dist/types/src/testing/harness.d.ts +67 -0
  158. package/dist/types/src/testing/harness.d.ts.map +1 -0
  159. package/dist/types/src/testing/index.d.ts +1 -0
  160. package/dist/types/src/testing/index.d.ts.map +1 -1
  161. package/dist/types/src/testing/react.d.ts +27 -0
  162. package/dist/types/src/testing/react.d.ts.map +1 -0
  163. package/dist/types/src/testing/react.test.d.ts +2 -0
  164. package/dist/types/src/testing/react.test.d.ts.map +1 -0
  165. package/dist/types/src/testing/service.d.ts.map +1 -1
  166. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  167. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  168. package/dist/types/src/ui/components/App/App.d.ts +3 -2
  169. package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
  170. package/dist/types/src/ui/components/App/App.stories.d.ts +2 -2
  171. package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
  172. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
  173. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
  174. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
  175. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
  176. package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
  177. package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
  178. package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -1
  179. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +16 -4
  180. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
  181. package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
  182. package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +1 -1
  183. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +48 -0
  184. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -0
  185. package/dist/types/src/ui/components/Surface/index.d.ts +22 -6
  186. package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
  187. package/dist/types/src/ui/components/Surface/types.d.ts +110 -9
  188. package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
  189. package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
  190. package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
  191. package/dist/types/src/ui/components/index.d.ts +1 -0
  192. package/dist/types/src/ui/components/index.d.ts.map +1 -1
  193. package/dist/types/src/ui/hooks/index.d.ts +0 -1
  194. package/dist/types/src/ui/hooks/index.d.ts.map +1 -1
  195. package/dist/types/src/ui/hooks/useApp.d.ts +43 -4
  196. package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
  197. package/dist/types/src/ui/hooks/useApp.test.d.ts +2 -0
  198. package/dist/types/src/ui/hooks/useApp.test.d.ts.map +1 -0
  199. package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -1
  200. package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -1
  201. package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -1
  202. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
  203. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
  204. package/dist/types/src/vite-plugin/boot-loader/index.d.ts +2 -0
  205. package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
  206. package/dist/types/src/vite-plugin/boot-loader/loader.d.ts +51 -0
  207. package/dist/types/src/vite-plugin/boot-loader/loader.d.ts.map +1 -0
  208. package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
  209. package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
  210. package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
  211. package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
  212. package/dist/types/src/vite-plugin/index.d.ts +5 -0
  213. package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
  214. package/dist/types/src/vite-plugin/manifest.d.ts +41 -0
  215. package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
  216. package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
  217. package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
  218. package/dist/types/src/vite-plugin/packages.d.ts +13 -0
  219. package/dist/types/src/vite-plugin/packages.d.ts.map +1 -0
  220. package/dist/types/tsconfig.tsbuildinfo +1 -1
  221. package/moon.yml +15 -0
  222. package/package.json +48 -53
  223. package/src/cli/cli.ts +1 -1
  224. package/src/common/activation-events.ts +1 -1
  225. package/src/common/annotations.ts +3 -0
  226. package/src/common/capabilities.ts +5 -10
  227. package/src/common/operations.ts +5 -8
  228. package/src/core/activation-event.ts +4 -1
  229. package/src/core/capability-manager.test.ts +1 -1
  230. package/src/core/capability-manager.ts +22 -1
  231. package/src/core/capability.ts +13 -2
  232. package/src/core/edge-registry-plugin-provider.ts +92 -0
  233. package/src/core/index.ts +6 -0
  234. package/src/core/plugin-asset-cache.ts +60 -0
  235. package/src/core/plugin-manager.test.ts +833 -7
  236. package/src/core/plugin-manager.ts +808 -188
  237. package/src/core/plugin-manifest.test.ts +75 -0
  238. package/src/core/plugin-manifest.ts +134 -0
  239. package/src/core/plugin.ts +142 -10
  240. package/src/core/registry.ts +157 -0
  241. package/src/core/url-loader.test.ts +221 -0
  242. package/src/core/url-loader.ts +388 -0
  243. package/src/plugin-operation/OperationPlugin.ts +2 -3
  244. package/src/plugin-operation/history/capability.ts +1 -2
  245. package/src/plugin-operation/history/errors.ts +2 -6
  246. package/src/plugin-operation/history/history-tracker.test.ts +37 -43
  247. package/src/plugin-operation/history/history-tracker.ts +1 -2
  248. package/src/plugin-operation/history/types.ts +1 -1
  249. package/src/plugin-operation/history/undo-mapping.ts +1 -1
  250. package/src/plugin-operation/history/undo-registry.test.ts +3 -4
  251. package/src/plugin-operation/history/undo-registry.ts +1 -1
  252. package/src/plugin-operation/invoker-capability.ts +19 -4
  253. package/src/plugin-operation/meta.ts +1 -0
  254. package/src/plugin-operation/testing.ts +26 -45
  255. package/src/plugin-runtime/RuntimePlugin.ts +2 -3
  256. package/src/plugin-runtime/meta.ts +1 -0
  257. package/src/testing/harness.ts +229 -0
  258. package/src/testing/index.ts +1 -0
  259. package/src/testing/react.test.tsx +48 -0
  260. package/src/testing/react.tsx +113 -0
  261. package/src/testing/service.ts +1 -1
  262. package/src/testing/withPluginManager.stories.tsx +1 -2
  263. package/src/testing/withPluginManager.tsx +38 -16
  264. package/src/ui/components/App/App.stories.tsx +4 -8
  265. package/src/ui/components/App/App.tsx +29 -5
  266. package/src/ui/components/Placeholder/Placeholder.stories.tsx +77 -0
  267. package/src/ui/components/Placeholder/Placeholder.tsx +155 -0
  268. package/src/ui/components/Placeholder/index.ts +5 -0
  269. package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +4 -2
  270. package/src/ui/components/Surface/SurfaceComponent.stories.tsx +16 -15
  271. package/src/ui/components/Surface/SurfaceComponent.tsx +111 -55
  272. package/src/ui/components/Surface/SurfaceInfo.tsx +0 -1
  273. package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
  274. package/src/ui/components/Surface/index.ts +35 -1
  275. package/src/ui/components/Surface/types.test.ts +126 -0
  276. package/src/ui/components/Surface/types.ts +164 -12
  277. package/src/ui/components/index.ts +1 -0
  278. package/src/ui/hooks/index.ts +0 -1
  279. package/src/ui/hooks/useApp.test.tsx +159 -0
  280. package/src/ui/hooks/useApp.tsx +223 -12
  281. package/src/ui/hooks/useLoading.tsx +14 -6
  282. package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +270 -0
  283. package/src/vite-plugin/boot-loader/boot-loader.css +320 -0
  284. package/src/vite-plugin/boot-loader/boot-loader.js +325 -0
  285. package/src/vite-plugin/boot-loader/index.ts +5 -0
  286. package/src/vite-plugin/boot-loader/loader.ts +123 -0
  287. package/src/vite-plugin/composer/index.ts +306 -0
  288. package/src/vite-plugin/import-map/index.ts +527 -0
  289. package/src/vite-plugin/index.ts +10 -0
  290. package/src/vite-plugin/manifest.test.ts +46 -0
  291. package/src/vite-plugin/manifest.ts +57 -0
  292. package/src/vite-plugin/packages.ts +187 -0
  293. package/tsconfig.json +19 -1
  294. package/tsconfig.node.json +1 -1
  295. package/vitest.config.ts +1 -1
  296. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  297. package/dist/lib/browser/capability-LF3OXSCV.mjs.map +0 -7
  298. package/dist/lib/browser/chunk-272IPLHQ.mjs.map +0 -7
  299. package/dist/lib/browser/chunk-2UI6ACB5.mjs +0 -824
  300. package/dist/lib/browser/chunk-2UI6ACB5.mjs.map +0 -7
  301. package/dist/lib/browser/chunk-7M4467QR.mjs.map +0 -7
  302. package/dist/lib/browser/chunk-JGWCBVKJ.mjs.map +0 -7
  303. package/dist/lib/browser/chunk-M5IC326L.mjs.map +0 -7
  304. package/dist/lib/browser/chunk-NQPYE365.mjs +0 -703
  305. package/dist/lib/browser/chunk-NQPYE365.mjs.map +0 -7
  306. package/dist/lib/browser/chunk-WEBSGU5L.mjs.map +0 -7
  307. package/dist/lib/browser/chunk-YAFEA4GV.mjs +0 -1
  308. package/dist/lib/browser/chunk-YNFPIQGB.mjs.map +0 -7
  309. package/dist/lib/browser/invoker-capability-4AUGUMM5.mjs.map +0 -7
  310. package/dist/lib/node-esm/capability-SA6LPYGL.mjs.map +0 -7
  311. package/dist/lib/node-esm/chunk-3D66SZHP.mjs.map +0 -7
  312. package/dist/lib/node-esm/chunk-6REV5DE7.mjs.map +0 -7
  313. package/dist/lib/node-esm/chunk-FHWPWQRJ.mjs +0 -704
  314. package/dist/lib/node-esm/chunk-FHWPWQRJ.mjs.map +0 -7
  315. package/dist/lib/node-esm/chunk-JHFY3HTS.mjs.map +0 -7
  316. package/dist/lib/node-esm/chunk-JIVXIJ2T.mjs +0 -825
  317. package/dist/lib/node-esm/chunk-JIVXIJ2T.mjs.map +0 -7
  318. package/dist/lib/node-esm/chunk-NHXBSAQR.mjs.map +0 -7
  319. package/dist/lib/node-esm/chunk-SB5ODNPX.mjs.map +0 -7
  320. package/dist/lib/node-esm/chunk-SQICGJBW.mjs.map +0 -7
  321. package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs +0 -2
  322. package/dist/lib/node-esm/invoker-capability-3YDIVDWV.mjs.map +0 -7
  323. package/dist/types/src/ui/hooks/useOperationResolver.d.ts +0 -19
  324. package/dist/types/src/ui/hooks/useOperationResolver.d.ts.map +0 -1
  325. package/src/ui/hooks/useOperationResolver.ts +0 -40
  326. /package/dist/lib/{node-esm/capability-R5O2OYX4.mjs.map → browser/capability-LUKGKUQH.mjs.map} +0 -0
  327. /package/dist/lib/browser/{chunk-YAFEA4GV.mjs.map → core/url-loader.mjs.map} +0 -0
  328. /package/dist/lib/node-esm/{chunk-Z4TJPSMP.mjs.map → core/url-loader.mjs.map} +0 -0
package/moon.yml CHANGED
@@ -20,3 +20,18 @@ tasks:
20
20
  - '--entryPoint=src/common/activation-events.ts'
21
21
  - '--entryPoint=src/ui/index.ts'
22
22
  - '--entryPoint=src/testing/index.ts'
23
+ - '--entryPoint=src/testing/react.tsx'
24
+ - '--entryPoint=src/core/url-loader.ts'
25
+ deps:
26
+ - compile-plugin
27
+ compile-plugin:
28
+ command: dx-compile
29
+ args:
30
+ - '--entryPoint=src/vite-plugin/index.ts'
31
+ - '--outputPath=dist/plugin'
32
+ - '--platform=node'
33
+ deps:
34
+ - ^:compile
35
+ - dx-compile:compile
36
+ outputs:
37
+ - dist/plugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/app-framework",
3
- "version": "0.8.4-main.d05673bc65",
3
+ "version": "0.8.4-main.dfabb4ec29",
4
4
  "description": "A framework for building applications from composible plugins.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -55,6 +55,16 @@
55
55
  "node": "./dist/lib/node-esm/plugin-manager/index.mjs",
56
56
  "types": "./dist/types/src/plugin-manager/index.d.ts"
57
57
  },
58
+ "./UrlLoader": {
59
+ "source": "./src/core/url-loader.ts",
60
+ "browser": "./dist/lib/browser/url-loader/index.mjs",
61
+ "node": "./dist/lib/node-esm/url-loader/index.mjs",
62
+ "types": "./dist/types/src/url-loader/index.d.ts"
63
+ },
64
+ "./vite-plugin": {
65
+ "import": "./dist/plugin/node-esm/index.mjs",
66
+ "types": "./dist/types/src/vite-plugin/index.d.ts"
67
+ },
58
68
  "./cli": {
59
69
  "source": "./src/cli/index.ts",
60
70
  "browser": "./dist/lib/browser/cli/index.mjs",
@@ -67,6 +77,12 @@
67
77
  "node": "./dist/lib/node-esm/testing/index.mjs",
68
78
  "types": "./dist/types/src/testing/index.d.ts"
69
79
  },
80
+ "./testing-react": {
81
+ "source": "./src/testing/react.tsx",
82
+ "browser": "./dist/lib/browser/testing/react.mjs",
83
+ "node": "./dist/lib/node-esm/testing/react.mjs",
84
+ "types": "./dist/types/src/testing/react.d.ts"
85
+ },
70
86
  "./ui": {
71
87
  "source": "./src/ui/index.ts",
72
88
  "browser": "./dist/lib/browser/ui/index.mjs",
@@ -75,72 +91,51 @@
75
91
  }
76
92
  },
77
93
  "types": "dist/types/src/index.d.ts",
78
- "typesVersions": {
79
- "*": {
80
- "ActivationEvent": [
81
- "dist/types/src/activation-event/index.d.ts"
82
- ],
83
- "ActivationEvents": [
84
- "dist/types/src/common/activation-events.d.ts"
85
- ],
86
- "Capabilities": [
87
- "dist/types/src/common/capabilities.d.ts"
88
- ],
89
- "Capability": [
90
- "dist/types/src/capability/index.d.ts"
91
- ],
92
- "Plugin": [
93
- "dist/types/src/plugin/index.d.ts"
94
- ],
95
- "PluginManager": [
96
- "dist/types/src/plugin-manager/index.d.ts"
97
- ],
98
- "cli": [
99
- "dist/types/src/cli/index.d.ts"
100
- ],
101
- "testing": [
102
- "dist/types/src/testing/index.d.ts"
103
- ],
104
- "ui": [
105
- "dist/types/src/ui/index.d.ts"
106
- ]
107
- }
108
- },
109
94
  "dependencies": {
110
95
  "@effect/cli": "0.73.2",
111
- "@dxos/async": "0.8.4-main.d05673bc65",
112
- "@dxos/echo": "0.8.4-main.d05673bc65",
113
- "@dxos/debug": "0.8.4-main.d05673bc65",
114
- "@dxos/effect": "0.8.4-main.d05673bc65",
115
- "@dxos/log": "0.8.4-main.d05673bc65",
116
- "@dxos/invariant": "0.8.4-main.d05673bc65",
117
- "@dxos/react-error-boundary": "0.8.4-main.d05673bc65",
118
- "@dxos/operation": "0.8.4-main.d05673bc65",
119
- "@dxos/react-hooks": "0.8.4-main.d05673bc65",
120
- "@dxos/util": "0.8.4-main.d05673bc65",
121
- "@dxos/web-context": "0.8.4-main.d05673bc65",
122
- "@dxos/web-context-react": "0.8.4-main.d05673bc65"
96
+ "cjs-module-lexer": "^2.2.0",
97
+ "@dxos/context": "0.8.4-main.dfabb4ec29",
98
+ "@dxos/compute": "0.8.4-main.dfabb4ec29",
99
+ "@dxos/debug": "0.8.4-main.dfabb4ec29",
100
+ "@dxos/echo": "0.8.4-main.dfabb4ec29",
101
+ "@dxos/edge-client": "0.8.4-main.dfabb4ec29",
102
+ "@dxos/effect": "0.8.4-main.dfabb4ec29",
103
+ "@dxos/errors": "0.8.4-main.dfabb4ec29",
104
+ "@dxos/invariant": "0.8.4-main.dfabb4ec29",
105
+ "@dxos/log": "0.8.4-main.dfabb4ec29",
106
+ "@dxos/protocols": "0.8.4-main.dfabb4ec29",
107
+ "@dxos/operation": "0.8.4-main.dfabb4ec29",
108
+ "@dxos/react-error-boundary": "0.8.4-main.dfabb4ec29",
109
+ "@dxos/react-hooks": "0.8.4-main.dfabb4ec29",
110
+ "@dxos/react-ui": "0.8.4-main.dfabb4ec29",
111
+ "@dxos/ui-theme": "0.8.4-main.dfabb4ec29",
112
+ "@dxos/util": "0.8.4-main.dfabb4ec29",
113
+ "@dxos/web-context": "0.8.4-main.dfabb4ec29",
114
+ "@dxos/web-context-react": "0.8.4-main.dfabb4ec29",
115
+ "@dxos/async": "0.8.4-main.dfabb4ec29"
123
116
  },
124
117
  "devDependencies": {
125
118
  "@effect-atom/atom-react": "^0.5.0",
126
119
  "@effect/platform": "0.94.4",
127
- "@effect/vitest": "0.27.0",
120
+ "@effect/vitest": "0.29.0",
121
+ "@testing-library/react": "^16.3.0",
128
122
  "@types/react": "~19.2.7",
129
- "effect": "3.19.16",
123
+ "effect": "3.20.0",
130
124
  "react": "~19.2.3",
131
125
  "react-dom": "~19.2.3",
132
126
  "typedoc": "0.28.1",
133
- "@dxos/echo-db": "0.8.4-main.d05673bc65",
134
- "@dxos/random": "0.8.4-main.d05673bc65",
135
- "@dxos/react-ui": "0.8.4-main.d05673bc65",
136
- "@dxos/test-utils": "0.8.4-main.d05673bc65",
137
- "@dxos/ui-theme": "0.8.4-main.d05673bc65",
138
- "@dxos/storybook-utils": "0.8.4-main.d05673bc65"
127
+ "vite": "^8.0.10",
128
+ "@dxos/brand": "0.8.4-main.dfabb4ec29",
129
+ "@dxos/echo-db": "0.8.4-main.dfabb4ec29",
130
+ "@dxos/storybook-utils": "0.8.4-main.dfabb4ec29",
131
+ "@dxos/random": "0.8.4-main.dfabb4ec29",
132
+ "@dxos/test-utils": "0.8.4-main.dfabb4ec29"
139
133
  },
140
134
  "peerDependencies": {
141
135
  "@effect-atom/atom-react": "^0.5.0",
142
136
  "@effect/platform": "0.94.4",
143
- "effect": "3.19.16",
137
+ "@testing-library/react": "^16.3.0",
138
+ "effect": "3.20.0",
144
139
  "react": "~19.2.3",
145
140
  "react-dom": "~19.2.3"
146
141
  },
package/src/cli/cli.ts CHANGED
@@ -17,7 +17,7 @@ const defaultPluginLoader =
17
17
  Effect.sync(() => {
18
18
  const plugin = plugins.find((plugin) => plugin.meta.id === id);
19
19
  invariant(plugin, `Plugin not found: ${id}`);
20
- return plugin;
20
+ return { plugin };
21
21
  });
22
22
 
23
23
  type SubCommands = [Command.Command<any, any, any, any>, ...Array<Command.Command<any, any, any, any>>];
@@ -21,7 +21,7 @@ export const SetupReactSurface = ActivationEvent$.make('org.dxos.app-framework.e
21
21
  /**
22
22
  * Fired before the operation invoker is activated.
23
23
  */
24
- export const SetupOperationResolver = ActivationEvent$.make('org.dxos.app-framework.event.setup-operation-resolver');
24
+ export const SetupOperationHandler = ActivationEvent$.make('org.dxos.app-framework.event.setup-operation-handler');
25
25
 
26
26
  /**
27
27
  * Fired before the managed runtime is created.
@@ -0,0 +1,3 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
@@ -2,14 +2,15 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import type * as Command$ from '@effect/cli/Command';
6
5
  import { type Atom, type Registry } from '@effect-atom/atom-react';
6
+ import type * as Command$ from '@effect/cli/Command';
7
7
  import * as Effect from 'effect/Effect';
8
8
  import type * as Layer$ from 'effect/Layer';
9
9
  import type * as ManagedRuntime$ from 'effect/ManagedRuntime';
10
10
  import type { FC, PropsWithChildren } from 'react';
11
11
 
12
- import type { OperationInvoker as OperationInvoker$, OperationResolver as OperationResolver$ } from '@dxos/operation';
12
+ import type { OperationHandlerSet } from '@dxos/compute';
13
+ import { OperationInvoker as OperationInvoker$ } from '@dxos/operation';
13
14
 
14
15
  import { Capability as Capability$, type PluginManager as PluginManager$ } from '../core';
15
16
  import type {
@@ -88,14 +89,8 @@ export const ManagedRuntime = Capability$.make<ManagedRuntime>('org.dxos.app-fra
88
89
  // Operation System Capabilities
89
90
  //
90
91
 
91
- export type OperationResolver = OperationResolver$.OperationResolver<any, any, any, any>;
92
-
93
- /**
94
- * Handler registration for operations - contributed by plugins.
95
- * @category Capability
96
- */
97
- export const OperationResolver = Capability$.make<OperationResolver[]>(
98
- 'org.dxos.app-framework.capability.operation-resolver',
92
+ export const OperationHandler = Capability$.make<OperationHandlerSet.OperationHandlerSet>(
93
+ 'org.dxos.app-framework.capability.operation-handler',
99
94
  );
100
95
 
101
96
  export type UndoMapping = UndoMapping$.UndoMapping;
@@ -4,10 +4,9 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { Operation } from '@dxos/operation';
7
+ import { Operation } from '@dxos/compute';
8
8
 
9
9
  import { Capability } from '../core';
10
-
11
10
  import { Label } from './translations';
12
11
 
13
12
  const UNDO_NAMESPACE = 'org.dxos.app-framework.undo';
@@ -28,11 +27,9 @@ export namespace UndoOperation {
28
27
  },
29
28
  executionMode: 'sync',
30
29
  services: [Capability.Service],
31
- schema: {
32
- input: Schema.Struct({
33
- message: Schema.optional(Label.annotations({ description: 'The message to display in the undo toast.' })),
34
- }),
35
- output: Schema.Void,
36
- },
30
+ input: Schema.Struct({
31
+ message: Schema.optional(Label.annotations({ description: 'The message to display in the undo toast.' })),
32
+ }),
33
+ output: Schema.Void,
37
34
  });
38
35
  }
@@ -2,6 +2,8 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { compositeKey } from '@dxos/util';
6
+
5
7
  /**
6
8
  * A unique string identifier representing an event.
7
9
  * This is expected to be a URI, where initial parts are often the id of the plugin whose package defines the event.
@@ -31,7 +33,8 @@ export const make = (id: string, specifier?: string) => {
31
33
  /**
32
34
  * Helper to create an activation event key.
33
35
  */
34
- export const eventKey = (event: ActivationEvent) => (event.specifier ? `${event.id}:${event.specifier}` : event.id);
36
+ export const eventKey = (event: ActivationEvent) =>
37
+ event.specifier ? compositeKey(event.id, event.specifier) : event.id;
35
38
 
36
39
  /**
37
40
  * Helper to create an activation event that triggers when any of the given events are activated.
@@ -2,8 +2,8 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { describe, expect, it, onTestFinished } from '@effect/vitest';
6
5
  import { Registry } from '@effect-atom/atom-react';
6
+ import { describe, expect, it, onTestFinished } from '@effect/vitest';
7
7
  import * as Effect from 'effect/Effect';
8
8
 
9
9
  import * as Capability from './capability';
@@ -59,6 +59,12 @@ export interface CapabilityManager {
59
59
  * @returns The capability.
60
60
  */
61
61
  waitFor<T>(interfaceDef: Capability.InterfaceDef<T>): Effect.Effect<T, Error>;
62
+
63
+ /**
64
+ * Get capabilities grouped by the module that contributed them.
65
+ * @returns An atom containing a record from module ID to capability implementations.
66
+ */
67
+ atomByModule<T>(interfaceDef: Capability.InterfaceDef<T>): Atom.Atom<Record<string, T[]>>;
62
68
  }
63
69
 
64
70
  /**
@@ -75,7 +81,18 @@ class CapabilityManagerImpl implements CapabilityManager {
75
81
  return Atom.make((get) => {
76
82
  const current = get(this._capabilityEntries(id));
77
83
  return current.map((c) => c.implementation);
78
- });
84
+ }).pipe(Atom.keepAlive);
85
+ });
86
+
87
+ readonly _capabilitiesByModule = Atom.family<string, Atom.Atom<Record<string, unknown[]>>>((id: string) => {
88
+ return Atom.make((get) => {
89
+ const entries = get(this._capabilityEntries(id));
90
+ const result: Record<string, unknown[]> = {};
91
+ for (const entry of entries) {
92
+ (result[entry.moduleId] ??= []).push(entry.implementation);
93
+ }
94
+ return result;
95
+ }).pipe(Atom.keepAlive);
79
96
  });
80
97
 
81
98
  readonly _capability = Atom.family<string, Atom.Atom<unknown>>((id: string) => {
@@ -163,6 +180,10 @@ class CapabilityManagerImpl implements CapabilityManager {
163
180
  return result;
164
181
  });
165
182
  }
183
+
184
+ atomByModule<T>(interfaceDef: Capability.InterfaceDef<T>): Atom.Atom<Record<string, T[]>> {
185
+ return this._capabilitiesByModule(interfaceDef.identifier) as Atom.Atom<Record<string, T[]>>;
186
+ }
166
187
  }
167
188
 
168
189
  /**
@@ -62,6 +62,16 @@ export const waitFor = <T>(interfaceDef: InterfaceDef<T>): Effect.Effect<T, Erro
62
62
  export const atom = <T>(interfaceDef: InterfaceDef<T>): Effect.Effect<Atom.Atom<T[]>, never, Service> =>
63
63
  Effect.map(Service, (manager) => manager.atom(interfaceDef));
64
64
 
65
+ /**
66
+ * Get capabilities grouped by the module that contributed them.
67
+ * @param interfaceDef The interface definition of the capability.
68
+ * @returns An Atom containing a record from module ID to capability implementations.
69
+ */
70
+ export const atomByModule = <T>(
71
+ interfaceDef: InterfaceDef<T>,
72
+ ): Effect.Effect<Atom.Atom<Record<string, T[]>>, never, Service> =>
73
+ Effect.map(Service, (manager) => manager.atomByModule(interfaceDef));
74
+
65
75
  const InterfaceDefTypeId: unique symbol = Symbol.for('InterfaceDefTypeId');
66
76
 
67
77
  /**
@@ -120,6 +130,7 @@ export type ModuleReturn = void | Any | Any[] | readonly Any[] | [Any, ...Any[]]
120
130
  /**
121
131
  * Helper to define the implementation of a capability.
122
132
  */
133
+ // TODO(dmaretskyi): Make the return type non-generic so capabilities are non-discernable.
123
134
  export const contributes = <I extends InterfaceDef<any>>(
124
135
  interfaceDef: I,
125
136
  implementation: Capability<InterfaceDef.Implementation<I>>['implementation'],
@@ -164,7 +175,7 @@ export const lazy = <T = void, R extends ModuleReturn = ModuleReturn>(
164
175
  ): LazyCapability<T, R> => {
165
176
  const lazyFn: LazyCapability<T, R> = (props: T) =>
166
177
  Effect.gen(function* () {
167
- const { default: getCapability } = yield* Effect.tryPromise(() => c());
178
+ const { default: getCapability } = yield* Effect.promise(() => c());
168
179
  const result = yield* getCapability(props);
169
180
  const normalized = result == null ? [] : Array.isArray(result) ? Array.from(result) : [result];
170
181
  return normalized as NormalizeReturn<R>;
@@ -221,7 +232,7 @@ export const getModuleTag = (capability: unknown): string | undefined => {
221
232
  * export default Capability.makeModule(
222
233
  * Effect.fnUntraced(function* (props: { observability: boolean }) {
223
234
  * const invoker = yield* Capability.get(Capabilities.OperationInvoker);
224
- * return contributes(Capabilities.IntentResolver, ...);
235
+ * return contributes(Capabilities.OperationHandler, ...);
225
236
  * })
226
237
  * );
227
238
  * ```
@@ -0,0 +1,92 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Context } from '@dxos/context';
8
+ import { type EdgeHttpClient } from '@dxos/edge-client';
9
+ import { type PluginEntry } from '@dxos/protocols';
10
+
11
+ import * as Registry from './registry';
12
+
13
+ /**
14
+ * Maps a wire-format `PluginEntry` (from `@dxos/protocols`) to a
15
+ * `Registry.Plugin` (the app-framework domain type).
16
+ *
17
+ * This is the only translation seam between the two independently-defined type
18
+ * hierarchies — fields are mapped explicitly, with no shared type between them.
19
+ */
20
+ const toRegistryPlugin = (entry: PluginEntry): Registry.Plugin => ({
21
+ id: entry.meta.id,
22
+ name: entry.meta.name,
23
+ description: entry.meta.description,
24
+ homePage: entry.meta.homePage,
25
+ source: entry.meta.source,
26
+ screenshots: entry.meta.screenshots ? [...entry.meta.screenshots] : undefined,
27
+ tags: entry.meta.tags ? [...entry.meta.tags] : undefined,
28
+ icon: entry.meta.icon,
29
+ iconHue: entry.meta.iconHue,
30
+ moduleUrl: entry.moduleUrl,
31
+ repo: entry.repo,
32
+ version: entry.releaseTag,
33
+ });
34
+
35
+ /**
36
+ * Implements `Registry.PluginProvider` against the Edge `/registry` HTTP endpoints.
37
+ *
38
+ * Lives in app-framework (rather than the more obvious home of `@dxos/edge-client`)
39
+ * because edge-client doesn't depend on app-framework; siting the implementation
40
+ * here keeps the dependency arrow `app-framework → edge-client` and avoids a
41
+ * cycle. The class needs only the public `EdgeHttpClient` type, so a one-way
42
+ * type-import is enough.
43
+ *
44
+ * `listVersions` is currently a stub: it returns the single latest version derived
45
+ * from the cached plugin list, so the host's version picker has something to render.
46
+ * The wire contract for the real endpoint already exists — see
47
+ * `GetPluginVersionsResponseBodySchema` in `@dxos/protocols/edge/registry` and
48
+ * {@link EdgeHttpClient.getRegistryPluginVersions} — so once Edge ships
49
+ * `GET /registry/plugins/:repo/versions`, swap this stub for a call to
50
+ * `this._client.getRegistryPluginVersions(...)` and map each entry through a
51
+ * `toRegistryPluginVersion` helper (mirror of {@link toRegistryPlugin}).
52
+ */
53
+ export class EdgeRegistryPluginProvider implements Registry.PluginProvider {
54
+ // Cached on first load so getPlugin/listVersions can resolve without re-fetching.
55
+ #cachedPlugins: readonly Registry.Plugin[] = [];
56
+
57
+ constructor(private readonly _client: EdgeHttpClient) {}
58
+
59
+ listPlugins(): Effect.Effect<readonly Registry.Plugin[], Error> {
60
+ return Effect.tryPromise({
61
+ try: () => this._client.getRegistryPlugins(Context.default()),
62
+ catch: (error) => (error instanceof Error ? error : new Error(String(error))),
63
+ }).pipe(
64
+ Effect.map((body) => {
65
+ const plugins = body.plugins.filter((entry) => entry.health === 'ok').map(toRegistryPlugin);
66
+ this.#cachedPlugins = plugins;
67
+ return plugins;
68
+ }),
69
+ );
70
+ }
71
+
72
+ listVersions(repo: string): Effect.Effect<readonly Registry.PluginVersion[], Error> {
73
+ // Stub: return only the currently-known version until Edge implements the versions endpoint.
74
+ const plugin = this.#cachedPlugins.find((candidate) => candidate.repo === repo);
75
+ if (!plugin) {
76
+ return Effect.fail(new Error(`Plugin not found in catalog: ${repo}`));
77
+ }
78
+ const version: Registry.PluginVersion = { tag: plugin.version, moduleUrl: plugin.moduleUrl };
79
+ return Effect.succeed([version]);
80
+ }
81
+
82
+ getPlugin(repo: string, version?: string): Effect.Effect<Registry.Plugin, Error> {
83
+ const plugin = this.#cachedPlugins.find((p) => p.repo === repo);
84
+ if (!plugin) {
85
+ return Effect.fail(new Error(`Plugin not found in catalog: ${repo}`));
86
+ }
87
+ if (version && version !== plugin.version) {
88
+ return Effect.fail(new Error(`Version ${version} not available for ${repo}; only ${plugin.version} is cached`));
89
+ }
90
+ return Effect.succeed(plugin);
91
+ }
92
+ }
package/src/core/index.ts CHANGED
@@ -6,4 +6,10 @@ export * as ActivationEvent from './activation-event';
6
6
  export * as Capability from './capability';
7
7
  export * as CapabilityManager from './capability-manager';
8
8
  export * as Plugin from './plugin';
9
+ export * as PluginAssetCache from './plugin-asset-cache';
9
10
  export * as PluginManager from './plugin-manager';
11
+ export * as PluginManifest from './plugin-manifest';
12
+ export { PLUGIN_DEV_SERVER_PORT } from './plugin-manifest';
13
+ export * as Registry from './registry';
14
+ export { EdgeRegistryPluginProvider } from './edge-registry-plugin-provider';
15
+ export * as UrlLoader from './url-loader';
@@ -0,0 +1,60 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { BaseError } from '@dxos/errors';
8
+
9
+ /**
10
+ * Tagged error for cache operations. Construction sites supply `context.operation`
11
+ * (one of `'cache' | 'evict' | 'resolve' | 'list'`) and `context.pluginId` so
12
+ * downstream handlers can route on the failed call without scanning the message.
13
+ */
14
+ export class PluginAssetCacheError extends BaseError.extend(
15
+ 'PluginAssetCacheError',
16
+ 'Plugin asset cache operation failed',
17
+ ) {}
18
+
19
+ /**
20
+ * Per-platform offline cache for third-party plugin assets.
21
+ *
22
+ * Implementations live alongside their platform glue (composer-app's
23
+ * `asset-cache/{tauri,service-worker}.ts`); the no-op default is for tests
24
+ * and unsupported environments.
25
+ */
26
+ export interface Cache {
27
+ /**
28
+ * Persist all listed URLs under the namespace of `pluginId`. Idempotent.
29
+ * The order of `urls` is significant — the first entry is treated as the entry module.
30
+ */
31
+ cache(pluginId: string, urls: readonly string[]): Effect.Effect<void, PluginAssetCacheError>;
32
+
33
+ /**
34
+ * Drop all assets for a plugin (uninstall).
35
+ */
36
+ evict(pluginId: string): Effect.Effect<void, PluginAssetCacheError>;
37
+
38
+ /**
39
+ * Resolves a plugin asset URL to a platform-specific cached URL when one is available.
40
+ * Returns the original URL when no cached copy exists or the platform serves cached
41
+ * responses transparently (e.g. service worker fetch interception on web).
42
+ */
43
+ resolve(pluginId: string, url: string): Effect.Effect<string, PluginAssetCacheError>;
44
+
45
+ /**
46
+ * List currently cached plugin ids (diagnostic).
47
+ */
48
+ list(): Effect.Effect<readonly string[], PluginAssetCacheError>;
49
+ }
50
+
51
+ /**
52
+ * No-op implementation. Used when no platform cache is registered (tests, unsupported environments).
53
+ * Plugins still load — they just have no offline guarantee.
54
+ */
55
+ export const noop = (): Cache => ({
56
+ cache: () => Effect.void,
57
+ evict: () => Effect.void,
58
+ resolve: (_pluginId, url) => Effect.succeed(url),
59
+ list: () => Effect.succeed([] as readonly string[]),
60
+ });