@dxos/app-framework 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934

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 (307) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/{capability-OP63CD5N.mjs → capability-HRFPP52W.mjs} +11 -11
  4. package/dist/lib/browser/capability-HRFPP52W.mjs.map +7 -0
  5. package/dist/lib/browser/{capability-BBBBAPDI.mjs → capability-VQ236TY5.mjs} +10 -10
  6. package/dist/lib/browser/{chunk-T3Y4AEKX.mjs → chunk-23D4SJUE.mjs} +3 -3
  7. package/dist/lib/browser/{chunk-T3Y4AEKX.mjs.map → chunk-23D4SJUE.mjs.map} +1 -1
  8. package/dist/lib/browser/{chunk-2CKCJ6PN.mjs → chunk-3JWJXGLK.mjs} +1 -1
  9. package/dist/lib/browser/{chunk-2CKCJ6PN.mjs.map → chunk-3JWJXGLK.mjs.map} +1 -1
  10. package/dist/lib/browser/{chunk-I34GF4NG.mjs → chunk-45CHLTBV.mjs} +2 -2
  11. package/dist/lib/browser/{chunk-QSXYHXCE.mjs → chunk-66IXTIVK.mjs} +1 -1
  12. package/dist/lib/browser/{chunk-QSXYHXCE.mjs.map → chunk-66IXTIVK.mjs.map} +2 -2
  13. package/dist/lib/browser/chunk-6GZYCP73.mjs +422 -0
  14. package/dist/lib/browser/chunk-6GZYCP73.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-7VZJR2OA.mjs +581 -0
  16. package/dist/lib/browser/chunk-7VZJR2OA.mjs.map +7 -0
  17. package/dist/lib/browser/{chunk-TGX63LTL.mjs → chunk-FJ4765WW.mjs} +1 -1
  18. package/dist/lib/browser/{chunk-TGX63LTL.mjs.map → chunk-FJ4765WW.mjs.map} +2 -2
  19. package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
  20. package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
  21. package/dist/lib/browser/{chunk-FU4GAFUQ.mjs → chunk-G6Q2M2M5.mjs} +85 -15
  22. package/dist/lib/browser/chunk-G6Q2M2M5.mjs.map +7 -0
  23. package/dist/lib/browser/chunk-J43JDWAV.mjs +1445 -0
  24. package/dist/lib/browser/chunk-J43JDWAV.mjs.map +7 -0
  25. package/dist/lib/browser/{chunk-JKWMHZP6.mjs → chunk-WBHCSOBW.mjs} +2 -2
  26. package/dist/lib/browser/chunk-WBHCSOBW.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-XLYULXAO.mjs +469 -0
  28. package/dist/lib/browser/chunk-XLYULXAO.mjs.map +7 -0
  29. package/dist/lib/browser/{chunk-F7FW2RK2.mjs → chunk-ZGJAZSNE.mjs} +7 -32
  30. package/dist/lib/browser/chunk-ZGJAZSNE.mjs.map +7 -0
  31. package/dist/lib/browser/cli/index.mjs +14 -28
  32. package/dist/lib/browser/cli/index.mjs.map +3 -3
  33. package/dist/lib/browser/common/activation-events.mjs +7 -7
  34. package/dist/lib/browser/common/capabilities.mjs +7 -7
  35. package/dist/lib/browser/core/activation-event.mjs +1 -1
  36. package/dist/lib/browser/core/capability.mjs +1 -1
  37. package/dist/lib/browser/core/plugin-manager.mjs +8 -4
  38. package/dist/lib/browser/core/plugin.mjs +12 -2
  39. package/dist/lib/browser/core/url-loader.mjs +17 -5
  40. package/dist/lib/browser/index.mjs +38 -21
  41. package/dist/lib/browser/index.mjs.map +3 -3
  42. package/dist/lib/browser/{invoker-capability-H5PPENOC.mjs → invoker-capability-CEL2L6GX.mjs} +12 -11
  43. package/dist/lib/browser/invoker-capability-CEL2L6GX.mjs.map +7 -0
  44. package/dist/lib/browser/meta.json +1 -1
  45. package/dist/lib/browser/testing/index.mjs +149 -28
  46. package/dist/lib/browser/testing/index.mjs.map +4 -4
  47. package/dist/lib/browser/testing/react.mjs +78 -0
  48. package/dist/lib/browser/testing/react.mjs.map +7 -0
  49. package/dist/lib/browser/ui/index.mjs +18 -14
  50. package/dist/lib/node-esm/{capability-AWBEMRYR.mjs → capability-GS3XJH74.mjs} +10 -10
  51. package/dist/lib/node-esm/{capability-WFEG6CIZ.mjs → capability-I5P7ACFL.mjs} +11 -11
  52. package/dist/lib/node-esm/capability-I5P7ACFL.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-4RJL37GN.mjs +423 -0
  56. package/dist/lib/node-esm/chunk-4RJL37GN.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-WZCSOX5Q.mjs → chunk-6XW6LET6.mjs} +2 -2
  58. package/dist/lib/node-esm/{chunk-URWHJQT2.mjs → chunk-D347W3KO.mjs} +7 -32
  59. package/dist/lib/node-esm/chunk-D347W3KO.mjs.map +7 -0
  60. package/dist/lib/node-esm/chunk-DW45NFLW.mjs +1446 -0
  61. package/dist/lib/node-esm/chunk-DW45NFLW.mjs.map +7 -0
  62. package/dist/lib/node-esm/chunk-EI4LYXFY.mjs +470 -0
  63. package/dist/lib/node-esm/chunk-EI4LYXFY.mjs.map +7 -0
  64. package/dist/lib/node-esm/{chunk-ULUEXB7Q.mjs → chunk-KIFOQXD4.mjs} +85 -15
  65. package/dist/lib/node-esm/chunk-KIFOQXD4.mjs.map +7 -0
  66. package/dist/lib/node-esm/{chunk-VKHGNEDB.mjs → chunk-SBS2YMPT.mjs} +3 -3
  67. package/dist/lib/node-esm/{chunk-VKHGNEDB.mjs.map → chunk-SBS2YMPT.mjs.map} +1 -1
  68. package/dist/lib/node-esm/{chunk-42KBWDE4.mjs → chunk-SDJ4B2LU.mjs} +1 -1
  69. package/dist/lib/node-esm/{chunk-42KBWDE4.mjs.map → chunk-SDJ4B2LU.mjs.map} +1 -1
  70. package/dist/lib/node-esm/chunk-V24UWT36.mjs +582 -0
  71. package/dist/lib/node-esm/chunk-V24UWT36.mjs.map +7 -0
  72. package/dist/lib/node-esm/{chunk-G3RTFSNG.mjs → chunk-WFSRZKBP.mjs} +2 -2
  73. package/dist/lib/node-esm/chunk-WFSRZKBP.mjs.map +7 -0
  74. package/dist/lib/node-esm/chunk-WK7OIQKI.mjs +70 -0
  75. package/dist/lib/node-esm/chunk-WK7OIQKI.mjs.map +7 -0
  76. package/dist/lib/node-esm/{chunk-ZZ7CKK6W.mjs → chunk-XOCUANHO.mjs} +1 -1
  77. package/dist/lib/node-esm/{chunk-ZZ7CKK6W.mjs.map → chunk-XOCUANHO.mjs.map} +2 -2
  78. package/dist/lib/node-esm/cli/index.mjs +14 -28
  79. package/dist/lib/node-esm/cli/index.mjs.map +3 -3
  80. package/dist/lib/node-esm/common/activation-events.mjs +7 -7
  81. package/dist/lib/node-esm/common/capabilities.mjs +7 -7
  82. package/dist/lib/node-esm/core/activation-event.mjs +1 -1
  83. package/dist/lib/node-esm/core/capability.mjs +1 -1
  84. package/dist/lib/node-esm/core/plugin-manager.mjs +8 -4
  85. package/dist/lib/node-esm/core/plugin.mjs +12 -2
  86. package/dist/lib/node-esm/core/url-loader.mjs +17 -5
  87. package/dist/lib/node-esm/index.mjs +38 -21
  88. package/dist/lib/node-esm/index.mjs.map +3 -3
  89. package/dist/lib/node-esm/{invoker-capability-S3ZA527J.mjs → invoker-capability-QKUKN2MF.mjs} +12 -11
  90. package/dist/lib/node-esm/invoker-capability-QKUKN2MF.mjs.map +7 -0
  91. package/dist/lib/node-esm/meta.json +1 -1
  92. package/dist/lib/node-esm/testing/index.mjs +149 -28
  93. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  94. package/dist/lib/node-esm/testing/react.mjs +79 -0
  95. package/dist/lib/node-esm/testing/react.mjs.map +7 -0
  96. package/dist/lib/node-esm/ui/index.mjs +18 -14
  97. package/dist/plugin/node-esm/index.mjs +542 -33
  98. package/dist/plugin/node-esm/index.mjs.map +4 -4
  99. package/dist/plugin/node-esm/meta.json +1 -1
  100. package/dist/types/src/common/annotations.d.ts +1 -0
  101. package/dist/types/src/common/annotations.d.ts.map +1 -0
  102. package/dist/types/src/common/capabilities.d.ts +2 -1
  103. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  104. package/dist/types/src/common/operations.d.ts +1 -1
  105. package/dist/types/src/common/operations.d.ts.map +1 -1
  106. package/dist/types/src/core/activation-event.d.ts +4 -4
  107. package/dist/types/src/core/activation-event.d.ts.map +1 -1
  108. package/dist/types/src/core/capability-manager.d.ts.map +1 -1
  109. package/dist/types/src/core/capability.d.ts +2 -2
  110. package/dist/types/src/core/capability.d.ts.map +1 -1
  111. package/dist/types/src/core/edge-registry-plugin-provider.d.ts +30 -0
  112. package/dist/types/src/core/edge-registry-plugin-provider.d.ts.map +1 -0
  113. package/dist/types/src/core/index.d.ts +5 -0
  114. package/dist/types/src/core/index.d.ts.map +1 -1
  115. package/dist/types/src/core/plugin-asset-cache.d.ts +71 -0
  116. package/dist/types/src/core/plugin-asset-cache.d.ts.map +1 -0
  117. package/dist/types/src/core/plugin-manager.d.ts +230 -5
  118. package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
  119. package/dist/types/src/core/plugin-manifest.d.ts +101 -0
  120. package/dist/types/src/core/plugin-manifest.d.ts.map +1 -0
  121. package/dist/types/src/core/plugin-manifest.test.d.ts +2 -0
  122. package/dist/types/src/core/plugin-manifest.test.d.ts.map +1 -0
  123. package/dist/types/src/core/plugin.d.ts +164 -6
  124. package/dist/types/src/core/plugin.d.ts.map +1 -1
  125. package/dist/types/src/core/registry.d.ts +107 -0
  126. package/dist/types/src/core/registry.d.ts.map +1 -0
  127. package/dist/types/src/core/url-loader.d.ts +105 -3
  128. package/dist/types/src/core/url-loader.d.ts.map +1 -1
  129. package/dist/types/src/helpers.d.ts.map +1 -1
  130. package/dist/types/src/plugin-operation/history/capability.d.ts.map +1 -1
  131. package/dist/types/src/plugin-operation/history/errors.d.ts +6 -6
  132. package/dist/types/src/plugin-operation/history/errors.d.ts.map +1 -1
  133. package/dist/types/src/plugin-operation/history/history-tracker.d.ts +1 -1
  134. package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +1 -1
  135. package/dist/types/src/plugin-operation/history/types.d.ts +1 -1
  136. package/dist/types/src/plugin-operation/history/types.d.ts.map +1 -1
  137. package/dist/types/src/plugin-operation/history/undo-mapping.d.ts +1 -1
  138. package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +1 -1
  139. package/dist/types/src/plugin-operation/history/undo-registry.d.ts +1 -1
  140. package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +1 -1
  141. package/dist/types/src/plugin-operation/invoker-capability.d.ts +1 -1
  142. package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +1 -1
  143. package/dist/types/src/plugin-operation/meta.d.ts.map +1 -1
  144. package/dist/types/src/plugin-operation/testing.d.ts +2 -1
  145. package/dist/types/src/plugin-operation/testing.d.ts.map +1 -1
  146. package/dist/types/src/plugin-runtime/capability.d.ts +1 -1
  147. package/dist/types/src/plugin-runtime/capability.d.ts.map +1 -1
  148. package/dist/types/src/plugin-runtime/meta.d.ts.map +1 -1
  149. package/dist/types/src/testing/harness.d.ts +67 -0
  150. package/dist/types/src/testing/harness.d.ts.map +1 -0
  151. package/dist/types/src/testing/index.d.ts +1 -0
  152. package/dist/types/src/testing/index.d.ts.map +1 -1
  153. package/dist/types/src/testing/react.d.ts +27 -0
  154. package/dist/types/src/testing/react.d.ts.map +1 -0
  155. package/dist/types/src/testing/react.test.d.ts +2 -0
  156. package/dist/types/src/testing/react.test.d.ts.map +1 -0
  157. package/dist/types/src/testing/service.d.ts.map +1 -1
  158. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  159. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  160. package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
  161. package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
  162. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
  163. package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
  164. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
  165. package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
  166. package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
  167. package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
  168. package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -1
  169. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +16 -4
  170. package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
  171. package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
  172. package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +1 -1
  173. package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -1
  174. package/dist/types/src/ui/components/Surface/index.d.ts +16 -6
  175. package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
  176. package/dist/types/src/ui/components/Surface/types.d.ts +110 -9
  177. package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
  178. package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
  179. package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
  180. package/dist/types/src/ui/components/index.d.ts +1 -0
  181. package/dist/types/src/ui/components/index.d.ts.map +1 -1
  182. package/dist/types/src/ui/hooks/useApp.d.ts +30 -3
  183. package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
  184. package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -1
  185. package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -1
  186. package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -1
  187. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
  188. package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
  189. package/dist/types/src/vite-plugin/boot-loader/index.d.ts +2 -0
  190. package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
  191. package/dist/types/src/vite-plugin/boot-loader/loader.d.ts +51 -0
  192. package/dist/types/src/vite-plugin/boot-loader/loader.d.ts.map +1 -0
  193. package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
  194. package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
  195. package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
  196. package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
  197. package/dist/types/src/vite-plugin/index.d.ts +4 -2
  198. package/dist/types/src/vite-plugin/index.d.ts.map +1 -1
  199. package/dist/types/src/vite-plugin/manifest.d.ts +41 -0
  200. package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
  201. package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
  202. package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
  203. package/dist/types/src/vite-plugin/packages.d.ts +10 -4
  204. package/dist/types/src/vite-plugin/packages.d.ts.map +1 -1
  205. package/dist/types/tsconfig.tsbuildinfo +1 -1
  206. package/moon.yml +1 -0
  207. package/package.json +36 -60
  208. package/src/cli/cli.ts +1 -1
  209. package/src/common/annotations.ts +3 -0
  210. package/src/common/capabilities.ts +2 -1
  211. package/src/common/operations.ts +1 -1
  212. package/src/core/capability.ts +1 -1
  213. package/src/core/edge-registry-plugin-provider.ts +92 -0
  214. package/src/core/index.ts +5 -0
  215. package/src/core/plugin-asset-cache.ts +60 -0
  216. package/src/core/plugin-manager.test.ts +793 -7
  217. package/src/core/plugin-manager.ts +846 -44
  218. package/src/core/plugin-manifest.test.ts +75 -0
  219. package/src/core/plugin-manifest.ts +134 -0
  220. package/src/core/plugin.ts +170 -10
  221. package/src/core/registry.ts +163 -0
  222. package/src/core/url-loader.test.ts +148 -6
  223. package/src/core/url-loader.ts +284 -44
  224. package/src/plugin-operation/OperationPlugin.ts +2 -2
  225. package/src/plugin-operation/history/capability.ts +1 -1
  226. package/src/plugin-operation/history/history-tracker.test.ts +2 -1
  227. package/src/plugin-operation/history/history-tracker.ts +1 -1
  228. package/src/plugin-operation/history/types.ts +1 -1
  229. package/src/plugin-operation/history/undo-mapping.ts +1 -1
  230. package/src/plugin-operation/history/undo-registry.ts +1 -1
  231. package/src/plugin-operation/invoker-capability.ts +2 -1
  232. package/src/plugin-operation/meta.ts +1 -0
  233. package/src/plugin-operation/testing.ts +2 -1
  234. package/src/plugin-runtime/RuntimePlugin.ts +2 -2
  235. package/src/plugin-runtime/meta.ts +1 -0
  236. package/src/testing/harness.ts +229 -0
  237. package/src/testing/index.ts +1 -0
  238. package/src/testing/react.test.tsx +48 -0
  239. package/src/testing/react.tsx +113 -0
  240. package/src/testing/service.ts +1 -1
  241. package/src/testing/withPluginManager.stories.tsx +1 -1
  242. package/src/testing/withPluginManager.tsx +0 -2
  243. package/src/ui/components/App/App.stories.tsx +2 -6
  244. package/src/ui/components/App/App.tsx +25 -2
  245. package/src/ui/components/Placeholder/Placeholder.stories.tsx +77 -0
  246. package/src/ui/components/Placeholder/Placeholder.tsx +155 -0
  247. package/src/ui/components/Placeholder/index.ts +5 -0
  248. package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +4 -2
  249. package/src/ui/components/Surface/SurfaceComponent.stories.tsx +1 -1
  250. package/src/ui/components/Surface/SurfaceComponent.tsx +85 -48
  251. package/src/ui/components/Surface/SurfaceInfo.tsx +0 -1
  252. package/src/ui/components/Surface/index.ts +20 -1
  253. package/src/ui/components/Surface/types.test.ts +126 -0
  254. package/src/ui/components/Surface/types.ts +164 -12
  255. package/src/ui/components/index.ts +1 -0
  256. package/src/ui/hooks/useApp.test.tsx +1 -1
  257. package/src/ui/hooks/useApp.tsx +177 -42
  258. package/src/ui/hooks/useLoading.tsx +14 -6
  259. package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +270 -0
  260. package/src/vite-plugin/boot-loader/boot-loader.css +321 -0
  261. package/src/vite-plugin/boot-loader/boot-loader.js +325 -0
  262. package/src/vite-plugin/boot-loader/index.ts +5 -0
  263. package/src/vite-plugin/boot-loader/loader.ts +123 -0
  264. package/src/vite-plugin/composer/index.ts +306 -0
  265. package/src/vite-plugin/import-map/index.ts +527 -0
  266. package/src/vite-plugin/index.ts +6 -2
  267. package/src/vite-plugin/manifest.test.ts +46 -0
  268. package/src/vite-plugin/manifest.ts +57 -0
  269. package/src/vite-plugin/packages.ts +168 -10
  270. package/tsconfig.json +16 -1
  271. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  272. package/dist/lib/browser/capability-OP63CD5N.mjs.map +0 -7
  273. package/dist/lib/browser/chunk-F7FW2RK2.mjs.map +0 -7
  274. package/dist/lib/browser/chunk-FU4GAFUQ.mjs.map +0 -7
  275. package/dist/lib/browser/chunk-GX4TUNM6.mjs +0 -963
  276. package/dist/lib/browser/chunk-GX4TUNM6.mjs.map +0 -7
  277. package/dist/lib/browser/chunk-JKWMHZP6.mjs.map +0 -7
  278. package/dist/lib/browser/chunk-LVJW5EFU.mjs +0 -157
  279. package/dist/lib/browser/chunk-LVJW5EFU.mjs.map +0 -7
  280. package/dist/lib/browser/chunk-RFSO3JRG.mjs +0 -1
  281. package/dist/lib/browser/chunk-RFSO3JRG.mjs.map +0 -7
  282. package/dist/lib/browser/chunk-WPE6AL7I.mjs +0 -905
  283. package/dist/lib/browser/chunk-WPE6AL7I.mjs.map +0 -7
  284. package/dist/lib/browser/invoker-capability-H5PPENOC.mjs.map +0 -7
  285. package/dist/lib/node-esm/capability-WFEG6CIZ.mjs.map +0 -7
  286. package/dist/lib/node-esm/chunk-4A3ZCMI3.mjs +0 -158
  287. package/dist/lib/node-esm/chunk-4A3ZCMI3.mjs.map +0 -7
  288. package/dist/lib/node-esm/chunk-BCEOLX47.mjs +0 -964
  289. package/dist/lib/node-esm/chunk-BCEOLX47.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-EL3R25OQ.mjs +0 -2
  291. package/dist/lib/node-esm/chunk-EL3R25OQ.mjs.map +0 -7
  292. package/dist/lib/node-esm/chunk-G3RTFSNG.mjs.map +0 -7
  293. package/dist/lib/node-esm/chunk-LQKOTNJW.mjs +0 -906
  294. package/dist/lib/node-esm/chunk-LQKOTNJW.mjs.map +0 -7
  295. package/dist/lib/node-esm/chunk-ULUEXB7Q.mjs.map +0 -7
  296. package/dist/lib/node-esm/chunk-URWHJQT2.mjs.map +0 -7
  297. package/dist/lib/node-esm/invoker-capability-S3ZA527J.mjs.map +0 -7
  298. package/dist/types/src/vite-plugin/composer-plugin.d.ts +0 -18
  299. package/dist/types/src/vite-plugin/composer-plugin.d.ts.map +0 -1
  300. package/dist/types/src/vite-plugin/import-map-plugin.d.ts +0 -16
  301. package/dist/types/src/vite-plugin/import-map-plugin.d.ts.map +0 -1
  302. package/src/vite-plugin/composer-plugin.ts +0 -128
  303. package/src/vite-plugin/import-map-plugin.ts +0 -314
  304. /package/dist/lib/browser/{capability-BBBBAPDI.mjs.map → capability-VQ236TY5.mjs.map} +0 -0
  305. /package/dist/lib/browser/{chunk-I34GF4NG.mjs.map → chunk-45CHLTBV.mjs.map} +0 -0
  306. /package/dist/lib/node-esm/{capability-AWBEMRYR.mjs.map → capability-GS3XJH74.mjs.map} +0 -0
  307. /package/dist/lib/node-esm/{chunk-WZCSOX5Q.mjs.map → chunk-6XW6LET6.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,20 +1,153 @@
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
152
  export type ActivationMessage = {
20
153
  event: string;
@@ -31,6 +164,13 @@ export interface PluginManager {
31
164
  readonly activation: PubSub.PubSub<ActivationMessage>;
32
165
  readonly capabilities: CapabilityManager.CapabilityManager;
33
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;
34
174
  readonly plugins: Atom.Atom<readonly Plugin.Plugin[]>;
35
175
  readonly core: Atom.Atom<readonly string[]>;
36
176
  readonly enabled: Atom.Atom<readonly string[]>;
@@ -38,6 +178,19 @@ export interface PluginManager {
38
178
  readonly active: Atom.Atom<readonly string[]>;
39
179
  readonly eventsFired: Atom.Atom<readonly string[]>;
40
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[]>;
41
194
  getPlugins(): readonly Plugin.Plugin[];
42
195
  getCore(): readonly string[];
43
196
  getEnabled(): readonly string[];
@@ -45,10 +198,81 @@ export interface PluginManager {
45
198
  getActive(): readonly string[];
46
199
  getEventsFired(): readonly string[];
47
200
  getPendingReset(): readonly string[];
48
- add(id: string): Effect.Effect<boolean, Error>;
49
- enable(id: string): Effect.Effect<boolean, Error>;
50
- remove(id: string): boolean;
51
- disable(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>;
214
+ /**
215
+ * Enables a plugin.
216
+ *
217
+ * Default behavior auto-resolves the plugin's declared `dependsOn` closure:
218
+ * missing entries that exist in the plugin registry catalog are installed via
219
+ * {@link add}, then enabled in dependency-first order. Set `resolveDependencies`
220
+ * to `false` to enable only the named plugin and skip the closure walk
221
+ * entirely — useful when substituting an alternative plugin that satisfies
222
+ * the dependent's capability needs in its own way.
223
+ */
224
+ enable(id: string, opts?: {
225
+ resolveDependencies?: boolean;
226
+ }): Effect.Effect<boolean, Error>;
227
+ /**
228
+ * Removes a plugin from the manager (disables then unregisters).
229
+ *
230
+ * Honors the same cascade option as {@link disable}.
231
+ */
232
+ remove(id: string, opts?: {
233
+ cascade?: boolean;
234
+ }): Effect.Effect<boolean, Error>;
235
+ /**
236
+ * Disables a plugin.
237
+ *
238
+ * By default, cascades to currently-enabled dependents (transitively, leaves
239
+ * first) so disabling a depended-upon plugin never leaves its dependents
240
+ * stranded. Pass `cascade: false` to disable only the named plugin and leave
241
+ * its dependents enabled-but-broken — VS Code-style disable parity for
242
+ * callers that want the escape hatch (e.g. when swapping in an alternative
243
+ * implementation that satisfies the dependents' needs in its own way).
244
+ *
245
+ * Fails with {@link Plugin.PluginDependencyError} (`reason: 'core-dependent'`)
246
+ * when cascading would require disabling a core plugin; UI flows should
247
+ * surface their own confirmation before calling `disable` with the default.
248
+ */
249
+ disable(id: string, opts?: {
250
+ cascade?: boolean;
251
+ }): Effect.Effect<boolean, Error>;
252
+ /**
253
+ * Returns the plugin ids that the given plugin declares as dependencies.
254
+ *
255
+ * Walks `meta.dependsOn` from both registered plugins and the plugin registry
256
+ * catalog so callers can preview the closure for a plugin that isn't yet
257
+ * installed. With `transitive: true` (default), returns the full dependency
258
+ * closure in dependency-first order (deps before dependents). Without it,
259
+ * returns the direct declarations only.
260
+ */
261
+ getDependencies(id: string, opts?: {
262
+ transitive?: boolean;
263
+ }): readonly string[];
264
+ /**
265
+ * Returns the plugin ids that declare the given plugin as a dependency.
266
+ *
267
+ * Walks `meta.dependsOn` over registered plugins. With `transitive: true`
268
+ * (default), returns the full reverse closure. With `enabledOnly: true`,
269
+ * filters to currently-enabled dependents — used by UI flows to preview what
270
+ * a cascading disable would touch.
271
+ */
272
+ getDependents(id: string, opts?: {
273
+ transitive?: boolean;
274
+ enabledOnly?: boolean;
275
+ }): readonly string[];
52
276
  activate(event: ActivationEvent.ActivationEvent | string, params?: {
53
277
  before?: string;
54
278
  after?: string;
@@ -70,4 +294,5 @@ export declare const isManager: (value: unknown) => value is PluginManager;
70
294
  * Creates a new Plugin Manager instance.
71
295
  */
72
296
  export declare const make: (options: ManagerOptions) => PluginManager;
297
+ export {};
73
298
  //# sourceMappingURL=plugin-manager.d.ts.map
@@ -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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,KAAK,CAAC,CAAC;IAEjF;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,MAAM,EAAE,CAAC;IAEhF;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,MAAM,EAAE,CAAC;IAErG,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;AA61CF;;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":""}