@dxos/plugin-debug 0.8.2-staging.7ac8446 → 0.8.2
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/DebugApp-WSEJPCKY.mjs +225 -0
- package/dist/lib/browser/{DebugApp-7PFYN52J.mjs.map → DebugApp-WSEJPCKY.mjs.map} +1 -1
- package/dist/lib/browser/DevtoolsOverviewContainer-IIIWO77Q.mjs +25 -0
- package/dist/lib/browser/DevtoolsOverviewContainer-IIIWO77Q.mjs.map +7 -0
- package/dist/lib/browser/{SpaceGenerator-NBOQZ4JF.mjs → SpaceGenerator-RHQLPN44.mjs} +254 -242
- package/dist/lib/browser/SpaceGenerator-RHQLPN44.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-ALFPRSAR.mjs → app-graph-builder-PIPBIN6P.mjs} +115 -88
- package/dist/lib/browser/app-graph-builder-PIPBIN6P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RORUXVAC.mjs → chunk-47JOZTT2.mjs} +1 -4
- package/dist/lib/browser/{chunk-RORUXVAC.mjs.map → chunk-47JOZTT2.mjs.map} +3 -3
- package/dist/lib/browser/chunk-KS3YBEL7.mjs +68 -0
- package/dist/lib/browser/chunk-KS3YBEL7.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +7 -5
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-context-ZRLN5KUI.mjs → react-context-ZQRD2WG2.mjs} +2 -2
- package/dist/lib/browser/{react-surface-MXXLOQYV.mjs → react-surface-PHUWS5WD.mjs} +318 -288
- package/dist/lib/browser/react-surface-PHUWS5WD.mjs.map +7 -0
- package/dist/lib/browser/{settings-AP74NCXH.mjs → settings-N4Q6YB7L.mjs} +5 -5
- package/dist/lib/browser/settings-N4Q6YB7L.mjs.map +7 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -178
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Container.d.ts.map +1 -1
- package/dist/types/src/components/DebugApp/Tree.d.ts.map +1 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts +2 -2
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/components/DebugStatus.d.ts.map +1 -1
- package/dist/types/src/components/DevtoolsOverviewContainer.d.ts +4 -0
- package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +1 -0
- 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/SchemaTable.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/draw-util.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts +1 -1
- 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 +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +5 -4
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +60 -53
- package/src/capabilities/app-graph-builder.ts +418 -374
- package/src/capabilities/react-surface.tsx +43 -19
- package/src/capabilities/settings.ts +2 -2
- package/src/components/DebugObjectPanel.tsx +2 -2
- package/src/components/DebugStatus.tsx +4 -29
- package/src/components/DevtoolsOverviewContainer.tsx +20 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +11 -16
- package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +1 -1
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +9 -9
- package/src/components/SpaceGenerator/presets.ts +20 -18
- package/src/components/Wireframe.tsx +2 -2
- package/src/components/index.ts +1 -0
- package/src/meta.ts +0 -1
- package/src/translations.ts +2 -0
- package/src/types.ts +6 -5
- package/dist/lib/browser/DebugApp-7PFYN52J.mjs +0 -182
- package/dist/lib/browser/SpaceGenerator-NBOQZ4JF.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-ALFPRSAR.mjs.map +0 -7
- package/dist/lib/browser/chunk-TCEHALD4.mjs +0 -73
- package/dist/lib/browser/chunk-TCEHALD4.mjs.map +0 -7
- package/dist/lib/browser/react-surface-MXXLOQYV.mjs.map +0 -7
- package/dist/lib/browser/settings-AP74NCXH.mjs.map +0 -7
- /package/dist/lib/browser/{react-context-ZRLN5KUI.mjs.map → react-context-ZQRD2WG2.mjs.map} +0 -0
|
@@ -2,412 +2,456 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
+
import { Option, pipe } from 'effect';
|
|
7
|
+
|
|
8
|
+
import { contributes, Capabilities, type PluginContext } from '@dxos/app-framework';
|
|
9
|
+
import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
10
|
+
import { createExtension, ROOT_ID, rxFromSignal } from '@dxos/plugin-graph';
|
|
11
|
+
import { getActiveSpace, SPACE_PLUGIN } from '@dxos/plugin-space';
|
|
12
|
+
import { isEchoObject } from '@dxos/react-client/echo';
|
|
10
13
|
|
|
11
14
|
import { DEBUG_PLUGIN } from '../meta';
|
|
12
15
|
import { Devtools } from '../types';
|
|
13
16
|
|
|
14
17
|
const DEVTOOLS_TYPE = 'dxos.org/plugin/debug/devtools';
|
|
15
18
|
|
|
16
|
-
export default (context:
|
|
19
|
+
export default (context: PluginContext) =>
|
|
17
20
|
contributes(Capabilities.AppGraphBuilder, [
|
|
18
21
|
// Devtools node.
|
|
19
22
|
createExtension({
|
|
20
23
|
id: 'dxos.org/plugin/debug/devtools',
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Not adding the debug node until the root collection is available aligns the behaviour of this
|
|
34
|
-
// extension with that of the space plugin adding objects. This ensures that the debug node is added at
|
|
35
|
-
// the same time as objects and prevents order from changing as the nodes are added.
|
|
36
|
-
const collection = space?.properties[CollectionType.typename]?.target as CollectionType | undefined;
|
|
37
|
-
if (node.id !== 'root' && !collection) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
24
|
+
connector: (node) =>
|
|
25
|
+
Rx.make((get) =>
|
|
26
|
+
pipe(
|
|
27
|
+
get(node),
|
|
28
|
+
Option.flatMap((node) =>
|
|
29
|
+
node.id === ROOT_ID || node.type === `${SPACE_PLUGIN}/settings` ? Option.some(node) : Option.none(),
|
|
30
|
+
),
|
|
31
|
+
Option.map((node) => {
|
|
32
|
+
const space = get(rxFromSignal(() => getActiveSpace(context)));
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
34
|
+
return [
|
|
35
|
+
{
|
|
36
|
+
id: `${Devtools.id}-${node.id}`,
|
|
37
|
+
data: null,
|
|
38
|
+
type: DEVTOOLS_TYPE,
|
|
39
|
+
properties: {
|
|
40
|
+
label: ['devtools label', { ns: DEBUG_PLUGIN }],
|
|
41
|
+
icon: 'ph--hammer--regular',
|
|
42
|
+
disposition: 'pin-end',
|
|
43
|
+
position: 'fallback',
|
|
44
|
+
},
|
|
45
|
+
nodes: [
|
|
46
|
+
...(space && node.type === `${SPACE_PLUGIN}/settings`
|
|
47
|
+
? [
|
|
48
|
+
{
|
|
49
|
+
id: `debug-${node.id}`,
|
|
50
|
+
type: 'dxos.org/plugin/debug/space',
|
|
51
|
+
data: { space, type: 'dxos.org/plugin/debug/space' },
|
|
52
|
+
properties: {
|
|
53
|
+
label: ['debug label', { ns: DEBUG_PLUGIN }],
|
|
54
|
+
icon: 'ph--bug--regular',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
]
|
|
58
|
+
: []),
|
|
54
59
|
{
|
|
55
|
-
id: `${
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
id: `${Devtools.Client.id}-${node.id}`,
|
|
61
|
+
data: null,
|
|
62
|
+
type: DEVTOOLS_TYPE,
|
|
58
63
|
properties: {
|
|
59
|
-
label: ['
|
|
60
|
-
icon: 'ph--
|
|
64
|
+
label: ['client label', { ns: DEBUG_PLUGIN }],
|
|
65
|
+
icon: 'ph--users--regular',
|
|
61
66
|
},
|
|
67
|
+
nodes: [
|
|
68
|
+
{
|
|
69
|
+
id: `${Devtools.Client.Config}-${node.id}`,
|
|
70
|
+
data: Devtools.Client.Config,
|
|
71
|
+
type: DEVTOOLS_TYPE,
|
|
72
|
+
properties: {
|
|
73
|
+
label: ['config label', { ns: DEBUG_PLUGIN }],
|
|
74
|
+
icon: 'ph--gear--regular',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: `${Devtools.Client.Storage}-${node.id}`,
|
|
79
|
+
data: Devtools.Client.Storage,
|
|
80
|
+
type: DEVTOOLS_TYPE,
|
|
81
|
+
properties: {
|
|
82
|
+
label: ['storage label', { ns: DEBUG_PLUGIN }],
|
|
83
|
+
icon: 'ph--hard-drives--regular',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: `${Devtools.Client.Logs}-${node.id}`,
|
|
88
|
+
data: Devtools.Client.Logs,
|
|
89
|
+
type: DEVTOOLS_TYPE,
|
|
90
|
+
properties: {
|
|
91
|
+
label: ['logs label', { ns: DEBUG_PLUGIN }],
|
|
92
|
+
icon: 'ph--file-text--regular',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: `${Devtools.Client.Diagnostics}-${node.id}`,
|
|
97
|
+
data: Devtools.Client.Diagnostics,
|
|
98
|
+
type: DEVTOOLS_TYPE,
|
|
99
|
+
properties: {
|
|
100
|
+
label: ['diagnostics label', { ns: DEBUG_PLUGIN }],
|
|
101
|
+
icon: 'ph--chart-line--regular',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: `${Devtools.Client.Tracing}-${node.id}`,
|
|
106
|
+
data: Devtools.Client.Tracing,
|
|
107
|
+
type: DEVTOOLS_TYPE,
|
|
108
|
+
properties: {
|
|
109
|
+
label: ['tracing label', { ns: DEBUG_PLUGIN }],
|
|
110
|
+
icon: 'ph--fire--regular',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
],
|
|
62
114
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
115
|
+
{
|
|
116
|
+
id: `${Devtools.Halo.id}-${node.id}`,
|
|
117
|
+
data: null,
|
|
118
|
+
type: DEVTOOLS_TYPE,
|
|
119
|
+
properties: {
|
|
120
|
+
label: ['halo label', { ns: DEBUG_PLUGIN }],
|
|
121
|
+
icon: 'ph--identification-badge--regular',
|
|
122
|
+
},
|
|
123
|
+
nodes: [
|
|
124
|
+
{
|
|
125
|
+
id: `${Devtools.Halo.Identity}-${node.id}`,
|
|
126
|
+
data: Devtools.Halo.Identity,
|
|
127
|
+
type: DEVTOOLS_TYPE,
|
|
128
|
+
properties: {
|
|
129
|
+
label: ['identity label', { ns: DEBUG_PLUGIN }],
|
|
130
|
+
icon: 'ph--identification-badge--regular',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: `${Devtools.Halo.Devices}-${node.id}`,
|
|
135
|
+
data: Devtools.Halo.Devices,
|
|
136
|
+
type: DEVTOOLS_TYPE,
|
|
137
|
+
properties: {
|
|
138
|
+
label: ['devices label', { ns: DEBUG_PLUGIN }],
|
|
139
|
+
icon: 'ph--devices--regular',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: `${Devtools.Halo.Keyring}-${node.id}`,
|
|
144
|
+
data: Devtools.Halo.Keyring,
|
|
145
|
+
type: DEVTOOLS_TYPE,
|
|
146
|
+
properties: {
|
|
147
|
+
label: ['keyring label', { ns: DEBUG_PLUGIN }],
|
|
148
|
+
icon: 'ph--key--regular',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
id: `${Devtools.Halo.Credentials}-${node.id}`,
|
|
153
|
+
data: Devtools.Halo.Credentials,
|
|
154
|
+
type: DEVTOOLS_TYPE,
|
|
155
|
+
properties: {
|
|
156
|
+
label: ['credentials label', { ns: DEBUG_PLUGIN }],
|
|
157
|
+
icon: 'ph--credit-card--regular',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
],
|
|
90
161
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
162
|
+
{
|
|
163
|
+
id: `${Devtools.Echo.id}-${node.id}`,
|
|
164
|
+
data: null,
|
|
165
|
+
type: DEVTOOLS_TYPE,
|
|
166
|
+
properties: {
|
|
167
|
+
label: ['echo label', { ns: DEBUG_PLUGIN }],
|
|
168
|
+
icon: 'ph--database--regular',
|
|
169
|
+
},
|
|
170
|
+
nodes: [
|
|
171
|
+
{
|
|
172
|
+
id: `${Devtools.Echo.Spaces}-${node.id}`,
|
|
173
|
+
data: Devtools.Echo.Spaces,
|
|
174
|
+
type: DEVTOOLS_TYPE,
|
|
175
|
+
properties: {
|
|
176
|
+
label: ['spaces label', { ns: DEBUG_PLUGIN }],
|
|
177
|
+
icon: 'ph--graph--regular',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: `${Devtools.Echo.Space}-${node.id}`,
|
|
182
|
+
data: Devtools.Echo.Space,
|
|
183
|
+
type: DEVTOOLS_TYPE,
|
|
184
|
+
properties: {
|
|
185
|
+
label: ['space label', { ns: DEBUG_PLUGIN }],
|
|
186
|
+
icon: 'ph--planet--regular',
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
id: `${Devtools.Echo.Feeds}-${node.id}`,
|
|
191
|
+
data: Devtools.Echo.Feeds,
|
|
192
|
+
type: DEVTOOLS_TYPE,
|
|
193
|
+
properties: {
|
|
194
|
+
label: ['feeds label', { ns: DEBUG_PLUGIN }],
|
|
195
|
+
icon: 'ph--list-bullets--regular',
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: `${Devtools.Echo.Objects}-${node.id}`,
|
|
200
|
+
data: Devtools.Echo.Objects,
|
|
201
|
+
type: DEVTOOLS_TYPE,
|
|
202
|
+
properties: {
|
|
203
|
+
label: ['objects label', { ns: DEBUG_PLUGIN }],
|
|
204
|
+
icon: 'ph--cube--regular',
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: `${Devtools.Echo.Schema}-${node.id}`,
|
|
209
|
+
data: Devtools.Echo.Schema,
|
|
210
|
+
type: DEVTOOLS_TYPE,
|
|
211
|
+
properties: {
|
|
212
|
+
label: ['schema label', { ns: DEBUG_PLUGIN }],
|
|
213
|
+
icon: 'ph--database--regular',
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: `${Devtools.Echo.Automerge}-${node.id}`,
|
|
218
|
+
data: Devtools.Echo.Automerge,
|
|
219
|
+
type: DEVTOOLS_TYPE,
|
|
220
|
+
properties: {
|
|
221
|
+
label: ['automerge label', { ns: DEBUG_PLUGIN }],
|
|
222
|
+
icon: 'ph--gear-six--regular',
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: `${Devtools.Echo.Queues}-${node.id}`,
|
|
227
|
+
data: Devtools.Echo.Queues,
|
|
228
|
+
type: DEVTOOLS_TYPE,
|
|
229
|
+
properties: {
|
|
230
|
+
label: ['queues label', { ns: DEBUG_PLUGIN }],
|
|
231
|
+
icon: 'ph--queue--regular',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: `${Devtools.Echo.Members}-${node.id}`,
|
|
236
|
+
data: Devtools.Echo.Members,
|
|
237
|
+
type: DEVTOOLS_TYPE,
|
|
238
|
+
properties: {
|
|
239
|
+
label: ['members label', { ns: DEBUG_PLUGIN }],
|
|
240
|
+
icon: 'ph--users--regular',
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: `${Devtools.Echo.Metadata}-${node.id}`,
|
|
245
|
+
data: Devtools.Echo.Metadata,
|
|
246
|
+
type: DEVTOOLS_TYPE,
|
|
247
|
+
properties: {
|
|
248
|
+
label: ['metadata label', { ns: DEBUG_PLUGIN }],
|
|
249
|
+
icon: 'ph--hard-drive--regular',
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
],
|
|
99
253
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
254
|
+
{
|
|
255
|
+
id: `${Devtools.Mesh.id}-${node.id}`,
|
|
256
|
+
data: null,
|
|
257
|
+
type: DEVTOOLS_TYPE,
|
|
258
|
+
properties: {
|
|
259
|
+
label: ['mesh label', { ns: DEBUG_PLUGIN }],
|
|
260
|
+
icon: 'ph--graph--regular',
|
|
261
|
+
},
|
|
262
|
+
nodes: [
|
|
263
|
+
{
|
|
264
|
+
id: `${Devtools.Mesh.Signal}-${node.id}`,
|
|
265
|
+
data: Devtools.Mesh.Signal,
|
|
266
|
+
type: DEVTOOLS_TYPE,
|
|
267
|
+
properties: {
|
|
268
|
+
label: ['signal label', { ns: DEBUG_PLUGIN }],
|
|
269
|
+
icon: 'ph--wifi-high--regular',
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
id: `${Devtools.Mesh.Swarm}-${node.id}`,
|
|
274
|
+
data: Devtools.Mesh.Swarm,
|
|
275
|
+
type: DEVTOOLS_TYPE,
|
|
276
|
+
properties: {
|
|
277
|
+
label: ['swarm label', { ns: DEBUG_PLUGIN }],
|
|
278
|
+
icon: 'ph--users-three--regular',
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
id: `${Devtools.Mesh.Network}-${node.id}`,
|
|
283
|
+
data: Devtools.Mesh.Network,
|
|
284
|
+
type: DEVTOOLS_TYPE,
|
|
285
|
+
properties: {
|
|
286
|
+
label: ['network label', { ns: DEBUG_PLUGIN }],
|
|
287
|
+
icon: 'ph--polygon--regular',
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
],
|
|
108
291
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
id: `${
|
|
112
|
-
data:
|
|
113
|
-
type: DEVTOOLS_TYPE,
|
|
114
|
-
properties: {
|
|
115
|
-
|
|
116
|
-
|
|
292
|
+
// TODO(wittjosiah): Remove?
|
|
293
|
+
// {
|
|
294
|
+
// id: `${prefix}-${Devtools.Agent.id}`,
|
|
295
|
+
// data: null,
|
|
296
|
+
// type: DEVTOOLS_TYPE,
|
|
297
|
+
// properties: {
|
|
298
|
+
// label: ['agent label', { ns: DEBUG_PLUGIN }],
|
|
299
|
+
// icon: 'ph--robot--regular',
|
|
300
|
+
// },
|
|
301
|
+
// nodes: [
|
|
302
|
+
// {
|
|
303
|
+
// id: `${prefix}-${Devtools.Agent.Dashboard}`,
|
|
304
|
+
// data: Devtools.Agent.Dashboard,
|
|
305
|
+
// type: DEVTOOLS_TYPE,
|
|
306
|
+
// properties: {
|
|
307
|
+
// label: ['dashboard label', { ns: DEBUG_PLUGIN }],
|
|
308
|
+
// icon: 'ph--computer-tower--regular',
|
|
309
|
+
// },
|
|
310
|
+
// },
|
|
311
|
+
// ],
|
|
312
|
+
// },
|
|
313
|
+
{
|
|
314
|
+
id: `${Devtools.Edge.id}-${node.id}`,
|
|
315
|
+
data: null,
|
|
316
|
+
type: DEVTOOLS_TYPE,
|
|
317
|
+
properties: {
|
|
318
|
+
label: ['edge label', { ns: DEBUG_PLUGIN }],
|
|
319
|
+
icon: 'ph--cloud--regular',
|
|
320
|
+
},
|
|
321
|
+
nodes: [
|
|
322
|
+
{
|
|
323
|
+
id: `${Devtools.Edge.Dashboard}-${node.id}`,
|
|
324
|
+
data: Devtools.Edge.Dashboard,
|
|
325
|
+
type: DEVTOOLS_TYPE,
|
|
326
|
+
properties: {
|
|
327
|
+
label: ['dashboard label', { ns: DEBUG_PLUGIN }],
|
|
328
|
+
icon: 'ph--computer-tower--regular',
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: `${Devtools.Edge.Workflows}-${node.id}`,
|
|
333
|
+
data: Devtools.Edge.Workflows,
|
|
334
|
+
type: DEVTOOLS_TYPE,
|
|
335
|
+
properties: {
|
|
336
|
+
label: ['workflows label', { ns: DEBUG_PLUGIN }],
|
|
337
|
+
icon: 'ph--function--regular',
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: `${Devtools.Edge.Traces}-${node.id}`,
|
|
342
|
+
data: Devtools.Edge.Traces,
|
|
343
|
+
type: DEVTOOLS_TYPE,
|
|
344
|
+
properties: {
|
|
345
|
+
label: ['traces label', { ns: DEBUG_PLUGIN }],
|
|
346
|
+
icon: 'ph--line-segments--regular',
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
id: `${Devtools.Edge.Testing}-${node.id}`,
|
|
351
|
+
data: Devtools.Edge.Testing,
|
|
352
|
+
type: DEVTOOLS_TYPE,
|
|
353
|
+
properties: {
|
|
354
|
+
label: ['testing label', { ns: DEBUG_PLUGIN }],
|
|
355
|
+
icon: 'ph--flask--regular',
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
],
|
|
117
359
|
},
|
|
118
|
-
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
id: `${node.id}-${Devtools.Halo.id}`,
|
|
123
|
-
data: null,
|
|
124
|
-
type: DEVTOOLS_TYPE,
|
|
125
|
-
properties: {
|
|
126
|
-
label: ['halo label', { ns: DEBUG_PLUGIN }],
|
|
127
|
-
icon: 'ph--identification-badge--regular',
|
|
360
|
+
],
|
|
128
361
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{
|
|
158
|
-
id: `${node.id}-${Devtools.Halo.Credentials}`,
|
|
159
|
-
data: Devtools.Halo.Credentials,
|
|
160
|
-
type: DEVTOOLS_TYPE,
|
|
161
|
-
properties: {
|
|
162
|
-
label: ['credentials label', { ns: DEBUG_PLUGIN }],
|
|
163
|
-
icon: 'ph--credit-card--regular',
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
],
|
|
167
|
-
},
|
|
362
|
+
];
|
|
363
|
+
}),
|
|
364
|
+
Option.getOrElse(() => []),
|
|
365
|
+
),
|
|
366
|
+
),
|
|
367
|
+
}),
|
|
368
|
+
|
|
369
|
+
// Debug node.
|
|
370
|
+
createExtension({
|
|
371
|
+
id: 'dxos.org/plugin/debug/debug',
|
|
372
|
+
connector: (node) =>
|
|
373
|
+
Rx.make((get) =>
|
|
374
|
+
pipe(
|
|
375
|
+
get(node),
|
|
376
|
+
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
377
|
+
Option.flatMap(() => {
|
|
378
|
+
const [graph] = get(context.capabilities(Capabilities.AppGraph));
|
|
379
|
+
return graph ? Option.some(graph) : Option.none();
|
|
380
|
+
}),
|
|
381
|
+
Option.flatMap((graph) => {
|
|
382
|
+
// TODO(wittjosiah): Plank is currently blank. Remove?
|
|
383
|
+
// const settings = context
|
|
384
|
+
// .requestCapabilities(Capabilities.SettingsStore)[0]
|
|
385
|
+
// ?.getStore<DebugSettingsProps>(DEBUG_PLUGIN)?.value;
|
|
386
|
+
// return !!settings?.debug && node.id === 'root';
|
|
387
|
+
return Option.none();
|
|
388
|
+
}),
|
|
389
|
+
Option.map((graph) => [
|
|
168
390
|
{
|
|
169
|
-
id:
|
|
170
|
-
|
|
171
|
-
|
|
391
|
+
id: 'dxos.org/plugin/debug/debug',
|
|
392
|
+
type: 'dxos.org/plugin/debug/debug',
|
|
393
|
+
data: { graph },
|
|
172
394
|
properties: {
|
|
173
|
-
label: ['
|
|
174
|
-
|
|
395
|
+
label: ['debug label', { ns: DEBUG_PLUGIN }],
|
|
396
|
+
disposition: 'navigation',
|
|
397
|
+
icon: 'ph--bug--regular',
|
|
175
398
|
},
|
|
176
|
-
nodes: [
|
|
177
|
-
{
|
|
178
|
-
id: `${node.id}-${Devtools.Echo.Spaces}`,
|
|
179
|
-
data: Devtools.Echo.Spaces,
|
|
180
|
-
type: DEVTOOLS_TYPE,
|
|
181
|
-
properties: {
|
|
182
|
-
label: ['spaces label', { ns: DEBUG_PLUGIN }],
|
|
183
|
-
icon: 'ph--graph--regular',
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
id: `${node.id}-${Devtools.Echo.Space}`,
|
|
188
|
-
data: Devtools.Echo.Space,
|
|
189
|
-
type: DEVTOOLS_TYPE,
|
|
190
|
-
properties: {
|
|
191
|
-
label: ['space label', { ns: DEBUG_PLUGIN }],
|
|
192
|
-
icon: 'ph--planet--regular',
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
id: `${node.id}-${Devtools.Echo.Feeds}`,
|
|
197
|
-
data: Devtools.Echo.Feeds,
|
|
198
|
-
type: DEVTOOLS_TYPE,
|
|
199
|
-
properties: {
|
|
200
|
-
label: ['feeds label', { ns: DEBUG_PLUGIN }],
|
|
201
|
-
icon: 'ph--list-bullets--regular',
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
id: `${node.id}-${Devtools.Echo.Objects}`,
|
|
206
|
-
data: Devtools.Echo.Objects,
|
|
207
|
-
type: DEVTOOLS_TYPE,
|
|
208
|
-
properties: {
|
|
209
|
-
label: ['objects label', { ns: DEBUG_PLUGIN }],
|
|
210
|
-
icon: 'ph--database--regular',
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
id: `${node.id}-${Devtools.Echo.Automerge}`,
|
|
215
|
-
data: Devtools.Echo.Automerge,
|
|
216
|
-
type: DEVTOOLS_TYPE,
|
|
217
|
-
properties: {
|
|
218
|
-
label: ['automerge label', { ns: DEBUG_PLUGIN }],
|
|
219
|
-
icon: 'ph--gear-six--regular',
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
id: `${node.id}-${Devtools.Echo.Queues}`,
|
|
224
|
-
data: Devtools.Echo.Queues,
|
|
225
|
-
type: DEVTOOLS_TYPE,
|
|
226
|
-
properties: {
|
|
227
|
-
label: ['queues label', { ns: DEBUG_PLUGIN }],
|
|
228
|
-
icon: 'ph--queue--regular',
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
id: `${node.id}-${Devtools.Echo.Members}`,
|
|
233
|
-
data: Devtools.Echo.Members,
|
|
234
|
-
type: DEVTOOLS_TYPE,
|
|
235
|
-
properties: {
|
|
236
|
-
label: ['members label', { ns: DEBUG_PLUGIN }],
|
|
237
|
-
icon: 'ph--users--regular',
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
id: `${node.id}-${Devtools.Echo.Metadata}`,
|
|
242
|
-
data: Devtools.Echo.Metadata,
|
|
243
|
-
type: DEVTOOLS_TYPE,
|
|
244
|
-
properties: {
|
|
245
|
-
label: ['metadata label', { ns: DEBUG_PLUGIN }],
|
|
246
|
-
icon: 'ph--hard-drive--regular',
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
399
|
},
|
|
400
|
+
]),
|
|
401
|
+
Option.getOrElse(() => []),
|
|
402
|
+
),
|
|
403
|
+
),
|
|
404
|
+
}),
|
|
405
|
+
|
|
406
|
+
// Debug object companion.
|
|
407
|
+
createExtension({
|
|
408
|
+
id: `${DEBUG_PLUGIN}/debug-object`,
|
|
409
|
+
connector: (node) =>
|
|
410
|
+
Rx.make((get) =>
|
|
411
|
+
pipe(
|
|
412
|
+
get(node),
|
|
413
|
+
Option.flatMap((node) => (isEchoObject(node.data) ? Option.some(node) : Option.none())),
|
|
414
|
+
Option.map((node) => [
|
|
251
415
|
{
|
|
252
|
-
id:
|
|
253
|
-
|
|
254
|
-
|
|
416
|
+
id: [node.id, 'debug'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
417
|
+
type: PLANK_COMPANION_TYPE,
|
|
418
|
+
data: 'debug',
|
|
255
419
|
properties: {
|
|
256
|
-
label: ['
|
|
257
|
-
icon: 'ph--
|
|
420
|
+
label: ['debug label', { ns: DEBUG_PLUGIN }],
|
|
421
|
+
icon: 'ph--bug--regular',
|
|
422
|
+
disposition: 'hidden',
|
|
423
|
+
position: 'fallback',
|
|
258
424
|
},
|
|
259
|
-
nodes: [
|
|
260
|
-
{
|
|
261
|
-
id: `${node.id}-${Devtools.Mesh.Signal}`,
|
|
262
|
-
data: Devtools.Mesh.Signal,
|
|
263
|
-
type: DEVTOOLS_TYPE,
|
|
264
|
-
properties: {
|
|
265
|
-
label: ['signal label', { ns: DEBUG_PLUGIN }],
|
|
266
|
-
icon: 'ph--wifi-high--regular',
|
|
267
|
-
},
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
id: `${node.id}-${Devtools.Mesh.Swarm}`,
|
|
271
|
-
data: Devtools.Mesh.Swarm,
|
|
272
|
-
type: DEVTOOLS_TYPE,
|
|
273
|
-
properties: {
|
|
274
|
-
label: ['swarm label', { ns: DEBUG_PLUGIN }],
|
|
275
|
-
icon: 'ph--users-three--regular',
|
|
276
|
-
},
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
id: `${node.id}-${Devtools.Mesh.Network}`,
|
|
280
|
-
data: Devtools.Mesh.Network,
|
|
281
|
-
type: DEVTOOLS_TYPE,
|
|
282
|
-
properties: {
|
|
283
|
-
label: ['network label', { ns: DEBUG_PLUGIN }],
|
|
284
|
-
icon: 'ph--polygon--regular',
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
],
|
|
288
425
|
},
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
// label: ['dashboard label', { ns: DEBUG_PLUGIN }],
|
|
305
|
-
// icon: 'ph--computer-tower--regular',
|
|
306
|
-
// },
|
|
307
|
-
// },
|
|
308
|
-
// ],
|
|
309
|
-
// },
|
|
426
|
+
]),
|
|
427
|
+
Option.getOrElse(() => []),
|
|
428
|
+
),
|
|
429
|
+
),
|
|
430
|
+
}),
|
|
431
|
+
|
|
432
|
+
// Devtools deck companion.
|
|
433
|
+
createExtension({
|
|
434
|
+
id: `${DEBUG_PLUGIN}/devtools-overview`,
|
|
435
|
+
connector: (node) =>
|
|
436
|
+
Rx.make((get) =>
|
|
437
|
+
pipe(
|
|
438
|
+
get(node),
|
|
439
|
+
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
440
|
+
Option.map((node) => [
|
|
310
441
|
{
|
|
311
|
-
id:
|
|
442
|
+
id: [node.id, 'devtools'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
443
|
+
type: DECK_COMPANION_TYPE,
|
|
312
444
|
data: null,
|
|
313
|
-
type: DEVTOOLS_TYPE,
|
|
314
445
|
properties: {
|
|
315
|
-
label: ['
|
|
316
|
-
icon: 'ph--
|
|
446
|
+
label: ['devtools overview label', { ns: DEBUG_PLUGIN }],
|
|
447
|
+
icon: 'ph--equalizer--regular',
|
|
448
|
+
disposition: 'hidden',
|
|
449
|
+
position: 'fallback',
|
|
317
450
|
},
|
|
318
|
-
nodes: [
|
|
319
|
-
{
|
|
320
|
-
id: `${node.id}-${Devtools.Edge.Dashboard}`,
|
|
321
|
-
data: Devtools.Edge.Dashboard,
|
|
322
|
-
type: DEVTOOLS_TYPE,
|
|
323
|
-
properties: {
|
|
324
|
-
label: ['dashboard label', { ns: DEBUG_PLUGIN }],
|
|
325
|
-
icon: 'ph--computer-tower--regular',
|
|
326
|
-
},
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
id: `${node.id}-${Devtools.Edge.Workflows}`,
|
|
330
|
-
data: Devtools.Edge.Workflows,
|
|
331
|
-
type: DEVTOOLS_TYPE,
|
|
332
|
-
properties: {
|
|
333
|
-
label: ['workflows label', { ns: DEBUG_PLUGIN }],
|
|
334
|
-
icon: 'ph--function--regular',
|
|
335
|
-
},
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
id: `${node.id}-${Devtools.Edge.Traces}`,
|
|
339
|
-
data: Devtools.Edge.Traces,
|
|
340
|
-
type: DEVTOOLS_TYPE,
|
|
341
|
-
properties: {
|
|
342
|
-
label: ['traces label', { ns: DEBUG_PLUGIN }],
|
|
343
|
-
icon: 'ph--line-segments--regular',
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
id: `${node.id}-${Devtools.Edge.Testing}`,
|
|
348
|
-
data: Devtools.Edge.Testing,
|
|
349
|
-
type: DEVTOOLS_TYPE,
|
|
350
|
-
properties: {
|
|
351
|
-
label: ['testing label', { ns: DEBUG_PLUGIN }],
|
|
352
|
-
icon: 'ph--flask--regular',
|
|
353
|
-
},
|
|
354
|
-
},
|
|
355
|
-
],
|
|
356
451
|
},
|
|
357
|
-
],
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
// Debug node.
|
|
364
|
-
createExtension({
|
|
365
|
-
id: 'dxos.org/plugin/debug/debug',
|
|
366
|
-
filter: (node): node is Node<null> => {
|
|
367
|
-
// TODO(wittjosiah): Plank is currently blank. Remove?
|
|
368
|
-
// const settings = context
|
|
369
|
-
// .requestCapabilities(Capabilities.SettingsStore)[0]
|
|
370
|
-
// ?.getStore<DebugSettingsProps>(DEBUG_PLUGIN)?.value;
|
|
371
|
-
// return !!settings?.debug && node.id === 'root';
|
|
372
|
-
return false;
|
|
373
|
-
},
|
|
374
|
-
connector: () => {
|
|
375
|
-
const [graph] = context.requestCapabilities(Capabilities.AppGraph);
|
|
376
|
-
if (!graph) {
|
|
377
|
-
return;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
return [
|
|
381
|
-
{
|
|
382
|
-
id: 'dxos.org/plugin/debug/debug',
|
|
383
|
-
type: 'dxos.org/plugin/debug/debug',
|
|
384
|
-
data: { graph },
|
|
385
|
-
properties: {
|
|
386
|
-
label: ['debug label', { ns: DEBUG_PLUGIN }],
|
|
387
|
-
disposition: 'navigation',
|
|
388
|
-
icon: 'ph--bug--regular',
|
|
389
|
-
},
|
|
390
|
-
},
|
|
391
|
-
];
|
|
392
|
-
},
|
|
393
|
-
}),
|
|
394
|
-
|
|
395
|
-
// Debug object companion.
|
|
396
|
-
createExtension({
|
|
397
|
-
id: `${DEBUG_PLUGIN}/debug-object`,
|
|
398
|
-
filter: (node): node is Node<ReactiveEchoObject<any>> => isEchoObject(node.data),
|
|
399
|
-
connector: ({ node }) => [
|
|
400
|
-
{
|
|
401
|
-
id: [node.id, 'debug'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
402
|
-
type: PLANK_COMPANION_TYPE,
|
|
403
|
-
data: 'debug',
|
|
404
|
-
properties: {
|
|
405
|
-
label: ['debug label', { ns: DEBUG_PLUGIN }],
|
|
406
|
-
icon: 'ph--bug--regular',
|
|
407
|
-
disposition: 'hidden',
|
|
408
|
-
position: 'fallback',
|
|
409
|
-
},
|
|
410
|
-
},
|
|
411
|
-
],
|
|
452
|
+
]),
|
|
453
|
+
Option.getOrElse(() => []),
|
|
454
|
+
),
|
|
455
|
+
),
|
|
412
456
|
}),
|
|
413
457
|
]);
|