@dxos/plugin-registry 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33

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 (173) hide show
  1. package/dist/lib/browser/cli/index.mjs +179 -0
  2. package/dist/lib/browser/cli/index.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +37 -63
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/translations.mjs +35 -0
  7. package/dist/lib/browser/translations.mjs.map +7 -0
  8. package/dist/lib/node-esm/cli/index.mjs +181 -0
  9. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +37 -62
  11. package/dist/lib/node-esm/index.mjs.map +4 -4
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/translations.mjs +37 -0
  14. package/dist/lib/node-esm/translations.mjs.map +7 -0
  15. package/dist/types/src/RegistryPlugin.d.ts +2 -1
  16. package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
  17. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  18. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  19. package/dist/types/src/capabilities/index.d.ts +6 -3
  20. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  21. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  22. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  23. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  24. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/state.d.ts +7 -0
  26. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  27. package/dist/types/src/cli/commands/disable.d.ts +11 -0
  28. package/dist/types/src/cli/commands/disable.d.ts.map +1 -0
  29. package/dist/types/src/cli/commands/enable.d.ts +11 -0
  30. package/dist/types/src/cli/commands/enable.d.ts.map +1 -0
  31. package/dist/types/src/cli/commands/index.d.ts +3 -0
  32. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  33. package/dist/types/src/cli/commands/list.d.ts +7 -0
  34. package/dist/types/src/cli/commands/list.d.ts.map +1 -0
  35. package/dist/types/src/cli/commands/util.d.ts +11 -0
  36. package/dist/types/src/cli/commands/util.d.ts.map +1 -0
  37. package/dist/types/src/cli/index.d.ts +3 -0
  38. package/dist/types/src/cli/index.d.ts.map +1 -0
  39. package/dist/types/src/cli/plugin.d.ts +3 -0
  40. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  41. package/dist/types/src/cli/storage.d.ts +18 -0
  42. package/dist/types/src/cli/storage.d.ts.map +1 -0
  43. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +22 -0
  44. package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
  45. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +42 -0
  46. package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -0
  47. package/dist/types/src/components/PluginDetail/index.d.ts +2 -0
  48. package/dist/types/src/components/PluginDetail/index.d.ts.map +1 -0
  49. package/dist/types/src/components/PluginList/PluginItem.d.ts +26 -0
  50. package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
  51. package/dist/types/src/components/PluginList/PluginList.d.ts +13 -0
  52. package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
  53. package/dist/types/src/components/PluginList/PluginList.stories.d.ts +41 -0
  54. package/dist/types/src/components/PluginList/PluginList.stories.d.ts.map +1 -0
  55. package/dist/types/src/components/PluginList/index.d.ts +2 -0
  56. package/dist/types/src/components/PluginList/index.d.ts.map +1 -0
  57. package/dist/types/src/components/index.d.ts +0 -1
  58. package/dist/types/src/components/index.d.ts.map +1 -1
  59. package/dist/types/src/containers/CommunityRegistry/CommunityRegistry.d.ts +8 -0
  60. package/dist/types/src/containers/CommunityRegistry/CommunityRegistry.d.ts.map +1 -0
  61. package/dist/types/src/containers/CommunityRegistry/index.d.ts +2 -0
  62. package/dist/types/src/containers/CommunityRegistry/index.d.ts.map +1 -0
  63. package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts +4 -0
  64. package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts.map +1 -0
  65. package/dist/types/src/containers/LoadPluginDialog/index.d.ts +2 -0
  66. package/dist/types/src/containers/LoadPluginDialog/index.d.ts.map +1 -0
  67. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +7 -0
  68. package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -0
  69. package/dist/types/src/containers/PluginArticle/index.d.ts +2 -0
  70. package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
  71. package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts +14 -0
  72. package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts.map +1 -0
  73. package/dist/types/src/containers/PluginRegistry/index.d.ts +2 -0
  74. package/dist/types/src/containers/PluginRegistry/index.d.ts.map +1 -0
  75. package/dist/types/src/containers/index.d.ts +7 -0
  76. package/dist/types/src/containers/index.d.ts.map +1 -0
  77. package/dist/types/src/hooks/index.d.ts +3 -0
  78. package/dist/types/src/hooks/index.d.ts.map +1 -0
  79. package/dist/types/src/hooks/use-auto-tags.d.ts +20 -0
  80. package/dist/types/src/hooks/use-auto-tags.d.ts.map +1 -0
  81. package/dist/types/src/hooks/use-community-plugins.d.ts +16 -0
  82. package/dist/types/src/hooks/use-community-plugins.d.ts.map +1 -0
  83. package/dist/types/src/meta.d.ts +7 -4
  84. package/dist/types/src/meta.d.ts.map +1 -1
  85. package/dist/types/src/operations/index.d.ts +3 -0
  86. package/dist/types/src/operations/index.d.ts.map +1 -0
  87. package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
  88. package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
  89. package/dist/types/src/translations.d.ts +22 -16
  90. package/dist/types/src/translations.d.ts.map +1 -1
  91. package/dist/types/src/types.d.ts +14 -1
  92. package/dist/types/src/types.d.ts.map +1 -1
  93. package/dist/types/tsconfig.tsbuildinfo +1 -1
  94. package/package.json +72 -38
  95. package/src/RegistryPlugin.tsx +17 -27
  96. package/src/capabilities/app-graph-builder.ts +173 -135
  97. package/src/capabilities/index.ts +9 -4
  98. package/src/capabilities/operation-handler.ts +16 -0
  99. package/src/capabilities/react-surface.tsx +108 -78
  100. package/src/capabilities/state.ts +40 -0
  101. package/src/cli/commands/disable.ts +47 -0
  102. package/src/cli/commands/enable.ts +44 -0
  103. package/src/cli/commands/index.ts +14 -0
  104. package/src/cli/commands/list.ts +41 -0
  105. package/src/cli/commands/util.ts +24 -0
  106. package/src/cli/index.ts +6 -0
  107. package/src/cli/plugin.ts +17 -0
  108. package/src/cli/storage.ts +50 -0
  109. package/src/components/PluginDetail/PluginDetail.stories.tsx +44 -0
  110. package/src/components/PluginDetail/PluginDetail.tsx +106 -0
  111. package/src/components/PluginDetail/index.ts +5 -0
  112. package/src/components/PluginList/PluginItem.tsx +187 -0
  113. package/src/components/PluginList/PluginList.stories.tsx +87 -0
  114. package/src/components/PluginList/PluginList.tsx +29 -0
  115. package/src/components/PluginList/index.ts +5 -0
  116. package/src/components/index.ts +0 -1
  117. package/src/containers/CommunityRegistry/CommunityRegistry.tsx +181 -0
  118. package/src/containers/CommunityRegistry/index.ts +5 -0
  119. package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +86 -0
  120. package/src/containers/LoadPluginDialog/index.ts +5 -0
  121. package/src/containers/PluginArticle/PluginArticle.tsx +73 -0
  122. package/src/containers/PluginArticle/index.ts +5 -0
  123. package/src/containers/PluginRegistry/PluginRegistry.tsx +98 -0
  124. package/src/containers/PluginRegistry/index.ts +5 -0
  125. package/src/containers/index.ts +11 -0
  126. package/src/hooks/index.ts +6 -0
  127. package/src/hooks/use-auto-tags.ts +52 -0
  128. package/src/hooks/use-community-plugins.ts +35 -0
  129. package/src/meta.ts +19 -9
  130. package/src/operations/index.ts +7 -0
  131. package/src/operations/open-plugin-registry.ts +21 -0
  132. package/src/translations.ts +22 -15
  133. package/src/types.ts +30 -1
  134. package/dist/lib/browser/app-graph-builder-LKQBQDUA.mjs +0 -161
  135. package/dist/lib/browser/app-graph-builder-LKQBQDUA.mjs.map +0 -7
  136. package/dist/lib/browser/chunk-AEBASNOI.mjs +0 -16
  137. package/dist/lib/browser/chunk-AEBASNOI.mjs.map +0 -7
  138. package/dist/lib/browser/intent-resolver-W67CIJI3.mjs +0 -23
  139. package/dist/lib/browser/intent-resolver-W67CIJI3.mjs.map +0 -7
  140. package/dist/lib/browser/react-surface-SRFVJQKE.mjs +0 -335
  141. package/dist/lib/browser/react-surface-SRFVJQKE.mjs.map +0 -7
  142. package/dist/lib/node-esm/app-graph-builder-N44OGVQA.mjs +0 -162
  143. package/dist/lib/node-esm/app-graph-builder-N44OGVQA.mjs.map +0 -7
  144. package/dist/lib/node-esm/chunk-R3GXMWPJ.mjs +0 -18
  145. package/dist/lib/node-esm/chunk-R3GXMWPJ.mjs.map +0 -7
  146. package/dist/lib/node-esm/intent-resolver-M2CBVUVQ.mjs +0 -24
  147. package/dist/lib/node-esm/intent-resolver-M2CBVUVQ.mjs.map +0 -7
  148. package/dist/lib/node-esm/react-surface-5XAG2EYX.mjs +0 -336
  149. package/dist/lib/node-esm/react-surface-5XAG2EYX.mjs.map +0 -7
  150. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  151. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  152. package/dist/types/src/components/Icon.stories.d.ts +0 -6
  153. package/dist/types/src/components/Icon.stories.d.ts.map +0 -1
  154. package/dist/types/src/components/PluginDetail.d.ts +0 -9
  155. package/dist/types/src/components/PluginDetail.d.ts.map +0 -1
  156. package/dist/types/src/components/PluginDetail.stories.d.ts +0 -8
  157. package/dist/types/src/components/PluginDetail.stories.d.ts.map +0 -1
  158. package/dist/types/src/components/PluginItem.d.ts +0 -13
  159. package/dist/types/src/components/PluginItem.d.ts.map +0 -1
  160. package/dist/types/src/components/PluginList.d.ts +0 -8
  161. package/dist/types/src/components/PluginList.d.ts.map +0 -1
  162. package/dist/types/src/components/PluginList.stories.d.ts +0 -11
  163. package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
  164. package/dist/types/src/components/RegistryContainer.d.ts +0 -7
  165. package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
  166. package/src/capabilities/intent-resolver.ts +0 -27
  167. package/src/components/Icon.stories.tsx +0 -107
  168. package/src/components/PluginDetail.stories.tsx +0 -45
  169. package/src/components/PluginDetail.tsx +0 -63
  170. package/src/components/PluginItem.tsx +0 -119
  171. package/src/components/PluginList.stories.tsx +0 -82
  172. package/src/components/PluginList.tsx +0 -26
  173. package/src/components/RegistryContainer.tsx +0 -84
@@ -0,0 +1,98 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { useAtomValue } from '@effect-atom/atom-react';
6
+ import * as Effect from 'effect/Effect';
7
+ import React, { useCallback, useMemo } from 'react';
8
+
9
+ import { type Plugin } from '@dxos/app-framework';
10
+ import { useCapabilities, useOperationInvoker, usePluginManager } from '@dxos/app-framework/ui';
11
+ import { AppCapabilities, LayoutOperation, SettingsOperation } from '@dxos/app-toolkit';
12
+ import { runAndForwardErrors } from '@dxos/effect';
13
+ import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
14
+ import { ScrollArea } from '@dxos/react-ui';
15
+ import { composable, composableProps } from '@dxos/ui-theme';
16
+
17
+ import { PluginList } from '#components';
18
+ import { getPluginPath } from '#meta';
19
+
20
+ const sortByPluginMeta = ({ meta: { name: a = '' } }: Plugin.Plugin, { meta: { name: b = '' } }: Plugin.Plugin) =>
21
+ a.localeCompare(b);
22
+
23
+ export type PluginRegistryProps = {
24
+ id: string;
25
+ plugins: Plugin.Plugin[];
26
+ /**
27
+ * Map from plugin id → display-only tags (e.g. `community`, `local`) computed by the caller.
28
+ */
29
+ extraTagsById?: Record<string, readonly string[]>;
30
+ };
31
+
32
+ export const PluginRegistry = composable<HTMLDivElement, PluginRegistryProps>(
33
+ ({ id, plugins: pluginsProp, extraTagsById, ...props }, forwardedRef) => {
34
+ const manager = usePluginManager();
35
+ const { invoke, invokePromise } = useOperationInvoker();
36
+ const plugins = useMemo(() => pluginsProp.sort(sortByPluginMeta), [pluginsProp]);
37
+ const enabled = useAtomValue(manager.enabled);
38
+ const allSettings = useCapabilities(AppCapabilities.Settings);
39
+
40
+ const handleChange = useCallback(
41
+ (id: string, enabled: boolean) =>
42
+ Effect.gen(function* () {
43
+ if (enabled) {
44
+ yield* manager.enable(id);
45
+ } else {
46
+ yield* manager.disable(id);
47
+ }
48
+
49
+ yield* invoke(ObservabilityOperation.SendEvent, {
50
+ name: 'plugins.toggle',
51
+ properties: {
52
+ plugin: id,
53
+ enabled,
54
+ },
55
+ });
56
+ }).pipe(runAndForwardErrors),
57
+ [invoke, manager],
58
+ );
59
+
60
+ const handleClick = useCallback(
61
+ (pluginId: string) =>
62
+ invokePromise(LayoutOperation.Open, {
63
+ subject: [getPluginPath(pluginId)],
64
+ pivotId: id,
65
+ positioning: 'end',
66
+ }),
67
+ [invokePromise, id],
68
+ );
69
+
70
+ const hasSettings = useCallback(
71
+ (pluginId: string) => allSettings.some((s) => s.prefix === pluginId),
72
+ [allSettings],
73
+ );
74
+
75
+ const handleSettings = useCallback(
76
+ (pluginId: string) => invokePromise(SettingsOperation.Open, { plugin: pluginId }),
77
+ [invokePromise],
78
+ );
79
+
80
+ return (
81
+ <ScrollArea.Root {...composableProps(props)} orientation='vertical' ref={forwardedRef}>
82
+ <ScrollArea.Viewport>
83
+ <PluginList
84
+ plugins={plugins}
85
+ enabled={enabled}
86
+ extraTagsById={extraTagsById}
87
+ onClick={handleClick}
88
+ onChange={handleChange}
89
+ hasSettings={hasSettings}
90
+ onSettings={handleSettings}
91
+ />
92
+ </ScrollArea.Viewport>
93
+ </ScrollArea.Root>
94
+ );
95
+ },
96
+ );
97
+
98
+ PluginRegistry.displayName = 'PluginRegistry';
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ export { PluginRegistry as default } from './PluginRegistry';
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type ComponentType, lazy } from 'react';
6
+
7
+ export { LOAD_PLUGIN_DIALOG } from './LoadPluginDialog/LoadPluginDialog';
8
+ export const CommunityRegistry: ComponentType<any> = lazy(() => import('./CommunityRegistry'));
9
+ export const LoadPluginDialog: ComponentType<any> = lazy(() => import('./LoadPluginDialog'));
10
+ export const PluginArticle: ComponentType<any> = lazy(() => import('./PluginArticle'));
11
+ export const PluginRegistry: ComponentType<any> = lazy(() => import('./PluginRegistry'));
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ export * from './use-auto-tags';
6
+ export * from './use-community-plugins';
@@ -0,0 +1,52 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { useMemo } from 'react';
6
+
7
+ import { UrlLoader } from '@dxos/app-framework';
8
+ import { type PluginEntry } from '@dxos/protocols';
9
+
10
+ /**
11
+ * Auto-tags that are derived at display time rather than persisted to `Plugin.Meta`.
12
+ * - `community`: plugin id appears in the community registry manifest.
13
+ * - `local`: plugin was loaded from a `localhost` / `127.0.0.1` / `::1` URL.
14
+ */
15
+ export type AutoTagsMap = Record<string, readonly string[]>;
16
+
17
+ /**
18
+ * Computes the per-plugin-id extra tags the UI should display.
19
+ *
20
+ * Reads the persisted remote-plugin entries synchronously to derive `local`, and
21
+ * adds `community` for any plugin id found in the supplied community manifest entries.
22
+ */
23
+ export const useAutoTags = (communityEntries: readonly PluginEntry[]): AutoTagsMap =>
24
+ useMemo(() => {
25
+ const byId: Record<string, string[]> = {};
26
+ const addTag = (id: string, tag: string) => {
27
+ const existing = byId[id];
28
+ if (!existing) {
29
+ byId[id] = [tag];
30
+ } else if (!existing.includes(tag)) {
31
+ existing.push(tag);
32
+ }
33
+ };
34
+
35
+ for (const entry of UrlLoader.getRemoteEntries()) {
36
+ if (UrlLoader.isLocalUrl(entry.url)) {
37
+ addTag(entry.id, 'local');
38
+ }
39
+ }
40
+ for (const entry of communityEntries) {
41
+ addTag(entry.meta.id, 'community');
42
+ }
43
+
44
+ return byId;
45
+ }, [communityEntries]);
46
+
47
+ /**
48
+ * Returns the set of plugin ids known to originate from a remote URL (not bundled).
49
+ * Used to filter the Official/Recommended sections so third-party plugins are excluded.
50
+ */
51
+ export const useRemotePluginIds = (): ReadonlySet<string> =>
52
+ useMemo(() => new Set(UrlLoader.getRemoteEntries().map((entry) => entry.id)), []);
@@ -0,0 +1,35 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { Atom, useAtomValue } from '@effect-atom/atom-react';
6
+ import * as Effect from 'effect/Effect';
7
+
8
+ import { useCapabilities } from '@dxos/app-framework/ui';
9
+ import { Context } from '@dxos/context';
10
+ import { type EdgeHttpClient } from '@dxos/edge-client';
11
+ import { type PluginEntry } from '@dxos/protocols';
12
+
13
+ import { RegistryCapabilities, type CommunityPluginsState } from '#types';
14
+
15
+ /**
16
+ * Fetches the community plugin catalog from the Edge registry service and
17
+ * filters out unhealthy entries.
18
+ */
19
+ export const loadCommunityPlugins = (client: EdgeHttpClient): Effect.Effect<readonly PluginEntry[], Error> =>
20
+ Effect.tryPromise({
21
+ try: () => client.getRegistryPlugins(Context.default()),
22
+ catch: (error) => (error instanceof Error ? error : new Error(String(error))),
23
+ }).pipe(Effect.map((body) => body.plugins.filter((entry) => entry.health === 'ok')));
24
+
25
+ const emptyAtom = Atom.make<CommunityPluginsState>({ entries: [], loading: true, error: null });
26
+
27
+ /**
28
+ * Reads the community plugin catalog from the registry state capability. The
29
+ * catalog is loaded once at plugin startup so this hook is purely reactive.
30
+ * Returns the empty/loading state until the state capability activates.
31
+ */
32
+ export const useCommunityPlugins = (): CommunityPluginsState => {
33
+ const atoms = useCapabilities(RegistryCapabilities.State);
34
+ return useAtomValue(atoms[0] ?? emptyAtom);
35
+ };
package/src/meta.ts CHANGED
@@ -2,17 +2,27 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
5
+ import { type Plugin } from '@dxos/app-framework';
6
+ import { pinnedWorkspaceId } from '@dxos/app-toolkit';
7
+ import { trim } from '@dxos/util';
6
8
 
7
- export const REGISTRY_PLUGIN = 'dxos.org/plugin/registry';
8
-
9
- // TODO(wittjosiah): Deck does not currently support `/` in ids.
10
- // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
11
- // Ideally this should be worked into the data model in a generic way.
12
- export const REGISTRY_ID = '!dxos:plugin-registry';
9
+ export const REGISTRY_ID = pinnedWorkspaceId('dxos:plugin-registry');
13
10
  export const REGISTRY_KEY = 'plugin-registry';
14
11
 
15
- export const meta: PluginMeta = {
16
- id: REGISTRY_PLUGIN,
12
+ // TODO(wittjosiah): Should this be a special separator or use the standard path separator?
13
+ const CATEGORY_SEPARATOR = '>';
14
+
15
+ /** Build a registry category node ID. */
16
+ export const registryCategoryId = (category: string): string => `${REGISTRY_KEY}${CATEGORY_SEPARATOR}${category}`;
17
+
18
+ /** Qualified graph path to a specific plugin node. */
19
+ export const getPluginPath = (pluginId: string): string => `root/${REGISTRY_ID}/${pluginId}`;
20
+
21
+ export const meta: Plugin.Meta = {
22
+ id: 'org.dxos.plugin.registry',
17
23
  name: 'Plugins',
24
+ description: trim`
25
+ Plugin management system for discovering, installing, and configuring workspace extensions.
26
+ Browse available plugins and customize your workspace capabilities.
27
+ `,
18
28
  };
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { OperationHandlerSet } from '@dxos/compute';
6
+
7
+ export const RegistryOperationHandlerSet = OperationHandlerSet.lazy(() => import('./open-plugin-registry'));
@@ -0,0 +1,21 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { LayoutOperation, SettingsOperation, getSpacePath } from '@dxos/app-toolkit';
8
+ import { Operation } from '@dxos/compute';
9
+
10
+ import { REGISTRY_ID } from '#meta';
11
+
12
+ const handler: Operation.WithHandler<typeof SettingsOperation.OpenPluginRegistry> =
13
+ SettingsOperation.OpenPluginRegistry.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* () {
16
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: getSpacePath(REGISTRY_ID) });
17
+ }),
18
+ ),
19
+ );
20
+
21
+ export default handler;
@@ -4,26 +4,33 @@
4
4
 
5
5
  import { type Resource } from '@dxos/react-ui';
6
6
 
7
- import { meta } from './meta';
7
+ import { meta } from '#meta';
8
8
 
9
9
  export const translations = [
10
10
  {
11
11
  'en-US': {
12
12
  [meta.id]: {
13
- 'plugin name': 'Registry',
14
- 'details label': 'Details',
15
- 'home page label': 'Website',
16
- 'source label': 'Source',
17
- 'plugin registry label': 'Plugin Registry',
18
- 'all plugins label': 'All',
19
- 'installed plugins label': 'Enabled',
20
- 'recommended plugins label': 'Recommended',
21
- 'labs plugins label': 'Labs',
22
- 'community plugins label': 'Community',
23
- 'load by url label': 'Load by URL (soon)',
24
- 'coming soon label': 'Coming soon!',
25
- 'open plugin registry label': 'Open plugin registry',
26
- 'settings label': 'Settings',
13
+ 'plugin.name': 'Registry',
14
+ 'details.label': 'Details',
15
+ 'home-page.label': 'Website',
16
+ 'source.label': 'Source',
17
+ 'plugin-registry.label': 'Plugin Registry',
18
+ 'plugin-settings.label': 'Plugin Settings',
19
+ 'official-plugins.label': 'Official',
20
+ 'installed-plugins.label': 'Enabled',
21
+ 'recommended-plugins.label': 'Recommended',
22
+ 'labs-plugins.label': 'Labs',
23
+ 'community-plugins.label': 'Community',
24
+ 'load-by-url.label': 'Load from URL',
25
+ 'load-by-url-dialog.title': 'Load Plugin from URL',
26
+ 'plugin-url.label': 'Plugin URL',
27
+ 'load-plugin.label': 'Load Plugin',
28
+ 'loading.label': 'Loading...',
29
+ 'coming-soon.label': 'Coming soon!',
30
+ 'open-plugin-registry.label': 'Open plugin registry',
31
+ 'install.label': 'Install',
32
+ 'installing.label': 'Installing…',
33
+ 'uninstall.label': 'Uninstall',
27
34
  },
28
35
  },
29
36
  },
package/src/types.ts CHANGED
@@ -2,7 +2,23 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import { type Atom } from '@effect-atom/atom-react';
6
+ import * as Schema from 'effect/Schema';
7
+
8
+ import { Capability } from '@dxos/app-framework';
9
+ import { type PluginEntry } from '@dxos/protocols';
10
+
11
+ import { meta } from '#meta';
12
+
13
+ export type CommunityPluginsState = {
14
+ entries: readonly PluginEntry[];
15
+ loading: boolean;
16
+ error: Error | null;
17
+ };
18
+
19
+ export namespace RegistryCapabilities {
20
+ export const State = Capability.make<Atom.Atom<CommunityPluginsState>>(`${meta.id}.capability.state`);
21
+ }
6
22
 
7
23
  export const RegistrySettingsSchema = Schema.mutable(
8
24
  Schema.Struct({
@@ -11,3 +27,16 @@ export const RegistrySettingsSchema = Schema.mutable(
11
27
  );
12
28
 
13
29
  export type RegistrySettings = Schema.Schema.Type<typeof RegistrySettingsSchema>;
30
+
31
+ export const RegistryTagType = Schema.Literal(
32
+ 'new',
33
+ 'beta',
34
+ 'labs',
35
+ 'popular',
36
+ 'featured',
37
+ 'experimental',
38
+ 'community',
39
+ 'local',
40
+ );
41
+
42
+ export type RegistryTagType = Schema.Schema.Type<typeof RegistryTagType>;
@@ -1,161 +0,0 @@
1
- import {
2
- REGISTRY_ID,
3
- REGISTRY_KEY,
4
- REGISTRY_PLUGIN
5
- } from "./chunk-AEBASNOI.mjs";
6
-
7
- // src/capabilities/app-graph-builder.ts
8
- import { Rx } from "@effect-rx/rx-react";
9
- import { Option, pipe } from "effect";
10
- import { Capabilities, contributes, createIntent, SettingsAction } from "@dxos/app-framework";
11
- import { createExtension } from "@dxos/plugin-graph";
12
- var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, [
13
- createExtension({
14
- id: REGISTRY_PLUGIN,
15
- actions: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === "root" ? Option.some(node2) : Option.none()), Option.map((node2) => [
16
- {
17
- id: REGISTRY_PLUGIN,
18
- data: async () => {
19
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
20
- await dispatch(createIntent(SettingsAction.OpenPluginRegistry));
21
- },
22
- properties: {
23
- label: [
24
- "open plugin registry label",
25
- {
26
- ns: REGISTRY_PLUGIN
27
- }
28
- ],
29
- icon: "ph--squares-four--regular",
30
- disposition: "menu"
31
- }
32
- }
33
- ]), Option.getOrElse(() => [])))
34
- }),
35
- createExtension({
36
- id: REGISTRY_PLUGIN,
37
- connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === "root" ? Option.some(node2) : Option.none()), Option.map((node2) => [
38
- {
39
- id: REGISTRY_ID,
40
- type: REGISTRY_PLUGIN,
41
- properties: {
42
- label: [
43
- "plugin registry label",
44
- {
45
- ns: REGISTRY_PLUGIN
46
- }
47
- ],
48
- icon: "ph--squares-four--regular",
49
- disposition: "pin-end",
50
- testId: "treeView.pluginRegistry"
51
- },
52
- nodes: [
53
- {
54
- id: `${REGISTRY_KEY}+all`,
55
- type: "category",
56
- data: `${REGISTRY_KEY}+all`,
57
- properties: {
58
- label: [
59
- "all plugins label",
60
- {
61
- ns: REGISTRY_PLUGIN
62
- }
63
- ],
64
- icon: "ph--squares-four--regular",
65
- key: REGISTRY_KEY,
66
- testId: "pluginRegistry.all"
67
- }
68
- },
69
- {
70
- id: `${REGISTRY_KEY}+installed`,
71
- type: "category",
72
- data: `${REGISTRY_KEY}+installed`,
73
- properties: {
74
- label: [
75
- "installed plugins label",
76
- {
77
- ns: REGISTRY_PLUGIN
78
- }
79
- ],
80
- icon: "ph--check--regular",
81
- key: REGISTRY_KEY,
82
- testId: "pluginRegistry.installed"
83
- }
84
- },
85
- {
86
- id: `${REGISTRY_KEY}+recommended`,
87
- type: "category",
88
- data: `${REGISTRY_KEY}+recommended`,
89
- properties: {
90
- label: [
91
- "recommended plugins label",
92
- {
93
- ns: REGISTRY_PLUGIN
94
- }
95
- ],
96
- icon: "ph--star--regular",
97
- key: REGISTRY_KEY,
98
- testId: "pluginRegistry.recommended"
99
- }
100
- },
101
- {
102
- id: `${REGISTRY_KEY}+labs`,
103
- type: "category",
104
- data: `${REGISTRY_KEY}+labs`,
105
- properties: {
106
- label: [
107
- "labs plugins label",
108
- {
109
- ns: REGISTRY_PLUGIN
110
- }
111
- ],
112
- icon: "ph--flask--regular",
113
- key: REGISTRY_KEY,
114
- testId: "pluginRegistry.labs"
115
- }
116
- }
117
- ]
118
- }
119
- ]), Option.getOrElse(() => [])))
120
- }),
121
- createExtension({
122
- id: `${REGISTRY_PLUGIN}/actions`,
123
- actions: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === REGISTRY_ID ? Option.some(node2) : Option.none()), Option.map(() => [
124
- {
125
- id: `${REGISTRY_PLUGIN}/load-by-url`,
126
- data: async () => {
127
- },
128
- properties: {
129
- label: [
130
- "load by url label",
131
- {
132
- ns: REGISTRY_PLUGIN
133
- }
134
- ],
135
- icon: "ph--cloud-arrow-down--regular",
136
- disabled: true
137
- }
138
- }
139
- ]), Option.getOrElse(() => [])))
140
- }),
141
- createExtension({
142
- id: `${REGISTRY_PLUGIN}/plugins`,
143
- connector: (node) => Rx.make((get) => pipe(get(node), Option.flatMap((node2) => node2.id === REGISTRY_ID ? Option.some(node2) : Option.none()), Option.map(() => {
144
- const manager = context.getCapability(Capabilities.PluginManager);
145
- return manager.plugins.map((plugin) => ({
146
- id: plugin.meta.id.replaceAll("/", ":"),
147
- type: "dxos.org/plugin",
148
- data: plugin,
149
- properties: {
150
- label: plugin.meta.name ?? plugin.meta.id,
151
- icon: plugin.meta.icon ?? "ph--circle--regular",
152
- disposition: "hidden"
153
- }
154
- }));
155
- }), Option.getOrElse(() => [])))
156
- })
157
- ]);
158
- export {
159
- app_graph_builder_default as default
160
- };
161
- //# sourceMappingURL=app-graph-builder-LKQBQDUA.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Rx } from '@effect-rx/rx-react';\nimport { Option, pipe } from 'effect';\n\nimport { Capabilities, contributes, createIntent, SettingsAction, type PluginContext } from '@dxos/app-framework';\nimport { createExtension } from '@dxos/plugin-graph';\n\nimport { REGISTRY_ID, REGISTRY_KEY, REGISTRY_PLUGIN } from '../meta';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: REGISTRY_PLUGIN,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: REGISTRY_PLUGIN,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(SettingsAction.OpenPluginRegistry));\n },\n properties: {\n label: ['open plugin registry label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n disposition: 'menu',\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: REGISTRY_PLUGIN,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),\n Option.map((node) => [\n {\n id: REGISTRY_ID,\n type: REGISTRY_PLUGIN,\n properties: {\n label: ['plugin registry label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n disposition: 'pin-end',\n testId: 'treeView.pluginRegistry',\n },\n nodes: [\n {\n id: `${REGISTRY_KEY}+all`,\n type: 'category',\n data: `${REGISTRY_KEY}+all`,\n properties: {\n label: ['all plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--squares-four--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.all',\n },\n },\n {\n id: `${REGISTRY_KEY}+installed`,\n type: 'category',\n data: `${REGISTRY_KEY}+installed`,\n properties: {\n label: ['installed plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--check--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.installed',\n },\n },\n {\n id: `${REGISTRY_KEY}+recommended`,\n type: 'category',\n data: `${REGISTRY_KEY}+recommended`,\n properties: {\n label: ['recommended plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--star--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.recommended',\n },\n },\n {\n id: `${REGISTRY_KEY}+labs`,\n type: 'category',\n data: `${REGISTRY_KEY}+labs`,\n properties: {\n label: ['labs plugins label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--flask--regular',\n key: REGISTRY_KEY,\n testId: 'pluginRegistry.labs',\n },\n },\n ],\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${REGISTRY_PLUGIN}/actions`,\n actions: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),\n Option.map(() => [\n {\n id: `${REGISTRY_PLUGIN}/load-by-url`,\n data: async () => {},\n properties: {\n label: ['load by url label', { ns: REGISTRY_PLUGIN }],\n icon: 'ph--cloud-arrow-down--regular',\n disabled: true,\n },\n },\n ]),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n createExtension({\n id: `${REGISTRY_PLUGIN}/plugins`,\n connector: (node) =>\n Rx.make((get) =>\n pipe(\n get(node),\n Option.flatMap((node) => (node.id === REGISTRY_ID ? Option.some(node) : Option.none())),\n Option.map(() => {\n const manager = context.getCapability(Capabilities.PluginManager);\n return manager.plugins.map((plugin) => ({\n id: plugin.meta.id.replaceAll('/', ':'),\n type: 'dxos.org/plugin',\n data: plugin,\n properties: {\n label: plugin.meta.name ?? plugin.meta.id,\n icon: plugin.meta.icon ?? 'ph--circle--regular',\n disposition: 'hidden',\n },\n }));\n }),\n Option.getOrElse(() => []),\n ),\n ),\n }),\n ]);\n"],
5
- "mappings": "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",
6
- "names": ["Rx", "Option", "pipe", "Capabilities", "contributes", "createIntent", "SettingsAction", "createExtension", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "REGISTRY_PLUGIN", "actions", "node", "Rx", "make", "get", "pipe", "Option", "flatMap", "some", "none", "map", "data", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "createIntent", "SettingsAction", "OpenPluginRegistry", "properties", "label", "ns", "icon", "disposition", "getOrElse", "connector", "REGISTRY_ID", "type", "testId", "nodes", "REGISTRY_KEY", "key", "disabled", "manager", "PluginManager", "plugins", "plugin", "meta", "replaceAll", "name"]
7
- }
@@ -1,16 +0,0 @@
1
- // src/meta.ts
2
- var REGISTRY_PLUGIN = "dxos.org/plugin/registry";
3
- var REGISTRY_ID = "!dxos:plugin-registry";
4
- var REGISTRY_KEY = "plugin-registry";
5
- var meta = {
6
- id: REGISTRY_PLUGIN,
7
- name: "Plugins"
8
- };
9
-
10
- export {
11
- REGISTRY_PLUGIN,
12
- REGISTRY_ID,
13
- REGISTRY_KEY,
14
- meta
15
- };
16
- //# sourceMappingURL=chunk-AEBASNOI.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const REGISTRY_PLUGIN = 'dxos.org/plugin/registry';\n\n// TODO(wittjosiah): Deck does not currently support `/` in ids.\n// TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n// Ideally this should be worked into the data model in a generic way.\nexport const REGISTRY_ID = '!dxos:plugin-registry';\nexport const REGISTRY_KEY = 'plugin-registry';\n\nexport const meta: PluginMeta = {\n id: REGISTRY_PLUGIN,\n name: 'Plugins',\n};\n"],
5
- "mappings": ";AAMO,IAAMA,kBAAkB;AAKxB,IAAMC,cAAc;AACpB,IAAMC,eAAe;AAErB,IAAMC,OAAmB;EAC9BC,IAAIJ;EACJK,MAAM;AACR;",
6
- "names": ["REGISTRY_PLUGIN", "REGISTRY_ID", "REGISTRY_KEY", "meta", "id", "name"]
7
- }
@@ -1,23 +0,0 @@
1
- import {
2
- REGISTRY_ID
3
- } from "./chunk-AEBASNOI.mjs";
4
-
5
- // src/capabilities/intent-resolver.ts
6
- import { contributes, SettingsAction, createResolver, LayoutAction, Capabilities, createIntent } from "@dxos/app-framework";
7
- var intent_resolver_default = () => contributes(Capabilities.IntentResolver, createResolver({
8
- intent: SettingsAction.OpenPluginRegistry,
9
- resolve: () => {
10
- return {
11
- intents: [
12
- createIntent(LayoutAction.SwitchWorkspace, {
13
- part: "workspace",
14
- subject: REGISTRY_ID
15
- })
16
- ]
17
- };
18
- }
19
- }));
20
- export {
21
- intent_resolver_default as default
22
- };
23
- //# sourceMappingURL=intent-resolver-W67CIJI3.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/intent-resolver.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {\n contributes,\n SettingsAction,\n createResolver,\n LayoutAction,\n Capabilities,\n createIntent,\n} from '@dxos/app-framework';\n\nimport { REGISTRY_ID } from '../meta';\n\nexport default () =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: SettingsAction.OpenPluginRegistry,\n resolve: () => {\n return {\n intents: [createIntent(LayoutAction.SwitchWorkspace, { part: 'workspace', subject: REGISTRY_ID })],\n };\n },\n }),\n );\n"],
5
- "mappings": ";;;;;AAIA,SACEA,aACAC,gBACAC,gBACAC,cACAC,cACAC,oBACK;AAIP,IAAA,0BAAe,MACbC,YACEC,aAAaC,gBACbC,eAAe;EACbC,QAAQC,eAAeC;EACvBC,SAAS,MAAA;AACP,WAAO;MACLC,SAAS;QAACC,aAAaC,aAAaC,iBAAiB;UAAEC,MAAM;UAAaC,SAASC;QAAY,CAAA;;IACjG;EACF;AACF,CAAA,CAAA;",
6
- "names": ["contributes", "SettingsAction", "createResolver", "LayoutAction", "Capabilities", "createIntent", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "SettingsAction", "OpenPluginRegistry", "resolve", "intents", "createIntent", "LayoutAction", "SwitchWorkspace", "part", "subject", "REGISTRY_ID"]
7
- }