@dxos/plugin-registry 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae

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 (165) hide show
  1. package/dist/lib/browser/PluginArticle-MLBF7AFA.mjs +29 -0
  2. package/dist/lib/browser/PluginArticle-MLBF7AFA.mjs.map +7 -0
  3. package/dist/lib/browser/PluginRegistry-ENAI4SAY.mjs +77 -0
  4. package/dist/lib/browser/PluginRegistry-ENAI4SAY.mjs.map +7 -0
  5. package/dist/lib/browser/app-graph-builder-2HXD7SOS.mjs +167 -0
  6. package/dist/lib/browser/app-graph-builder-2HXD7SOS.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-TSNK3SAR.mjs +191 -0
  8. package/dist/lib/browser/chunk-TSNK3SAR.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-VOAOTNGS.mjs +19 -0
  10. package/dist/lib/browser/chunk-VOAOTNGS.mjs.map +7 -0
  11. package/dist/lib/browser/cli/index.mjs +224 -0
  12. package/dist/lib/browser/cli/index.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +23 -29
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs +25 -0
  17. package/dist/lib/browser/operation-resolver-7P3NNVSR.mjs.map +7 -0
  18. package/dist/lib/browser/react-surface-DH25DIRH.mjs +85 -0
  19. package/dist/lib/browser/react-surface-DH25DIRH.mjs.map +7 -0
  20. package/dist/lib/node-esm/PluginArticle-TP2G6GGI.mjs +30 -0
  21. package/dist/lib/node-esm/PluginArticle-TP2G6GGI.mjs.map +7 -0
  22. package/dist/lib/node-esm/PluginRegistry-CWIZIQNX.mjs +78 -0
  23. package/dist/lib/node-esm/PluginRegistry-CWIZIQNX.mjs.map +7 -0
  24. package/dist/lib/node-esm/app-graph-builder-2LNPN72O.mjs +168 -0
  25. package/dist/lib/node-esm/app-graph-builder-2LNPN72O.mjs.map +7 -0
  26. package/dist/lib/node-esm/chunk-4XO63XB6.mjs +192 -0
  27. package/dist/lib/node-esm/chunk-4XO63XB6.mjs.map +7 -0
  28. package/dist/lib/node-esm/chunk-SALMIZ2W.mjs +21 -0
  29. package/dist/lib/node-esm/chunk-SALMIZ2W.mjs.map +7 -0
  30. package/dist/lib/node-esm/cli/index.mjs +225 -0
  31. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  32. package/dist/lib/node-esm/index.mjs +64 -0
  33. package/dist/lib/node-esm/index.mjs.map +7 -0
  34. package/dist/lib/node-esm/meta.json +1 -0
  35. package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs +26 -0
  36. package/dist/lib/node-esm/operation-resolver-B24QW6IF.mjs.map +7 -0
  37. package/dist/lib/node-esm/react-surface-3YBEVL65.mjs +86 -0
  38. package/dist/lib/node-esm/react-surface-3YBEVL65.mjs.map +7 -0
  39. package/dist/types/src/RegistryPlugin.d.ts +2 -1
  40. package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
  41. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  42. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  43. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  44. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  45. package/dist/types/src/capabilities/index.d.ts +3 -3
  46. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  48. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  50. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  51. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  52. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  53. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  54. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  55. package/dist/types/src/cli/commands/disable.d.ts +11 -0
  56. package/dist/types/src/cli/commands/disable.d.ts.map +1 -0
  57. package/dist/types/src/cli/commands/enable.d.ts +11 -0
  58. package/dist/types/src/cli/commands/enable.d.ts.map +1 -0
  59. package/dist/types/src/cli/commands/index.d.ts +3 -0
  60. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  61. package/dist/types/src/cli/commands/list.d.ts +7 -0
  62. package/dist/types/src/cli/commands/list.d.ts.map +1 -0
  63. package/dist/types/src/cli/commands/util.d.ts +11 -0
  64. package/dist/types/src/cli/commands/util.d.ts.map +1 -0
  65. package/dist/types/src/cli/index.d.ts +3 -0
  66. package/dist/types/src/cli/index.d.ts.map +1 -0
  67. package/dist/types/src/cli/plugin.d.ts +3 -0
  68. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  69. package/dist/types/src/cli/storage.d.ts +18 -0
  70. package/dist/types/src/cli/storage.d.ts.map +1 -0
  71. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +9 -0
  72. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
  73. package/dist/types/src/components/{PluginDetail.stories.d.ts → PluginDetail/PluginDetail.stories.d.ts} +1 -1
  74. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -0
  75. package/dist/types/src/components/PluginDetail/index.d.ts +2 -0
  76. package/dist/types/src/components/PluginDetail/index.d.ts.map +1 -0
  77. package/dist/types/src/components/{PluginItem.d.ts → PluginList/PluginItem.d.ts} +2 -2
  78. package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
  79. package/dist/types/src/components/{PluginList.d.ts → PluginList/PluginList.d.ts} +1 -1
  80. package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
  81. package/dist/types/src/components/{PluginList.stories.d.ts → PluginList/PluginList.stories.d.ts} +2 -5
  82. package/dist/types/src/components/PluginList/PluginList.stories.d.ts.map +1 -0
  83. package/dist/types/src/components/PluginList/index.d.ts +2 -0
  84. package/dist/types/src/components/PluginList/index.d.ts.map +1 -0
  85. package/dist/types/src/components/index.d.ts +0 -1
  86. package/dist/types/src/components/index.d.ts.map +1 -1
  87. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +7 -0
  88. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -0
  89. package/dist/types/src/containers/PluginArticle/index.d.ts +3 -0
  90. package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
  91. package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts +8 -0
  92. package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts.map +1 -0
  93. package/dist/types/src/containers/PluginRegistry/index.d.ts +3 -0
  94. package/dist/types/src/containers/PluginRegistry/index.d.ts.map +1 -0
  95. package/dist/types/src/containers/index.d.ts +4 -0
  96. package/dist/types/src/containers/index.d.ts.map +1 -0
  97. package/dist/types/src/meta.d.ts +2 -2
  98. package/dist/types/src/meta.d.ts.map +1 -1
  99. package/dist/types/src/types.d.ts +2 -0
  100. package/dist/types/src/types.d.ts.map +1 -1
  101. package/dist/types/tsconfig.tsbuildinfo +1 -1
  102. package/package.json +49 -33
  103. package/src/RegistryPlugin.tsx +10 -24
  104. package/src/capabilities/app-graph-builder/app-graph-builder.ts +137 -0
  105. package/src/capabilities/app-graph-builder/index.ts +7 -0
  106. package/src/capabilities/index.ts +3 -5
  107. package/src/capabilities/operation-resolver/index.ts +7 -0
  108. package/src/capabilities/operation-resolver/operation-resolver.ts +24 -0
  109. package/src/capabilities/react-surface/index.ts +7 -0
  110. package/src/capabilities/react-surface/react-surface.tsx +88 -0
  111. package/src/cli/commands/disable.ts +47 -0
  112. package/src/cli/commands/enable.ts +44 -0
  113. package/src/cli/commands/index.ts +14 -0
  114. package/src/cli/commands/list.ts +41 -0
  115. package/src/cli/commands/util.ts +24 -0
  116. package/src/cli/index.ts +6 -0
  117. package/src/cli/plugin.ts +17 -0
  118. package/src/cli/storage.ts +57 -0
  119. package/src/components/PluginDetail/PluginDetail.stories.tsx +44 -0
  120. package/src/components/PluginDetail/PluginDetail.tsx +81 -0
  121. package/src/components/PluginDetail/index.ts +5 -0
  122. package/src/components/PluginList/PluginItem.tsx +124 -0
  123. package/src/components/{PluginList.stories.tsx → PluginList/PluginList.stories.tsx} +27 -26
  124. package/src/components/{PluginList.tsx → PluginList/PluginList.tsx} +3 -5
  125. package/src/components/PluginList/index.ts +5 -0
  126. package/src/components/index.ts +0 -1
  127. package/src/containers/PluginArticle/PluginArticle.tsx +28 -0
  128. package/src/containers/PluginArticle/index.ts +7 -0
  129. package/src/containers/PluginRegistry/PluginRegistry.tsx +86 -0
  130. package/src/containers/PluginRegistry/index.ts +7 -0
  131. package/src/containers/index.ts +8 -0
  132. package/src/meta.ts +7 -2
  133. package/src/types.ts +4 -0
  134. package/dist/lib/browser/app-graph-builder-5BKKIS5T.mjs +0 -162
  135. package/dist/lib/browser/app-graph-builder-5BKKIS5T.mjs.map +0 -7
  136. package/dist/lib/browser/chunk-MWZPWWWF.mjs +0 -14
  137. package/dist/lib/browser/chunk-MWZPWWWF.mjs.map +0 -7
  138. package/dist/lib/browser/intent-resolver-RUD6WFGT.mjs +0 -23
  139. package/dist/lib/browser/intent-resolver-RUD6WFGT.mjs.map +0 -7
  140. package/dist/lib/browser/react-surface-FYRVOQGA.mjs +0 -335
  141. package/dist/lib/browser/react-surface-FYRVOQGA.mjs.map +0 -7
  142. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  143. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  144. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  145. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  146. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  147. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  148. package/dist/types/src/components/Icon.stories.d.ts +0 -14
  149. package/dist/types/src/components/Icon.stories.d.ts.map +0 -1
  150. package/dist/types/src/components/PluginDetail.d.ts +0 -9
  151. package/dist/types/src/components/PluginDetail.d.ts.map +0 -1
  152. package/dist/types/src/components/PluginDetail.stories.d.ts.map +0 -1
  153. package/dist/types/src/components/PluginItem.d.ts.map +0 -1
  154. package/dist/types/src/components/PluginList.d.ts.map +0 -1
  155. package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
  156. package/dist/types/src/components/RegistryContainer.d.ts +0 -7
  157. package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
  158. package/src/capabilities/app-graph-builder.ts +0 -156
  159. package/src/capabilities/intent-resolver.ts +0 -27
  160. package/src/capabilities/react-surface.tsx +0 -85
  161. package/src/components/Icon.stories.tsx +0 -110
  162. package/src/components/PluginDetail.stories.tsx +0 -45
  163. package/src/components/PluginDetail.tsx +0 -65
  164. package/src/components/PluginItem.tsx +0 -119
  165. package/src/components/RegistryContainer.tsx +0 -84
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@dxos/plugin-registry",
3
- "version": "0.8.4-main.c4373fc",
3
+ "version": "0.8.4-main.c85a9c8dae",
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,
@@ -11,8 +15,15 @@
11
15
  "exports": {
12
16
  ".": {
13
17
  "source": "./src/index.ts",
14
- "types": "./dist/types/src/index.d.ts",
15
- "browser": "./dist/lib/browser/index.mjs"
18
+ "browser": "./dist/lib/browser/index.mjs",
19
+ "node": "./dist/lib/node-esm/index.mjs",
20
+ "types": "./dist/types/src/index.d.ts"
21
+ },
22
+ "./cli": {
23
+ "source": "./src/cli/index.ts",
24
+ "browser": "./dist/lib/browser/cli/index.mjs",
25
+ "node": "./dist/lib/node-esm/cli/index.mjs",
26
+ "types": "./dist/types/src/cli/index.d.ts"
16
27
  }
17
28
  },
18
29
  "types": "dist/types/src/index.d.ts",
@@ -24,40 +35,45 @@
24
35
  "src"
25
36
  ],
26
37
  "dependencies": {
27
- "@preact-signals/safe-react": "^0.9.0",
28
- "@dxos/invariant": "0.8.4-main.c4373fc",
29
- "@dxos/live-object": "0.8.4-main.c4373fc",
30
- "@dxos/echo": "0.8.4-main.c4373fc",
31
- "@dxos/plugin-observability": "0.8.4-main.c4373fc",
32
- "@dxos/app-framework": "0.8.4-main.c4373fc",
33
- "@dxos/react-ui-form": "0.8.4-main.c4373fc",
34
- "@dxos/react-ui-stack": "0.8.4-main.c4373fc",
35
- "@dxos/util": "0.8.4-main.c4373fc",
36
- "@dxos/plugin-graph": "0.8.4-main.c4373fc"
38
+ "@effect-atom/atom-react": "^0.5.0",
39
+ "@effect/cli": "0.73.2",
40
+ "@dxos/app-toolkit": "0.8.4-main.c85a9c8dae",
41
+ "@dxos/cli-util": "0.8.4-main.c85a9c8dae",
42
+ "@dxos/app-framework": "0.8.4-main.c85a9c8dae",
43
+ "@dxos/client-protocol": "0.8.4-main.c85a9c8dae",
44
+ "@dxos/echo": "0.8.4-main.c85a9c8dae",
45
+ "@dxos/effect": "0.8.4-main.c85a9c8dae",
46
+ "@dxos/invariant": "0.8.4-main.c85a9c8dae",
47
+ "@dxos/operation": "0.8.4-main.c85a9c8dae",
48
+ "@dxos/plugin-observability": "0.8.4-main.c85a9c8dae",
49
+ "@dxos/plugin-graph": "0.8.4-main.c85a9c8dae",
50
+ "@dxos/react-ui-form": "0.8.4-main.c85a9c8dae",
51
+ "@dxos/react-ui-mosaic": "0.8.4-main.c85a9c8dae",
52
+ "@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
53
+ "@dxos/util": "0.8.4-main.c85a9c8dae"
37
54
  },
38
55
  "devDependencies": {
39
- "@effect-rx/rx-react": "0.42.4",
40
- "@effect/platform": "0.92.1",
41
- "@phosphor-icons/react": "^2.1.10",
42
- "@types/react": "~19.2.2",
43
- "@types/react-dom": "~19.2.1",
44
- "effect": "3.18.3",
45
- "react": "~19.2.0",
46
- "react-dom": "~19.2.0",
47
- "vite": "7.1.9",
48
- "@dxos/random": "0.8.4-main.c4373fc",
49
- "@dxos/storybook-utils": "0.8.4-main.c4373fc",
50
- "@dxos/react-ui-theme": "0.8.4-main.c4373fc",
51
- "@dxos/react-ui": "0.8.4-main.c4373fc"
56
+ "@effect-atom/atom-react": "^0.5.0",
57
+ "@effect/platform": "0.94.4",
58
+ "@types/react": "~19.2.7",
59
+ "@types/react-dom": "~19.2.3",
60
+ "effect": "3.19.16",
61
+ "react": "~19.2.3",
62
+ "react-dom": "~19.2.3",
63
+ "vite": "^7.1.11",
64
+ "@dxos/random": "0.8.4-main.c85a9c8dae",
65
+ "@dxos/react-ui": "0.8.4-main.c85a9c8dae",
66
+ "@dxos/storybook-utils": "0.8.4-main.c85a9c8dae",
67
+ "@dxos/ui-theme": "0.8.4-main.c85a9c8dae"
52
68
  },
53
69
  "peerDependencies": {
54
- "@effect-rx/rx-react": "^0.34.1",
55
- "@effect/platform": "^0.80.12",
56
- "effect": "^3.13.3",
57
- "react": "^19.0.0",
58
- "react-dom": "^19.0.0",
59
- "@dxos/react-ui": "0.8.4-main.c4373fc",
60
- "@dxos/react-ui-theme": "0.8.4-main.c4373fc"
70
+ "@effect-atom/atom-react": "^0.5.0",
71
+ "@effect/platform": "0.94.4",
72
+ "effect": "3.19.16",
73
+ "react": "~19.2.3",
74
+ "react-dom": "~19.2.3",
75
+ "@dxos/react-ui": "0.8.4-main.c85a9c8dae",
76
+ "@dxos/ui-theme": "0.8.4-main.c85a9c8dae"
61
77
  },
62
78
  "publishConfig": {
63
79
  "access": "public"
@@ -2,31 +2,17 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
6
7
 
7
- import { AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';
8
+ import { AppGraphBuilder, OperationResolver, ReactSurface } from './capabilities';
8
9
  import { meta } from './meta';
9
10
  import { translations } from './translations';
10
11
 
11
- export const RegistryPlugin = definePlugin(meta, () => [
12
- defineModule({
13
- id: `${meta.id}/module/translations`,
14
- activatesOn: Events.SetupTranslations,
15
- activate: () => contributes(Capabilities.Translations, translations),
16
- }),
17
- defineModule({
18
- id: `${meta.id}/module/react-surface`,
19
- activatesOn: Events.SetupReactSurface,
20
- activate: ReactSurface,
21
- }),
22
- defineModule({
23
- id: `${meta.id}/module/intent-resolver`,
24
- activatesOn: Events.SetupIntentResolver,
25
- activate: IntentResolver,
26
- }),
27
- defineModule({
28
- id: `${meta.id}/module/app-graph-builder`,
29
- activatesOn: Events.SetupAppGraph,
30
- activate: AppGraphBuilder,
31
- }),
32
- ]);
12
+ export const RegistryPlugin = Plugin.define(meta).pipe(
13
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
14
+ AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
15
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
16
+ AppPlugin.addTranslationsModule({ translations }),
17
+ Plugin.make,
18
+ );
@@ -0,0 +1,137 @@
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 { AppCapabilities, SettingsOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/operation';
10
+ import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
11
+
12
+ import { REGISTRY_ID, REGISTRY_KEY, meta } from '../../meta';
13
+
14
+ export default Capability.makeModule(
15
+ Effect.fnUntraced(function* () {
16
+ const capabilities = yield* Capability.Service;
17
+
18
+ const extensions = yield* Effect.all([
19
+ GraphBuilder.createExtension({
20
+ id: meta.id,
21
+ match: NodeMatcher.whenRoot,
22
+ actions: () =>
23
+ Effect.succeed([
24
+ {
25
+ id: meta.id,
26
+ data: () => Operation.invoke(SettingsOperation.OpenPluginRegistry),
27
+ properties: {
28
+ label: ['open plugin registry label', { ns: meta.id }],
29
+ icon: 'ph--squares-four--regular',
30
+ disposition: 'menu',
31
+ },
32
+ },
33
+ ]),
34
+ }),
35
+ GraphBuilder.createExtension({
36
+ id: meta.id,
37
+ match: NodeMatcher.whenRoot,
38
+ connector: () =>
39
+ Effect.succeed([
40
+ {
41
+ id: REGISTRY_ID,
42
+ type: meta.id,
43
+ properties: {
44
+ label: ['plugin registry label', { ns: meta.id }],
45
+ icon: 'ph--squares-four--regular',
46
+ disposition: 'pin-end',
47
+ testId: 'treeView.pluginRegistry',
48
+ },
49
+ nodes: [
50
+ {
51
+ id: `${REGISTRY_KEY}>all`,
52
+ type: 'category' as const,
53
+ data: `${REGISTRY_KEY}>all`,
54
+ properties: {
55
+ label: ['all plugins label', { ns: meta.id }],
56
+ icon: 'ph--squares-four--regular',
57
+ key: REGISTRY_KEY,
58
+ testId: 'pluginRegistry.all',
59
+ },
60
+ },
61
+ {
62
+ id: `${REGISTRY_KEY}>installed`,
63
+ type: 'category' as const,
64
+ data: `${REGISTRY_KEY}>installed`,
65
+ properties: {
66
+ label: ['installed plugins label', { ns: meta.id }],
67
+ icon: 'ph--check--regular',
68
+ key: REGISTRY_KEY,
69
+ testId: 'pluginRegistry.installed',
70
+ },
71
+ },
72
+ {
73
+ id: `${REGISTRY_KEY}>recommended`,
74
+ type: 'category' as const,
75
+ data: `${REGISTRY_KEY}>recommended`,
76
+ properties: {
77
+ label: ['recommended plugins label', { ns: meta.id }],
78
+ icon: 'ph--star--regular',
79
+ key: REGISTRY_KEY,
80
+ testId: 'pluginRegistry.recommended',
81
+ },
82
+ },
83
+ {
84
+ id: `${REGISTRY_KEY}>labs`,
85
+ type: 'category' as const,
86
+ data: `${REGISTRY_KEY}>labs`,
87
+ properties: {
88
+ label: ['labs plugins label', { ns: meta.id }],
89
+ icon: 'ph--flask--regular',
90
+ key: REGISTRY_KEY,
91
+ testId: 'pluginRegistry.labs',
92
+ },
93
+ },
94
+ ],
95
+ },
96
+ ]),
97
+ }),
98
+ GraphBuilder.createExtension({
99
+ id: `${meta.id}/actions`,
100
+ match: NodeMatcher.whenId(REGISTRY_ID),
101
+ actions: () =>
102
+ Effect.succeed([
103
+ {
104
+ id: `${meta.id}/load-by-url`,
105
+ data: Effect.fnUntraced(function* () {}),
106
+ properties: {
107
+ label: ['load by url label', { ns: meta.id }],
108
+ icon: 'ph--cloud-arrow-down--regular',
109
+ disabled: true,
110
+ },
111
+ },
112
+ ]),
113
+ }),
114
+ GraphBuilder.createExtension({
115
+ id: `${meta.id}/plugins`,
116
+ match: NodeMatcher.whenId(REGISTRY_ID),
117
+ connector: () => {
118
+ const manager = capabilities.get(Capabilities.PluginManager);
119
+ return Effect.succeed(
120
+ manager.getPlugins().map((plugin) => ({
121
+ id: plugin.meta.id.replaceAll('/', ':'),
122
+ type: 'dxos.org/plugin',
123
+ data: plugin,
124
+ properties: {
125
+ label: plugin.meta.name ?? plugin.meta.id,
126
+ icon: plugin.meta.icon ?? 'ph--circle--regular',
127
+ disposition: 'hidden',
128
+ },
129
+ })),
130
+ );
131
+ },
132
+ }),
133
+ ]);
134
+
135
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
136
+ }),
137
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
@@ -2,8 +2,6 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
6
-
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'));
5
+ export * from './app-graph-builder';
6
+ export * from './operation-resolver';
7
+ export * from './react-surface';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const OperationResolver = Capability.lazy('OperationResolver', () => import('./operation-resolver'));
@@ -0,0 +1,24 @@
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 { LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';
9
+ import { Operation, OperationResolver } from '@dxos/operation';
10
+
11
+ import { REGISTRY_ID } from '../../meta';
12
+
13
+ export default Capability.makeModule(
14
+ Effect.fnUntraced(function* () {
15
+ return Capability.contributes(Capabilities.OperationResolver, [
16
+ OperationResolver.make({
17
+ operation: SettingsOperation.OpenPluginRegistry,
18
+ handler: Effect.fnUntraced(function* () {
19
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: REGISTRY_ID });
20
+ }),
21
+ }),
22
+ ]);
23
+ }),
24
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -0,0 +1,88 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import React, { useMemo } from 'react';
7
+
8
+ import { Capabilities, Capability, Plugin } from '@dxos/app-framework';
9
+ import { Surface, usePluginManager } from '@dxos/app-framework/ui';
10
+
11
+ import { PluginArticle, PluginRegistry } from '../../containers';
12
+ import { REGISTRY_KEY, meta } from '../../meta';
13
+
14
+ export default Capability.makeModule(() =>
15
+ Effect.succeed(
16
+ Capability.contributes(Capabilities.ReactSurface, [
17
+ Surface.create({
18
+ id: `${meta.id}/all`,
19
+ role: 'article',
20
+ filter: (data): data is any => data.subject === `${REGISTRY_KEY}>all`,
21
+ component: () => {
22
+ const manager = usePluginManager();
23
+ const filtered = useMemo(
24
+ () => manager.getPlugins().filter(({ meta }) => !manager.getCore().includes(meta.id)),
25
+ [],
26
+ );
27
+
28
+ return <PluginRegistry id={`${REGISTRY_KEY}>all`} plugins={filtered} />;
29
+ },
30
+ }),
31
+ Surface.create({
32
+ id: `${meta.id}/installed`,
33
+ role: 'article',
34
+ filter: (data): data is any => data.subject === `${REGISTRY_KEY}>installed`,
35
+ component: () => {
36
+ const manager = usePluginManager();
37
+ const filtered = useMemo(
38
+ () =>
39
+ manager
40
+ .getPlugins()
41
+ .filter(({ meta }) => !manager.getCore().includes(meta.id))
42
+ .filter(({ meta }) => manager.getEnabled().includes(meta.id)),
43
+ [],
44
+ );
45
+
46
+ return <PluginRegistry id={`${REGISTRY_KEY}>installed`} plugins={filtered} />;
47
+ },
48
+ }),
49
+ Surface.create({
50
+ id: `${meta.id}/recommended`,
51
+ role: 'article',
52
+ filter: (data): data is any => data.subject === `${REGISTRY_KEY}>recommended`,
53
+ component: () => {
54
+ const manager = usePluginManager();
55
+ const filtered = useMemo(
56
+ () =>
57
+ manager
58
+ .getPlugins()
59
+ .filter(({ meta }) => !manager.getCore().includes(meta.id))
60
+ .filter(({ meta }) => !meta.tags?.includes('labs')),
61
+ [],
62
+ );
63
+
64
+ return <PluginRegistry id={`${REGISTRY_KEY}>recommended`} plugins={filtered} />;
65
+ },
66
+ }),
67
+ Surface.create({
68
+ id: `${meta.id}/labs`,
69
+ role: 'article',
70
+ filter: (data): data is any => data.subject === `${REGISTRY_KEY}>labs`,
71
+ component: () => {
72
+ const manager = usePluginManager();
73
+ const filtered = useMemo(() => manager.getPlugins().filter(({ meta }) => meta.tags?.includes('labs')), []);
74
+
75
+ return <PluginRegistry id={`${REGISTRY_KEY}>labs`} plugins={filtered} />;
76
+ },
77
+ }),
78
+ Surface.create({
79
+ id: `${meta.id}/plugin-details`,
80
+ role: 'article',
81
+ filter: (data): data is { subject: Plugin.Plugin } => Plugin.isPlugin(data.subject),
82
+ component: ({ data: { subject } }) => {
83
+ return <PluginArticle subject={subject} />;
84
+ },
85
+ }),
86
+ ]),
87
+ ),
88
+ );
@@ -0,0 +1,47 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Args from '@effect/cli/Args';
6
+ import * as Command from '@effect/cli/Command';
7
+ import * as Console from 'effect/Console';
8
+ import * as Effect from 'effect/Effect';
9
+
10
+ import { Plugin } from '@dxos/app-framework';
11
+ import { CommandConfig } from '@dxos/cli-util';
12
+ import { invariant } from '@dxos/invariant';
13
+
14
+ import { saveEnabledPlugins } from '../storage';
15
+
16
+ export const handler = Effect.fn(function* ({ id }: { id: string }) {
17
+ const { json, profile } = yield* CommandConfig;
18
+ const manager = yield* Plugin.Service;
19
+
20
+ const plugins = manager.getPlugins();
21
+ const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);
22
+ invariant(plugin, `Plugin not found: ${id}`);
23
+
24
+ const core = manager.getCore();
25
+ invariant(!core.includes(id), `Cannot disable core plugin: ${id}`);
26
+
27
+ const disabled = yield* manager.disable(id);
28
+ invariant(disabled, `Failed to disable plugin: ${id}`);
29
+
30
+ // Save enabled plugins to storage
31
+ const enabledPlugins = manager.getEnabled();
32
+ yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });
33
+
34
+ if (json) {
35
+ yield* Console.log(JSON.stringify({ id, enabled: false }, null, 2));
36
+ } else {
37
+ yield* Console.log(`Plugin "${plugin.meta.name ?? id}" disabled.`);
38
+ }
39
+ });
40
+
41
+ export const disable = Command.make(
42
+ 'disable',
43
+ {
44
+ id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to disable.')),
45
+ },
46
+ handler,
47
+ ).pipe(Command.withDescription('Disable a plugin.'));
@@ -0,0 +1,44 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Args from '@effect/cli/Args';
6
+ import * as Command from '@effect/cli/Command';
7
+ import * as Console from 'effect/Console';
8
+ import * as Effect from 'effect/Effect';
9
+
10
+ import { Plugin } from '@dxos/app-framework';
11
+ import { CommandConfig } from '@dxos/cli-util';
12
+ import { invariant } from '@dxos/invariant';
13
+
14
+ import { saveEnabledPlugins } from '../storage';
15
+
16
+ export const handler = Effect.fn(function* ({ id }: { id: string }) {
17
+ const { json, profile } = yield* CommandConfig;
18
+ const manager = yield* Plugin.Service;
19
+
20
+ const plugins = manager.getPlugins();
21
+ const plugin = plugins.find((p: Plugin.Plugin) => p.meta.id === id);
22
+ invariant(plugin, `Plugin not found: ${id}`);
23
+
24
+ const enabled = yield* manager.enable(id);
25
+ invariant(enabled, `Failed to enable plugin: ${id}`);
26
+
27
+ // Save enabled plugins to storage
28
+ const enabledPlugins = manager.getEnabled();
29
+ yield* saveEnabledPlugins({ profile, enabled: [...enabledPlugins] });
30
+
31
+ if (json) {
32
+ yield* Console.log(JSON.stringify({ id, enabled: true }, null, 2));
33
+ } else {
34
+ yield* Console.log(`Plugin "${plugin.meta.name ?? id}" enabled.`);
35
+ }
36
+ });
37
+
38
+ export const enable = Command.make(
39
+ 'enable',
40
+ {
41
+ id: Args.text({ name: 'id' }).pipe(Args.withDescription('The ID of the plugin to enable.')),
42
+ },
43
+ handler,
44
+ ).pipe(Command.withDescription('Enable a plugin.'));
@@ -0,0 +1,14 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Command from '@effect/cli/Command';
6
+
7
+ import { disable } from './disable';
8
+ import { enable } from './enable';
9
+ import { list } from './list';
10
+
11
+ export const plugin: Command.Command<any, any, any, any> = Command.make('plugin').pipe(
12
+ Command.withDescription('Manage plugins.'),
13
+ Command.withSubcommands([enable, disable, list]),
14
+ );
@@ -0,0 +1,41 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Command from '@effect/cli/Command';
6
+ import * as Console from 'effect/Console';
7
+ import * as Effect from 'effect/Effect';
8
+
9
+ import { Plugin } from '@dxos/app-framework';
10
+ import { CommandConfig, printList } from '@dxos/cli-util';
11
+
12
+ import { type FormattedPlugin, printPlugin } from './util';
13
+
14
+ export const handler = Effect.fn(function* () {
15
+ const { json } = yield* CommandConfig;
16
+ const manager = yield* Plugin.Service;
17
+
18
+ const plugins = manager.getPlugins();
19
+ const enabled = manager.getEnabled();
20
+ const core = manager.getCore();
21
+
22
+ const formattedPlugins: FormattedPlugin[] = plugins.map((plugin: Plugin.Plugin) => {
23
+ const isEnabled = enabled.includes(plugin.meta.id);
24
+ const isCore = core.includes(plugin.meta.id);
25
+ return {
26
+ id: plugin.meta.id,
27
+ name: plugin.meta.name ?? plugin.meta.id,
28
+ enabled: isEnabled,
29
+ core: isCore,
30
+ };
31
+ });
32
+
33
+ if (json) {
34
+ yield* Console.log(JSON.stringify(formattedPlugins, null, 2));
35
+ } else {
36
+ const formatted = formattedPlugins.map(printPlugin);
37
+ yield* Console.log(printList(formatted));
38
+ }
39
+ });
40
+
41
+ export const list = Command.make('list', {}, handler).pipe(Command.withDescription('List all available plugins.'));
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { FormBuilder } from '@dxos/cli-util';
6
+
7
+ export type FormattedPlugin = {
8
+ id: string;
9
+ name: string;
10
+ enabled: boolean;
11
+ core: boolean;
12
+ };
13
+
14
+ /**
15
+ * Pretty prints a plugin with ANSI colors.
16
+ */
17
+ export const printPlugin = (plugin: FormattedPlugin) => {
18
+ const status = plugin.core ? 'core' : plugin.enabled ? 'enabled' : 'disabled';
19
+ return FormBuilder.make({ title: plugin.name }).pipe(
20
+ FormBuilder.set('id', plugin.id),
21
+ FormBuilder.set('status', status),
22
+ FormBuilder.build,
23
+ );
24
+ };
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './plugin';
6
+ export * from './storage';
@@ -0,0 +1,17 @@
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
+ );