@dxos/plugin-debug 0.8.4-main.1da679c → 0.8.4-main.21d9917

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