@dxos/plugin-registry 0.8.4-main.dedc0f3 → 0.8.4-main.dfabb4ec29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/dist/lib/neutral/RegistryPlugin.mjs +27 -0
  2. package/dist/lib/neutral/RegistryPlugin.mjs.map +7 -0
  3. package/dist/lib/neutral/RegistryPlugin.node.mjs +153 -0
  4. package/dist/lib/neutral/RegistryPlugin.node.mjs.map +7 -0
  5. package/dist/lib/neutral/chunk-XK2JMH3H.mjs +33 -0
  6. package/dist/lib/neutral/chunk-XK2JMH3H.mjs.map +7 -0
  7. package/dist/lib/neutral/chunk-YV7A523U.mjs +29 -0
  8. package/dist/lib/neutral/chunk-YV7A523U.mjs.map +7 -0
  9. package/dist/lib/neutral/index.mjs +21 -0
  10. package/dist/lib/neutral/index.mjs.map +7 -0
  11. package/dist/lib/neutral/meta.json +1 -0
  12. package/dist/lib/neutral/open-plugin-registry-II735N76.mjs +15 -0
  13. package/dist/lib/neutral/open-plugin-registry-II735N76.mjs.map +7 -0
  14. package/dist/lib/neutral/plugin.mjs +18 -0
  15. package/dist/lib/neutral/plugin.mjs.map +7 -0
  16. package/dist/lib/neutral/translations.mjs +61 -0
  17. package/dist/lib/neutral/translations.mjs.map +7 -0
  18. package/dist/types/src/RegistryPlugin.d.ts +3 -1
  19. package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
  20. package/dist/types/src/RegistryPlugin.node.d.ts +4 -0
  21. package/dist/types/src/RegistryPlugin.node.d.ts.map +1 -0
  22. package/dist/types/src/RegistryPlugin.test.d.ts +2 -0
  23. package/dist/types/src/RegistryPlugin.test.d.ts.map +1 -0
  24. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  25. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/dev-plugin-loader.d.ts +11 -0
  27. package/dist/types/src/capabilities/dev-plugin-loader.d.ts.map +1 -0
  28. package/dist/types/src/capabilities/index.d.ts +15 -3
  29. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  31. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  32. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  33. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  34. package/dist/types/src/capabilities/settings.d.ts +14 -0
  35. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  36. package/dist/types/src/commands/disable.d.ts +11 -0
  37. package/dist/types/src/commands/disable.d.ts.map +1 -0
  38. package/dist/types/src/commands/enable.d.ts +11 -0
  39. package/dist/types/src/commands/enable.d.ts.map +1 -0
  40. package/dist/types/src/commands/index.d.ts +3 -0
  41. package/dist/types/src/commands/index.d.ts.map +1 -0
  42. package/dist/types/src/commands/list.d.ts +7 -0
  43. package/dist/types/src/commands/list.d.ts.map +1 -0
  44. package/dist/types/src/commands/util.d.ts +11 -0
  45. package/dist/types/src/commands/util.d.ts.map +1 -0
  46. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +46 -0
  47. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
  48. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +68 -0
  49. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -0
  50. package/dist/types/src/components/PluginDetail/index.d.ts +2 -0
  51. package/dist/types/src/components/PluginDetail/index.d.ts.map +1 -0
  52. package/dist/types/src/components/PluginFailureBadge/PluginFailureBadge.d.ts +20 -0
  53. package/dist/types/src/components/PluginFailureBadge/PluginFailureBadge.d.ts.map +1 -0
  54. package/dist/types/src/components/PluginFailureBadge/index.d.ts +2 -0
  55. package/dist/types/src/components/PluginFailureBadge/index.d.ts.map +1 -0
  56. package/dist/types/src/components/PluginList/PluginItem.d.ts +40 -0
  57. package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
  58. package/dist/types/src/components/PluginList/PluginList.d.ts +23 -0
  59. package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
  60. package/dist/types/src/components/PluginList/PluginList.stories.d.ts +67 -0
  61. package/dist/types/src/components/PluginList/PluginList.stories.d.ts.map +1 -0
  62. package/dist/types/src/components/PluginList/index.d.ts +2 -0
  63. package/dist/types/src/components/PluginList/index.d.ts.map +1 -0
  64. package/dist/types/src/components/RegistrySettings/RegistrySettings.d.ts +18 -0
  65. package/dist/types/src/components/RegistrySettings/RegistrySettings.d.ts.map +1 -0
  66. package/dist/types/src/components/RegistrySettings/index.d.ts +2 -0
  67. package/dist/types/src/components/RegistrySettings/index.d.ts.map +1 -0
  68. package/dist/types/src/components/index.d.ts +2 -1
  69. package/dist/types/src/components/index.d.ts.map +1 -1
  70. package/dist/types/src/containers/BaseRegistryArticle/BaseRegistryArticle.d.ts +20 -0
  71. package/dist/types/src/containers/BaseRegistryArticle/BaseRegistryArticle.d.ts.map +1 -0
  72. package/dist/types/src/containers/BaseRegistryArticle/index.d.ts +2 -0
  73. package/dist/types/src/containers/BaseRegistryArticle/index.d.ts.map +1 -0
  74. package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts +4 -0
  75. package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts.map +1 -0
  76. package/dist/types/src/containers/LoadPluginDialog/index.d.ts +2 -0
  77. package/dist/types/src/containers/LoadPluginDialog/index.d.ts.map +1 -0
  78. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +7 -0
  79. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -0
  80. package/dist/types/src/containers/PluginArticle/index.d.ts +2 -0
  81. package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
  82. package/dist/types/src/containers/PublicRegistryArticle/PublicRegistryArticle.d.ts +8 -0
  83. package/dist/types/src/containers/PublicRegistryArticle/PublicRegistryArticle.d.ts.map +1 -0
  84. package/dist/types/src/containers/PublicRegistryArticle/index.d.ts +2 -0
  85. package/dist/types/src/containers/PublicRegistryArticle/index.d.ts.map +1 -0
  86. package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts +14 -0
  87. package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts.map +1 -0
  88. package/dist/types/src/containers/RegistryArticle/index.d.ts +2 -0
  89. package/dist/types/src/containers/RegistryArticle/index.d.ts.map +1 -0
  90. package/dist/types/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.d.ts +13 -0
  91. package/dist/types/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.d.ts.map +1 -0
  92. package/dist/types/src/containers/RegistrySettingsContainer/index.d.ts +2 -0
  93. package/dist/types/src/containers/RegistrySettingsContainer/index.d.ts.map +1 -0
  94. package/dist/types/src/containers/index.d.ts +8 -0
  95. package/dist/types/src/containers/index.d.ts.map +1 -0
  96. package/dist/types/src/hooks/index.d.ts +4 -0
  97. package/dist/types/src/hooks/index.d.ts.map +1 -0
  98. package/dist/types/src/hooks/use-auto-tags.d.ts +20 -0
  99. package/dist/types/src/hooks/use-auto-tags.d.ts.map +1 -0
  100. package/dist/types/src/hooks/use-registry-plugins.d.ts +15 -0
  101. package/dist/types/src/hooks/use-registry-plugins.d.ts.map +1 -0
  102. package/dist/types/src/hooks/use-update-available.d.ts +18 -0
  103. package/dist/types/src/hooks/use-update-available.d.ts.map +1 -0
  104. package/dist/types/src/index.d.ts +1 -1
  105. package/dist/types/src/index.d.ts.map +1 -1
  106. package/dist/types/src/meta.d.ts +7 -4
  107. package/dist/types/src/meta.d.ts.map +1 -1
  108. package/dist/types/src/operations/index.d.ts +3 -0
  109. package/dist/types/src/operations/index.d.ts.map +1 -0
  110. package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
  111. package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
  112. package/dist/types/src/plugin.d.ts +4 -0
  113. package/dist/types/src/plugin.d.ts.map +1 -0
  114. package/dist/types/src/storage.d.ts +18 -0
  115. package/dist/types/src/storage.d.ts.map +1 -0
  116. package/dist/types/src/translations.d.ts +48 -16
  117. package/dist/types/src/translations.d.ts.map +1 -1
  118. package/dist/types/src/types.d.ts +32 -1
  119. package/dist/types/src/types.d.ts.map +1 -1
  120. package/dist/types/tsconfig.tsbuildinfo +1 -1
  121. package/package.json +73 -36
  122. package/src/RegistryPlugin.node.ts +19 -0
  123. package/src/RegistryPlugin.test.ts +24 -0
  124. package/src/RegistryPlugin.tsx +20 -27
  125. package/src/capabilities/app-graph-builder.ts +180 -135
  126. package/src/capabilities/dev-plugin-loader.ts +39 -0
  127. package/src/capabilities/index.ts +10 -4
  128. package/src/capabilities/operation-handler.ts +16 -0
  129. package/src/capabilities/react-surface.tsx +124 -73
  130. package/src/capabilities/settings.ts +34 -0
  131. package/src/commands/disable.ts +47 -0
  132. package/src/commands/enable.ts +44 -0
  133. package/src/commands/index.ts +14 -0
  134. package/src/commands/list.ts +41 -0
  135. package/src/commands/util.ts +24 -0
  136. package/src/components/PluginDetail/PluginDetail.stories.tsx +44 -0
  137. package/src/components/PluginDetail/PluginDetail.tsx +196 -0
  138. package/src/components/PluginDetail/index.ts +5 -0
  139. package/src/components/PluginFailureBadge/PluginFailureBadge.tsx +68 -0
  140. package/src/components/PluginFailureBadge/index.ts +5 -0
  141. package/src/components/PluginList/PluginItem.tsx +226 -0
  142. package/src/components/PluginList/PluginList.stories.tsx +87 -0
  143. package/src/components/PluginList/PluginList.tsx +52 -0
  144. package/src/components/PluginList/index.ts +5 -0
  145. package/src/components/RegistrySettings/RegistrySettings.tsx +120 -0
  146. package/src/components/RegistrySettings/index.ts +5 -0
  147. package/src/components/index.ts +2 -1
  148. package/src/containers/BaseRegistryArticle/BaseRegistryArticle.tsx +163 -0
  149. package/src/containers/BaseRegistryArticle/index.ts +5 -0
  150. package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +87 -0
  151. package/src/containers/LoadPluginDialog/index.ts +5 -0
  152. package/src/containers/PluginArticle/PluginArticle.tsx +336 -0
  153. package/src/containers/PluginArticle/index.ts +5 -0
  154. package/src/containers/PublicRegistryArticle/PublicRegistryArticle.tsx +192 -0
  155. package/src/containers/PublicRegistryArticle/index.ts +5 -0
  156. package/src/containers/RegistryArticle/RegistryArticle.tsx +53 -0
  157. package/src/containers/RegistryArticle/index.ts +5 -0
  158. package/src/containers/RegistrySettingsContainer/RegistrySettingsContainer.tsx +59 -0
  159. package/src/containers/RegistrySettingsContainer/index.ts +5 -0
  160. package/src/containers/index.ts +12 -0
  161. package/src/hooks/index.ts +7 -0
  162. package/src/hooks/use-auto-tags.ts +51 -0
  163. package/src/hooks/use-registry-plugins.ts +29 -0
  164. package/src/hooks/use-update-available.ts +31 -0
  165. package/src/index.ts +1 -1
  166. package/src/meta.ts +21 -9
  167. package/src/operations/index.ts +7 -0
  168. package/src/operations/open-plugin-registry.ts +21 -0
  169. package/src/plugin.ts +11 -0
  170. package/src/storage.ts +50 -0
  171. package/src/translations.ts +52 -15
  172. package/src/types.ts +37 -1
  173. package/dist/lib/browser/app-graph-builder-6JQNRTEQ.mjs +0 -161
  174. package/dist/lib/browser/app-graph-builder-6JQNRTEQ.mjs.map +0 -7
  175. package/dist/lib/browser/chunk-AEBASNOI.mjs +0 -16
  176. package/dist/lib/browser/chunk-AEBASNOI.mjs.map +0 -7
  177. package/dist/lib/browser/index.mjs +0 -71
  178. package/dist/lib/browser/index.mjs.map +0 -7
  179. package/dist/lib/browser/intent-resolver-UGDFPMAG.mjs +0 -23
  180. package/dist/lib/browser/intent-resolver-UGDFPMAG.mjs.map +0 -7
  181. package/dist/lib/browser/meta.json +0 -1
  182. package/dist/lib/browser/react-surface-YATPY47L.mjs +0 -335
  183. package/dist/lib/browser/react-surface-YATPY47L.mjs.map +0 -7
  184. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  185. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  186. package/dist/types/src/components/Icon.stories.d.ts +0 -14
  187. package/dist/types/src/components/Icon.stories.d.ts.map +0 -1
  188. package/dist/types/src/components/PluginDetail.d.ts +0 -9
  189. package/dist/types/src/components/PluginDetail.d.ts.map +0 -1
  190. package/dist/types/src/components/PluginDetail.stories.d.ts +0 -33
  191. package/dist/types/src/components/PluginDetail.stories.d.ts.map +0 -1
  192. package/dist/types/src/components/PluginItem.d.ts +0 -13
  193. package/dist/types/src/components/PluginItem.d.ts.map +0 -1
  194. package/dist/types/src/components/PluginList.d.ts +0 -8
  195. package/dist/types/src/components/PluginList.d.ts.map +0 -1
  196. package/dist/types/src/components/PluginList.stories.d.ts +0 -37
  197. package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
  198. package/dist/types/src/components/RegistryContainer.d.ts +0 -7
  199. package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
  200. package/src/capabilities/intent-resolver.ts +0 -27
  201. package/src/components/Icon.stories.tsx +0 -110
  202. package/src/components/PluginDetail.stories.tsx +0 -46
  203. package/src/components/PluginDetail.tsx +0 -65
  204. package/src/components/PluginItem.tsx +0 -119
  205. package/src/components/PluginList.stories.tsx +0 -85
  206. package/src/components/PluginList.tsx +0 -26
  207. package/src/components/RegistryContainer.tsx +0 -84
package/package.json CHANGED
@@ -1,64 +1,101 @@
1
1
  {
2
2
  "name": "@dxos/plugin-registry",
3
- "version": "0.8.4-main.dedc0f3",
3
+ "version": "0.8.4-main.dfabb4ec29",
4
4
  "description": "Braneframe plugin gallery",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
10
14
  "type": "module",
15
+ "imports": {
16
+ "#capabilities": "./src/capabilities/index.ts",
17
+ "#components": "./src/components/index.ts",
18
+ "#containers": "./src/containers/index.ts",
19
+ "#meta": "./src/meta.ts",
20
+ "#operations": "./src/operations/index.ts",
21
+ "#plugin": {
22
+ "source": {
23
+ "node": "./src/RegistryPlugin.node.ts",
24
+ "default": "./src/RegistryPlugin.tsx"
25
+ },
26
+ "types": "./dist/types/src/RegistryPlugin.d.ts",
27
+ "node": "./dist/lib/neutral/RegistryPlugin.node.mjs",
28
+ "default": "./dist/lib/neutral/RegistryPlugin.mjs"
29
+ },
30
+ "#translations": "./src/translations.ts",
31
+ "#types": "./src/types.ts"
32
+ },
11
33
  "exports": {
12
34
  ".": {
13
35
  "source": "./src/index.ts",
14
36
  "types": "./dist/types/src/index.d.ts",
15
- "browser": "./dist/lib/browser/index.mjs"
37
+ "default": "./dist/lib/neutral/index.mjs"
38
+ },
39
+ "./plugin": {
40
+ "source": "./src/plugin.ts",
41
+ "types": "./dist/types/src/plugin.d.ts",
42
+ "default": "./dist/lib/neutral/plugin.mjs"
43
+ },
44
+ "./translations": {
45
+ "source": "./src/translations.ts",
46
+ "types": "./dist/types/src/translations.d.ts",
47
+ "default": "./dist/lib/neutral/translations.mjs"
16
48
  }
17
49
  },
18
50
  "types": "dist/types/src/index.d.ts",
19
- "typesVersions": {
20
- "*": {}
21
- },
22
51
  "files": [
23
52
  "dist",
24
53
  "src"
25
54
  ],
26
55
  "dependencies": {
27
- "@preact-signals/safe-react": "^0.9.0",
28
- "@dxos/app-framework": "0.8.4-main.dedc0f3",
29
- "@dxos/echo": "0.8.4-main.dedc0f3",
30
- "@dxos/echo-schema": "0.8.4-main.dedc0f3",
31
- "@dxos/live-object": "0.8.4-main.dedc0f3",
32
- "@dxos/plugin-observability": "0.8.4-main.dedc0f3",
33
- "@dxos/plugin-graph": "0.8.4-main.dedc0f3",
34
- "@dxos/invariant": "0.8.4-main.dedc0f3",
35
- "@dxos/react-ui-form": "0.8.4-main.dedc0f3",
36
- "@dxos/react-ui-stack": "0.8.4-main.dedc0f3",
37
- "@dxos/util": "0.8.4-main.dedc0f3"
56
+ "@effect-atom/atom-react": "^0.5.0",
57
+ "@effect/cli": "0.73.2",
58
+ "yaml": "^2.8.2",
59
+ "@dxos/app-framework": "0.8.4-main.dfabb4ec29",
60
+ "@dxos/client-protocol": "0.8.4-main.dfabb4ec29",
61
+ "@dxos/cli-util": "0.8.4-main.dfabb4ec29",
62
+ "@dxos/compute": "0.8.4-main.dfabb4ec29",
63
+ "@dxos/context": "0.8.4-main.dfabb4ec29",
64
+ "@dxos/app-toolkit": "0.8.4-main.dfabb4ec29",
65
+ "@dxos/effect": "0.8.4-main.dfabb4ec29",
66
+ "@dxos/invariant": "0.8.4-main.dfabb4ec29",
67
+ "@dxos/log": "0.8.4-main.dfabb4ec29",
68
+ "@dxos/echo": "0.8.4-main.dfabb4ec29",
69
+ "@dxos/plugin-graph": "0.8.4-main.dfabb4ec29",
70
+ "@dxos/plugin-observability": "0.8.4-main.dfabb4ec29",
71
+ "@dxos/react-ui-mosaic": "0.8.4-main.dfabb4ec29",
72
+ "@dxos/react-ui-form": "0.8.4-main.dfabb4ec29",
73
+ "@dxos/util": "0.8.4-main.dfabb4ec29",
74
+ "@dxos/react-ui-stack": "0.8.4-main.dfabb4ec29"
38
75
  },
39
76
  "devDependencies": {
40
- "@effect-rx/rx-react": "0.38.0",
41
- "@effect/platform": "0.90.2",
42
- "@phosphor-icons/react": "^2.1.5",
43
- "@types/react": "~18.2.0",
44
- "@types/react-dom": "~18.2.0",
45
- "effect": "3.17.7",
46
- "react": "~18.2.0",
47
- "react-dom": "~18.2.0",
48
- "vite": "7.1.1",
49
- "@dxos/random": "0.8.4-main.dedc0f3",
50
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
51
- "@dxos/storybook-utils": "0.8.4-main.dedc0f3",
52
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
77
+ "@effect-atom/atom-react": "^0.5.0",
78
+ "@effect/platform": "0.94.4",
79
+ "@types/react": "~19.2.7",
80
+ "@types/react-dom": "~19.2.3",
81
+ "effect": "3.20.0",
82
+ "react": "~19.2.3",
83
+ "react-dom": "~19.2.3",
84
+ "vite": "^8.0.10",
85
+ "@dxos/random": "0.8.4-main.dfabb4ec29",
86
+ "@dxos/react-ui": "0.8.4-main.dfabb4ec29",
87
+ "@dxos/storybook-utils": "0.8.4-main.dfabb4ec29",
88
+ "@dxos/plugin-testing": "0.8.4-main.dfabb4ec29",
89
+ "@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
53
90
  },
54
91
  "peerDependencies": {
55
- "@effect-rx/rx-react": "^0.34.1",
56
- "@effect/platform": "^0.80.12",
57
- "effect": "^3.13.3",
58
- "react": "~18.2.0",
59
- "react-dom": "~18.2.0",
60
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
61
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
92
+ "@effect-atom/atom-react": "^0.5.0",
93
+ "@effect/platform": "0.94.4",
94
+ "effect": "3.20.0",
95
+ "react": "~19.2.3",
96
+ "react-dom": "~19.2.3",
97
+ "@dxos/react-ui": "0.8.4-main.dfabb4ec29",
98
+ "@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
62
99
  },
63
100
  "publishConfig": {
64
101
  "access": "public"
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
7
+
8
+ import { meta } from '#meta';
9
+
10
+ import { plugin } from './commands';
11
+
12
+ export const RegistryPlugin = Plugin.define(meta).pipe(
13
+ AppPlugin.addCommandModule({
14
+ commands: [plugin],
15
+ }),
16
+ Plugin.make,
17
+ );
18
+
19
+ export default RegistryPlugin;
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
8
+
9
+ import { RegistryPlugin } from '#plugin';
10
+
11
+ import { meta } from './meta';
12
+
13
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
14
+
15
+ describe('RegistryPlugin', () => {
16
+ test('modules activate on the expected events', async ({ expect }) => {
17
+ await using harness = await createComposerTestApp({
18
+ plugins: [RegistryPlugin()],
19
+ });
20
+
21
+ // CLI commands activate on startup.
22
+ expect(harness.manager.getActive()).toContain(moduleId('cli-commands'));
23
+ });
24
+ });
@@ -2,32 +2,25 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
5
+ import { ActivationEvents, Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
6
7
 
7
- import { AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';
8
- import { meta } from './meta';
9
- import { translations } from './translations';
8
+ import { AppGraphBuilder, DevPluginLoader, OperationHandler, ReactSurface, RegistrySettings } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { translations } from '#translations';
10
11
 
11
- export const RegistryPlugin = () =>
12
- definePlugin(meta, [
13
- defineModule({
14
- id: `${meta.id}/module/translations`,
15
- activatesOn: Events.SetupTranslations,
16
- activate: () => contributes(Capabilities.Translations, translations),
17
- }),
18
- defineModule({
19
- id: `${meta.id}/module/react-surface`,
20
- activatesOn: Events.SetupReactSurface,
21
- activate: ReactSurface,
22
- }),
23
- defineModule({
24
- id: `${meta.id}/module/intent-resolver`,
25
- activatesOn: Events.SetupIntentResolver,
26
- activate: IntentResolver,
27
- }),
28
- defineModule({
29
- id: `${meta.id}/module/app-graph-builder`,
30
- activatesOn: Events.SetupAppGraph,
31
- activate: AppGraphBuilder,
32
- }),
33
- ]);
12
+ export const RegistryPlugin = Plugin.define(meta).pipe(
13
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
14
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
15
+ AppPlugin.addSettingsModule({ activate: RegistrySettings }),
16
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
17
+ AppPlugin.addTranslationsModule({ translations }),
18
+ Plugin.addModule({
19
+ id: 'dev-plugin-loader',
20
+ activatesOn: ActivationEvents.Startup,
21
+ activate: DevPluginLoader,
22
+ }),
23
+ Plugin.make,
24
+ );
25
+
26
+ export default RegistryPlugin;
@@ -2,154 +2,199 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Rx } from '@effect-rx/rx-react';
6
- import { Option, pipe } from 'effect';
5
+ import * as Effect from 'effect/Effect';
7
6
 
8
- import { Capabilities, type PluginContext, SettingsAction, contributes, createIntent } from '@dxos/app-framework';
9
- import { createExtension } from '@dxos/plugin-graph';
7
+ import { Capabilities, Capability, type Registry, Plugin } from '@dxos/app-framework';
8
+ import { AppCapabilities, LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
10
+ import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
10
11
 
11
- import { REGISTRY_ID, REGISTRY_KEY, REGISTRY_PLUGIN } from '../meta';
12
+ import { REGISTRY_ID, REGISTRY_KEY, registryCategoryId, meta } from '#meta';
12
13
 
13
- export default (context: PluginContext) =>
14
- contributes(Capabilities.AppGraphBuilder, [
15
- createExtension({
16
- id: REGISTRY_PLUGIN,
17
- actions: (node) =>
18
- Rx.make((get) =>
19
- pipe(
20
- get(node),
21
- Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),
22
- Option.map((node) => [
23
- {
24
- id: REGISTRY_PLUGIN,
25
- data: async () => {
26
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
27
- await dispatch(createIntent(SettingsAction.OpenPluginRegistry));
28
- },
29
- properties: {
30
- label: ['open plugin registry label', { ns: REGISTRY_PLUGIN }],
31
- icon: 'ph--squares-four--regular',
32
- disposition: 'menu',
33
- },
14
+ import { LOAD_PLUGIN_DIALOG } from '../containers';
15
+
16
+ /**
17
+ * Turns a registry catalog entry into a minimal {@link Plugin.Plugin} so it
18
+ * can be attached as the graph node's `data`. The synthesized plugin has no
19
+ * modules and only exists so the article surface can render details for
20
+ * registry plugins that haven't been installed yet.
21
+ */
22
+ const toDisplayPlugin = (entry: Registry.Plugin): Plugin.Plugin =>
23
+ ({
24
+ [Plugin.PluginTypeId]: Plugin.PluginTypeId,
25
+ meta: {
26
+ id: entry.id,
27
+ name: entry.name,
28
+ description: entry.description,
29
+ homePage: entry.homePage,
30
+ source: entry.source,
31
+ screenshots: entry.screenshots,
32
+ tags: entry.tags,
33
+ icon: entry.icon,
34
+ iconHue: entry.iconHue,
35
+ },
36
+ modules: [],
37
+ }) as Plugin.Plugin;
38
+
39
+ export default Capability.makeModule(
40
+ Effect.fnUntraced(function* () {
41
+ const capabilities = yield* Capability.Service;
42
+
43
+ const extensions = yield* Effect.all([
44
+ GraphBuilder.createExtension({
45
+ id: 'open-registry',
46
+ match: NodeMatcher.whenRoot,
47
+ actions: () =>
48
+ Effect.succeed([
49
+ {
50
+ id: 'open-registry',
51
+ data: () => Operation.invoke(SettingsOperation.OpenPluginRegistry),
52
+ properties: {
53
+ label: ['open-plugin-registry.label', { ns: meta.id }],
54
+ icon: 'ph--squares-four--regular',
55
+ disposition: 'menu',
34
56
  },
35
- ]),
36
- Option.getOrElse(() => []),
37
- ),
38
- ),
39
- }),
40
- createExtension({
41
- id: REGISTRY_PLUGIN,
42
- connector: (node) =>
43
- Rx.make((get) =>
44
- pipe(
45
- get(node),
46
- Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),
47
- Option.map((node) => [
48
- {
49
- id: REGISTRY_ID,
50
- type: REGISTRY_PLUGIN,
51
- properties: {
52
- label: ['plugin registry label', { ns: REGISTRY_PLUGIN }],
53
- icon: 'ph--squares-four--regular',
54
- disposition: 'pin-end',
55
- testId: 'treeView.pluginRegistry',
56
- },
57
- nodes: [
58
- {
59
- id: `${REGISTRY_KEY}+all`,
60
- type: 'category',
61
- data: `${REGISTRY_KEY}+all`,
62
- properties: {
63
- label: ['all plugins label', { ns: REGISTRY_PLUGIN }],
64
- icon: 'ph--squares-four--regular',
65
- key: REGISTRY_KEY,
66
- testId: 'pluginRegistry.all',
67
- },
57
+ },
58
+ ]),
59
+ }),
60
+ GraphBuilder.createExtension({
61
+ id: 'registry',
62
+ match: NodeMatcher.whenRoot,
63
+ connector: () =>
64
+ Effect.succeed([
65
+ Node.make({
66
+ id: REGISTRY_ID,
67
+ type: meta.id,
68
+ properties: {
69
+ label: ['plugin-registry.label', { ns: meta.id }],
70
+ icon: 'ph--squares-four--regular',
71
+ disposition: 'pin-end',
72
+ position: 'hoist',
73
+ testId: 'treeView.pluginRegistry',
74
+ },
75
+ nodes: [
76
+ Node.make({
77
+ id: registryCategoryId('official'),
78
+ type: 'category',
79
+ data: registryCategoryId('official'),
80
+ properties: {
81
+ label: ['official-plugins.label', { ns: meta.id }],
82
+ icon: 'ph--squares-four--regular',
83
+ key: REGISTRY_KEY,
84
+ testId: 'pluginRegistry.official',
85
+ },
86
+ }),
87
+ Node.make({
88
+ id: registryCategoryId('installed'),
89
+ type: 'category',
90
+ data: registryCategoryId('installed'),
91
+ properties: {
92
+ label: ['installed-plugins.label', { ns: meta.id }],
93
+ icon: 'ph--check--regular',
94
+ key: REGISTRY_KEY,
95
+ testId: 'pluginRegistry.installed',
68
96
  },
69
- {
70
- id: `${REGISTRY_KEY}+installed`,
71
- type: 'category',
72
- data: `${REGISTRY_KEY}+installed`,
73
- properties: {
74
- label: ['installed plugins label', { ns: REGISTRY_PLUGIN }],
75
- icon: 'ph--check--regular',
76
- key: REGISTRY_KEY,
77
- testId: 'pluginRegistry.installed',
78
- },
97
+ }),
98
+ Node.make({
99
+ id: registryCategoryId('recommended'),
100
+ type: 'category',
101
+ data: registryCategoryId('recommended'),
102
+ properties: {
103
+ label: ['recommended-plugins.label', { ns: meta.id }],
104
+ icon: 'ph--star--regular',
105
+ key: REGISTRY_KEY,
106
+ testId: 'pluginRegistry.recommended',
79
107
  },
80
- {
81
- id: `${REGISTRY_KEY}+recommended`,
82
- type: 'category',
83
- data: `${REGISTRY_KEY}+recommended`,
84
- properties: {
85
- label: ['recommended plugins label', { ns: REGISTRY_PLUGIN }],
86
- icon: 'ph--star--regular',
87
- key: REGISTRY_KEY,
88
- testId: 'pluginRegistry.recommended',
89
- },
108
+ }),
109
+ Node.make({
110
+ id: registryCategoryId('labs'),
111
+ type: 'category',
112
+ data: registryCategoryId('labs'),
113
+ properties: {
114
+ label: ['labs-plugins.label', { ns: meta.id }],
115
+ icon: 'ph--flask--regular',
116
+ key: REGISTRY_KEY,
117
+ testId: 'pluginRegistry.labs',
90
118
  },
91
- {
92
- id: `${REGISTRY_KEY}+labs`,
93
- type: 'category',
94
- data: `${REGISTRY_KEY}+labs`,
95
- properties: {
96
- label: ['labs plugins label', { ns: REGISTRY_PLUGIN }],
97
- icon: 'ph--flask--regular',
98
- key: REGISTRY_KEY,
99
- testId: 'pluginRegistry.labs',
100
- },
119
+ }),
120
+ Node.make({
121
+ id: registryCategoryId('registry'),
122
+ type: 'category',
123
+ data: registryCategoryId('registry'),
124
+ properties: {
125
+ label: ['registry-plugins.label', { ns: meta.id }],
126
+ icon: 'ph--users-three--regular',
127
+ key: REGISTRY_KEY,
128
+ testId: 'pluginRegistry.registry',
101
129
  },
102
- ],
130
+ }),
131
+ ],
132
+ }),
133
+ ]),
134
+ }),
135
+ GraphBuilder.createExtension({
136
+ id: 'actions',
137
+ match: NodeMatcher.whenId(`root/${REGISTRY_ID}`),
138
+ actions: () =>
139
+ Effect.succeed([
140
+ {
141
+ id: 'load-by-url',
142
+ data: Effect.fnUntraced(function* () {
143
+ yield* Operation.invoke(LayoutOperation.UpdateDialog, {
144
+ subject: LOAD_PLUGIN_DIALOG,
145
+ state: true,
146
+ });
147
+ }),
148
+ properties: {
149
+ label: ['load-by-url.label', { ns: meta.id }],
150
+ icon: 'ph--cloud-arrow-down--regular',
151
+ disposition: 'list-item-primary',
103
152
  },
104
- ]),
105
- Option.getOrElse(() => []),
106
- ),
107
- ),
108
- }),
109
- createExtension({
110
- id: `${REGISTRY_PLUGIN}/actions`,
111
- actions: (node) =>
112
- Rx.make((get) =>
113
- pipe(
114
- get(node),
115
- Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),
116
- Option.map(() => [
117
- {
118
- id: `${REGISTRY_PLUGIN}/load-by-url`,
119
- data: async () => {},
120
- properties: {
121
- label: ['load by url label', { ns: REGISTRY_PLUGIN }],
122
- icon: 'ph--cloud-arrow-down--regular',
123
- disabled: true,
124
- },
153
+ },
154
+ ]),
155
+ }),
156
+ GraphBuilder.createExtension({
157
+ id: 'plugins',
158
+ match: NodeMatcher.whenId(`root/${REGISTRY_ID}`),
159
+ connector: (_node, get) => {
160
+ const manager = capabilities.get(Capabilities.PluginManager);
161
+ const installedIds = new Set(manager.getPlugins().map((plugin) => plugin.meta.id));
162
+
163
+ const installedNodes = manager.getPlugins().map((plugin) =>
164
+ Node.make({
165
+ id: plugin.meta.id,
166
+ type: 'org.dxos.plugin',
167
+ data: plugin,
168
+ properties: {
169
+ label: plugin.meta.name ?? plugin.meta.id,
170
+ icon: plugin.meta.icon ?? 'ph--circle--regular',
171
+ disposition: 'hidden',
125
172
  },
126
- ]),
127
- Option.getOrElse(() => []),
128
- ),
129
- ),
130
- }),
131
- createExtension({
132
- id: `${REGISTRY_PLUGIN}/plugins`,
133
- connector: (node) =>
134
- Rx.make((get) =>
135
- pipe(
136
- get(node),
137
- Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),
138
- Option.map(() => {
139
- const manager = context.getCapability(Capabilities.PluginManager);
140
- return manager.plugins.map((plugin) => ({
141
- id: plugin.meta.id.replaceAll('/', ':'),
142
- type: 'dxos.org/plugin',
173
+ }),
174
+ );
175
+
176
+ const registryEntries = get(manager.pluginRegistry.plugins).entries;
177
+ const registryNodes = registryEntries
178
+ .filter((entry) => !installedIds.has(entry.id))
179
+ .map((entry) => {
180
+ const plugin = toDisplayPlugin(entry);
181
+ return Node.make({
182
+ id: plugin.meta.id,
183
+ type: 'org.dxos.plugin',
143
184
  data: plugin,
144
185
  properties: {
145
186
  label: plugin.meta.name ?? plugin.meta.id,
146
187
  icon: plugin.meta.icon ?? 'ph--circle--regular',
147
188
  disposition: 'hidden',
148
189
  },
149
- }));
150
- }),
151
- Option.getOrElse(() => []),
152
- ),
153
- ),
154
- }),
155
- ]);
190
+ });
191
+ });
192
+
193
+ return Effect.succeed([...installedNodes, ...registryNodes]);
194
+ },
195
+ }),
196
+ ]);
197
+
198
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
199
+ }),
200
+ );
@@ -0,0 +1,39 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { log } from '@dxos/log';
9
+
10
+ import { RegistryCapabilities } from '../types';
11
+
12
+ /**
13
+ * Startup module that auto-loads a locally-served dev plugin when the user has
14
+ * the toggle enabled in registry settings. Failures (dev server offline, 404,
15
+ * timeout) are logged and swallowed so a stale dev URL never blocks app boot —
16
+ * the toggle stays on, the next reload retries.
17
+ */
18
+ export default Capability.makeModule(
19
+ Effect.fnUntraced(function* () {
20
+ const manager = yield* Capability.get(Capabilities.PluginManager);
21
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
22
+ const settingsAtom = yield* Capability.get(RegistryCapabilities.Settings);
23
+
24
+ const settings = registry.get(settingsAtom);
25
+ const url = settings.devPluginUrl?.trim();
26
+ if (!settings.devPluginEnabled || !url) {
27
+ return [];
28
+ }
29
+
30
+ log.info('loading dev plugin from registry settings', { url });
31
+ yield* manager.add(url).pipe(
32
+ Effect.flatMap((plugin) => manager.enable(plugin.meta.id)),
33
+ Effect.tapError((error) => Effect.sync(() => log.warn('dev plugin auto-load failed', { url, error }))),
34
+ Effect.ignore,
35
+ );
36
+
37
+ return [];
38
+ }),
39
+ );
@@ -2,8 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
5
+ import { Capability } from '@dxos/app-framework';
6
+ import { OperationHandlerSet } from '@dxos/compute';
6
7
 
7
- export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
8
- export const IntentResolver = lazy(() => import('./intent-resolver'));
9
- export const ReactSurface = lazy(() => import('./react-surface'));
8
+ export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
9
+ export const DevPluginLoader = Capability.lazy('DevPluginLoader', () => import('./dev-plugin-loader'));
10
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
11
+ 'OperationHandler',
12
+ () => import('./operation-handler'),
13
+ );
14
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
15
+ export const RegistrySettings = Capability.lazy('RegistrySettings', () => import('./settings'));
@@ -0,0 +1,16 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import type { OperationHandlerSet } from '@dxos/compute';
9
+
10
+ import { RegistryOperationHandlerSet } from '#operations';
11
+
12
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
13
+ Effect.fnUntraced(function* () {
14
+ return Capability.contributes(Capabilities.OperationHandler, RegistryOperationHandlerSet);
15
+ }),
16
+ );