@dxos/plugin-debug 0.8.4-main.ae835ea → 0.8.4-main.bc674ce
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/DebugGraph-6VMEOKEV.mjs +15 -0
- package/dist/lib/browser/DebugGraph-6VMEOKEV.mjs.map +7 -0
- package/dist/lib/browser/DevtoolsOverviewContainer-77PKFLYV.mjs +19 -0
- package/dist/lib/browser/DevtoolsOverviewContainer-77PKFLYV.mjs.map +7 -0
- package/dist/lib/browser/{SpaceGenerator-7Q7CX64P.mjs → SpaceGenerator-H33AEFGC.mjs} +226 -233
- package/dist/lib/browser/SpaceGenerator-H33AEFGC.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-LV73R7HR.mjs +598 -0
- package/dist/lib/browser/app-graph-builder-LV73R7HR.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SRV2AIGJ.mjs → chunk-4UFQXPP7.mjs} +11 -1
- package/dist/lib/browser/chunk-4UFQXPP7.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WZFZ4ESO.mjs → chunk-A5H5GRV6.mjs} +1 -1
- package/dist/lib/browser/chunk-A5H5GRV6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +34 -39
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-context-FSWBT3MH.mjs +17 -0
- package/dist/lib/browser/react-context-FSWBT3MH.mjs.map +7 -0
- package/dist/lib/browser/react-surface-2N6CPSHR.mjs +757 -0
- package/dist/lib/browser/react-surface-2N6CPSHR.mjs.map +7 -0
- package/dist/lib/browser/settings-KA4GN73K.mjs +31 -0
- package/dist/lib/browser/settings-KA4GN73K.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +2 -1
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context/index.d.ts +7 -0
- package/dist/types/src/capabilities/react-context/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context/react-context.d.ts +10 -0
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +3 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +5 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/components/DebugGraph.d.ts +5 -4
- package/dist/types/src/components/DebugGraph.d.ts.map +1 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts +1 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings.d.ts +4 -2
- package/dist/types/src/components/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +5 -5
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts +2 -5
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/Wireframe.d.ts +2 -2
- package/dist/types/src/components/Wireframe.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -1
- package/dist/types/src/types.d.ts +5 -0
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +76 -70
- package/src/DebugPlugin.tsx +16 -31
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +420 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +4 -6
- package/src/capabilities/react-context/index.ts +7 -0
- package/src/capabilities/react-context/react-context.tsx +20 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +409 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +30 -0
- package/src/components/DebugGraph.tsx +4 -3
- package/src/components/DebugObjectPanel.tsx +4 -4
- package/src/components/DebugSettings.tsx +44 -18
- package/src/components/DevtoolsOverviewContainer.tsx +1 -1
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +18 -19
- package/src/components/SpaceGenerator/SchemaTable.tsx +2 -2
- package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +7 -5
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +18 -13
- package/src/components/SpaceGenerator/presets.ts +217 -100
- package/src/components/Wireframe.tsx +4 -5
- package/src/components/index.ts +4 -1
- package/src/meta.ts +2 -2
- package/src/translations.ts +1 -1
- package/src/types.ts +8 -0
- package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs +0 -20
- package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-EPD6EWT5.mjs +0 -25
- package/dist/lib/browser/DevtoolsOverviewContainer-EPD6EWT5.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-7Q7CX64P.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-RXWTHLEW.mjs +0 -588
- package/dist/lib/browser/app-graph-builder-RXWTHLEW.mjs.map +0 -7
- package/dist/lib/browser/chunk-SRV2AIGJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-WZFZ4ESO.mjs.map +0 -7
- package/dist/lib/browser/react-context-P2YDWEWI.mjs +0 -16
- package/dist/lib/browser/react-context-P2YDWEWI.mjs.map +0 -7
- package/dist/lib/browser/react-surface-4XGZUT3Z.mjs +0 -772
- package/dist/lib/browser/react-surface-4XGZUT3Z.mjs.map +0 -7
- package/dist/lib/browser/settings-SQXR3OAH.mjs +0 -22
- package/dist/lib/browser/settings-SQXR3OAH.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context.d.ts +0 -8
- package/dist/types/src/capabilities/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -431
- package/src/capabilities/react-context.tsx +0 -16
- package/src/capabilities/react-surface.tsx +0 -399
- package/src/capabilities/settings.ts +0 -19
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
8
|
-
import { DevtoolsContextProvider } from '@dxos/devtools';
|
|
9
|
-
|
|
10
|
-
import { meta } from '../meta';
|
|
11
|
-
|
|
12
|
-
export default () =>
|
|
13
|
-
contributes(Capabilities.ReactContext, {
|
|
14
|
-
id: meta.id,
|
|
15
|
-
context: ({ children }) => <DevtoolsContextProvider>{children}</DevtoolsContextProvider>,
|
|
16
|
-
});
|
|
@@ -1,399 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Function from 'effect/Function';
|
|
6
|
-
import React, { useCallback } from 'react';
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
Capabilities,
|
|
10
|
-
LayoutAction,
|
|
11
|
-
type PluginContext,
|
|
12
|
-
chain,
|
|
13
|
-
contributes,
|
|
14
|
-
createIntent,
|
|
15
|
-
createSurface,
|
|
16
|
-
useCapability,
|
|
17
|
-
useIntentDispatcher,
|
|
18
|
-
} from '@dxos/app-framework';
|
|
19
|
-
import {
|
|
20
|
-
AutomergePanel,
|
|
21
|
-
ConfigPanel,
|
|
22
|
-
CredentialsPanel,
|
|
23
|
-
DeviceListPanel,
|
|
24
|
-
DiagnosticsPanel,
|
|
25
|
-
EdgeDashboardPanel,
|
|
26
|
-
FeedsPanel,
|
|
27
|
-
IdentityPanel,
|
|
28
|
-
InvocationTraceContainer,
|
|
29
|
-
KeyringPanel,
|
|
30
|
-
LoggingPanel,
|
|
31
|
-
MembersPanel,
|
|
32
|
-
MetadataPanel,
|
|
33
|
-
NetworkPanel,
|
|
34
|
-
ObjectsPanel,
|
|
35
|
-
QueuesPanel,
|
|
36
|
-
SchemaPanel,
|
|
37
|
-
SignalPanel,
|
|
38
|
-
SpaceInfoPanel,
|
|
39
|
-
SpaceListPanel,
|
|
40
|
-
StoragePanel,
|
|
41
|
-
SwarmPanel,
|
|
42
|
-
TestingPanel,
|
|
43
|
-
TracingPanel,
|
|
44
|
-
WorkflowPanel,
|
|
45
|
-
} from '@dxos/devtools';
|
|
46
|
-
import { Obj } from '@dxos/echo';
|
|
47
|
-
import { SettingsStore } from '@dxos/local-storage';
|
|
48
|
-
import { log } from '@dxos/log';
|
|
49
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
50
|
-
import { Graph } from '@dxos/plugin-graph';
|
|
51
|
-
import { ScriptAction } from '@dxos/plugin-script/types';
|
|
52
|
-
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
53
|
-
import { type Space, SpaceState, isSpace, parseId } from '@dxos/react-client/echo';
|
|
54
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
55
|
-
import { DataType } from '@dxos/schema';
|
|
56
|
-
|
|
57
|
-
import {
|
|
58
|
-
DebugGraph,
|
|
59
|
-
DebugObjectPanel,
|
|
60
|
-
DebugSettings,
|
|
61
|
-
DebugStatus,
|
|
62
|
-
DevtoolsOverviewContainer,
|
|
63
|
-
SpaceGenerator,
|
|
64
|
-
Wireframe,
|
|
65
|
-
} from '../components';
|
|
66
|
-
import { meta } from '../meta';
|
|
67
|
-
import { type DebugSettingsProps, Devtools } from '../types';
|
|
68
|
-
|
|
69
|
-
type SpaceDebug = {
|
|
70
|
-
type: string;
|
|
71
|
-
space: Space;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
type GraphDebug = {
|
|
75
|
-
graph: Graph;
|
|
76
|
-
root: string;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const isSpaceDebug = (data: any): data is SpaceDebug => data?.type === `${meta.id}/space` && isSpace(data.space);
|
|
80
|
-
const isGraphDebug = (data: any): data is GraphDebug => data?.graph instanceof Graph && typeof data?.root === 'string';
|
|
81
|
-
|
|
82
|
-
// TODO(wittjosiah): Factor out?
|
|
83
|
-
const useCurrentSpace = () => {
|
|
84
|
-
const layout = useCapability(Capabilities.Layout);
|
|
85
|
-
const client = useCapability(ClientCapabilities.Client);
|
|
86
|
-
const { spaceId } = parseId(layout.workspace);
|
|
87
|
-
const space = spaceId ? client.spaces.get(spaceId) : undefined;
|
|
88
|
-
return space;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export default (context: PluginContext) =>
|
|
92
|
-
contributes(Capabilities.ReactSurface, [
|
|
93
|
-
createSurface({
|
|
94
|
-
id: `${meta.id}/plugin-settings`,
|
|
95
|
-
role: 'article',
|
|
96
|
-
filter: (data): data is { subject: SettingsStore<DebugSettingsProps> } =>
|
|
97
|
-
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
98
|
-
component: ({ data: { subject } }) => <DebugSettings settings={subject.value} />,
|
|
99
|
-
}),
|
|
100
|
-
createSurface({
|
|
101
|
-
id: `${meta.id}/space`,
|
|
102
|
-
role: 'article',
|
|
103
|
-
filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),
|
|
104
|
-
component: ({ data }) => {
|
|
105
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
106
|
-
|
|
107
|
-
const handleCreateObject = useCallback(
|
|
108
|
-
(objects: Obj.Any[]) => {
|
|
109
|
-
if (!isSpace(data.subject.space)) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const collection =
|
|
114
|
-
data.subject.space.state.get() === SpaceState.SPACE_READY &&
|
|
115
|
-
data.subject.space.properties[DataType.Collection.typename]?.target;
|
|
116
|
-
if (!Obj.instanceOf(DataType.Collection, collection)) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
objects.forEach((object) => {
|
|
121
|
-
void dispatch(createIntent(SpaceAction.AddObject, { target: collection, object }));
|
|
122
|
-
});
|
|
123
|
-
},
|
|
124
|
-
[data.subject.space],
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
return (
|
|
128
|
-
<StackItem.Content>
|
|
129
|
-
<SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />
|
|
130
|
-
</StackItem.Content>
|
|
131
|
-
);
|
|
132
|
-
},
|
|
133
|
-
}),
|
|
134
|
-
createSurface({
|
|
135
|
-
id: `${meta.id}/app-graph`,
|
|
136
|
-
role: 'article',
|
|
137
|
-
filter: (data): data is { subject: GraphDebug } => isGraphDebug(data.subject),
|
|
138
|
-
component: ({ data }) => <DebugGraph graph={data.subject.graph} root={data.subject.root} />,
|
|
139
|
-
}),
|
|
140
|
-
createSurface({
|
|
141
|
-
id: `${meta.id}/wireframe`,
|
|
142
|
-
role: ['article', 'section'],
|
|
143
|
-
position: 'hoist',
|
|
144
|
-
filter: (data): data is { subject: Obj.Any } => {
|
|
145
|
-
const settings = context.getCapability(Capabilities.SettingsStore).getStore<DebugSettingsProps>(meta.id)!.value;
|
|
146
|
-
return Obj.isObject(data.subject) && !!settings.wireframe;
|
|
147
|
-
},
|
|
148
|
-
component: ({ data, role }) => (
|
|
149
|
-
<Wireframe label={`${role}:${name}`} object={data.subject} classNames='row-span-2 overflow-hidden' />
|
|
150
|
-
),
|
|
151
|
-
}),
|
|
152
|
-
createSurface({
|
|
153
|
-
id: `${meta.id}/object-debug`,
|
|
154
|
-
role: 'article',
|
|
155
|
-
filter: (data): data is { companionTo: Obj.Any } => data.subject === 'debug' && Obj.isObject(data.companionTo),
|
|
156
|
-
component: ({ data }) => <DebugObjectPanel object={data.companionTo} />,
|
|
157
|
-
}),
|
|
158
|
-
createSurface({
|
|
159
|
-
id: `${meta.id}/devtools-overview`,
|
|
160
|
-
role: 'deck-companion--devtools',
|
|
161
|
-
component: () => <DevtoolsOverviewContainer />,
|
|
162
|
-
}),
|
|
163
|
-
createSurface({
|
|
164
|
-
id: `${meta.id}/status`,
|
|
165
|
-
role: 'status',
|
|
166
|
-
component: () => <DebugStatus />,
|
|
167
|
-
}),
|
|
168
|
-
|
|
169
|
-
//
|
|
170
|
-
// Devtools
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
createSurface({
|
|
174
|
-
id: `${meta.id}/client/config`,
|
|
175
|
-
role: 'article',
|
|
176
|
-
filter: (data): data is any => data.subject === Devtools.Client.Config,
|
|
177
|
-
component: () => <ConfigPanel vaultSelector={false} />,
|
|
178
|
-
}),
|
|
179
|
-
createSurface({
|
|
180
|
-
id: `${meta.id}/client/storage`,
|
|
181
|
-
role: 'article',
|
|
182
|
-
filter: (data): data is any => data.subject === Devtools.Client.Storage,
|
|
183
|
-
component: () => <StoragePanel />,
|
|
184
|
-
}),
|
|
185
|
-
createSurface({
|
|
186
|
-
id: `${meta.id}/client/logs`,
|
|
187
|
-
role: 'article',
|
|
188
|
-
filter: (data): data is any => data.subject === Devtools.Client.Logs,
|
|
189
|
-
component: () => <LoggingPanel />,
|
|
190
|
-
}),
|
|
191
|
-
createSurface({
|
|
192
|
-
id: `${meta.id}/client/diagnostics`,
|
|
193
|
-
role: 'article',
|
|
194
|
-
filter: (data): data is any => data.subject === Devtools.Client.Diagnostics,
|
|
195
|
-
component: () => <DiagnosticsPanel />,
|
|
196
|
-
}),
|
|
197
|
-
createSurface({
|
|
198
|
-
id: `${meta.id}/client/tracing`,
|
|
199
|
-
role: 'article',
|
|
200
|
-
filter: (data): data is any => data.subject === Devtools.Client.Tracing,
|
|
201
|
-
component: () => <TracingPanel />,
|
|
202
|
-
}),
|
|
203
|
-
createSurface({
|
|
204
|
-
id: `${meta.id}/halo/identity`,
|
|
205
|
-
role: 'article',
|
|
206
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Identity,
|
|
207
|
-
component: () => <IdentityPanel />,
|
|
208
|
-
}),
|
|
209
|
-
createSurface({
|
|
210
|
-
id: `${meta.id}/halo/devices`,
|
|
211
|
-
role: 'article',
|
|
212
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Devices,
|
|
213
|
-
component: () => <DeviceListPanel />,
|
|
214
|
-
}),
|
|
215
|
-
createSurface({
|
|
216
|
-
id: `${meta.id}/halo/keyring`,
|
|
217
|
-
role: 'article',
|
|
218
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Keyring,
|
|
219
|
-
component: () => <KeyringPanel />,
|
|
220
|
-
}),
|
|
221
|
-
createSurface({
|
|
222
|
-
id: `${meta.id}/halo/credentials`,
|
|
223
|
-
role: 'article',
|
|
224
|
-
filter: (data): data is any => data.subject === Devtools.Halo.Credentials,
|
|
225
|
-
component: () => {
|
|
226
|
-
const space = useCurrentSpace();
|
|
227
|
-
return <CredentialsPanel space={space} />;
|
|
228
|
-
},
|
|
229
|
-
}),
|
|
230
|
-
createSurface({
|
|
231
|
-
id: `${meta.id}/echo/spaces`,
|
|
232
|
-
role: 'article',
|
|
233
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Spaces,
|
|
234
|
-
component: () => {
|
|
235
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
236
|
-
const handleSelect = useCallback(
|
|
237
|
-
() => dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [Devtools.Echo.Space] })),
|
|
238
|
-
[dispatch],
|
|
239
|
-
);
|
|
240
|
-
return <SpaceListPanel onSelect={handleSelect} />;
|
|
241
|
-
},
|
|
242
|
-
}),
|
|
243
|
-
createSurface({
|
|
244
|
-
id: `${meta.id}/echo/space`,
|
|
245
|
-
role: 'article',
|
|
246
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Space,
|
|
247
|
-
component: () => {
|
|
248
|
-
const space = useCurrentSpace();
|
|
249
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
250
|
-
const handleSelect = useCallback(
|
|
251
|
-
() => dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [Devtools.Echo.Feeds] })),
|
|
252
|
-
[dispatch],
|
|
253
|
-
);
|
|
254
|
-
return <SpaceInfoPanel space={space} onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;
|
|
255
|
-
},
|
|
256
|
-
}),
|
|
257
|
-
createSurface({
|
|
258
|
-
id: `${meta.id}/echo/feeds`,
|
|
259
|
-
role: 'article',
|
|
260
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Feeds,
|
|
261
|
-
component: () => {
|
|
262
|
-
const space = useCurrentSpace();
|
|
263
|
-
return <FeedsPanel space={space} />;
|
|
264
|
-
},
|
|
265
|
-
}),
|
|
266
|
-
createSurface({
|
|
267
|
-
id: `${meta.id}/echo/objects`,
|
|
268
|
-
role: 'article',
|
|
269
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Objects,
|
|
270
|
-
component: () => {
|
|
271
|
-
const space = useCurrentSpace();
|
|
272
|
-
return <ObjectsPanel space={space} />;
|
|
273
|
-
},
|
|
274
|
-
}),
|
|
275
|
-
createSurface({
|
|
276
|
-
id: `${meta.id}/echo/schema`,
|
|
277
|
-
role: 'article',
|
|
278
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Schema,
|
|
279
|
-
component: () => {
|
|
280
|
-
const space = useCurrentSpace();
|
|
281
|
-
return <SchemaPanel space={space} />;
|
|
282
|
-
},
|
|
283
|
-
}),
|
|
284
|
-
createSurface({
|
|
285
|
-
id: `${meta.id}/echo/automerge`,
|
|
286
|
-
role: 'article',
|
|
287
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Automerge,
|
|
288
|
-
component: () => {
|
|
289
|
-
const space = useCurrentSpace();
|
|
290
|
-
return <AutomergePanel space={space} />;
|
|
291
|
-
},
|
|
292
|
-
}),
|
|
293
|
-
createSurface({
|
|
294
|
-
id: `${meta.id}/echo/queues`,
|
|
295
|
-
role: 'article',
|
|
296
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Queues,
|
|
297
|
-
component: () => <QueuesPanel />,
|
|
298
|
-
}),
|
|
299
|
-
createSurface({
|
|
300
|
-
id: `${meta.id}/echo/members`,
|
|
301
|
-
role: 'article',
|
|
302
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Members,
|
|
303
|
-
component: () => {
|
|
304
|
-
const space = useCurrentSpace();
|
|
305
|
-
return <MembersPanel space={space} />;
|
|
306
|
-
},
|
|
307
|
-
}),
|
|
308
|
-
createSurface({
|
|
309
|
-
id: `${meta.id}/echo/metadata`,
|
|
310
|
-
role: 'article',
|
|
311
|
-
filter: (data): data is any => data.subject === Devtools.Echo.Metadata,
|
|
312
|
-
component: () => <MetadataPanel />,
|
|
313
|
-
}),
|
|
314
|
-
createSurface({
|
|
315
|
-
id: `${meta.id}/mesh/signal`,
|
|
316
|
-
role: 'article',
|
|
317
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Signal,
|
|
318
|
-
component: () => <SignalPanel />,
|
|
319
|
-
}),
|
|
320
|
-
createSurface({
|
|
321
|
-
id: `${meta.id}/mesh/swarm`,
|
|
322
|
-
role: 'article',
|
|
323
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Swarm,
|
|
324
|
-
component: () => <SwarmPanel />,
|
|
325
|
-
}),
|
|
326
|
-
createSurface({
|
|
327
|
-
id: `${meta.id}/mesh/network`,
|
|
328
|
-
role: 'article',
|
|
329
|
-
filter: (data): data is any => data.subject === Devtools.Mesh.Network,
|
|
330
|
-
component: () => {
|
|
331
|
-
const space = useCurrentSpace();
|
|
332
|
-
return <NetworkPanel space={space} />;
|
|
333
|
-
},
|
|
334
|
-
}),
|
|
335
|
-
// TODO(wittjosiah): Remove?
|
|
336
|
-
// createSurface({
|
|
337
|
-
// id: `${meta.id}/agent/dashboard`,
|
|
338
|
-
// role: 'article',
|
|
339
|
-
// filter: (data): data is any => data.subject === Devtools.Agent.Dashboard,
|
|
340
|
-
// component: () => <DashboardPanel />,
|
|
341
|
-
// }),
|
|
342
|
-
createSurface({
|
|
343
|
-
id: `${meta.id}/edge/dashboard`,
|
|
344
|
-
role: 'article',
|
|
345
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Dashboard,
|
|
346
|
-
component: () => <EdgeDashboardPanel />,
|
|
347
|
-
}),
|
|
348
|
-
createSurface({
|
|
349
|
-
id: `${meta.id}/edge/workflows`,
|
|
350
|
-
role: 'article',
|
|
351
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Workflows,
|
|
352
|
-
component: () => {
|
|
353
|
-
const space = useCurrentSpace();
|
|
354
|
-
return <WorkflowPanel space={space} />;
|
|
355
|
-
},
|
|
356
|
-
}),
|
|
357
|
-
createSurface({
|
|
358
|
-
id: `${meta.id}/edge/traces`,
|
|
359
|
-
role: 'article',
|
|
360
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Traces,
|
|
361
|
-
component: () => {
|
|
362
|
-
const space = useCurrentSpace();
|
|
363
|
-
return <InvocationTraceContainer space={space} detailAxis='block' />;
|
|
364
|
-
},
|
|
365
|
-
}),
|
|
366
|
-
createSurface({
|
|
367
|
-
id: `${meta.id}/edge/testing`,
|
|
368
|
-
role: 'article',
|
|
369
|
-
filter: (data): data is any => data.subject === Devtools.Edge.Testing,
|
|
370
|
-
component: () => {
|
|
371
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
372
|
-
const onSpaceCreate = useCallback(
|
|
373
|
-
async (space: Space) => {
|
|
374
|
-
await space.waitUntilReady();
|
|
375
|
-
await dispatch(createIntent(SpaceAction.Migrate, { space }));
|
|
376
|
-
await space.db.flush();
|
|
377
|
-
},
|
|
378
|
-
[dispatch],
|
|
379
|
-
);
|
|
380
|
-
const onScriptPluginOpen = useCallback(
|
|
381
|
-
async (space: Space) => {
|
|
382
|
-
await space.waitUntilReady();
|
|
383
|
-
const result = await dispatch(
|
|
384
|
-
Function.pipe(
|
|
385
|
-
createIntent(ScriptAction.CreateScript, { space }),
|
|
386
|
-
chain(SpaceAction.AddObject, { target: space }),
|
|
387
|
-
),
|
|
388
|
-
);
|
|
389
|
-
log.info('script created', { result });
|
|
390
|
-
await dispatch(
|
|
391
|
-
createIntent(LayoutAction.Open, { part: 'main', subject: [`${space.id}:${result.data?.object.id}`] }),
|
|
392
|
-
);
|
|
393
|
-
},
|
|
394
|
-
[dispatch],
|
|
395
|
-
);
|
|
396
|
-
return <TestingPanel onSpaceCreate={onSpaceCreate} onScriptPluginOpen={onScriptPluginOpen} />;
|
|
397
|
-
},
|
|
398
|
-
}),
|
|
399
|
-
]);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
import { type DebugSettingsProps, DebugSettingsSchema } from '../types';
|
|
10
|
-
|
|
11
|
-
export default () => {
|
|
12
|
-
const settings = live<DebugSettingsProps>({});
|
|
13
|
-
|
|
14
|
-
return contributes(Capabilities.Settings, {
|
|
15
|
-
prefix: meta.id,
|
|
16
|
-
schema: DebugSettingsSchema,
|
|
17
|
-
value: settings,
|
|
18
|
-
});
|
|
19
|
-
};
|