@dxos/plugin-registry 0.8.4-main.f9ba587 → 0.8.4-main.fcfe5033a5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/cli/index.mjs +219 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +52 -52
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/cli/index.mjs +221 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +53 -52
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/RegistryPlugin.d.ts +2 -1
- package/dist/types/src/RegistryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +5 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/cli/commands/disable.d.ts +11 -0
- package/dist/types/src/cli/commands/disable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/enable.d.ts +11 -0
- package/dist/types/src/cli/commands/enable.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +3 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/list.d.ts +7 -0
- package/dist/types/src/cli/commands/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/util.d.ts +11 -0
- package/dist/types/src/cli/commands/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +3 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/cli/storage.d.ts +18 -0
- package/dist/types/src/cli/storage.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts +11 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts +39 -0
- package/dist/types/src/components/PluginDetail/PluginDetail.stories.d.ts.map +1 -0
- package/dist/types/src/components/PluginDetail/index.d.ts +2 -0
- package/dist/types/src/components/PluginDetail/index.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginItem.d.ts +18 -0
- package/dist/types/src/components/PluginList/PluginItem.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginList.d.ts +13 -0
- package/dist/types/src/components/PluginList/PluginList.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts +38 -0
- package/dist/types/src/components/PluginList/PluginList.stories.d.ts.map +1 -0
- package/dist/types/src/components/PluginList/index.d.ts +2 -0
- package/dist/types/src/components/PluginList/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CommunityRegistry/CommunityRegistry.d.ts +8 -0
- package/dist/types/src/containers/CommunityRegistry/CommunityRegistry.d.ts.map +1 -0
- package/dist/types/src/containers/CommunityRegistry/index.d.ts +2 -0
- package/dist/types/src/containers/CommunityRegistry/index.d.ts.map +1 -0
- package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts +4 -0
- package/dist/types/src/containers/LoadPluginDialog/LoadPluginDialog.d.ts.map +1 -0
- package/dist/types/src/containers/LoadPluginDialog/index.d.ts +2 -0
- package/dist/types/src/containers/LoadPluginDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts +7 -0
- package/dist/types/src/containers/PluginArticle/PluginArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PluginArticle/index.d.ts +2 -0
- package/dist/types/src/containers/PluginArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts +14 -0
- package/dist/types/src/containers/PluginRegistry/PluginRegistry.d.ts.map +1 -0
- package/dist/types/src/containers/PluginRegistry/index.d.ts +2 -0
- package/dist/types/src/containers/PluginRegistry/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +3 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/use-auto-tags.d.ts +20 -0
- package/dist/types/src/hooks/use-auto-tags.d.ts.map +1 -0
- package/dist/types/src/hooks/use-community-plugins.d.ts +15 -0
- package/dist/types/src/hooks/use-community-plugins.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +7 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open-plugin-registry.d.ts +5 -0
- package/dist/types/src/operations/open-plugin-registry.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +19 -15
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +3 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +64 -35
- package/src/RegistryPlugin.tsx +12 -26
- package/src/capabilities/app-graph-builder.ts +138 -136
- package/src/capabilities/index.ts +8 -4
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +108 -78
- package/src/cli/commands/disable.ts +47 -0
- package/src/cli/commands/enable.ts +44 -0
- package/src/cli/commands/index.ts +14 -0
- package/src/cli/commands/list.ts +41 -0
- package/src/cli/commands/util.ts +24 -0
- package/src/cli/index.ts +6 -0
- package/src/cli/plugin.ts +17 -0
- package/src/cli/storage.ts +50 -0
- package/src/components/PluginDetail/PluginDetail.stories.tsx +43 -0
- package/src/components/PluginDetail/PluginDetail.tsx +84 -0
- package/src/components/PluginDetail/index.ts +5 -0
- package/src/components/PluginList/PluginItem.tsx +152 -0
- package/src/components/PluginList/PluginList.stories.tsx +87 -0
- package/src/components/PluginList/PluginList.tsx +29 -0
- package/src/components/PluginList/index.ts +5 -0
- package/src/components/index.ts +0 -1
- package/src/containers/CommunityRegistry/CommunityRegistry.tsx +147 -0
- package/src/containers/CommunityRegistry/index.ts +5 -0
- package/src/containers/LoadPluginDialog/LoadPluginDialog.tsx +85 -0
- package/src/containers/LoadPluginDialog/index.ts +5 -0
- package/src/containers/PluginArticle/PluginArticle.tsx +28 -0
- package/src/containers/PluginArticle/index.ts +5 -0
- package/src/containers/PluginRegistry/PluginRegistry.tsx +98 -0
- package/src/containers/PluginRegistry/index.ts +5 -0
- package/src/containers/index.ts +11 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/use-auto-tags.ts +52 -0
- package/src/hooks/use-community-plugins.ts +77 -0
- package/src/meta.ts +19 -9
- package/src/operations/index.ts +7 -0
- package/src/operations/open-plugin-registry.ts +21 -0
- package/src/translations.ts +19 -15
- package/src/types.ts +14 -1
- package/dist/lib/browser/app-graph-builder-LKQBQDUA.mjs +0 -161
- package/dist/lib/browser/app-graph-builder-LKQBQDUA.mjs.map +0 -7
- package/dist/lib/browser/chunk-AEBASNOI.mjs +0 -16
- package/dist/lib/browser/chunk-AEBASNOI.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-W67CIJI3.mjs +0 -23
- package/dist/lib/browser/intent-resolver-W67CIJI3.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SRFVJQKE.mjs +0 -335
- package/dist/lib/browser/react-surface-SRFVJQKE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-N44OGVQA.mjs +0 -162
- package/dist/lib/node-esm/app-graph-builder-N44OGVQA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-R3GXMWPJ.mjs +0 -18
- package/dist/lib/node-esm/chunk-R3GXMWPJ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-M2CBVUVQ.mjs +0 -24
- package/dist/lib/node-esm/intent-resolver-M2CBVUVQ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-5XAG2EYX.mjs +0 -336
- package/dist/lib/node-esm/react-surface-5XAG2EYX.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/Icon.stories.d.ts +0 -6
- package/dist/types/src/components/Icon.stories.d.ts.map +0 -1
- package/dist/types/src/components/PluginDetail.d.ts +0 -9
- package/dist/types/src/components/PluginDetail.d.ts.map +0 -1
- package/dist/types/src/components/PluginDetail.stories.d.ts +0 -8
- package/dist/types/src/components/PluginDetail.stories.d.ts.map +0 -1
- package/dist/types/src/components/PluginItem.d.ts +0 -13
- package/dist/types/src/components/PluginItem.d.ts.map +0 -1
- package/dist/types/src/components/PluginList.d.ts +0 -8
- package/dist/types/src/components/PluginList.d.ts.map +0 -1
- package/dist/types/src/components/PluginList.stories.d.ts +0 -11
- package/dist/types/src/components/PluginList.stories.d.ts.map +0 -1
- package/dist/types/src/components/RegistryContainer.d.ts +0 -7
- package/dist/types/src/components/RegistryContainer.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -27
- package/src/components/Icon.stories.tsx +0 -107
- package/src/components/PluginDetail.stories.tsx +0 -45
- package/src/components/PluginDetail.tsx +0 -63
- package/src/components/PluginItem.tsx +0 -119
- package/src/components/PluginList.stories.tsx +0 -82
- package/src/components/PluginList.tsx +0 -26
- package/src/components/RegistryContainer.tsx +0 -84
|
@@ -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,77 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Context } from '@dxos/context';
|
|
8
|
+
import { type EdgeHttpClient } from '@dxos/edge-client';
|
|
9
|
+
import { log } from '@dxos/log';
|
|
10
|
+
import { type PluginEntry } from '@dxos/protocols';
|
|
11
|
+
import { useEdgeClient } from '@dxos/react-edge-client';
|
|
12
|
+
|
|
13
|
+
export type CommunityPluginsState = {
|
|
14
|
+
entries: readonly PluginEntry[];
|
|
15
|
+
loading: boolean;
|
|
16
|
+
error: Error | null;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Session-level cache keyed by Edge base URL. One fetch per page load, shared across every
|
|
21
|
+
* surface that asks. Reset via {@link resetCommunityPluginsCache} (tests).
|
|
22
|
+
*/
|
|
23
|
+
const cachedByBaseUrl = new Map<string, Promise<readonly PluginEntry[]>>();
|
|
24
|
+
|
|
25
|
+
export const resetCommunityPluginsCache = (): void => {
|
|
26
|
+
cachedByBaseUrl.clear();
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const loadOnce = (client: EdgeHttpClient): Promise<readonly PluginEntry[]> => {
|
|
30
|
+
const baseUrl = client.baseUrl;
|
|
31
|
+
const existing = cachedByBaseUrl.get(baseUrl);
|
|
32
|
+
if (existing) {
|
|
33
|
+
return existing;
|
|
34
|
+
}
|
|
35
|
+
const promise = client
|
|
36
|
+
.getRegistryPlugins(Context.default())
|
|
37
|
+
.then((body) => body.plugins.filter((entry) => entry.health === 'ok'))
|
|
38
|
+
.catch((error: unknown) => {
|
|
39
|
+
cachedByBaseUrl.delete(baseUrl);
|
|
40
|
+
throw error;
|
|
41
|
+
});
|
|
42
|
+
cachedByBaseUrl.set(baseUrl, promise);
|
|
43
|
+
return promise;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Fetches the community plugin registry once per session from the Edge registry service
|
|
48
|
+
* and returns the hydrated, healthy entries. The cache is shared across every surface that
|
|
49
|
+
* calls this hook so the Official/Recommended filters, the Community surface, and the
|
|
50
|
+
* auto-tags map all hit Edge exactly once.
|
|
51
|
+
*/
|
|
52
|
+
export const useCommunityPlugins = (): CommunityPluginsState => {
|
|
53
|
+
const edgeClient = useEdgeClient();
|
|
54
|
+
const [state, setState] = useState<CommunityPluginsState>({ entries: [], loading: true, error: null });
|
|
55
|
+
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
let cancelled = false;
|
|
58
|
+
loadOnce(edgeClient)
|
|
59
|
+
.then((entries) => {
|
|
60
|
+
if (!cancelled) {
|
|
61
|
+
setState({ entries, loading: false, error: null });
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
.catch((error: unknown) => {
|
|
65
|
+
if (!cancelled) {
|
|
66
|
+
const normalized = error instanceof Error ? error : new Error(String(error));
|
|
67
|
+
log.catch(normalized);
|
|
68
|
+
setState({ entries: [], loading: false, error: normalized });
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return () => {
|
|
72
|
+
cancelled = true;
|
|
73
|
+
};
|
|
74
|
+
}, [edgeClient]);
|
|
75
|
+
|
|
76
|
+
return state;
|
|
77
|
+
};
|
package/src/meta.ts
CHANGED
|
@@ -2,17 +2,27 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
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
|
|
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
|
-
|
|
16
|
-
|
|
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,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/operation';
|
|
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;
|
package/src/translations.ts
CHANGED
|
@@ -4,26 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
import { meta } from '
|
|
7
|
+
import { meta } from '#meta';
|
|
8
8
|
|
|
9
9
|
export const translations = [
|
|
10
10
|
{
|
|
11
11
|
'en-US': {
|
|
12
12
|
[meta.id]: {
|
|
13
|
-
'plugin
|
|
14
|
-
'details
|
|
15
|
-
'home
|
|
16
|
-
'source
|
|
17
|
-
'plugin
|
|
18
|
-
'
|
|
19
|
-
'installed
|
|
20
|
-
'recommended
|
|
21
|
-
'labs
|
|
22
|
-
'community
|
|
23
|
-
'load
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
13
|
+
'plugin.name': 'Registry',
|
|
14
|
+
'details.label': 'Details',
|
|
15
|
+
'home-page.label': 'Website',
|
|
16
|
+
'source.label': 'Source',
|
|
17
|
+
'plugin-registry.label': 'Plugin Registry',
|
|
18
|
+
'official-plugins.label': 'Official',
|
|
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 from URL',
|
|
24
|
+
'load-by-url-dialog.title': 'Load Plugin from URL',
|
|
25
|
+
'plugin-url.label': 'Plugin URL',
|
|
26
|
+
'load-plugin.label': 'Load Plugin',
|
|
27
|
+
'loading.label': 'Loading...',
|
|
28
|
+
'coming-soon.label': 'Coming soon!',
|
|
29
|
+
'open-plugin-registry.label': 'Open plugin registry',
|
|
30
|
+
'settings.label': 'Settings',
|
|
27
31
|
},
|
|
28
32
|
},
|
|
29
33
|
},
|
package/src/types.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
7
|
export const RegistrySettingsSchema = Schema.mutable(
|
|
8
8
|
Schema.Struct({
|
|
@@ -11,3 +11,16 @@ export const RegistrySettingsSchema = Schema.mutable(
|
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
export type RegistrySettings = Schema.Schema.Type<typeof RegistrySettingsSchema>;
|
|
14
|
+
|
|
15
|
+
export const RegistryTagType = Schema.Literal(
|
|
16
|
+
'new',
|
|
17
|
+
'beta',
|
|
18
|
+
'labs',
|
|
19
|
+
'popular',
|
|
20
|
+
'featured',
|
|
21
|
+
'experimental',
|
|
22
|
+
'community',
|
|
23
|
+
'local',
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
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
|
-
}
|