@dxos/plugin-debug 0.8.4-main.7996785055 → 0.8.4-main.8baae0fced
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/{browser/DebugGraph-7HXJ2PS2.mjs → neutral/DebugGraph-G4FWS57E.mjs} +4 -5
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs.map +7 -0
- package/dist/lib/neutral/DebugObjectPanel-UJ63CV25.mjs +59 -0
- package/dist/lib/neutral/DebugObjectPanel-UJ63CV25.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.mjs +47 -0
- package/dist/lib/neutral/DebugPlugin.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs +18 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs +12 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DebugSettings-Z3XADRNK.mjs +224 -0
- package/dist/lib/neutral/DebugSettings-Z3XADRNK.mjs.map +7 -0
- package/dist/lib/{browser/DebugSpaceObjectsPanel-SIK72DXV.mjs → neutral/DebugSpaceObjectsPanel-NISULU6U.mjs} +9 -20
- package/dist/lib/neutral/DebugSpaceObjectsPanel-NISULU6U.mjs.map +7 -0
- package/dist/lib/{browser/DebugStatus-FWF3YFBA.mjs → neutral/DebugStatus-YB3KFP7G.mjs} +5 -8
- package/dist/lib/neutral/DebugStatus-YB3KFP7G.mjs.map +7 -0
- package/dist/lib/{browser/DevtoolsOverviewContainer-TBTTPXVF.mjs → neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs} +4 -5
- package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs.map +7 -0
- package/dist/lib/neutral/GithubPanel-DAIR6QSZ.mjs +177 -0
- package/dist/lib/neutral/GithubPanel-DAIR6QSZ.mjs.map +7 -0
- package/dist/lib/neutral/SpaceGenerator-UBYB4NPD.mjs +143 -0
- package/dist/lib/neutral/SpaceGenerator-UBYB4NPD.mjs.map +7 -0
- package/dist/lib/{browser/Wireframe-KAGOKEFW.mjs → neutral/Wireframe-7SNRUKET.mjs} +8 -9
- package/dist/lib/neutral/Wireframe-7SNRUKET.mjs.map +7 -0
- package/dist/lib/{browser/app-graph-builder-FBLOEOH5.mjs → neutral/app-graph-builder-OIC65GEP.mjs} +169 -186
- package/dist/lib/neutral/app-graph-builder-OIC65GEP.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +15 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/{browser/chunk-Q37TZWW5.mjs → neutral/chunk-NFIOTQRZ.mjs} +21 -10
- package/dist/lib/neutral/chunk-NFIOTQRZ.mjs.map +7 -0
- package/dist/lib/{browser/chunk-ZOM2FBHQ.mjs → neutral/chunk-SWW2QL66.mjs} +5 -1
- package/dist/lib/neutral/chunk-SWW2QL66.mjs.map +7 -0
- package/dist/lib/{browser/SpaceGenerator-UUQS6TYY.mjs → neutral/components/index.mjs} +61 -264
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +23 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/{browser/react-context-KBHXEMRS.mjs → neutral/react-context-MUZ3KVLU.mjs} +4 -5
- package/dist/lib/neutral/react-context-MUZ3KVLU.mjs.map +7 -0
- package/dist/lib/{browser/react-surface-HYT4HKZX.mjs → neutral/react-surface-UP747GQ7.mjs} +148 -157
- package/dist/lib/neutral/react-surface-UP747GQ7.mjs.map +7 -0
- package/dist/lib/{browser/settings-XXFUM3QJ.mjs → neutral/settings-MPM6YUP4.mjs} +7 -11
- package/dist/lib/neutral/settings-MPM6YUP4.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +89 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +2 -5
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/DebugPlugin.node.d.ts +5 -0
- package/dist/types/src/DebugPlugin.node.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.test.d.ts +2 -0
- package/dist/types/src/DebugPlugin.test.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.workerd.d.ts +5 -0
- package/dist/types/src/DebugPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +11 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts +11 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts +104 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/index.d.ts +2 -0
- package/dist/types/src/components/DebugSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +2 -2
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/index.d.ts +1 -2
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +3 -4
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +1 -2
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +3 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +1 -2
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/index.d.ts +1 -2
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +1 -2
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +15 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +104 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts +3 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts +2 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +1 -5
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +1 -2
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
- package/dist/types/src/containers/Wireframe/index.d.ts +1 -2
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +85 -61
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +8 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/index.d.ts} +10 -9
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +116 -63
- package/src/DebugPlugin.node.ts +18 -0
- package/src/DebugPlugin.test.ts +29 -0
- package/src/DebugPlugin.tsx +9 -11
- package/src/DebugPlugin.workerd.ts +12 -0
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +139 -153
- package/src/capabilities/index.ts +6 -4
- package/src/capabilities/{react-context/react-context.tsx → react-context.tsx} +1 -1
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +163 -139
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -4
- package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
- package/src/components/DebugSettings/DebugSettings.tsx +262 -0
- package/src/components/DebugSettings/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +13 -14
- package/src/components/SpaceGenerator/draw-util.ts +8 -8
- package/src/components/SpaceGenerator/presets.ts +27 -52
- package/src/components/index.ts +4 -0
- package/src/containers/DebugGraph/DebugGraph.tsx +3 -2
- package/src/containers/DebugGraph/index.ts +1 -3
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +44 -15
- package/src/containers/DebugObjectPanel/index.ts +1 -3
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +9 -17
- package/src/containers/DebugSpaceObjectsPanel/index.ts +1 -3
- package/src/containers/DebugStatus/DebugStatus.tsx +1 -3
- package/src/containers/DebugStatus/index.ts +1 -3
- package/src/containers/DevtoolsOverviewContainer/index.ts +1 -3
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +38 -0
- package/src/containers/GithubPanel/GithubComponent.tsx +192 -0
- package/src/containers/GithubPanel/GithubPanel.tsx +17 -0
- package/src/containers/GithubPanel/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +16 -20
- package/src/containers/SpaceGenerator/index.ts +1 -3
- package/src/containers/Wireframe/Wireframe.tsx +2 -6
- package/src/containers/Wireframe/index.ts +1 -3
- package/src/containers/index.ts +1 -1
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -0
- package/src/plugin.ts +10 -0
- package/src/translations.ts +81 -60
- package/src/types/Settings.ts +16 -0
- package/src/{types.ts → types/index.ts} +14 -12
- package/dist/lib/browser/DebugGraph-7HXJ2PS2.mjs.map +0 -7
- package/dist/lib/browser/DebugObjectPanel-KXVFOGU6.mjs +0 -35
- package/dist/lib/browser/DebugObjectPanel-KXVFOGU6.mjs.map +0 -7
- package/dist/lib/browser/DebugSettings-DQXOXF6A.mjs +0 -183
- package/dist/lib/browser/DebugSettings-DQXOXF6A.mjs.map +0 -7
- package/dist/lib/browser/DebugSpaceObjectsPanel-SIK72DXV.mjs.map +0 -7
- package/dist/lib/browser/DebugStatus-FWF3YFBA.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-TBTTPXVF.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-UUQS6TYY.mjs.map +0 -7
- package/dist/lib/browser/Wireframe-KAGOKEFW.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-FBLOEOH5.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q37TZWW5.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZOM2FBHQ.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -132
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-context-KBHXEMRS.mjs.map +0 -7
- package/dist/lib/browser/react-surface-HYT4HKZX.mjs.map +0 -7
- package/dist/lib/browser/settings-XXFUM3QJ.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/index.d.ts +0 -7
- package/dist/types/src/capabilities/react-context/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +0 -10
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +0 -1
- package/dist/types/src/containers/DebugSettings/index.d.ts +0 -3
- package/dist/types/src/containers/DebugSettings/index.d.ts.map +0 -1
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/react-context/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/settings/index.ts +0 -7
- package/src/containers/DebugSettings/DebugSettings.tsx +0 -206
- package/src/containers/DebugSettings/index.ts +0 -7
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-context/react-context.d.ts → react-context.d.ts} +0 -0
|
@@ -8,7 +8,7 @@ import React, { useCallback } from 'react';
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';
|
|
10
10
|
import { AppCapabilities, LayoutOperation, getObjectPathFromObject } from '@dxos/app-toolkit';
|
|
11
|
-
|
|
11
|
+
import { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
12
12
|
import {
|
|
13
13
|
AutomergePanel,
|
|
14
14
|
ConfigPanel,
|
|
@@ -33,33 +33,32 @@ import {
|
|
|
33
33
|
StoragePanel,
|
|
34
34
|
SwarmPanel,
|
|
35
35
|
TestingPanel,
|
|
36
|
-
TracingPanel,
|
|
37
36
|
WorkflowPanel,
|
|
38
37
|
} from '@dxos/devtools';
|
|
39
|
-
import { Obj } from '@dxos/echo';
|
|
40
|
-
import { Collection } from '@dxos/echo';
|
|
41
|
-
import { type LogBuffer } from '@dxos/log';
|
|
38
|
+
import { Collection, Feed, Obj } from '@dxos/echo';
|
|
42
39
|
import { log } from '@dxos/log';
|
|
43
|
-
|
|
40
|
+
import { type IdbLogStore } from '@dxos/log-store-idb';
|
|
44
41
|
import { type Graph } from '@dxos/plugin-graph';
|
|
45
|
-
import { ScriptOperation } from '@dxos/plugin-script
|
|
46
|
-
import { SpaceOperation } from '@dxos/plugin-space
|
|
47
|
-
import { useActiveSpace } from '@dxos/plugin-space';
|
|
42
|
+
import { ScriptOperation } from '@dxos/plugin-script';
|
|
43
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
48
44
|
import { type Space, SpaceState, isSpace } from '@dxos/react-client/echo';
|
|
49
|
-
import {
|
|
45
|
+
import { ToolsExplorer } from '@dxos/react-ui-introspect';
|
|
50
46
|
|
|
47
|
+
import { DebugSettings } from '#components';
|
|
51
48
|
import {
|
|
52
49
|
DebugGraph,
|
|
53
50
|
DebugObjectPanel,
|
|
54
|
-
DebugSettings,
|
|
55
51
|
DebugSpaceObjectsPanel,
|
|
56
52
|
DebugStatus,
|
|
57
53
|
DevtoolsOverviewContainer,
|
|
58
54
|
SpaceGenerator,
|
|
59
55
|
Wireframe,
|
|
60
|
-
} from '
|
|
61
|
-
import { meta } from '
|
|
62
|
-
import { DebugCapabilities, type
|
|
56
|
+
} from '#containers';
|
|
57
|
+
import { meta } from '#meta';
|
|
58
|
+
import { DebugCapabilities, type Settings, Devtools } from '#types';
|
|
59
|
+
|
|
60
|
+
// TODO(burdon): Move to config.
|
|
61
|
+
const MCP_SERVER_URL = 'https://introspect-service-labs.dxos.workers.dev/mcp';
|
|
63
62
|
|
|
64
63
|
type SpaceDebug = {
|
|
65
64
|
type: string;
|
|
@@ -79,31 +78,35 @@ const isGraphDebug = (data: any): data is GraphDebug => {
|
|
|
79
78
|
);
|
|
80
79
|
};
|
|
81
80
|
|
|
82
|
-
const useCurrentSpace = useActiveSpace;
|
|
83
|
-
|
|
84
81
|
type ReactSurfaceOptions = {
|
|
85
|
-
|
|
82
|
+
logStore?: IdbLogStore;
|
|
86
83
|
};
|
|
87
84
|
|
|
88
85
|
export default Capability.makeModule(
|
|
89
|
-
Effect.fnUntraced(function* ({
|
|
86
|
+
Effect.fnUntraced(function* ({ logStore }: ReactSurfaceOptions) {
|
|
90
87
|
const capabilities = yield* Capability.Service;
|
|
91
88
|
const registry = capabilities.get(Capabilities.AtomRegistry);
|
|
92
89
|
const settingsAtom = capabilities.get(DebugCapabilities.Settings);
|
|
90
|
+
const fileUploader = capabilities.getAll(AppCapabilities.FileUploader)[0];
|
|
93
91
|
|
|
94
92
|
return Capability.contributes(Capabilities.ReactSurface, [
|
|
95
93
|
Surface.create({
|
|
96
|
-
id:
|
|
97
|
-
|
|
98
|
-
filter: (data): data is { subject: AppCapabilities.Settings } =>
|
|
99
|
-
AppCapabilities.isSettings(data.subject) && data.subject.prefix === meta.id,
|
|
94
|
+
id: 'plugin-settings',
|
|
95
|
+
filter: AppSurface.settings(AppSurface.Article, meta.id),
|
|
100
96
|
component: ({ data: { subject } }) => {
|
|
101
|
-
const { settings, updateSettings } = useSettingsState<
|
|
102
|
-
return
|
|
97
|
+
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
98
|
+
return (
|
|
99
|
+
<DebugSettings
|
|
100
|
+
settings={settings}
|
|
101
|
+
onSettingsChange={updateSettings}
|
|
102
|
+
logStore={logStore}
|
|
103
|
+
onUpload={fileUploader}
|
|
104
|
+
/>
|
|
105
|
+
);
|
|
103
106
|
},
|
|
104
107
|
}),
|
|
105
108
|
Surface.create({
|
|
106
|
-
id:
|
|
109
|
+
id: 'space',
|
|
107
110
|
role: 'article',
|
|
108
111
|
filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),
|
|
109
112
|
component: ({ role, data }) => {
|
|
@@ -132,25 +135,25 @@ export default Capability.makeModule(
|
|
|
132
135
|
[data.subject.space, invokePromise],
|
|
133
136
|
);
|
|
134
137
|
|
|
135
|
-
return
|
|
136
|
-
<Panel.Root role={role} className='dx-document'>
|
|
137
|
-
<Panel.Content asChild>
|
|
138
|
-
<SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />
|
|
139
|
-
</Panel.Content>
|
|
140
|
-
</Panel.Root>
|
|
141
|
-
);
|
|
138
|
+
return <SpaceGenerator role={role} space={data.subject.space} onCreateObjects={handleCreateObject} />;
|
|
142
139
|
},
|
|
143
140
|
}),
|
|
144
141
|
Surface.create({
|
|
145
|
-
id:
|
|
142
|
+
id: 'app-graph',
|
|
146
143
|
role: 'article',
|
|
147
144
|
filter: (data): data is { subject: GraphDebug } => isGraphDebug(data.subject),
|
|
148
145
|
component: ({ data }) => <DebugGraph graph={data.subject.graph} root={data.subject.root} />,
|
|
149
146
|
}),
|
|
150
147
|
Surface.create({
|
|
151
|
-
id:
|
|
148
|
+
id: 'tools-explorer',
|
|
149
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.ToolsExplorer),
|
|
150
|
+
component: () => <ToolsExplorer serverUrl={MCP_SERVER_URL} />,
|
|
151
|
+
}),
|
|
152
|
+
Surface.create({
|
|
153
|
+
id: 'wireframe',
|
|
154
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
152
155
|
role: ['article', 'section'],
|
|
153
|
-
position: '
|
|
156
|
+
position: 'first',
|
|
154
157
|
filter: (data): data is { subject: Obj.Unknown } => {
|
|
155
158
|
const settings = registry.get(settingsAtom);
|
|
156
159
|
return Obj.isObject(data.subject) && !!settings.wireframe;
|
|
@@ -160,96 +163,95 @@ export default Capability.makeModule(
|
|
|
160
163
|
),
|
|
161
164
|
}),
|
|
162
165
|
Surface.create({
|
|
163
|
-
id:
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
id: 'object-debug',
|
|
167
|
+
filter: AppSurface.allOf(
|
|
168
|
+
AppSurface.literal(AppSurface.Article, 'debug'),
|
|
169
|
+
AppSurface.companion(AppSurface.Article),
|
|
170
|
+
),
|
|
171
|
+
component: ({ role, data }) => <DebugObjectPanel role={role} companionTo={data.companionTo} />,
|
|
168
172
|
}),
|
|
169
173
|
Surface.create({
|
|
170
|
-
id:
|
|
171
|
-
|
|
172
|
-
filter: (data): data is { subject: 'devtools' } => data.subject === 'devtools',
|
|
174
|
+
id: 'devtools-overview',
|
|
175
|
+
filter: AppSurface.literal(Surface.makeType<{ subject: string }>('deck-companion--devtools'), 'devtools'),
|
|
173
176
|
component: () => <DevtoolsOverviewContainer />,
|
|
174
177
|
}),
|
|
175
178
|
Surface.create({
|
|
176
|
-
id:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
179
|
+
id: 'space-objects',
|
|
180
|
+
filter: AppSurface.literal(
|
|
181
|
+
Surface.makeType<{ subject: string }>('deck-companion--space-objects'),
|
|
182
|
+
'space-objects',
|
|
183
|
+
),
|
|
184
|
+
component: () => {
|
|
185
|
+
const space = useActiveSpace();
|
|
186
|
+
if (!space) {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return <DebugSpaceObjectsPanel space={space} />;
|
|
191
|
+
},
|
|
180
192
|
}),
|
|
181
193
|
|
|
182
194
|
Surface.create({
|
|
183
|
-
id:
|
|
195
|
+
id: 'status',
|
|
184
196
|
role: 'status-indicator',
|
|
185
|
-
position: '
|
|
197
|
+
position: 'first',
|
|
186
198
|
component: () => <DebugStatus />,
|
|
187
199
|
}),
|
|
200
|
+
|
|
188
201
|
//
|
|
189
202
|
// Devtools
|
|
190
203
|
//
|
|
191
204
|
|
|
192
205
|
Surface.create({
|
|
193
|
-
id:
|
|
194
|
-
|
|
195
|
-
filter: (data): data is any => data.subject === Devtools.Client.Config,
|
|
206
|
+
id: 'client.config',
|
|
207
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Config),
|
|
196
208
|
component: () => <ConfigPanel vaultSelector={false} />,
|
|
197
209
|
}),
|
|
198
210
|
Surface.create({
|
|
199
|
-
id:
|
|
200
|
-
|
|
201
|
-
filter: (data): data is any => data.subject === Devtools.Client.Storage,
|
|
211
|
+
id: 'client.storage',
|
|
212
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Storage),
|
|
202
213
|
component: () => <StoragePanel />,
|
|
203
214
|
}),
|
|
204
215
|
Surface.create({
|
|
205
|
-
id:
|
|
206
|
-
|
|
207
|
-
filter: (data): data is any => data.subject === Devtools.Client.Logs,
|
|
216
|
+
id: 'client.logs',
|
|
217
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Logs),
|
|
208
218
|
component: () => <LoggingPanel />,
|
|
209
219
|
}),
|
|
210
220
|
Surface.create({
|
|
211
|
-
id:
|
|
212
|
-
|
|
213
|
-
filter: (data): data is any => data.subject === Devtools.Client.Diagnostics,
|
|
221
|
+
id: 'client.diagnostics',
|
|
222
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Diagnostics),
|
|
214
223
|
component: () => <DiagnosticsPanel />,
|
|
215
224
|
}),
|
|
216
225
|
Surface.create({
|
|
217
|
-
id:
|
|
218
|
-
|
|
219
|
-
filter: (data): data is any => data.subject === Devtools.Client.Tracing,
|
|
220
|
-
component: () => <TracingPanel />,
|
|
221
|
-
}),
|
|
222
|
-
Surface.create({
|
|
223
|
-
id: `${meta.id}.halo.identity`,
|
|
224
|
-
role: 'article',
|
|
225
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Identity,
|
|
226
|
+
id: 'halo.identity',
|
|
227
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Identity),
|
|
226
228
|
component: () => <IdentityPanel />,
|
|
227
229
|
}),
|
|
228
230
|
Surface.create({
|
|
229
|
-
id:
|
|
230
|
-
|
|
231
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Devices,
|
|
231
|
+
id: 'halo.devices',
|
|
232
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Devices),
|
|
232
233
|
component: () => <DeviceListPanel />,
|
|
233
234
|
}),
|
|
234
235
|
Surface.create({
|
|
235
|
-
id:
|
|
236
|
-
|
|
237
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Keyring,
|
|
236
|
+
id: 'halo.keyring',
|
|
237
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Keyring),
|
|
238
238
|
component: () => <KeyringPanel />,
|
|
239
239
|
}),
|
|
240
240
|
Surface.create({
|
|
241
|
-
id:
|
|
242
|
-
|
|
243
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Credentials,
|
|
241
|
+
id: 'halo.credentials',
|
|
242
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Credentials),
|
|
244
243
|
component: () => {
|
|
245
|
-
const space =
|
|
244
|
+
const space = useActiveSpace();
|
|
245
|
+
if (!space) {
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
|
|
246
249
|
return <CredentialsPanel space={space} />;
|
|
247
250
|
},
|
|
248
251
|
}),
|
|
249
252
|
Surface.create({
|
|
250
|
-
id:
|
|
251
|
-
|
|
252
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Spaces,
|
|
253
|
+
id: 'echo.spaces',
|
|
254
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Spaces),
|
|
253
255
|
component: () => {
|
|
254
256
|
const { invokePromise } = useOperationInvoker();
|
|
255
257
|
const handleSelect = useCallback(
|
|
@@ -260,126 +262,148 @@ export default Capability.makeModule(
|
|
|
260
262
|
},
|
|
261
263
|
}),
|
|
262
264
|
Surface.create({
|
|
263
|
-
id:
|
|
264
|
-
|
|
265
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Space,
|
|
265
|
+
id: 'echo.space',
|
|
266
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Space),
|
|
266
267
|
component: () => {
|
|
267
|
-
const space =
|
|
268
|
+
const space = useActiveSpace();
|
|
268
269
|
const { invokePromise } = useOperationInvoker();
|
|
269
270
|
const handleSelect = useCallback(
|
|
270
271
|
() => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Feeds] }),
|
|
271
272
|
[invokePromise],
|
|
272
273
|
);
|
|
274
|
+
if (!space) {
|
|
275
|
+
return null;
|
|
276
|
+
}
|
|
277
|
+
|
|
273
278
|
return <SpaceInfoPanel space={space} onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;
|
|
274
279
|
},
|
|
275
280
|
}),
|
|
276
281
|
Surface.create({
|
|
277
|
-
id:
|
|
278
|
-
|
|
279
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Feeds,
|
|
282
|
+
id: 'echo.feeds',
|
|
283
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Feeds),
|
|
280
284
|
component: () => {
|
|
281
|
-
const space =
|
|
285
|
+
const space = useActiveSpace();
|
|
286
|
+
if (!space) {
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
|
|
282
290
|
return <FeedsPanel space={space} />;
|
|
283
291
|
},
|
|
284
292
|
}),
|
|
285
293
|
Surface.create({
|
|
286
|
-
id:
|
|
287
|
-
|
|
288
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Objects,
|
|
294
|
+
id: 'echo.objects',
|
|
295
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Objects),
|
|
289
296
|
component: () => {
|
|
290
|
-
const space =
|
|
297
|
+
const space = useActiveSpace();
|
|
298
|
+
if (!space) {
|
|
299
|
+
return null;
|
|
300
|
+
}
|
|
301
|
+
|
|
291
302
|
return <ObjectsPanel space={space} />;
|
|
292
303
|
},
|
|
293
304
|
}),
|
|
294
305
|
Surface.create({
|
|
295
|
-
id:
|
|
296
|
-
|
|
297
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Schema,
|
|
306
|
+
id: 'echo.schema',
|
|
307
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Schema),
|
|
298
308
|
component: () => {
|
|
299
|
-
const space =
|
|
309
|
+
const space = useActiveSpace();
|
|
310
|
+
if (!space) {
|
|
311
|
+
return null;
|
|
312
|
+
}
|
|
313
|
+
|
|
300
314
|
return <SchemaPanel space={space} />;
|
|
301
315
|
},
|
|
302
316
|
}),
|
|
303
317
|
Surface.create({
|
|
304
|
-
id:
|
|
305
|
-
|
|
306
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Automerge,
|
|
318
|
+
id: 'echo.automerge',
|
|
319
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Automerge),
|
|
307
320
|
component: () => {
|
|
308
|
-
const space =
|
|
321
|
+
const space = useActiveSpace();
|
|
322
|
+
if (!space) {
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
|
|
309
326
|
return <AutomergePanel space={space} />;
|
|
310
327
|
},
|
|
311
328
|
}),
|
|
312
329
|
Surface.create({
|
|
313
|
-
id:
|
|
314
|
-
|
|
315
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Queues,
|
|
330
|
+
id: 'echo.queues',
|
|
331
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Queues),
|
|
316
332
|
component: () => <QueuesPanel />,
|
|
317
333
|
}),
|
|
318
334
|
Surface.create({
|
|
319
|
-
id:
|
|
320
|
-
|
|
321
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Members,
|
|
335
|
+
id: 'echo.members',
|
|
336
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Members),
|
|
322
337
|
component: () => {
|
|
323
|
-
const space =
|
|
338
|
+
const space = useActiveSpace();
|
|
339
|
+
if (!space) {
|
|
340
|
+
return null;
|
|
341
|
+
}
|
|
342
|
+
|
|
324
343
|
return <MembersPanel space={space} />;
|
|
325
344
|
},
|
|
326
345
|
}),
|
|
327
346
|
Surface.create({
|
|
328
|
-
id:
|
|
329
|
-
|
|
330
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Metadata,
|
|
347
|
+
id: 'echo.metadata',
|
|
348
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Metadata),
|
|
331
349
|
component: () => <MetadataPanel />,
|
|
332
350
|
}),
|
|
333
351
|
Surface.create({
|
|
334
|
-
id:
|
|
335
|
-
|
|
336
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Signal,
|
|
352
|
+
id: 'mesh.signal',
|
|
353
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Signal),
|
|
337
354
|
component: () => <SignalPanel />,
|
|
338
355
|
}),
|
|
339
356
|
Surface.create({
|
|
340
|
-
id:
|
|
341
|
-
|
|
342
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Swarm,
|
|
357
|
+
id: 'mesh.swarm',
|
|
358
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Swarm),
|
|
343
359
|
component: () => <SwarmPanel />,
|
|
344
360
|
}),
|
|
345
361
|
Surface.create({
|
|
346
|
-
id:
|
|
347
|
-
|
|
348
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Network,
|
|
362
|
+
id: 'mesh.network',
|
|
363
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Network),
|
|
349
364
|
component: () => {
|
|
350
|
-
const space =
|
|
365
|
+
const space = useActiveSpace();
|
|
366
|
+
if (!space) {
|
|
367
|
+
return null;
|
|
368
|
+
}
|
|
369
|
+
|
|
351
370
|
return <NetworkPanel space={space} />;
|
|
352
371
|
},
|
|
353
372
|
}),
|
|
354
373
|
Surface.create({
|
|
355
|
-
id:
|
|
356
|
-
|
|
357
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Dashboard,
|
|
374
|
+
id: 'edge.dashboard',
|
|
375
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Dashboard),
|
|
358
376
|
component: () => <EdgeDashboardPanel />,
|
|
359
377
|
}),
|
|
360
378
|
Surface.create({
|
|
361
|
-
id:
|
|
362
|
-
|
|
363
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Workflows,
|
|
379
|
+
id: 'edge.workflows',
|
|
380
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Workflows),
|
|
364
381
|
component: () => {
|
|
365
|
-
const space =
|
|
382
|
+
const space = useActiveSpace();
|
|
383
|
+
if (!space) {
|
|
384
|
+
return null;
|
|
385
|
+
}
|
|
386
|
+
|
|
366
387
|
return <WorkflowPanel space={space} />;
|
|
367
388
|
},
|
|
368
389
|
}),
|
|
369
390
|
Surface.create({
|
|
370
|
-
id:
|
|
371
|
-
|
|
372
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Traces,
|
|
391
|
+
id: 'edge.traces',
|
|
392
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Traces),
|
|
373
393
|
component: () => {
|
|
374
|
-
const space =
|
|
375
|
-
|
|
376
|
-
|
|
394
|
+
const space = useActiveSpace();
|
|
395
|
+
if (!space) {
|
|
396
|
+
return null;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
const feed = space.properties.invocationTraceFeed?.target;
|
|
400
|
+
const feedDXN = feed ? Feed.getQueueDxn(feed) : undefined;
|
|
401
|
+
return <InvocationTraceContainer db={space.db} feedDXN={feedDXN} detailAxis='block' />;
|
|
377
402
|
},
|
|
378
403
|
}),
|
|
379
404
|
Surface.create({
|
|
380
|
-
id:
|
|
381
|
-
|
|
382
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Testing,
|
|
405
|
+
id: 'edge.testing',
|
|
406
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Testing),
|
|
383
407
|
component: () => {
|
|
384
408
|
const { invokePromise } = useOperationInvoker();
|
|
385
409
|
const onSpaceCreate = useCallback(
|
|
@@ -8,14 +8,14 @@ import { Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
9
|
import { createKvsStore } from '@dxos/effect';
|
|
10
10
|
|
|
11
|
-
import { meta } from '
|
|
12
|
-
import { DebugCapabilities,
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { DebugCapabilities, Settings } from '#types';
|
|
13
13
|
|
|
14
14
|
export default Capability.makeModule(() =>
|
|
15
15
|
Effect.sync(() => {
|
|
16
16
|
const settingsAtom = createKvsStore({
|
|
17
17
|
key: meta.id,
|
|
18
|
-
schema:
|
|
18
|
+
schema: Settings.Settings,
|
|
19
19
|
defaultValue: () => ({}),
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -23,7 +23,7 @@ export default Capability.makeModule(() =>
|
|
|
23
23
|
Capability.contributes(DebugCapabilities.Settings, settingsAtom),
|
|
24
24
|
Capability.contributes(AppCapabilities.Settings, {
|
|
25
25
|
prefix: meta.id,
|
|
26
|
-
schema:
|
|
26
|
+
schema: Settings.Settings,
|
|
27
27
|
atom: settingsAtom,
|
|
28
28
|
}),
|
|
29
29
|
];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
|
|
7
|
+
import { withClientProvider } from '@dxos/react-client/testing';
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
|
+
|
|
10
|
+
import { translations } from '#translations';
|
|
11
|
+
|
|
12
|
+
import { DebugSettings } from './DebugSettings';
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
title: 'plugins/plugin-debug/components/DebugSettings',
|
|
16
|
+
component: DebugSettings,
|
|
17
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' }), withClientProvider({ createIdentity: true })],
|
|
18
|
+
tags: ['settings'],
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'fullscreen',
|
|
21
|
+
translations,
|
|
22
|
+
},
|
|
23
|
+
} satisfies Meta<typeof DebugSettings>;
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
|
|
29
|
+
export const Default: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
settings: {
|
|
32
|
+
wireframe: false,
|
|
33
|
+
},
|
|
34
|
+
logStore: { export: async () => '' } as any,
|
|
35
|
+
},
|
|
36
|
+
};
|