@dxos/app-framework 0.8.4-main.c85a9c8dae → 0.8.4-main.d05539e30a
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.
- package/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/browser/{capability-7RLVE42K.mjs → capability-K5XIVCQU.mjs} +12 -11
- package/dist/lib/browser/capability-K5XIVCQU.mjs.map +7 -0
- package/dist/lib/browser/chunk-5AHASNDW.mjs +95 -0
- package/dist/lib/browser/chunk-5AHASNDW.mjs.map +7 -0
- package/dist/lib/browser/chunk-5GY3YOEL.mjs +28 -0
- package/dist/lib/browser/chunk-5GY3YOEL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PKQT6C53.mjs → chunk-66IXTIVK.mjs} +3 -2
- package/dist/lib/browser/chunk-66IXTIVK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZRWBPIZG.mjs → chunk-BRK6GYNB.mjs} +14 -42
- package/dist/lib/browser/chunk-BRK6GYNB.mjs.map +7 -0
- package/dist/lib/browser/chunk-FJ4765WW.mjs +8 -0
- package/dist/lib/browser/{chunk-FHQTHCX7.mjs.map → chunk-FJ4765WW.mjs.map} +3 -3
- package/dist/lib/browser/chunk-FO3IYSLV.mjs +68 -0
- package/dist/lib/browser/chunk-FO3IYSLV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-YNFPIQGB.mjs → chunk-IW44C7UL.mjs} +9 -2
- package/dist/lib/browser/chunk-IW44C7UL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5RJNZV7K.mjs → chunk-KFDF7KR3.mjs} +11 -13
- package/dist/lib/browser/{chunk-5RJNZV7K.mjs.map → chunk-KFDF7KR3.mjs.map} +3 -3
- package/dist/lib/browser/chunk-KLHQNYJ2.mjs +422 -0
- package/dist/lib/browser/chunk-KLHQNYJ2.mjs.map +7 -0
- package/dist/lib/browser/chunk-QLML5QFJ.mjs +581 -0
- package/dist/lib/browser/chunk-QLML5QFJ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FNKT2QQ2.mjs → chunk-SLX73WRZ.mjs} +90 -17
- package/dist/lib/browser/chunk-SLX73WRZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-UVTGHZQF.mjs +513 -0
- package/dist/lib/browser/chunk-UVTGHZQF.mjs.map +7 -0
- package/dist/lib/browser/chunk-VJ5PFAWC.mjs +1446 -0
- package/dist/lib/browser/chunk-VJ5PFAWC.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +17 -32
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- package/dist/lib/browser/common/activation-events.mjs +11 -14
- package/dist/lib/browser/common/capabilities.mjs +19 -8
- package/dist/lib/browser/core/activation-event.mjs +1 -1
- package/dist/lib/browser/core/capability.mjs +5 -1
- package/dist/lib/browser/core/plugin-manager.mjs +8 -4
- package/dist/lib/browser/core/plugin.mjs +16 -4
- package/dist/lib/browser/core/url-loader.mjs +24 -0
- package/dist/lib/browser/index.mjs +47 -49
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/process-manager-capability-JIWLN7SU.mjs +89 -0
- package/dist/lib/browser/process-manager-capability-JIWLN7SU.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +199 -56
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/browser/testing/react.mjs +78 -0
- package/dist/lib/browser/testing/react.mjs.map +7 -0
- package/dist/lib/browser/ui/index.mjs +24 -15
- package/dist/lib/node-esm/{capability-EVZK4REM.mjs → capability-RLKFFLTB.mjs} +12 -11
- package/dist/lib/node-esm/capability-RLKFFLTB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UEWJDI2L.mjs → chunk-37Z53PXZ.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-UEWJDI2L.mjs.map → chunk-37Z53PXZ.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-42UNAKYO.mjs +423 -0
- package/dist/lib/node-esm/chunk-42UNAKYO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CJCQS2YL.mjs → chunk-6S45OMUP.mjs} +90 -17
- package/dist/lib/node-esm/chunk-6S45OMUP.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2A4PRBIX.mjs → chunk-BYHYYJZH.mjs} +14 -42
- package/dist/lib/node-esm/chunk-BYHYYJZH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SB5ODNPX.mjs → chunk-CTKEZHKF.mjs} +9 -2
- package/dist/lib/node-esm/chunk-CTKEZHKF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JNT72ZCN.mjs +514 -0
- package/dist/lib/node-esm/chunk-JNT72ZCN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KFZEB6BV.mjs +29 -0
- package/dist/lib/node-esm/chunk-KFZEB6BV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LJNUFNDO.mjs +582 -0
- package/dist/lib/node-esm/chunk-LJNUFNDO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VUIUFIGT.mjs → chunk-OUEMWPIW.mjs} +11 -13
- package/dist/lib/node-esm/{chunk-VUIUFIGT.mjs.map → chunk-OUEMWPIW.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-PW2VYGOS.mjs +96 -0
- package/dist/lib/node-esm/chunk-PW2VYGOS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SFYCO3PT.mjs +1447 -0
- package/dist/lib/node-esm/chunk-SFYCO3PT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WK7OIQKI.mjs +70 -0
- package/dist/lib/node-esm/chunk-WK7OIQKI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7OWSHPYK.mjs → chunk-XOCUANHO.mjs} +3 -2
- package/dist/lib/node-esm/chunk-XOCUANHO.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +17 -32
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- package/dist/lib/node-esm/common/activation-events.mjs +11 -14
- package/dist/lib/node-esm/common/capabilities.mjs +19 -8
- package/dist/lib/node-esm/core/activation-event.mjs +1 -1
- package/dist/lib/node-esm/core/capability.mjs +5 -1
- package/dist/lib/node-esm/core/plugin-manager.mjs +8 -4
- package/dist/lib/node-esm/core/plugin.mjs +16 -4
- package/dist/lib/node-esm/core/url-loader.mjs +25 -0
- package/dist/lib/node-esm/index.mjs +47 -49
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/process-manager-capability-PHKLO2BL.mjs +90 -0
- package/dist/lib/node-esm/process-manager-capability-PHKLO2BL.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +199 -56
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/testing/react.mjs +79 -0
- package/dist/lib/node-esm/testing/react.mjs.map +7 -0
- package/dist/lib/node-esm/ui/index.mjs +24 -15
- package/dist/plugin/node-esm/index.mjs +893 -0
- package/dist/plugin/node-esm/index.mjs.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -0
- package/dist/types/src/cli/cli.d.ts +1 -3
- package/dist/types/src/cli/cli.d.ts.map +1 -1
- package/dist/types/src/common/activation-events.d.ts +10 -13
- package/dist/types/src/common/activation-events.d.ts.map +1 -1
- package/dist/types/src/common/annotations.d.ts +1 -0
- package/dist/types/src/common/annotations.d.ts.map +1 -0
- package/dist/types/src/common/capabilities.d.ts +113 -12
- package/dist/types/src/common/capabilities.d.ts.map +1 -1
- package/dist/types/src/common/operations.d.ts +8 -22
- package/dist/types/src/common/operations.d.ts.map +1 -1
- package/dist/types/src/core/activation-event.d.ts +5 -5
- package/dist/types/src/core/activation-event.d.ts.map +1 -1
- package/dist/types/src/core/capability-manager.d.ts +5 -0
- package/dist/types/src/core/capability-manager.d.ts.map +1 -1
- package/dist/types/src/core/capability.d.ts +13 -2
- package/dist/types/src/core/capability.d.ts.map +1 -1
- package/dist/types/src/core/edge-registry-plugin-provider.d.ts +30 -0
- package/dist/types/src/core/edge-registry-plugin-provider.d.ts.map +1 -0
- package/dist/types/src/core/index.d.ts +6 -0
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/dist/types/src/core/plugin-asset-cache.d.ts +71 -0
- package/dist/types/src/core/plugin-asset-cache.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manager.d.ts +238 -7
- package/dist/types/src/core/plugin-manager.d.ts.map +1 -1
- package/dist/types/src/core/plugin-manifest.d.ts +101 -0
- package/dist/types/src/core/plugin-manifest.d.ts.map +1 -0
- package/dist/types/src/core/plugin-manifest.test.d.ts +2 -0
- package/dist/types/src/core/plugin-manifest.test.d.ts.map +1 -0
- package/dist/types/src/core/plugin.d.ts +182 -7
- package/dist/types/src/core/plugin.d.ts.map +1 -1
- package/dist/types/src/core/registry.d.ts +107 -0
- package/dist/types/src/core/registry.d.ts.map +1 -0
- package/dist/types/src/core/url-loader.d.ts +127 -0
- package/dist/types/src/core/url-loader.d.ts.map +1 -0
- package/dist/types/src/core/url-loader.test.d.ts +2 -0
- package/dist/types/src/core/url-loader.test.d.ts.map +1 -0
- package/dist/types/src/helpers.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/plugin-process-manager/ProcessManagerPlugin.d.ts +3 -0
- package/dist/types/src/plugin-process-manager/ProcessManagerPlugin.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/capability.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/errors.d.ts +32 -0
- package/dist/types/src/plugin-process-manager/history/errors.d.ts.map +1 -0
- package/dist/types/src/{plugin-operation → plugin-process-manager}/history/history-tracker.d.ts +1 -1
- package/dist/types/src/plugin-process-manager/history/history-tracker.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/history-tracker.test.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/index.d.ts.map +1 -0
- package/dist/types/src/{plugin-operation → plugin-process-manager}/history/types.d.ts +1 -1
- package/dist/types/src/plugin-process-manager/history/types.d.ts.map +1 -0
- package/dist/types/src/{plugin-operation → plugin-process-manager}/history/undo-mapping.d.ts +1 -1
- package/dist/types/src/plugin-process-manager/history/undo-mapping.d.ts.map +1 -0
- package/dist/types/src/{plugin-operation → plugin-process-manager}/history/undo-registry.d.ts +1 -1
- package/dist/types/src/plugin-process-manager/history/undo-registry.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/history/undo-registry.test.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/index.d.ts +3 -0
- package/dist/types/src/plugin-process-manager/index.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/meta.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts +8 -0
- package/dist/types/src/plugin-process-manager/process-manager-capability.d.ts.map +1 -0
- package/dist/types/src/plugin-process-manager/testing.d.ts +59 -0
- package/dist/types/src/plugin-process-manager/testing.d.ts.map +1 -0
- package/dist/types/src/testing/harness.d.ts +79 -0
- package/dist/types/src/testing/harness.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/react.d.ts +27 -0
- package/dist/types/src/testing/react.d.ts.map +1 -0
- package/dist/types/src/testing/react.test.d.ts +2 -0
- package/dist/types/src/testing/react.test.d.ts.map +1 -0
- package/dist/types/src/testing/service.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
- package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.d.ts +3 -2
- package/dist/types/src/ui/components/App/App.d.ts.map +1 -1
- package/dist/types/src/ui/components/App/App.stories.d.ts +2 -2
- package/dist/types/src/ui/components/App/App.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts +64 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.d.ts.map +1 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts +19 -0
- package/dist/types/src/ui/components/Placeholder/Placeholder.stories.d.ts.map +1 -0
- package/dist/types/src/ui/components/Placeholder/index.d.ts +2 -0
- package/dist/types/src/ui/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/src/ui/components/PluginManager/PluginManagerContext.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts +16 -4
- package/dist/types/src/ui/components/Surface/SurfaceComponent.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceComponent.stories.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceInfo.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts +48 -0
- package/dist/types/src/ui/components/Surface/SurfaceProfilerContext.d.ts.map +1 -0
- package/dist/types/src/ui/components/Surface/index.d.ts +22 -6
- package/dist/types/src/ui/components/Surface/index.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.d.ts +110 -9
- package/dist/types/src/ui/components/Surface/types.d.ts.map +1 -1
- package/dist/types/src/ui/components/Surface/types.test.d.ts +2 -0
- package/dist/types/src/ui/components/Surface/types.test.d.ts.map +1 -0
- package/dist/types/src/ui/components/index.d.ts +1 -0
- package/dist/types/src/ui/components/index.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/index.d.ts +1 -1
- package/dist/types/src/ui/hooks/index.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useApp.d.ts +47 -11
- package/dist/types/src/ui/hooks/useApp.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useApp.test.d.ts +2 -0
- package/dist/types/src/ui/hooks/useApp.test.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useCapabilities.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useLoading.d.ts.map +1 -1
- package/dist/types/src/ui/hooks/useProcessManagerRuntime.d.ts +24 -0
- package/dist/types/src/ui/hooks/useProcessManagerRuntime.d.ts.map +1 -0
- package/dist/types/src/ui/hooks/useSettingsState.d.ts.map +1 -1
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts +34 -0
- package/dist/types/src/vite-plugin/boot-loader/BootLoader.stories.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts +2 -0
- package/dist/types/src/vite-plugin/boot-loader/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/boot-loader/loader.d.ts +51 -0
- package/dist/types/src/vite-plugin/boot-loader/loader.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts +34 -0
- package/dist/types/src/vite-plugin/composer/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts +28 -0
- package/dist/types/src/vite-plugin/import-map/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/index.d.ts +5 -0
- package/dist/types/src/vite-plugin/index.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.d.ts +41 -0
- package/dist/types/src/vite-plugin/manifest.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/manifest.test.d.ts +2 -0
- package/dist/types/src/vite-plugin/manifest.test.d.ts.map +1 -0
- package/dist/types/src/vite-plugin/packages.d.ts +13 -0
- package/dist/types/src/vite-plugin/packages.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/moon.yml +15 -0
- package/package.json +53 -54
- package/src/cli/cli.ts +4 -9
- package/src/common/activation-events.ts +12 -17
- package/src/common/annotations.ts +3 -0
- package/src/common/capabilities.ts +160 -29
- package/src/common/operations.ts +7 -10
- package/src/context.ts +1 -1
- package/src/core/activation-event.ts +5 -2
- package/src/core/capability-manager.test.ts +1 -1
- package/src/core/capability-manager.ts +22 -1
- package/src/core/capability.ts +20 -2
- package/src/core/edge-registry-plugin-provider.ts +92 -0
- package/src/core/index.ts +6 -0
- package/src/core/plugin-asset-cache.ts +60 -0
- package/src/core/plugin-manager.test.ts +1085 -31
- package/src/core/plugin-manager.ts +1170 -198
- package/src/core/plugin-manifest.test.ts +75 -0
- package/src/core/plugin-manifest.ts +134 -0
- package/src/core/plugin.ts +194 -12
- package/src/core/registry.ts +163 -0
- package/src/core/url-loader.test.ts +221 -0
- package/src/core/url-loader.ts +388 -0
- package/src/index.ts +1 -2
- package/src/plugin-process-manager/ProcessManagerPlugin.ts +24 -0
- package/src/{plugin-operation → plugin-process-manager}/history/capability.ts +1 -2
- package/src/plugin-process-manager/history/errors.ts +7 -0
- package/src/{plugin-operation → plugin-process-manager}/history/history-tracker.test.ts +37 -43
- package/src/{plugin-operation → plugin-process-manager}/history/history-tracker.ts +1 -2
- package/src/{plugin-operation → plugin-process-manager}/history/types.ts +1 -1
- package/src/{plugin-operation → plugin-process-manager}/history/undo-mapping.ts +1 -1
- package/src/{plugin-operation → plugin-process-manager}/history/undo-registry.test.ts +3 -4
- package/src/{plugin-operation → plugin-process-manager}/history/undo-registry.ts +1 -1
- package/src/{plugin-operation → plugin-process-manager}/index.ts +1 -1
- package/src/plugin-process-manager/meta.ts +14 -0
- package/src/plugin-process-manager/process-manager-capability.ts +178 -0
- package/src/{plugin-operation → plugin-process-manager}/testing.ts +26 -45
- package/src/testing/harness.ts +247 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/react.test.tsx +48 -0
- package/src/testing/react.tsx +113 -0
- package/src/testing/service.ts +4 -4
- package/src/testing/withPluginManager.stories.tsx +1 -2
- package/src/testing/withPluginManager.tsx +45 -20
- package/src/ui/components/App/App.stories.tsx +7 -13
- package/src/ui/components/App/App.tsx +29 -5
- package/src/ui/components/Placeholder/Placeholder.stories.tsx +77 -0
- package/src/ui/components/Placeholder/Placeholder.tsx +155 -0
- package/src/{plugin-runtime → ui/components/Placeholder}/index.ts +1 -1
- package/src/ui/components/PluginManager/PluginManagerContext.stories.tsx +8 -7
- package/src/ui/components/Surface/SurfaceComponent.stories.tsx +16 -15
- package/src/ui/components/Surface/SurfaceComponent.tsx +111 -55
- package/src/ui/components/Surface/SurfaceInfo.tsx +0 -1
- package/src/ui/components/Surface/SurfaceProfilerContext.tsx +207 -0
- package/src/ui/components/Surface/index.ts +35 -1
- package/src/ui/components/Surface/types.test.ts +126 -0
- package/src/ui/components/Surface/types.ts +164 -12
- package/src/ui/components/index.ts +1 -0
- package/src/ui/hooks/index.ts +1 -1
- package/src/ui/hooks/useApp.test.tsx +159 -0
- package/src/ui/hooks/useApp.tsx +229 -24
- package/src/ui/hooks/useLoading.tsx +14 -6
- package/src/ui/hooks/useProcessManagerRuntime.ts +68 -0
- package/src/vite-plugin/boot-loader/BootLoader.stories.tsx +270 -0
- package/src/vite-plugin/boot-loader/boot-loader.css +320 -0
- package/src/vite-plugin/boot-loader/boot-loader.js +325 -0
- package/src/vite-plugin/boot-loader/index.ts +5 -0
- package/src/vite-plugin/boot-loader/loader.ts +123 -0
- package/src/vite-plugin/composer/index.ts +306 -0
- package/src/vite-plugin/import-map/index.ts +527 -0
- package/src/vite-plugin/index.ts +10 -0
- package/src/vite-plugin/manifest.test.ts +46 -0
- package/src/vite-plugin/manifest.ts +57 -0
- package/src/vite-plugin/packages.ts +187 -0
- package/tsconfig.json +25 -1
- package/tsconfig.node.json +1 -1
- package/vitest.config.ts +1 -1
- package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
- package/dist/lib/browser/capability-2GL5JAGJ.mjs +0 -37
- package/dist/lib/browser/capability-2GL5JAGJ.mjs.map +0 -7
- package/dist/lib/browser/capability-7RLVE42K.mjs.map +0 -7
- package/dist/lib/browser/chunk-4CTRO67U.mjs +0 -703
- package/dist/lib/browser/chunk-4CTRO67U.mjs.map +0 -7
- package/dist/lib/browser/chunk-FHQTHCX7.mjs +0 -8
- package/dist/lib/browser/chunk-FNKT2QQ2.mjs.map +0 -7
- package/dist/lib/browser/chunk-HE27PNNQ.mjs +0 -824
- package/dist/lib/browser/chunk-HE27PNNQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-NPUEVX42.mjs +0 -34
- package/dist/lib/browser/chunk-NPUEVX42.mjs.map +0 -7
- package/dist/lib/browser/chunk-PKQT6C53.mjs.map +0 -7
- package/dist/lib/browser/chunk-REORGDJT.mjs +0 -80
- package/dist/lib/browser/chunk-REORGDJT.mjs.map +0 -7
- package/dist/lib/browser/chunk-YAFEA4GV.mjs +0 -1
- package/dist/lib/browser/chunk-YNFPIQGB.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZRWBPIZG.mjs.map +0 -7
- package/dist/lib/browser/invoker-capability-BNLVNYHU.mjs +0 -36
- package/dist/lib/browser/invoker-capability-BNLVNYHU.mjs.map +0 -7
- package/dist/lib/node-esm/capability-CHIMU6LX.mjs +0 -38
- package/dist/lib/node-esm/capability-CHIMU6LX.mjs.map +0 -7
- package/dist/lib/node-esm/capability-EVZK4REM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2A4PRBIX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7CPNAEGV.mjs +0 -704
- package/dist/lib/node-esm/chunk-7CPNAEGV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7OWSHPYK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CJCQS2YL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DTCHT2X2.mjs +0 -825
- package/dist/lib/node-esm/chunk-DTCHT2X2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs +0 -35
- package/dist/lib/node-esm/chunk-JAZVHID3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SB5ODNPX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UFW652GS.mjs +0 -81
- package/dist/lib/node-esm/chunk-UFW652GS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Z4TJPSMP.mjs +0 -2
- package/dist/lib/node-esm/invoker-capability-VF6SP44V.mjs +0 -37
- package/dist/lib/node-esm/invoker-capability-VF6SP44V.mjs.map +0 -7
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts +0 -3
- package/dist/types/src/plugin-operation/OperationPlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/capability.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/errors.d.ts +0 -5
- package/dist/types/src/plugin-operation/history/errors.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/history-tracker.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/history-tracker.test.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/index.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/types.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/undo-mapping.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/undo-registry.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/history/undo-registry.test.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/index.d.ts +0 -3
- package/dist/types/src/plugin-operation/index.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/invoker-capability.d.ts +0 -6
- package/dist/types/src/plugin-operation/invoker-capability.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/meta.d.ts.map +0 -1
- package/dist/types/src/plugin-operation/testing.d.ts +0 -109
- package/dist/types/src/plugin-operation/testing.d.ts.map +0 -1
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts +0 -3
- package/dist/types/src/plugin-runtime/RuntimePlugin.d.ts.map +0 -1
- package/dist/types/src/plugin-runtime/capability.d.ts +0 -6
- package/dist/types/src/plugin-runtime/capability.d.ts.map +0 -1
- package/dist/types/src/plugin-runtime/index.d.ts +0 -2
- package/dist/types/src/plugin-runtime/index.d.ts.map +0 -1
- package/dist/types/src/plugin-runtime/meta.d.ts +0 -3
- package/dist/types/src/plugin-runtime/meta.d.ts.map +0 -1
- package/dist/types/src/ui/hooks/useOperationResolver.d.ts +0 -19
- package/dist/types/src/ui/hooks/useOperationResolver.d.ts.map +0 -1
- package/src/plugin-operation/OperationPlugin.ts +0 -25
- package/src/plugin-operation/history/errors.ts +0 -11
- package/src/plugin-operation/invoker-capability.ts +0 -40
- package/src/plugin-operation/meta.ts +0 -11
- package/src/plugin-runtime/RuntimePlugin.ts +0 -20
- package/src/plugin-runtime/capability.ts +0 -53
- package/src/plugin-runtime/meta.ts +0 -11
- package/src/ui/hooks/useOperationResolver.ts +0 -40
- /package/dist/lib/browser/{chunk-YAFEA4GV.mjs.map → core/url-loader.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-Z4TJPSMP.mjs.map → core/url-loader.mjs.map} +0 -0
- /package/dist/types/src/{plugin-operation → plugin-process-manager}/history/capability.d.ts +0 -0
- /package/dist/types/src/{plugin-operation → plugin-process-manager}/history/history-tracker.test.d.ts +0 -0
- /package/dist/types/src/{plugin-operation → plugin-process-manager}/history/index.d.ts +0 -0
- /package/dist/types/src/{plugin-operation → plugin-process-manager}/history/undo-registry.test.d.ts +0 -0
- /package/dist/types/src/{plugin-operation → plugin-process-manager}/meta.d.ts +0 -0
- /package/src/{plugin-operation → plugin-process-manager}/history/index.ts +0 -0
package/moon.yml
CHANGED
|
@@ -20,3 +20,18 @@ tasks:
|
|
|
20
20
|
- '--entryPoint=src/common/activation-events.ts'
|
|
21
21
|
- '--entryPoint=src/ui/index.ts'
|
|
22
22
|
- '--entryPoint=src/testing/index.ts'
|
|
23
|
+
- '--entryPoint=src/testing/react.tsx'
|
|
24
|
+
- '--entryPoint=src/core/url-loader.ts'
|
|
25
|
+
deps:
|
|
26
|
+
- compile-plugin
|
|
27
|
+
compile-plugin:
|
|
28
|
+
command: dx-compile
|
|
29
|
+
args:
|
|
30
|
+
- '--entryPoint=src/vite-plugin/index.ts'
|
|
31
|
+
- '--outputPath=dist/plugin'
|
|
32
|
+
- '--platform=node'
|
|
33
|
+
deps:
|
|
34
|
+
- ^:compile
|
|
35
|
+
- dx-compile:compile
|
|
36
|
+
outputs:
|
|
37
|
+
- dist/plugin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/app-framework",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.d05539e30a",
|
|
4
4
|
"description": "A framework for building applications from composible plugins.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"type": "module",
|
|
@@ -55,6 +55,16 @@
|
|
|
55
55
|
"node": "./dist/lib/node-esm/plugin-manager/index.mjs",
|
|
56
56
|
"types": "./dist/types/src/plugin-manager/index.d.ts"
|
|
57
57
|
},
|
|
58
|
+
"./UrlLoader": {
|
|
59
|
+
"source": "./src/core/url-loader.ts",
|
|
60
|
+
"browser": "./dist/lib/browser/url-loader/index.mjs",
|
|
61
|
+
"node": "./dist/lib/node-esm/url-loader/index.mjs",
|
|
62
|
+
"types": "./dist/types/src/url-loader/index.d.ts"
|
|
63
|
+
},
|
|
64
|
+
"./vite-plugin": {
|
|
65
|
+
"import": "./dist/plugin/node-esm/index.mjs",
|
|
66
|
+
"types": "./dist/types/src/vite-plugin/index.d.ts"
|
|
67
|
+
},
|
|
58
68
|
"./cli": {
|
|
59
69
|
"source": "./src/cli/index.ts",
|
|
60
70
|
"browser": "./dist/lib/browser/cli/index.mjs",
|
|
@@ -67,6 +77,12 @@
|
|
|
67
77
|
"node": "./dist/lib/node-esm/testing/index.mjs",
|
|
68
78
|
"types": "./dist/types/src/testing/index.d.ts"
|
|
69
79
|
},
|
|
80
|
+
"./testing-react": {
|
|
81
|
+
"source": "./src/testing/react.tsx",
|
|
82
|
+
"browser": "./dist/lib/browser/testing/react.mjs",
|
|
83
|
+
"node": "./dist/lib/node-esm/testing/react.mjs",
|
|
84
|
+
"types": "./dist/types/src/testing/react.d.ts"
|
|
85
|
+
},
|
|
70
86
|
"./ui": {
|
|
71
87
|
"source": "./src/ui/index.ts",
|
|
72
88
|
"browser": "./dist/lib/browser/ui/index.mjs",
|
|
@@ -75,72 +91,55 @@
|
|
|
75
91
|
}
|
|
76
92
|
},
|
|
77
93
|
"types": "dist/types/src/index.d.ts",
|
|
78
|
-
"typesVersions": {
|
|
79
|
-
"*": {
|
|
80
|
-
"ActivationEvent": [
|
|
81
|
-
"dist/types/src/activation-event/index.d.ts"
|
|
82
|
-
],
|
|
83
|
-
"ActivationEvents": [
|
|
84
|
-
"dist/types/src/common/activation-events.d.ts"
|
|
85
|
-
],
|
|
86
|
-
"Capabilities": [
|
|
87
|
-
"dist/types/src/common/capabilities.d.ts"
|
|
88
|
-
],
|
|
89
|
-
"Capability": [
|
|
90
|
-
"dist/types/src/capability/index.d.ts"
|
|
91
|
-
],
|
|
92
|
-
"Plugin": [
|
|
93
|
-
"dist/types/src/plugin/index.d.ts"
|
|
94
|
-
],
|
|
95
|
-
"PluginManager": [
|
|
96
|
-
"dist/types/src/plugin-manager/index.d.ts"
|
|
97
|
-
],
|
|
98
|
-
"cli": [
|
|
99
|
-
"dist/types/src/cli/index.d.ts"
|
|
100
|
-
],
|
|
101
|
-
"testing": [
|
|
102
|
-
"dist/types/src/testing/index.d.ts"
|
|
103
|
-
],
|
|
104
|
-
"ui": [
|
|
105
|
-
"dist/types/src/ui/index.d.ts"
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
94
|
"dependencies": {
|
|
95
|
+
"@effect-atom/atom": "^0.5.1",
|
|
110
96
|
"@effect/cli": "0.73.2",
|
|
111
|
-
"@
|
|
112
|
-
"
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/
|
|
122
|
-
"@dxos/
|
|
97
|
+
"@effect/platform": "0.94.4",
|
|
98
|
+
"cjs-module-lexer": "^2.2.0",
|
|
99
|
+
"@dxos/async": "0.8.4-main.d05539e30a",
|
|
100
|
+
"@dxos/compute": "0.8.4-main.d05539e30a",
|
|
101
|
+
"@dxos/compute-runtime": "0.8.4-main.d05539e30a",
|
|
102
|
+
"@dxos/context": "0.8.4-main.d05539e30a",
|
|
103
|
+
"@dxos/debug": "0.8.4-main.d05539e30a",
|
|
104
|
+
"@dxos/edge-client": "0.8.4-main.d05539e30a",
|
|
105
|
+
"@dxos/echo": "0.8.4-main.d05539e30a",
|
|
106
|
+
"@dxos/effect": "0.8.4-main.d05539e30a",
|
|
107
|
+
"@dxos/errors": "0.8.4-main.d05539e30a",
|
|
108
|
+
"@dxos/functions": "0.8.4-main.d05539e30a",
|
|
109
|
+
"@dxos/invariant": "0.8.4-main.d05539e30a",
|
|
110
|
+
"@dxos/operation": "0.8.4-main.d05539e30a",
|
|
111
|
+
"@dxos/log": "0.8.4-main.d05539e30a",
|
|
112
|
+
"@dxos/react-error-boundary": "0.8.4-main.d05539e30a",
|
|
113
|
+
"@dxos/protocols": "0.8.4-main.d05539e30a",
|
|
114
|
+
"@dxos/react-hooks": "0.8.4-main.d05539e30a",
|
|
115
|
+
"@dxos/react-ui": "0.8.4-main.d05539e30a",
|
|
116
|
+
"@dxos/util": "0.8.4-main.d05539e30a",
|
|
117
|
+
"@dxos/web-context": "0.8.4-main.d05539e30a",
|
|
118
|
+
"@dxos/ui-theme": "0.8.4-main.d05539e30a",
|
|
119
|
+
"@dxos/web-context-react": "0.8.4-main.d05539e30a"
|
|
123
120
|
},
|
|
124
121
|
"devDependencies": {
|
|
125
122
|
"@effect-atom/atom-react": "^0.5.0",
|
|
126
123
|
"@effect/platform": "0.94.4",
|
|
127
|
-
"@effect/vitest": "0.
|
|
124
|
+
"@effect/vitest": "0.29.0",
|
|
125
|
+
"@testing-library/react": "^16.3.0",
|
|
128
126
|
"@types/react": "~19.2.7",
|
|
129
|
-
"effect": "3.
|
|
127
|
+
"effect": "3.20.0",
|
|
130
128
|
"react": "~19.2.3",
|
|
131
129
|
"react-dom": "~19.2.3",
|
|
132
130
|
"typedoc": "0.28.1",
|
|
133
|
-
"
|
|
134
|
-
"@dxos/
|
|
135
|
-
"@dxos/
|
|
136
|
-
"@dxos/
|
|
137
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
138
|
-
"@dxos/
|
|
131
|
+
"vite": "^8.0.13",
|
|
132
|
+
"@dxos/brand": "0.8.4-main.d05539e30a",
|
|
133
|
+
"@dxos/echo-db": "0.8.4-main.d05539e30a",
|
|
134
|
+
"@dxos/random": "0.8.4-main.d05539e30a",
|
|
135
|
+
"@dxos/storybook-utils": "0.8.4-main.d05539e30a",
|
|
136
|
+
"@dxos/test-utils": "0.8.4-main.d05539e30a"
|
|
139
137
|
},
|
|
140
138
|
"peerDependencies": {
|
|
141
139
|
"@effect-atom/atom-react": "^0.5.0",
|
|
142
140
|
"@effect/platform": "0.94.4",
|
|
143
|
-
"
|
|
141
|
+
"@testing-library/react": "^16.3.0",
|
|
142
|
+
"effect": "3.20.0",
|
|
144
143
|
"react": "~19.2.3",
|
|
145
144
|
"react-dom": "~19.2.3"
|
|
146
145
|
},
|
package/src/cli/cli.ts
CHANGED
|
@@ -17,7 +17,7 @@ const defaultPluginLoader =
|
|
|
17
17
|
Effect.sync(() => {
|
|
18
18
|
const plugin = plugins.find((plugin) => plugin.meta.id === id);
|
|
19
19
|
invariant(plugin, `Plugin not found: ${id}`);
|
|
20
|
-
return plugin;
|
|
20
|
+
return { plugin };
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
type SubCommands = [Command.Command<any, any, any, any>, ...Array<Command.Command<any, any, any, any>>];
|
|
@@ -28,7 +28,6 @@ export type CreateCliAppOptions = {
|
|
|
28
28
|
pluginManager?: PluginManager.PluginManager;
|
|
29
29
|
pluginLoader?: PluginManager.ManagerOptions['pluginLoader'];
|
|
30
30
|
plugins?: Plugin.Plugin[];
|
|
31
|
-
core?: string[];
|
|
32
31
|
enabled?: string[];
|
|
33
32
|
safeMode?: boolean;
|
|
34
33
|
};
|
|
@@ -44,8 +43,7 @@ export type CreateCliAppOptions = {
|
|
|
44
43
|
*
|
|
45
44
|
* @param options.pluginManager Optional existing PluginManager instance.
|
|
46
45
|
* @param options.pluginLoader Function to load plugins by ID.
|
|
47
|
-
* @param options.plugins All plugins available to the application.
|
|
48
|
-
* @param options.core Core plugins which will always be enabled.
|
|
46
|
+
* @param options.plugins All plugins available to the application. Plugins whose `meta.tags` includes `'system'` are treated as core.
|
|
49
47
|
* @param options.enabled Enabled plugins.
|
|
50
48
|
* @param options.safeMode Whether to enable safe mode, which disables optional plugins.
|
|
51
49
|
*/
|
|
@@ -55,12 +53,10 @@ export const createCliApp = Effect.fn(function* ({
|
|
|
55
53
|
pluginManager: pluginManagerProp,
|
|
56
54
|
pluginLoader: pluginLoaderProp,
|
|
57
55
|
plugins: pluginsProp = [],
|
|
58
|
-
core: coreProp,
|
|
59
56
|
enabled: enabledProp = [],
|
|
60
57
|
safeMode = false,
|
|
61
58
|
}: CreateCliAppOptions) {
|
|
62
59
|
const plugins = pluginsProp;
|
|
63
|
-
const core = coreProp ?? plugins.map(({ meta }) => meta.id);
|
|
64
60
|
const pluginLoader = pluginLoaderProp ?? defaultPluginLoader(plugins);
|
|
65
61
|
const enabled = safeMode ? [] : enabledProp;
|
|
66
62
|
const manager =
|
|
@@ -68,20 +64,19 @@ export const createCliApp = Effect.fn(function* ({
|
|
|
68
64
|
PluginManager.make({
|
|
69
65
|
pluginLoader,
|
|
70
66
|
plugins,
|
|
71
|
-
core,
|
|
72
67
|
enabled,
|
|
73
68
|
});
|
|
74
69
|
|
|
75
70
|
manager.capabilities.contribute({
|
|
76
71
|
interface: Capabilities.PluginManager,
|
|
77
72
|
implementation: manager,
|
|
78
|
-
module: 'dxos.
|
|
73
|
+
module: 'org.dxos.app-framework.plugin-manager',
|
|
79
74
|
});
|
|
80
75
|
|
|
81
76
|
manager.capabilities.contribute({
|
|
82
77
|
interface: Capabilities.AtomRegistry,
|
|
83
78
|
implementation: manager.registry,
|
|
84
|
-
module: 'dxos.
|
|
79
|
+
module: 'org.dxos.app-framework.atom-registry',
|
|
85
80
|
});
|
|
86
81
|
|
|
87
82
|
// Activate startup event to load CLI commands and Effect layers.
|
|
@@ -7,7 +7,7 @@ import { ActivationEvent as ActivationEvent$ } from '../core';
|
|
|
7
7
|
/**
|
|
8
8
|
* Fired when the app is started.
|
|
9
9
|
*/
|
|
10
|
-
export const Startup = ActivationEvent$.make('dxos.
|
|
10
|
+
export const Startup = ActivationEvent$.make('org.dxos.app-framework.event.startup');
|
|
11
11
|
|
|
12
12
|
//
|
|
13
13
|
// Dependent Events
|
|
@@ -16,29 +16,24 @@ export const Startup = ActivationEvent$.make('dxos.org/app-framework/event/start
|
|
|
16
16
|
/**
|
|
17
17
|
* Fired to load any newly available surfaces.
|
|
18
18
|
*/
|
|
19
|
-
export const SetupReactSurface = ActivationEvent$.make('dxos.
|
|
19
|
+
export const SetupReactSurface = ActivationEvent$.make('org.dxos.app-framework.event.setup-react-surface');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Fired before the
|
|
22
|
+
* Fired before the process manager is created.
|
|
23
|
+
* Plugins should contribute their {@link Capabilities.LayerSpec} entries and
|
|
24
|
+
* {@link Capabilities.OperationHandler} sets before this event fires so the
|
|
25
|
+
* process manager's {@link ServiceResolver} and {@link OperationInvoker} pick
|
|
26
|
+
* them up at construction time.
|
|
23
27
|
*/
|
|
24
|
-
export const
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Fired before the managed runtime is created.
|
|
28
|
-
* Plugins should contribute their Layer capabilities before this event.
|
|
29
|
-
*/
|
|
30
|
-
export const SetupLayer = ActivationEvent$.make('dxos.org/app-framework/event/setup-layer');
|
|
28
|
+
export const SetupProcessManager = ActivationEvent$.make('org.dxos.app-framework.event.setup-process-manager');
|
|
31
29
|
|
|
32
30
|
//
|
|
33
31
|
// Triggered Events
|
|
34
32
|
//
|
|
35
33
|
|
|
36
34
|
/**
|
|
37
|
-
* Fired after the
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Fired after the managed runtime is ready.
|
|
35
|
+
* Fired after the process manager runtime is ready and its derived capabilities
|
|
36
|
+
* (`ProcessManagerRuntime`, `ServiceResolver`, `ProcessMonitor`, `OperationInvoker`)
|
|
37
|
+
* have been contributed.
|
|
43
38
|
*/
|
|
44
|
-
export const
|
|
39
|
+
export const ProcessManagerReady = ActivationEvent$.make('org.dxos.app-framework.event.process-manager-ready');
|
|
@@ -2,40 +2,52 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import type * as Command$ from '@effect/cli/Command';
|
|
6
5
|
import { type Atom, type Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import type * as Command$ from '@effect/cli/Command';
|
|
7
7
|
import * as Effect from 'effect/Effect';
|
|
8
|
+
import type * as Exit$ from 'effect/Exit';
|
|
9
|
+
import type * as Fiber$ from 'effect/Fiber';
|
|
8
10
|
import type * as Layer$ from 'effect/Layer';
|
|
9
11
|
import type * as ManagedRuntime$ from 'effect/ManagedRuntime';
|
|
12
|
+
import type * as Runtime$ from 'effect/Runtime';
|
|
10
13
|
import type { FC, PropsWithChildren } from 'react';
|
|
11
14
|
|
|
12
|
-
import type {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
import type {
|
|
16
|
+
LayerSpec as LayerSpec$,
|
|
17
|
+
Operation as Operation$,
|
|
18
|
+
OperationHandlerSet,
|
|
19
|
+
Process as Process$,
|
|
20
|
+
ServiceResolver as ServiceResolver$,
|
|
21
|
+
Trace as Trace$,
|
|
22
|
+
} from '@dxos/compute';
|
|
23
|
+
import type { ProcessManager as ProcessManager$ } from '@dxos/compute-runtime';
|
|
24
|
+
import { OperationInvoker as OperationInvoker$ } from '@dxos/operation';
|
|
25
|
+
|
|
26
|
+
import { Capability as Capability$, Plugin as Plugin$, type PluginManager as PluginManager$ } from '../core';
|
|
15
27
|
import type {
|
|
16
28
|
HistoryTracker as HistoryTracker$,
|
|
17
29
|
UndoMapping as UndoMapping$,
|
|
18
30
|
UndoRegistry as UndoRegistry$,
|
|
19
|
-
} from '../plugin-
|
|
31
|
+
} from '../plugin-process-manager';
|
|
20
32
|
import type { Surface } from '../ui';
|
|
21
33
|
|
|
22
34
|
/**
|
|
23
35
|
* Null capability.
|
|
24
36
|
* @category Capability
|
|
25
37
|
*/
|
|
26
|
-
export const Null = Capability$.make<null>('dxos.
|
|
38
|
+
export const Null = Capability$.make<null>('org.dxos.app-framework.capability.null');
|
|
27
39
|
|
|
28
40
|
/**
|
|
29
41
|
* @category Capability
|
|
30
42
|
*/
|
|
31
43
|
export const PluginManager = Capability$.make<PluginManager$.PluginManager>(
|
|
32
|
-
'dxos.
|
|
44
|
+
'org.dxos.app-framework.capability.plugin-manager',
|
|
33
45
|
);
|
|
34
46
|
|
|
35
47
|
/**
|
|
36
48
|
* @category Capability
|
|
37
49
|
*/
|
|
38
|
-
export const AtomRegistry = Capability$.make<Registry.Registry>('dxos.
|
|
50
|
+
export const AtomRegistry = Capability$.make<Registry.Registry>('org.dxos.app-framework.capability.atom-registry');
|
|
39
51
|
|
|
40
52
|
export type ReactContext = Readonly<{
|
|
41
53
|
id: string;
|
|
@@ -46,14 +58,14 @@ export type ReactContext = Readonly<{
|
|
|
46
58
|
/**
|
|
47
59
|
* @category Capability
|
|
48
60
|
*/
|
|
49
|
-
export const ReactContext = Capability$.make<ReactContext>('dxos.
|
|
61
|
+
export const ReactContext = Capability$.make<ReactContext>('org.dxos.app-framework.capability.react-context');
|
|
50
62
|
|
|
51
63
|
export type ReactRoot = Readonly<{ id: string; root: FC<PropsWithChildren> }>;
|
|
52
64
|
|
|
53
65
|
/**
|
|
54
66
|
* @category Capability
|
|
55
67
|
*/
|
|
56
|
-
export const ReactRoot = Capability$.make<ReactRoot>('dxos.
|
|
68
|
+
export const ReactRoot = Capability$.make<ReactRoot>('org.dxos.app-framework.capability.react-root');
|
|
57
69
|
|
|
58
70
|
/**
|
|
59
71
|
* Surface definitions that can be either React components or Web Components.
|
|
@@ -63,39 +75,154 @@ export type ReactSurface = Surface.Definition | readonly Surface.Definition[];
|
|
|
63
75
|
/**
|
|
64
76
|
* @category Capability
|
|
65
77
|
*/
|
|
66
|
-
export const ReactSurface = Capability$.make<ReactSurface>('dxos.
|
|
78
|
+
export const ReactSurface = Capability$.make<ReactSurface>('org.dxos.app-framework.common.react-surface');
|
|
67
79
|
|
|
68
80
|
export type AnyCommand = Command$.Command<any, any, any, any>;
|
|
69
81
|
|
|
70
82
|
/**
|
|
71
83
|
* @category Capability
|
|
72
84
|
*/
|
|
73
|
-
export const Command = Capability$.make<AnyCommand>('dxos.
|
|
85
|
+
export const Command = Capability$.make<AnyCommand>('org.dxos.app-framework.capability.command');
|
|
74
86
|
|
|
75
87
|
/**
|
|
76
88
|
* @category Capability
|
|
77
89
|
*/
|
|
78
|
-
export const Layer = Capability$.make<Layer$.Layer<any, any, any>>('dxos.
|
|
90
|
+
export const Layer = Capability$.make<Layer$.Layer<any, any, any>>('org.dxos.app-framework.capability.layer');
|
|
79
91
|
|
|
80
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Layer specification contributed by plugins.
|
|
94
|
+
*
|
|
95
|
+
* Plugins contribute {@link LayerSpec.LayerSpec} entries that are collected by the
|
|
96
|
+
* process-manager module and composed into a {@link LayerStack} which backs the
|
|
97
|
+
* {@link ProcessManagerRuntime}'s service resolver.
|
|
98
|
+
*
|
|
99
|
+
* @category Capability
|
|
100
|
+
*/
|
|
101
|
+
export const LayerSpec = Capability$.make<LayerSpec$.LayerSpec>('org.dxos.app-framework.capability.layer-spec');
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Context passed to {@link TraceSinkFactory} implementations when the
|
|
105
|
+
* process-manager capability materialises contributed sinks.
|
|
106
|
+
*/
|
|
107
|
+
export interface TraceSinkFactoryContext {
|
|
108
|
+
/**
|
|
109
|
+
* Service resolver backing the shared {@link ProcessManagerRuntime}. Use it
|
|
110
|
+
* to resolve per-space (or per-process) services like `FeedTraceSink` when
|
|
111
|
+
* building a routing sink.
|
|
112
|
+
*/
|
|
113
|
+
readonly resolver: ServiceResolver$.ServiceResolver;
|
|
114
|
+
}
|
|
81
115
|
|
|
82
116
|
/**
|
|
117
|
+
* Factory that builds a {@link Trace$.Sink} when the process-manager
|
|
118
|
+
* capability is ready. Plugins that only need a static sink can ignore the
|
|
119
|
+
* context (e.g. `() => myConsoleSink`); plugins that need per-space routing
|
|
120
|
+
* can use {@link TraceSinkFactoryContext.resolver} to look up services.
|
|
121
|
+
*/
|
|
122
|
+
export type TraceSinkFactory = (ctx: TraceSinkFactoryContext) => Trace$.Sink;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Trace sink contribution.
|
|
126
|
+
*
|
|
127
|
+
* Plugins contribute {@link TraceSinkFactory} functions; the process-manager
|
|
128
|
+
* capability invokes each factory with the runtime's
|
|
129
|
+
* {@link ServiceResolver$.ServiceResolver}, collects the resulting
|
|
130
|
+
* {@link Trace$.Sink}s, merges them via {@link Trace$.mergeSinks}, and
|
|
131
|
+
* installs the merged sink as {@link Trace$.TraceSink} in the runtime layer
|
|
132
|
+
* so every process writes to every contributed sink.
|
|
133
|
+
*
|
|
83
134
|
* @category Capability
|
|
84
135
|
*/
|
|
85
|
-
export const
|
|
136
|
+
export const TraceSink = Capability$.make<TraceSinkFactory>('org.dxos.app-framework.capability.trace-sink');
|
|
86
137
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
138
|
+
/**
|
|
139
|
+
* Service resolver backing the shared {@link ProcessManagerRuntime}.
|
|
140
|
+
*
|
|
141
|
+
* Contributed by the process-manager capability module. Consumers can combine
|
|
142
|
+
* it with {@link ServiceResolver$.provide} to build space-scoped layers without
|
|
143
|
+
* having to go through the process-manager runtime:
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* const resolver = yield* Capability.get(Capabilities.ServiceResolver);
|
|
148
|
+
* yield* effect.pipe(
|
|
149
|
+
* Effect.provide(
|
|
150
|
+
* ServiceResolver.provide({ space }, Database.Service, QueueService).pipe(
|
|
151
|
+
* Layer.provide(Layer.succeed(ServiceResolver.ServiceResolver, resolver)),
|
|
152
|
+
* ),
|
|
153
|
+
* ),
|
|
154
|
+
* );
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* @category Capability
|
|
158
|
+
*/
|
|
159
|
+
export const ServiceResolver = Capability$.make<ServiceResolver$.ServiceResolver>(
|
|
160
|
+
'org.dxos.app-framework.capability.service-resolver',
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Process monitor backing the shared {@link ProcessManagerRuntime}. Exposes the
|
|
165
|
+
* live process tree (including inactive/terminated entries) via
|
|
166
|
+
* {@link Process$.Monitor#processTreeAtom}.
|
|
167
|
+
*
|
|
168
|
+
* @category Capability
|
|
169
|
+
*/
|
|
170
|
+
export const ProcessMonitor = Capability$.make<Process$.Monitor>('org.dxos.app-framework.capability.process-monitor');
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Services that are always available when running effects through a {@link ProcessManagerRuntime}.
|
|
174
|
+
*/
|
|
175
|
+
export type ProcessManagerRuntimeServices =
|
|
176
|
+
| Capability$.Service
|
|
177
|
+
| Plugin$.Service
|
|
178
|
+
| ProcessManager$.ProcessManagerService
|
|
179
|
+
| Operation$.Service
|
|
180
|
+
| ProcessManager$.ProcessOperationInvoker.Service
|
|
181
|
+
| ServiceResolver$.ServiceResolver;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Runtime that runs effects requiring a fixed set of capability-manager and
|
|
185
|
+
* process-manager services.
|
|
186
|
+
*
|
|
187
|
+
* The shape mirrors {@link ManagedRuntime$.ManagedRuntime} but deliberately does
|
|
188
|
+
* not expose `dispose` – lifecycle is driven by the host plugin manager.
|
|
189
|
+
*/
|
|
190
|
+
export interface ProcessManagerRuntime {
|
|
191
|
+
runPromise<A, E>(
|
|
192
|
+
effect: Effect.Effect<A, E, ProcessManagerRuntimeServices>,
|
|
193
|
+
options?: { readonly signal?: AbortSignal },
|
|
194
|
+
): Promise<A>;
|
|
195
|
+
runPromiseExit<A, E>(
|
|
196
|
+
effect: Effect.Effect<A, E, ProcessManagerRuntimeServices>,
|
|
197
|
+
options?: { readonly signal?: AbortSignal },
|
|
198
|
+
): Promise<Exit$.Exit<A, E>>;
|
|
199
|
+
runFork<A, E>(
|
|
200
|
+
effect: Effect.Effect<A, E, ProcessManagerRuntimeServices>,
|
|
201
|
+
options?: Runtime$.RunForkOptions,
|
|
202
|
+
): Fiber$.RuntimeFiber<A, E>;
|
|
203
|
+
runSync<A, E>(effect: Effect.Effect<A, E, ProcessManagerRuntimeServices>): A;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @category Capability
|
|
208
|
+
*/
|
|
209
|
+
export const ProcessManagerRuntime = Capability$.make<ProcessManagerRuntime>(
|
|
210
|
+
'org.dxos.app-framework.capability.process-manager-runtime',
|
|
211
|
+
);
|
|
90
212
|
|
|
91
|
-
export type
|
|
213
|
+
export type ManagedRuntime = ManagedRuntime$.ManagedRuntime<any, any>;
|
|
92
214
|
|
|
93
215
|
/**
|
|
94
|
-
* Handler registration for operations - contributed by plugins.
|
|
95
216
|
* @category Capability
|
|
96
217
|
*/
|
|
97
|
-
export const
|
|
98
|
-
|
|
218
|
+
export const ManagedRuntime = Capability$.make<ManagedRuntime>('org.dxos.app-framework.capability.managed-runtime');
|
|
219
|
+
|
|
220
|
+
//
|
|
221
|
+
// Operation System Capabilities
|
|
222
|
+
//
|
|
223
|
+
|
|
224
|
+
export const OperationHandler = Capability$.make<OperationHandlerSet.OperationHandlerSet>(
|
|
225
|
+
'org.dxos.app-framework.capability.operation-handler',
|
|
99
226
|
);
|
|
100
227
|
|
|
101
228
|
export type UndoMapping = UndoMapping$.UndoMapping;
|
|
@@ -104,33 +231,37 @@ export type UndoMapping = UndoMapping$.UndoMapping;
|
|
|
104
231
|
* Undo mapping registration - contributed by plugins.
|
|
105
232
|
* @category Capability
|
|
106
233
|
*/
|
|
107
|
-
export const UndoMapping = Capability$.make<UndoMapping[]>('dxos.
|
|
234
|
+
export const UndoMapping = Capability$.make<UndoMapping[]>('org.dxos.app-framework.capability.undo-mapping');
|
|
108
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Operation invoker backed by the process manager. Spawns a process per
|
|
238
|
+
* operation invocation; see {@link ProcessManager$.ProcessOperationInvoker}.
|
|
239
|
+
*/
|
|
109
240
|
export type OperationInvoker = OperationInvoker$.OperationInvoker;
|
|
110
241
|
|
|
111
242
|
/**
|
|
112
|
-
* Operation invoker - provided by
|
|
243
|
+
* Operation invoker - provided by the process-manager capability.
|
|
113
244
|
* @category Capability
|
|
114
245
|
*/
|
|
115
246
|
export const OperationInvoker = Capability$.make<OperationInvoker>(
|
|
116
|
-
'dxos.
|
|
247
|
+
'org.dxos.app-framework.capability.operation-invoker',
|
|
117
248
|
);
|
|
118
249
|
|
|
119
250
|
export type UndoRegistry = UndoRegistry$.UndoRegistry;
|
|
120
251
|
|
|
121
252
|
/**
|
|
122
|
-
* Undo registry - provided by
|
|
253
|
+
* Undo registry - provided by ProcessManagerPlugin.
|
|
123
254
|
* @category Capability
|
|
124
255
|
*/
|
|
125
|
-
export const UndoRegistry = Capability$.make<UndoRegistry>('dxos.
|
|
256
|
+
export const UndoRegistry = Capability$.make<UndoRegistry>('org.dxos.app-framework.capability.undo-registry');
|
|
126
257
|
|
|
127
258
|
export type HistoryTracker = HistoryTracker$.HistoryTracker;
|
|
128
259
|
|
|
129
260
|
/**
|
|
130
|
-
* History tracker - provided by
|
|
261
|
+
* History tracker - provided by ProcessManagerPlugin.
|
|
131
262
|
* @category Capability
|
|
132
263
|
*/
|
|
133
|
-
export const HistoryTracker = Capability$.make<HistoryTracker>('dxos.
|
|
264
|
+
export const HistoryTracker = Capability$.make<HistoryTracker>('org.dxos.app-framework.capability.history-tracker');
|
|
134
265
|
|
|
135
266
|
//
|
|
136
267
|
// Atom Capability Helpers
|
package/src/common/operations.ts
CHANGED
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Operation } from '@dxos/
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
8
|
|
|
9
9
|
import { Capability } from '../core';
|
|
10
|
-
|
|
11
10
|
import { Label } from './translations';
|
|
12
11
|
|
|
13
|
-
const UNDO_NAMESPACE = 'dxos.
|
|
12
|
+
const UNDO_NAMESPACE = 'org.dxos.app-framework.undo';
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* Operations related to undo/history functionality.
|
|
@@ -22,17 +21,15 @@ export namespace UndoOperation {
|
|
|
22
21
|
*/
|
|
23
22
|
export const ShowUndo = Operation.make({
|
|
24
23
|
meta: {
|
|
25
|
-
key: `${UNDO_NAMESPACE}
|
|
24
|
+
key: `${UNDO_NAMESPACE}.operation.show-undo`,
|
|
26
25
|
name: 'Show Undo',
|
|
27
26
|
description: 'Show an undo toast notification.',
|
|
28
27
|
},
|
|
29
28
|
executionMode: 'sync',
|
|
30
29
|
services: [Capability.Service],
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
output: Schema.Void,
|
|
36
|
-
},
|
|
30
|
+
input: Schema.Struct({
|
|
31
|
+
message: Schema.optional(Label.annotations({ description: 'The message to display in the undo toast.' })),
|
|
32
|
+
}),
|
|
33
|
+
output: Schema.Void,
|
|
37
34
|
});
|
|
38
35
|
}
|
package/src/context.ts
CHANGED
|
@@ -6,4 +6,4 @@ import { createContext } from '@dxos/web-context';
|
|
|
6
6
|
|
|
7
7
|
import { type PluginManager } from './core';
|
|
8
8
|
|
|
9
|
-
export const PluginManagerContext = createContext<PluginManager.PluginManager>('dxos.
|
|
9
|
+
export const PluginManagerContext = createContext<PluginManager.PluginManager>('org.dxos.app-framework.plugin-manager');
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { compositeKey } from '@dxos/util';
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* A unique string identifier representing an event.
|
|
7
9
|
* This is expected to be a URI, where initial parts are often the id of the plugin whose package defines the event.
|
|
8
10
|
*
|
|
9
|
-
* @example dxos.
|
|
11
|
+
* @example org.dxos.plugin.example.event.ready
|
|
10
12
|
*/
|
|
11
13
|
export type ActivationEvent = {
|
|
12
14
|
id: string;
|
|
@@ -31,7 +33,8 @@ export const make = (id: string, specifier?: string) => {
|
|
|
31
33
|
/**
|
|
32
34
|
* Helper to create an activation event key.
|
|
33
35
|
*/
|
|
34
|
-
export const eventKey = (event: ActivationEvent) =>
|
|
36
|
+
export const eventKey = (event: ActivationEvent) =>
|
|
37
|
+
event.specifier ? compositeKey(event.id, event.specifier) : event.id;
|
|
35
38
|
|
|
36
39
|
/**
|
|
37
40
|
* Helper to create an activation event that triggers when any of the given events are activated.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { describe, expect, it, onTestFinished } from '@effect/vitest';
|
|
6
5
|
import { Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import { describe, expect, it, onTestFinished } from '@effect/vitest';
|
|
7
7
|
import * as Effect from 'effect/Effect';
|
|
8
8
|
|
|
9
9
|
import * as Capability from './capability';
|