@dxos/app-framework 0.8.4-main.c85a9c8dae → 0.8.4-main.cb12b3f963

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 (325) hide show
  1. package/dist/lib/browser/{capability-7RLVE42K.mjs → capability-5RRH3WIB.mjs} +11 -10
  2. package/dist/lib/browser/capability-5RRH3WIB.mjs.map +7 -0
  3. package/dist/lib/browser/{capability-2GL5JAGJ.mjs → capability-LUKGKUQH.mjs} +10 -9
  4. package/dist/lib/browser/{chunk-5RJNZV7K.mjs → chunk-23D4SJUE.mjs} +11 -13
  5. package/dist/lib/browser/{chunk-5RJNZV7K.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-45CHLTBV.mjs +34 -0
  9. package/dist/lib/browser/chunk-45CHLTBV.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-PKQT6C53.mjs → chunk-66IXTIVK.mjs} +3 -2
  11. package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
  12. package/dist/lib/browser/chunk-CZ4BIAHH.mjs +422 -0
  13. package/dist/lib/browser/chunk-CZ4BIAHH.mjs.map +7 -0
  14. package/dist/lib/browser/chunk-FJ4765WW.mjs +8 -0
  15. package/dist/lib/browser/{chunk-FHQTHCX7.mjs.map → chunk-FJ4765WW.mjs.map} +3 -3
  16. package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
  17. package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
  18. package/dist/lib/browser/chunk-MX5DKEJH.mjs +584 -0
  19. package/dist/lib/browser/chunk-MX5DKEJH.mjs.map +7 -0
  20. package/dist/lib/browser/chunk-NBXPP7JR.mjs +1174 -0
  21. package/dist/lib/browser/chunk-NBXPP7JR.mjs.map +7 -0
  22. package/dist/lib/browser/chunk-PC4NOADA.mjs +471 -0
  23. package/dist/lib/browser/chunk-PC4NOADA.mjs.map +7 -0
  24. package/dist/lib/browser/{chunk-REORGDJT.mjs → chunk-WBHCSOBW.mjs} +18 -18
  25. package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
  26. package/dist/lib/browser/{chunk-FNKT2QQ2.mjs → chunk-Z55LVAGN.mjs} +85 -17
  27. package/dist/lib/browser/chunk-Z55LVAGN.mjs.map +7 -0
  28. package/dist/lib/browser/{chunk-ZRWBPIZG.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 +16 -29
  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 +37 -22
  40. package/dist/lib/browser/index.mjs.map +3 -3
  41. package/dist/lib/browser/{invoker-capability-BNLVNYHU.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 +184 -49
  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-CHIMU6LX.mjs → capability-FCGZVIEG.mjs} +10 -9
  50. package/dist/lib/{browser/capability-2GL5JAGJ.mjs.map → node-esm/capability-FCGZVIEG.mjs.map} +1 -1
  51. package/dist/lib/node-esm/{capability-EVZK4REM.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-UEWJDI2L.mjs → chunk-37Z53PXZ.mjs} +2 -2
  54. package/dist/lib/node-esm/{chunk-UEWJDI2L.mjs.map → chunk-37Z53PXZ.mjs.map} +3 -3
  55. package/dist/lib/node-esm/chunk-42J2ZUQQ.mjs +472 -0
  56. package/dist/lib/node-esm/chunk-42J2ZUQQ.mjs.map +7 -0
  57. package/dist/lib/node-esm/chunk-6XW6LET6.mjs +35 -0
  58. package/dist/lib/node-esm/chunk-6XW6LET6.mjs.map +7 -0
  59. package/dist/lib/node-esm/{chunk-2A4PRBIX.mjs → chunk-D347W3KO.mjs} +9 -37
  60. package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
  61. package/dist/lib/node-esm/{chunk-CJCQS2YL.mjs → chunk-HTBJU5FX.mjs} +85 -17
  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-VUIUFIGT.mjs → chunk-SBS2YMPT.mjs} +11 -13
  68. package/dist/lib/node-esm/{chunk-VUIUFIGT.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-UFW652GS.mjs → chunk-WFSRZKBP.mjs} +18 -18
  72. package/dist/lib/node-esm/chunk-WFSRZKBP.mjs.map +7 -0
  73. package/dist/lib/node-esm/chunk-WK7OIQKI.mjs +70 -0
  74. package/dist/lib/node-esm/chunk-WK7OIQKI.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-WKTLE7MG.mjs +585 -0
  76. package/dist/lib/node-esm/chunk-WKTLE7MG.mjs.map +7 -0
  77. package/dist/lib/node-esm/{chunk-7OWSHPYK.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 +16 -29
  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 +37 -22
  89. package/dist/lib/node-esm/index.mjs.map +3 -3
  90. package/dist/lib/node-esm/{invoker-capability-VF6SP44V.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 +184 -49
  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 +875 -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 +5 -5
  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 +113 -7
  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/testing.d.ts +27 -77
  151. package/dist/types/src/plugin-operation/testing.d.ts.map +1 -1
  152. package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +1 -1
  153. package/dist/types/src/plugin-runtime/capability.d.ts +1 -1
  154. package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -1
  155. package/dist/types/src/testing/harness.d.ts +67 -0
  156. package/dist/types/src/testing/harness.d.ts.map +1 -0
  157. package/dist/types/src/testing/index.d.ts +1 -0
  158. package/dist/types/src/testing/index.d.ts.map +1 -1
  159. package/dist/types/src/testing/react.d.ts +27 -0
  160. package/dist/types/src/testing/react.d.ts.map +1 -0
  161. package/dist/types/src/testing/react.test.d.ts +2 -0
  162. package/dist/types/src/testing/react.test.d.ts.map +1 -0
  163. package/dist/types/src/testing/service.d.ts.map +1 -1
  164. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  165. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  166. package/dist/types/src/ui/components/App/App.d.ts +3 -2
  167. package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
  168. package/dist/types/src/ui/components/App/App.stories.d.ts +2 -2
  169. package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
  170. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
  171. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
  172. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
  173. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
  174. package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
  175. package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
  176. package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -1
  177. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +16 -4
  178. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
  179. package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
  180. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +48 -0
  181. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -0
  182. package/dist/types/src/ui/components/Surface/index.d.ts +22 -6
  183. package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
  184. package/dist/types/src/ui/components/Surface/types.d.ts +110 -9
  185. package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
  186. package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
  187. package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
  188. package/dist/types/src/ui/components/index.d.ts +1 -0
  189. package/dist/types/src/ui/components/index.d.ts.map +1 -1
  190. package/dist/types/src/ui/hooks/index.d.ts +0 -1
  191. package/dist/types/src/ui/hooks/index.d.ts.map +1 -1
  192. package/dist/types/src/ui/hooks/useApp.d.ts +43 -4
  193. package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
  194. package/dist/types/src/ui/hooks/useApp.test.d.ts +2 -0
  195. package/dist/types/src/ui/hooks/useApp.test.d.ts.map +1 -0
  196. package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -1
  197. package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -1
  198. package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -1
  199. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
  200. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
  201. package/dist/types/src/vite-plugin/boot-loader/index.d.ts +52 -0
  202. package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
  203. package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
  204. package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
  205. package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
  206. package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
  207. package/dist/types/src/vite-plugin/index.d.ts +5 -0
  208. package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
  209. package/dist/types/src/vite-plugin/manifest.d.ts +41 -0
  210. package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
  211. package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
  212. package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
  213. package/dist/types/src/vite-plugin/packages.d.ts +13 -0
  214. package/dist/types/src/vite-plugin/packages.d.ts.map +1 -0
  215. package/dist/types/tsconfig.tsbuildinfo +1 -1
  216. package/moon.yml +15 -0
  217. package/package.json +48 -53
  218. package/src/cli/cli.ts +3 -3
  219. package/src/common/activation-events.ts +6 -6
  220. package/src/common/annotations.ts +3 -0
  221. package/src/common/capabilities.ts +18 -23
  222. package/src/common/operations.ts +7 -10
  223. package/src/context.ts +1 -1
  224. package/src/core/activation-event.ts +5 -2
  225. package/src/core/capability-manager.test.ts +1 -1
  226. package/src/core/capability-manager.ts +22 -1
  227. package/src/core/capability.ts +13 -2
  228. package/src/core/edge-registry-plugin-provider.ts +92 -0
  229. package/src/core/index.ts +6 -0
  230. package/src/core/plugin-asset-cache.ts +60 -0
  231. package/src/core/plugin-manager.test.ts +855 -29
  232. package/src/core/plugin-manager.ts +808 -188
  233. package/src/core/plugin-manifest.test.ts +75 -0
  234. package/src/core/plugin-manifest.ts +134 -0
  235. package/src/core/plugin.ts +144 -12
  236. package/src/core/registry.ts +157 -0
  237. package/src/core/url-loader.test.ts +221 -0
  238. package/src/core/url-loader.ts +388 -0
  239. package/src/plugin-operation/OperationPlugin.ts +2 -3
  240. package/src/plugin-operation/history/capability.ts +1 -2
  241. package/src/plugin-operation/history/errors.ts +2 -6
  242. package/src/plugin-operation/history/history-tracker.test.ts +37 -43
  243. package/src/plugin-operation/history/history-tracker.ts +1 -2
  244. package/src/plugin-operation/history/types.ts +1 -1
  245. package/src/plugin-operation/history/undo-mapping.ts +1 -1
  246. package/src/plugin-operation/history/undo-registry.test.ts +3 -4
  247. package/src/plugin-operation/history/undo-registry.ts +1 -1
  248. package/src/plugin-operation/invoker-capability.ts +19 -4
  249. package/src/plugin-operation/meta.ts +1 -1
  250. package/src/plugin-operation/testing.ts +26 -45
  251. package/src/plugin-runtime/RuntimePlugin.ts +2 -3
  252. package/src/plugin-runtime/meta.ts +1 -1
  253. package/src/testing/harness.ts +229 -0
  254. package/src/testing/index.ts +1 -0
  255. package/src/testing/react.test.tsx +48 -0
  256. package/src/testing/react.tsx +113 -0
  257. package/src/testing/service.ts +3 -3
  258. package/src/testing/withPluginManager.stories.tsx +1 -2
  259. package/src/testing/withPluginManager.tsx +40 -18
  260. package/src/ui/components/App/App.stories.tsx +5 -5
  261. package/src/ui/components/App/App.tsx +29 -5
  262. package/src/ui/components/Placeholder/Placeholder.stories.tsx +77 -0
  263. package/src/ui/components/Placeholder/Placeholder.tsx +155 -0
  264. package/src/ui/components/Placeholder/index.ts +5 -0
  265. package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +8 -6
  266. package/src/ui/components/Surface/SurfaceComponent.stories.tsx +16 -15
  267. package/src/ui/components/Surface/SurfaceComponent.tsx +109 -53
  268. package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
  269. package/src/ui/components/Surface/index.ts +35 -1
  270. package/src/ui/components/Surface/types.test.ts +126 -0
  271. package/src/ui/components/Surface/types.ts +164 -12
  272. package/src/ui/components/index.ts +1 -0
  273. package/src/ui/hooks/index.ts +0 -1
  274. package/src/ui/hooks/useApp.test.tsx +159 -0
  275. package/src/ui/hooks/useApp.tsx +226 -15
  276. package/src/ui/hooks/useLoading.tsx +14 -6
  277. package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +263 -0
  278. package/src/vite-plugin/boot-loader/boot-loader.css +294 -0
  279. package/src/vite-plugin/boot-loader/boot-loader.js +274 -0
  280. package/src/vite-plugin/boot-loader/index.ts +112 -0
  281. package/src/vite-plugin/composer/index.ts +306 -0
  282. package/src/vite-plugin/import-map/index.ts +524 -0
  283. package/src/vite-plugin/index.ts +10 -0
  284. package/src/vite-plugin/manifest.test.ts +46 -0
  285. package/src/vite-plugin/manifest.ts +57 -0
  286. package/src/vite-plugin/packages.ts +188 -0
  287. package/tsconfig.json +19 -1
  288. package/tsconfig.node.json +1 -1
  289. package/vitest.config.ts +1 -1
  290. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  291. package/dist/lib/browser/capability-7RLVE42K.mjs.map +0 -7
  292. package/dist/lib/browser/chunk-4CTRO67U.mjs +0 -703
  293. package/dist/lib/browser/chunk-4CTRO67U.mjs.map +0 -7
  294. package/dist/lib/browser/chunk-FHQTHCX7.mjs +0 -8
  295. package/dist/lib/browser/chunk-FNKT2QQ2.mjs.map +0 -7
  296. package/dist/lib/browser/chunk-HE27PNNQ.mjs +0 -824
  297. package/dist/lib/browser/chunk-HE27PNNQ.mjs.map +0 -7
  298. package/dist/lib/browser/chunk-NPUEVX42.mjs +0 -34
  299. package/dist/lib/browser/chunk-NPUEVX42.mjs.map +0 -7
  300. package/dist/lib/browser/chunk-PKQT6C53.mjs.map +0 -7
  301. package/dist/lib/browser/chunk-REORGDJT.mjs.map +0 -7
  302. package/dist/lib/browser/chunk-YAFEA4GV.mjs +0 -1
  303. package/dist/lib/browser/chunk-YNFPIQGB.mjs.map +0 -7
  304. package/dist/lib/browser/chunk-ZRWBPIZG.mjs.map +0 -7
  305. package/dist/lib/browser/invoker-capability-BNLVNYHU.mjs.map +0 -7
  306. package/dist/lib/node-esm/capability-EVZK4REM.mjs.map +0 -7
  307. package/dist/lib/node-esm/chunk-2A4PRBIX.mjs.map +0 -7
  308. package/dist/lib/node-esm/chunk-7CPNAEGV.mjs +0 -704
  309. package/dist/lib/node-esm/chunk-7CPNAEGV.mjs.map +0 -7
  310. package/dist/lib/node-esm/chunk-7OWSHPYK.mjs.map +0 -7
  311. package/dist/lib/node-esm/chunk-CJCQS2YL.mjs.map +0 -7
  312. package/dist/lib/node-esm/chunk-DTCHT2X2.mjs +0 -825
  313. package/dist/lib/node-esm/chunk-DTCHT2X2.mjs.map +0 -7
  314. package/dist/lib/node-esm/chunk-JAZVHID3.mjs +0 -35
  315. package/dist/lib/node-esm/chunk-JAZVHID3.mjs.map +0 -7
  316. package/dist/lib/node-esm/chunk-SB5ODNPX.mjs.map +0 -7
  317. package/dist/lib/node-esm/chunk-UFW652GS.mjs.map +0 -7
  318. package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs +0 -2
  319. package/dist/lib/node-esm/invoker-capability-VF6SP44V.mjs.map +0 -7
  320. package/dist/types/src/ui/hooks/useOperationResolver.d.ts +0 -19
  321. package/dist/types/src/ui/hooks/useOperationResolver.d.ts.map +0 -1
  322. package/src/ui/hooks/useOperationResolver.ts +0 -40
  323. /package/dist/lib/{node-esm/capability-CHIMU6LX.mjs.map → browser/capability-LUKGKUQH.mjs.map} +0 -0
  324. /package/dist/lib/browser/{chunk-YAFEA4GV.mjs.map → core/url-loader.mjs.map} +0 -0
  325. /package/dist/lib/node-esm/{chunk-Z4TJPSMP.mjs.map → core/url-loader.mjs.map} +0 -0
@@ -0,0 +1,71 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { BaseError } from '@dxos/errors';
3
+ declare const PluginAssetCacheError_base: {
4
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
5
+ cause?: unknown;
6
+ stack?: string;
7
+ name: "PluginAssetCacheError";
8
+ context: Record<string, unknown>;
9
+ readonly message: string;
10
+ readonly _tag: "PluginAssetCacheError";
11
+ };
12
+ isError(error: unknown): error is Error;
13
+ name: "PluginAssetCacheError";
14
+ is(error: unknown): error is BaseError;
15
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
16
+ ifTypeDiffers?: boolean;
17
+ }): (error: unknown) => {
18
+ cause?: unknown;
19
+ stack?: string;
20
+ name: "PluginAssetCacheError";
21
+ context: Record<string, unknown>;
22
+ readonly message: string;
23
+ readonly _tag: "PluginAssetCacheError";
24
+ };
25
+ extend<Name extends string = string>(name: Name, message?: string): any;
26
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
27
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
28
+ stackTraceLimit: number;
29
+ };
30
+ /**
31
+ * Tagged error for cache operations. Construction sites supply `context.operation`
32
+ * (one of `'cache' | 'evict' | 'resolve' | 'list'`) and `context.pluginId` so
33
+ * downstream handlers can route on the failed call without scanning the message.
34
+ */
35
+ export declare class PluginAssetCacheError extends PluginAssetCacheError_base {
36
+ }
37
+ /**
38
+ * Per-platform offline cache for third-party plugin assets.
39
+ *
40
+ * Implementations live alongside their platform glue (composer-app's
41
+ * `asset-cache/{tauri,service-worker}.ts`); the no-op default is for tests
42
+ * and unsupported environments.
43
+ */
44
+ export interface Cache {
45
+ /**
46
+ * Persist all listed URLs under the namespace of `pluginId`. Idempotent.
47
+ * The order of `urls` is significant — the first entry is treated as the entry module.
48
+ */
49
+ cache(pluginId: string, urls: readonly string[]): Effect.Effect<void, PluginAssetCacheError>;
50
+ /**
51
+ * Drop all assets for a plugin (uninstall).
52
+ */
53
+ evict(pluginId: string): Effect.Effect<void, PluginAssetCacheError>;
54
+ /**
55
+ * Resolves a plugin asset URL to a platform-specific cached URL when one is available.
56
+ * Returns the original URL when no cached copy exists or the platform serves cached
57
+ * responses transparently (e.g. service worker fetch interception on web).
58
+ */
59
+ resolve(pluginId: string, url: string): Effect.Effect<string, PluginAssetCacheError>;
60
+ /**
61
+ * List currently cached plugin ids (diagnostic).
62
+ */
63
+ list(): Effect.Effect<readonly string[], PluginAssetCacheError>;
64
+ }
65
+ /**
66
+ * No-op implementation. Used when no platform cache is registered (tests, unsupported environments).
67
+ * Plugins still load — they just have no offline guarantee.
68
+ */
69
+ export declare const noop: () => Cache;
70
+ export {};
71
+ //# sourceMappingURL=plugin-asset-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-asset-cache.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin-asset-cache.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,0BAG1C;CAAG;AAEJ;;;;;;GAMG;AACH,MAAM,WAAW,KAAK;IACpB;;;OAGG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IAE7F;;OAEG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IAEpE;;;;OAIG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAErF;;OAEG;IACH,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,MAAM,EAAE,EAAE,qBAAqB,CAAC,CAAC;CACjE;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,QAAO,KAKtB,CAAC"}
@@ -1,24 +1,159 @@
1
1
  import { Atom, Registry } from '@effect-atom/atom-react';
2
+ import * as Duration from 'effect/Duration';
2
3
  import * as Effect from 'effect/Effect';
3
4
  import * as PubSub from 'effect/PubSub';
5
+ import { BaseError } from '@dxos/errors';
4
6
  import * as ActivationEvent from './activation-event';
5
7
  import * as CapabilityManager from './capability-manager';
6
8
  import * as Plugin from './plugin';
9
+ import * as PluginRegistry from './registry';
10
+ declare const PluginInitializationError_base: {
11
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
12
+ cause?: unknown;
13
+ stack?: string;
14
+ name: "PluginInitializationError";
15
+ context: Record<string, unknown>;
16
+ readonly message: string;
17
+ readonly _tag: "PluginInitializationError";
18
+ };
19
+ isError(error: unknown): error is Error;
20
+ name: "PluginInitializationError";
21
+ is(error: unknown): error is BaseError;
22
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
23
+ ifTypeDiffers?: boolean;
24
+ }): (error: unknown) => {
25
+ cause?: unknown;
26
+ stack?: string;
27
+ name: "PluginInitializationError";
28
+ context: Record<string, unknown>;
29
+ readonly message: string;
30
+ readonly _tag: "PluginInitializationError";
31
+ };
32
+ extend<Name extends string = string>(name: Name, message?: string): any;
33
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
34
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
35
+ stackTraceLimit: number;
36
+ };
37
+ /**
38
+ * Tagged error for failures during the constructor-launched core/enabled
39
+ * `enable()` chain. Surfaces via {@link PluginManager.activate}'s wait on
40
+ * `_initialization` so a caller blocked on initialization gets a typed
41
+ * failure (with the original error preserved as `cause`) instead of an
42
+ * untyped `Error`.
43
+ */
44
+ export declare class PluginInitializationError extends PluginInitializationError_base {
45
+ }
46
+ declare const PluginTimeoutError_base: {
47
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
48
+ cause?: unknown;
49
+ stack?: string;
50
+ name: "PluginTimeoutError";
51
+ context: Record<string, unknown>;
52
+ readonly message: string;
53
+ readonly _tag: "PluginTimeoutError";
54
+ };
55
+ isError(error: unknown): error is Error;
56
+ name: "PluginTimeoutError";
57
+ is(error: unknown): error is BaseError;
58
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
59
+ ifTypeDiffers?: boolean;
60
+ }): (error: unknown) => {
61
+ cause?: unknown;
62
+ stack?: string;
63
+ name: "PluginTimeoutError";
64
+ context: Record<string, unknown>;
65
+ readonly message: string;
66
+ readonly _tag: "PluginTimeoutError";
67
+ };
68
+ extend<Name extends string = string>(name: Name, message?: string): any;
69
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
70
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
71
+ stackTraceLimit: number;
72
+ };
73
+ /**
74
+ * Tagged error raised when a plugin exceeds its configured load or activation
75
+ * timeout. The plugin manager records the failure on the `failed` atom and
76
+ * auto-disables the plugin so that one stuck remote does not stall app boot.
77
+ * `context.id` is the plugin id, `context.phase` is `'load'` or `'activation'`.
78
+ */
79
+ export declare class PluginTimeoutError extends PluginTimeoutError_base {
80
+ }
81
+ /** Phase of the plugin lifecycle in which the failure was observed. */
82
+ export type PluginFailurePhase = 'load' | 'activation';
83
+ /** Why the plugin entered a failed state. */
84
+ export type PluginFailureReason = 'timeout' | 'error';
85
+ /**
86
+ * Record of a plugin that failed to load or activate. Surfaced via the
87
+ * {@link PluginManager.failed} atom so registry / UI consumers can flag
88
+ * unhealthy plugins (e.g. a remote host that has gone offline) rather than
89
+ * leaving the app in a half-broken state.
90
+ */
91
+ export type PluginFailure = {
92
+ readonly id: string;
93
+ readonly phase: PluginFailurePhase;
94
+ readonly reason: PluginFailureReason;
95
+ readonly error: Error;
96
+ /** `Date.now()` when the failure was recorded. */
97
+ readonly timestamp: number;
98
+ };
7
99
  /**
8
100
  * Identifier denoting a Manager.
9
101
  */
10
102
  export declare const ManagerTypeId: unique symbol;
11
103
  export type ManagerTypeId = typeof ManagerTypeId;
104
+ /**
105
+ * Loader result that carries optional metadata about how the plugin was sourced.
106
+ *
107
+ * `dev: true` marks a plugin as session-only and triggers shadow-on-id-collision
108
+ * inside the manager: if a plugin with the same id is already registered (a
109
+ * builtin, or a previously-installed plugin from the registry), the dev plugin
110
+ * temporarily takes over that id slot. The original is restored when the dev
111
+ * plugin is removed (or on page reload, since dev plugins aren't persisted).
112
+ */
113
+ export type LoadedPlugin = {
114
+ plugin: Plugin.Plugin;
115
+ /** True when the plugin came from a dev source. See type doc for semantics. */
116
+ dev?: boolean;
117
+ };
12
118
  export type ManagerOptions = {
13
- pluginLoader: (id: string) => Effect.Effect<Plugin.Plugin, Error>;
119
+ pluginLoader: (id: string) => Effect.Effect<LoadedPlugin, Error>;
14
120
  plugins?: Plugin.Plugin[];
15
121
  core?: string[];
16
122
  enabled?: string[];
17
123
  registry?: Registry.Registry;
124
+ /**
125
+ * Backend for the plugin registry catalog. When omitted the manager exposes a
126
+ * no-op `pluginRegistry` (empty list, no versions endpoint). Implementations
127
+ * live in app-framework alongside the interface (e.g.
128
+ * `EdgeRegistryPluginProvider`); the host app instantiates one and passes it in.
129
+ */
130
+ pluginRegistryProvider?: PluginRegistry.PluginProvider;
131
+ /**
132
+ * Hook called when a plugin is removed via {@link PluginManager.remove}. Used by the
133
+ * host app to clean up persisted state (e.g. evict offline-cached plugin assets).
134
+ * Failures are logged and swallowed; removal still succeeds even if the hook fails.
135
+ */
136
+ onRemove?: (id: string) => Effect.Effect<void, unknown>;
137
+ /**
138
+ * Maximum time allowed for a lazy plugin's dynamic `import()` to resolve.
139
+ * Plugins that exceed this are flagged on the {@link PluginManager.failed}
140
+ * atom and auto-disabled so a stuck remote host can't stall app boot.
141
+ * Defaults to 30 seconds; pass `Duration.infinity` to disable.
142
+ */
143
+ loadTimeout?: Duration.DurationInput;
144
+ /**
145
+ * Maximum time allowed for a single module's `activate()` Effect to settle.
146
+ * Modules that exceed this fail with {@link PluginTimeoutError}; the owning
147
+ * plugin is recorded on `failed` and auto-disabled. Defaults to 30 seconds;
148
+ * pass `Duration.infinity` to disable.
149
+ */
150
+ activationTimeout?: Duration.DurationInput;
18
151
  };
19
- type ActivationMessage = {
152
+ export type ActivationMessage = {
20
153
  event: string;
21
154
  state: 'activating' | 'activated' | 'error';
155
+ /** Module ID when the message pertains to a specific module activation. */
156
+ module?: string;
22
157
  error?: Error;
23
158
  };
24
159
  /**
@@ -29,6 +164,13 @@ export interface PluginManager {
29
164
  readonly activation: PubSub.PubSub<ActivationMessage>;
30
165
  readonly capabilities: CapabilityManager.CapabilityManager;
31
166
  readonly registry: Registry.Registry;
167
+ /**
168
+ * Cached registry catalog state plus pass-throughs for `listVersions` /
169
+ * `getPlugin`. Always present — the host supplies a `pluginRegistryProvider`
170
+ * via {@link ManagerOptions} for real backends, or it falls back to a no-op
171
+ * implementation that yields an empty catalog.
172
+ */
173
+ readonly pluginRegistry: PluginRegistry.Manager;
32
174
  readonly plugins: Atom.Atom<readonly Plugin.Plugin[]>;
33
175
  readonly core: Atom.Atom<readonly string[]>;
34
176
  readonly enabled: Atom.Atom<readonly string[]>;
@@ -36,6 +178,19 @@ export interface PluginManager {
36
178
  readonly active: Atom.Atom<readonly string[]>;
37
179
  readonly eventsFired: Atom.Atom<readonly string[]>;
38
180
  readonly pendingReset: Atom.Atom<readonly string[]>;
181
+ /**
182
+ * Plugins that failed to load or activate. Subscribers (e.g. the registry
183
+ * UI) can use this to flag unhealthy entries; a plugin id appears here at
184
+ * most once with its most recent failure.
185
+ */
186
+ readonly failed: Atom.Atom<readonly PluginFailure[]>;
187
+ /**
188
+ * Ids of currently-registered plugins that came from a dev source (loaded
189
+ * via {@link LoadedPlugin} with `dev: true`). Subscribers can use this to
190
+ * badge dev-overridden plugins or to derive the id of the active dev plugin
191
+ * for an "uninstall dev plugin" affordance.
192
+ */
193
+ readonly devPluginIds: Atom.Atom<readonly string[]>;
39
194
  getPlugins(): readonly Plugin.Plugin[];
40
195
  getCore(): readonly string[];
41
196
  getEnabled(): readonly string[];
@@ -43,9 +198,21 @@ export interface PluginManager {
43
198
  getActive(): readonly string[];
44
199
  getEventsFired(): readonly string[];
45
200
  getPendingReset(): readonly string[];
46
- add(id: string): Effect.Effect<boolean, Error>;
201
+ getFailed(): readonly PluginFailure[];
202
+ getDevPluginIds(): readonly string[];
203
+ /**
204
+ * Clears the failure record for a plugin so it can be retried. Returns
205
+ * whether a failure record existed and was removed.
206
+ */
207
+ clearFailure(id: string): boolean;
208
+ /**
209
+ * Loads a plugin via the plugin loader and registers it without enabling it.
210
+ * Returns the loaded plugin so callers can enable it by its canonical id
211
+ * (which may differ from the locator used to load it, e.g. URL loaders).
212
+ */
213
+ add(id: string): Effect.Effect<Plugin.Plugin, Error>;
47
214
  enable(id: string): Effect.Effect<boolean, Error>;
48
- remove(id: string): boolean;
215
+ remove(id: string): Effect.Effect<boolean, Error>;
49
216
  disable(id: string): Effect.Effect<boolean, Error>;
50
217
  activate(event: ActivationEvent.ActivationEvent | string, params?: {
51
218
  before?: string;
@@ -53,6 +220,12 @@ export interface PluginManager {
53
220
  }): Effect.Effect<boolean, Error>;
54
221
  deactivate(id: string): Effect.Effect<boolean, Error>;
55
222
  reset(event: ActivationEvent.ActivationEvent | string): Effect.Effect<boolean, Error>;
223
+ /**
224
+ * Shuts down the manager by deactivating all active modules in reverse activation order,
225
+ * clearing all capabilities, and resetting lifecycle bookkeeping.
226
+ * Plugins, core, enabled, and modules remain intact so the manager can be reused.
227
+ */
228
+ shutdown(): Effect.Effect<boolean, Error>;
56
229
  }
57
230
  /**
58
231
  * Type guard to check if a value is a PluginManager.
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin-manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKzD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAOxC,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,iBAAiB,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,OAAO,MAAkD,CAAC;AACtF,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAC9B,CAAC;AAEF,KAAK,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAEvG;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,iB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CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAClD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAEnD,QAAQ,CACN,KAAK,EAAE,eAAe,CAAC,eAAe,GAAG,MAAM,EAC/C,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3C,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACtD,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAEtF;;;;OAIG;IACH,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,UAAW,OAAO,KAAG,KAAK,IAAI,aAEnD,CAAC;AAojCF;;GAEG;AACH,eAAO,MAAM,IAAI,YAAa,cAAc,KAAG,aAAyC,CAAC"}
@@ -0,0 +1,101 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import * as Schema from 'effect/Schema';
3
+ import { BaseError } from '@dxos/errors';
4
+ /**
5
+ * Default port the Vite plugin (`composerPlugin`) binds the dev server to.
6
+ *
7
+ * Shared single source of truth — `composerPlugin` reads it as the default
8
+ * port, and the host's "Load Dev Plugin" affordance pre-fills the manifest URL
9
+ * with `http://localhost:${PLUGIN_DEV_SERVER_PORT}/manifest.json`. Lives in
10
+ * app-framework rather than `@dxos/protocols` because the constant is a
11
+ * client-side convention (host loader + Vite plugin) rather than a wire-level
12
+ * protocol.
13
+ */
14
+ export declare const PLUGIN_DEV_SERVER_PORT = 3967;
15
+ declare const PluginManifestError_base: {
16
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
17
+ cause?: unknown;
18
+ stack?: string;
19
+ name: "PluginManifestError";
20
+ context: Record<string, unknown>;
21
+ readonly message: string;
22
+ readonly _tag: "PluginManifestError";
23
+ };
24
+ isError(error: unknown): error is Error;
25
+ name: "PluginManifestError";
26
+ is(error: unknown): error is BaseError;
27
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
28
+ ifTypeDiffers?: boolean;
29
+ }): (error: unknown) => {
30
+ cause?: unknown;
31
+ stack?: string;
32
+ name: "PluginManifestError";
33
+ context: Record<string, unknown>;
34
+ readonly message: string;
35
+ readonly _tag: "PluginManifestError";
36
+ };
37
+ extend<Name extends string = string>(name: Name, message?: string): any;
38
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
39
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
40
+ stackTraceLimit: number;
41
+ };
42
+ /**
43
+ * Tagged error for manifest fetch / parse failures. Construction sites set
44
+ * `context.manifestUrl` and `context.reason` (one of `'fetch-failed' |
45
+ * 'http-error' | 'parse-failed' | 'invalid'`) so handlers can route on the
46
+ * specific failure mode.
47
+ */
48
+ export declare class PluginManifestError extends PluginManifestError_base {
49
+ }
50
+ /**
51
+ * Schema for a third-party plugin manifest.
52
+ *
53
+ * Production manifests are published as a sibling of the plugin's entry module
54
+ * ({@link PLUGIN_ENTRY_FILENAME}) and advertise every file the plugin needs at
55
+ * runtime so the host can eagerly cache them for offline use.
56
+ *
57
+ * Dev manifests (served by `vite dev` via {@link composerPlugin}) set `devEntry`
58
+ * to point at the unbundled source entry. The host's loader treats the presence
59
+ * of `devEntry` as the dev-mode signal: it imports the entry directly from the
60
+ * dev server, skips eager asset caching, and skips static stylesheet injection
61
+ * (Vite handles CSS via runtime `<style>` injection during HMR). `assets` is not
62
+ * required to enumerate every file in dev mode — chunks and styles flow through
63
+ * the dev server on demand.
64
+ */
65
+ export declare const Manifest: Schema.Struct<{
66
+ id: typeof Schema.String;
67
+ name: typeof Schema.String;
68
+ version: typeof Schema.String;
69
+ assets: Schema.Array$<typeof Schema.String>;
70
+ devEntry: Schema.optional<typeof Schema.String>;
71
+ }>;
72
+ export type Manifest = Schema.Schema.Type<typeof Manifest>;
73
+ /**
74
+ * Resolved manifest with all asset paths converted to absolute URLs.
75
+ *
76
+ * `dev` reflects whether the source manifest declared a `devEntry`. Loaders branch
77
+ * on this to skip offline caching and stylesheet injection — both are no-ops (or
78
+ * actively wrong) when the plugin is being served by a Vite dev server.
79
+ */
80
+ export type ResolvedManifest = {
81
+ id: string;
82
+ name: string;
83
+ version: string;
84
+ entryUrl: string;
85
+ assetUrls: readonly string[];
86
+ dev: boolean;
87
+ };
88
+ /**
89
+ * Synchronous decode + validate + resolve for an in-memory manifest payload. Used
90
+ * by tests and tooling that have the manifest body already loaded; the runtime
91
+ * path goes through {@link fetchManifest}.
92
+ */
93
+ export declare const parse: (manifestUrl: string, payload: unknown) => ResolvedManifest;
94
+ /**
95
+ * Fetches and parses a manifest from the given URL via Effect's HTTP client and
96
+ * Schema-driven JSON decoding. All failure modes surface as a single tagged
97
+ * {@link PluginManifestError}; callers route on `error.context.reason`.
98
+ */
99
+ export declare const fetchManifest: (manifestUrl: string) => Effect.Effect<ResolvedManifest, PluginManifestError>;
100
+ export {};
101
+ //# sourceMappingURL=plugin-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-manifest.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin-manifest.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3C;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,wBAAqE;CAAG;AAEjH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ;;;;;;EAMnB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAmBF;;;;GAIG;AACH,eAAO,MAAM,KAAK,gBAAiB,MAAM,WAAW,OAAO,KAAG,gBAM7D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,gBAAiB,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAuBxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plugin-manifest.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-manifest.test.d.ts","sourceRoot":"","sources":["../../../../src/core/plugin-manifest.test.ts"],"names":[],"mappings":""}
@@ -1,6 +1,7 @@
1
1
  import * as Context from 'effect/Context';
2
2
  import * as Effect from 'effect/Effect';
3
3
  import * as Pipeable from 'effect/Pipeable';
4
+ import { BaseError } from '@dxos/errors';
4
5
  import type * as ActivationEvent from './activation-event';
5
6
  import * as Capability from './capability';
6
7
  import type * as PluginManager from './plugin-manager';
@@ -25,6 +26,11 @@ export declare const activate: (event: ActivationEvent.ActivationEvent) => Effec
25
26
  * @returns Whether the reset was successful.
26
27
  */
27
28
  export declare const reset: (event: ActivationEvent.ActivationEvent) => Effect.Effect<boolean, Error, Service>;
29
+ /**
30
+ * Shuts down the plugin manager, deactivating all active modules and clearing lifecycle state.
31
+ * Accesses the PluginManager via the Effect layer system.
32
+ */
33
+ export declare const shutdown: () => Effect.Effect<boolean, Error, Service>;
28
34
  /**
29
35
  * Identifier denoting a PluginModule.
30
36
  */
@@ -49,15 +55,32 @@ export interface PluginModule {
49
55
  */
50
56
  activatesOn: ActivationEvent.Events;
51
57
  /**
52
- * Events which the plugin depends on being activated.
53
- * Plugin is marked as needing reset a plugin activated by a dependent event is removed.
54
- * Events are automatically activated before activation of the plugin.
58
+ * Events that this module fires *before* its own activation runs.
59
+ *
60
+ * When this module is asked to activate (via {@link activatesOn}), the
61
+ * plugin manager first activates every event listed here, ensuring any
62
+ * other modules that contribute to those events have completed before
63
+ * this module's {@link activate} body executes. These events are fired
64
+ * by the framework on this module's behalf — the module does not need
65
+ * to wait for some other code to fire them.
66
+ *
67
+ * The module is marked as needing reset if a module activated by one
68
+ * of these events is later removed.
69
+ *
70
+ * Read as: "this module fires these events before [its] activation".
55
71
  */
56
- activatesBefore?: ActivationEvent.ActivationEvent[];
72
+ firesBeforeActivation?: ActivationEvent.ActivationEvent[];
57
73
  /**
58
- * Events which this plugin triggers upon activation.
74
+ * Events that this module fires *after* its own activation completes.
75
+ *
76
+ * Once this module's {@link activate} body has finished executing, the
77
+ * plugin manager activates every event listed here, causing any modules
78
+ * listening on those events to run. These events are fired by the
79
+ * framework on this module's behalf as part of this module's lifecycle.
80
+ *
81
+ * Read as: "this module fires these events after [its] activation".
59
82
  */
60
- activatesAfter?: ActivationEvent.ActivationEvent[];
83
+ firesAfterActivation?: ActivationEvent.ActivationEvent[];
61
84
  /**
62
85
  * Called when the module is activated.
63
86
  * CapabilityManager is accessed via the Effect layer system (Capability.Service).
@@ -76,7 +99,7 @@ export type Meta = {
76
99
  *
77
100
  * Expected to be in the form of a valid URL.
78
101
  *
79
- * @example dxos.org/plugin/example
102
+ * @example org.dxos.plugin.example
80
103
  */
81
104
  id: string;
82
105
  /**
@@ -87,6 +110,10 @@ export type Meta = {
87
110
  * Short description of plugin functionality.
88
111
  */
89
112
  description?: string;
113
+ /**
114
+ * Name of the author or organization that created the plugin.
115
+ */
116
+ author?: string;
90
117
  /**
91
118
  * URL of home page.
92
119
  */
@@ -159,5 +186,84 @@ export type PluginFactory<T = void> = ((options: T) => Plugin) & {
159
186
  * When T is void, the function takes no arguments: () => Plugin.
160
187
  */
161
188
  export declare function make<T>(builder: PluginBuilder<T>): PluginFactory<T>;
189
+ /**
190
+ * Async loader for a lazy plugin's real implementation.
191
+ * The default export of the loaded module must be a `PluginFactory<T>` —
192
+ * i.e. the same shape `Plugin.make` produces.
193
+ */
194
+ export type LazyLoader<T = void> = () => Promise<{
195
+ default: PluginFactory<T>;
196
+ }>;
197
+ /**
198
+ * Defines a lazy plugin whose body is loaded on first enable.
199
+ *
200
+ * The returned factory produces a stub `Plugin` that exposes `meta`
201
+ * synchronously (so callers can read `Plugin.meta.id` for free) but defers
202
+ * loading the real plugin's modules until the manager calls
203
+ * `Plugin.resolveLazy`. This lets the plugin's main entry point ship as a
204
+ * tiny meta-only chunk — the heavy capabilities, schema, React surfaces,
205
+ * etc. live behind the dynamic `import()` and become a separate Rollup
206
+ * chunk that is only fetched when the plugin is enabled.
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * // plugin-markdown/src/index.ts
211
+ * import { Plugin } from '@dxos/app-framework';
212
+ * import { meta } from './meta';
213
+ *
214
+ * export const MarkdownPlugin = Plugin.lazy(meta, () => import('./MarkdownPlugin'));
215
+ *
216
+ * // plugin-markdown/src/MarkdownPlugin.tsx
217
+ * export const MarkdownPlugin = Plugin.define(meta).pipe(...heavy modules..., Plugin.make);
218
+ * export default MarkdownPlugin;
219
+ * ```
220
+ */
221
+ export declare const lazy: <T = void>(meta: Meta, loader: LazyLoader<T>) => PluginFactory<T>;
222
+ /**
223
+ * Type guard for lazy plugin stubs produced by {@link lazy}.
224
+ */
225
+ export declare const isLazy: (plugin: Plugin) => boolean;
226
+ declare const LazyPluginError_base: {
227
+ new (options?: import("@dxos/errors").BaseErrorOptions): {
228
+ cause?: unknown;
229
+ stack?: string;
230
+ name: "LazyPluginError";
231
+ context: Record<string, unknown>;
232
+ readonly message: string;
233
+ readonly _tag: "LazyPluginError";
234
+ };
235
+ isError(error: unknown): error is Error;
236
+ name: "LazyPluginError";
237
+ is(error: unknown): error is BaseError;
238
+ wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
239
+ ifTypeDiffers?: boolean;
240
+ }): (error: unknown) => {
241
+ cause?: unknown;
242
+ stack?: string;
243
+ name: "LazyPluginError";
244
+ context: Record<string, unknown>;
245
+ readonly message: string;
246
+ readonly _tag: "LazyPluginError";
247
+ };
248
+ extend<Name extends string = string>(name: Name, message?: string): any;
249
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
250
+ prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
251
+ stackTraceLimit: number;
252
+ };
253
+ /**
254
+ * Tagged error for failures during lazy plugin resolution. `context.id` is
255
+ * the lazy plugin's `meta.id`; `context.reason` discriminates the failure
256
+ * mode (`'load-failed' | 'missing-default' | 'invalid-plugin' |
257
+ * 'meta-mismatch'`) so callers can route on it.
258
+ */
259
+ export declare class LazyPluginError extends LazyPluginError_base {
260
+ }
261
+ /**
262
+ * Resolves a lazy plugin stub to its real plugin.
263
+ * Returns the plugin unchanged if it is not lazy. Failures surface as
264
+ * {@link LazyPluginError} with `context.reason` indicating the failure mode
265
+ * and (for loader failures) `cause` set to the original error.
266
+ */
267
+ export declare const resolveLazy: (plugin: Plugin) => Effect.Effect<Plugin, LazyPluginError>;
162
268
  export {};
163
269
  //# sourceMappingURL=plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/core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