@dxos/plugin-devtools 0.10.0 → 0.11.0
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/README.md +3 -3
- package/dist/lib/DevtoolsPlugin.mjs +39 -0
- package/dist/lib/DevtoolsPlugin.mjs.map +1 -0
- package/dist/lib/DevtoolsPlugin.node.mjs +10 -0
- package/dist/lib/DevtoolsPlugin.node.mjs.map +1 -0
- package/dist/lib/DevtoolsPlugin.workerd.mjs +8 -0
- package/dist/lib/DevtoolsPlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +9 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-DebugGraph.mjs +20 -0
- package/dist/lib/chunk-DebugGraph.mjs.map +1 -0
- package/dist/lib/chunk-DevtoolsOverviewContainer.mjs +40 -0
- package/dist/lib/chunk-DevtoolsOverviewContainer.mjs.map +1 -0
- package/dist/lib/chunk-GithubPanel.mjs +158 -0
- package/dist/lib/chunk-GithubPanel.mjs.map +1 -0
- package/dist/lib/chunk-RegistryPanel.mjs +124 -0
- package/dist/lib/chunk-RegistryPanel.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +371 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-QCL4JV4T.mjs → chunk-meta.mjs} +16 -25
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-react-context.mjs +16 -0
- package/dist/lib/chunk-react-context.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +252 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +92 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/containers.mjs +10 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/index.mjs +3 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/plugin.mjs +8 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/translations.mjs +55 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts +18 -0
- package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +1 -1
- package/dist/types/src/translations.d.ts +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +77 -79
- package/src/DevtoolsPlugin.tsx +1 -1
- package/src/capabilities/DevtoolsSurfaces.tsx +100 -0
- package/src/capabilities/app-graph-builder.ts +3 -3
- package/src/capabilities/react-surface.ts +236 -0
- package/src/containers/DebugGraph/DebugGraph.tsx +12 -1
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +1 -1
- package/src/containers/GithubPanel/GithubComponent.tsx +1 -1
- package/src/containers/GithubPanel/GithubPanel.tsx +1 -1
- package/src/containers/RegistryPanel/RegistryPanel.tsx +15 -14
- package/src/translations.ts +1 -1
- package/dist/lib/neutral/DebugGraph-F7AMZXKW.mjs +0 -16
- package/dist/lib/neutral/DebugGraph-F7AMZXKW.mjs.map +0 -7
- package/dist/lib/neutral/DevtoolsOverviewContainer-DCNZFKK5.mjs +0 -51
- package/dist/lib/neutral/DevtoolsOverviewContainer-DCNZFKK5.mjs.map +0 -7
- package/dist/lib/neutral/DevtoolsPlugin.mjs +0 -55
- package/dist/lib/neutral/DevtoolsPlugin.mjs.map +0 -7
- package/dist/lib/neutral/DevtoolsPlugin.node.mjs +0 -16
- package/dist/lib/neutral/DevtoolsPlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/DevtoolsPlugin.workerd.mjs +0 -12
- package/dist/lib/neutral/DevtoolsPlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/GithubPanel-DWFZXZUK.mjs +0 -178
- package/dist/lib/neutral/GithubPanel-DWFZXZUK.mjs.map +0 -7
- package/dist/lib/neutral/RegistryPanel-CVETZUZV.mjs +0 -162
- package/dist/lib/neutral/RegistryPanel-CVETZUZV.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-KHZ65O2Q.mjs +0 -560
- package/dist/lib/neutral/app-graph-builder-KHZ65O2Q.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -13
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-PJNVAE7D.mjs +0 -81
- package/dist/lib/neutral/chunk-PJNVAE7D.mjs.map +0 -7
- package/dist/lib/neutral/chunk-QCL4JV4T.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -15
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -12
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -8
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -12
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-context-UJURDOO6.mjs +0 -17
- package/dist/lib/neutral/react-context-UJURDOO6.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-XILLHGRR.mjs +0 -332
- package/dist/lib/neutral/react-surface-XILLHGRR.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -65
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -8
- package/dist/lib/neutral/types/index.mjs.map +0 -7
- package/src/capabilities/react-surface.tsx +0 -331
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "DXOS developer inspector plugin.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"#capabilities": {
|
|
17
17
|
"source": "./src/capabilities/index.ts",
|
|
18
18
|
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
-
"default": "./dist/lib/
|
|
19
|
+
"default": "./dist/lib/capabilities.mjs"
|
|
20
20
|
},
|
|
21
21
|
"#containers": {
|
|
22
22
|
"source": "./src/containers/index.ts",
|
|
23
23
|
"types": "./dist/types/src/containers/index.d.ts",
|
|
24
|
-
"default": "./dist/lib/
|
|
24
|
+
"default": "./dist/lib/containers.mjs"
|
|
25
25
|
},
|
|
26
26
|
"#meta": {
|
|
27
27
|
"source": "./src/meta.ts",
|
|
28
28
|
"types": "./dist/types/src/meta.d.ts",
|
|
29
|
-
"default": "./dist/lib/
|
|
29
|
+
"default": "./dist/lib/meta.mjs"
|
|
30
30
|
},
|
|
31
31
|
"#plugin": {
|
|
32
32
|
"source": {
|
|
@@ -35,37 +35,37 @@
|
|
|
35
35
|
"default": "./src/DevtoolsPlugin.tsx"
|
|
36
36
|
},
|
|
37
37
|
"types": "./dist/types/src/DevtoolsPlugin.d.ts",
|
|
38
|
-
"workerd": "./dist/lib/
|
|
39
|
-
"node": "./dist/lib/
|
|
40
|
-
"default": "./dist/lib/
|
|
38
|
+
"workerd": "./dist/lib/DevtoolsPlugin.workerd.mjs",
|
|
39
|
+
"node": "./dist/lib/DevtoolsPlugin.node.mjs",
|
|
40
|
+
"default": "./dist/lib/DevtoolsPlugin.mjs"
|
|
41
41
|
},
|
|
42
42
|
"#translations": {
|
|
43
43
|
"source": "./src/translations.ts",
|
|
44
44
|
"types": "./dist/types/src/translations.d.ts",
|
|
45
|
-
"default": "./dist/lib/
|
|
45
|
+
"default": "./dist/lib/translations.mjs"
|
|
46
46
|
},
|
|
47
47
|
"#types": {
|
|
48
48
|
"source": "./src/types/index.ts",
|
|
49
49
|
"types": "./dist/types/src/types/index.d.ts",
|
|
50
|
-
"default": "./dist/lib/
|
|
50
|
+
"default": "./dist/lib/types.mjs"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"exports": {
|
|
54
54
|
".": {
|
|
55
55
|
"source": "./src/index.ts",
|
|
56
56
|
"types": "./dist/types/src/index.d.ts",
|
|
57
|
-
"
|
|
57
|
+
"import": "./dist/lib/index.mjs"
|
|
58
58
|
},
|
|
59
59
|
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
60
60
|
"./plugin": {
|
|
61
61
|
"source": "./src/plugin.ts",
|
|
62
62
|
"types": "./dist/types/src/plugin.d.ts",
|
|
63
|
-
"
|
|
63
|
+
"import": "./dist/lib/plugin.mjs"
|
|
64
64
|
},
|
|
65
65
|
"./translations": {
|
|
66
66
|
"source": "./src/translations.ts",
|
|
67
67
|
"types": "./dist/types/src/translations.d.ts",
|
|
68
|
-
"
|
|
68
|
+
"import": "./dist/lib/translations.mjs"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -76,78 +76,76 @@
|
|
|
76
76
|
"PLUGIN.mdl"
|
|
77
77
|
],
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@antv/graphlib": "
|
|
80
|
-
"@antv/layout": "
|
|
81
|
-
"@
|
|
82
|
-
"
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/plugin-
|
|
101
|
-
"@dxos/plugin-
|
|
102
|
-
"@dxos/
|
|
103
|
-
"@dxos/plugin-
|
|
104
|
-
"@dxos/plugin-
|
|
105
|
-
"@dxos/plugin-
|
|
106
|
-
"@dxos/plugin-space": "
|
|
107
|
-
"@dxos/plugin-status-bar": "
|
|
108
|
-
"@dxos/protocols": "
|
|
109
|
-
"@dxos/random": "
|
|
110
|
-
"@dxos/react-client": "
|
|
111
|
-
"@dxos/react-ui-attention": "
|
|
112
|
-
"@dxos/react-ui-canvas-compute": "
|
|
113
|
-
"@dxos/react-ui-canvas-editor": "
|
|
114
|
-
"@dxos/react-ui-form": "
|
|
115
|
-
"@dxos/react-ui-introspect": "
|
|
116
|
-
"@dxos/react-ui-syntax-highlighter": "
|
|
117
|
-
"@dxos/react-ui-table": "
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/
|
|
122
|
-
"@
|
|
123
|
-
"@tldraw/tldraw": "catalog:",
|
|
124
|
-
"react-resize-detector": "catalog:"
|
|
79
|
+
"@antv/graphlib": "^2.0.4",
|
|
80
|
+
"@antv/layout": "^1.2.13",
|
|
81
|
+
"@tldraw/tldraw": "^3.0.0",
|
|
82
|
+
"react-resize-detector": "^11.0.1",
|
|
83
|
+
"@dxos/app-toolkit": "0.11.0",
|
|
84
|
+
"@dxos/app-framework": "0.11.0",
|
|
85
|
+
"@dxos/assistant-toolkit": "0.11.0",
|
|
86
|
+
"@dxos/client-services": "0.11.0",
|
|
87
|
+
"@dxos/async": "0.11.0",
|
|
88
|
+
"@dxos/compute-hyperformula": "0.11.0",
|
|
89
|
+
"@dxos/conductor": "0.11.0",
|
|
90
|
+
"@dxos/config": "0.11.0",
|
|
91
|
+
"@dxos/compute": "0.11.0",
|
|
92
|
+
"@dxos/devtools": "0.11.0",
|
|
93
|
+
"@dxos/echo": "0.11.0",
|
|
94
|
+
"@dxos/echo-host": "0.11.0",
|
|
95
|
+
"@dxos/effect": "0.11.0",
|
|
96
|
+
"@dxos/invariant": "0.11.0",
|
|
97
|
+
"@dxos/keys": "0.11.0",
|
|
98
|
+
"@dxos/log": "0.11.0",
|
|
99
|
+
"@dxos/log-store-idb": "0.11.0",
|
|
100
|
+
"@dxos/plugin-client": "0.11.0",
|
|
101
|
+
"@dxos/plugin-graph": "0.11.0",
|
|
102
|
+
"@dxos/operation": "0.11.0",
|
|
103
|
+
"@dxos/plugin-inbox": "0.11.0",
|
|
104
|
+
"@dxos/plugin-script": "0.11.0",
|
|
105
|
+
"@dxos/plugin-markdown": "0.11.0",
|
|
106
|
+
"@dxos/plugin-space": "0.11.0",
|
|
107
|
+
"@dxos/plugin-status-bar": "0.11.0",
|
|
108
|
+
"@dxos/protocols": "0.11.0",
|
|
109
|
+
"@dxos/random": "0.11.0",
|
|
110
|
+
"@dxos/react-client": "0.11.0",
|
|
111
|
+
"@dxos/react-ui-attention": "0.11.0",
|
|
112
|
+
"@dxos/react-ui-canvas-compute": "0.11.0",
|
|
113
|
+
"@dxos/react-ui-canvas-editor": "0.11.0",
|
|
114
|
+
"@dxos/react-ui-form": "0.11.0",
|
|
115
|
+
"@dxos/react-ui-introspect": "0.11.0",
|
|
116
|
+
"@dxos/react-ui-syntax-highlighter": "0.11.0",
|
|
117
|
+
"@dxos/react-ui-table": "0.11.0",
|
|
118
|
+
"@dxos/plugin-sheet": "0.11.0",
|
|
119
|
+
"@dxos/schema": "0.11.0",
|
|
120
|
+
"@dxos/tracing": "0.11.0",
|
|
121
|
+
"@dxos/types": "0.11.0",
|
|
122
|
+
"@dxos/util": "0.11.0"
|
|
125
123
|
},
|
|
126
124
|
"devDependencies": {
|
|
127
|
-
"@
|
|
128
|
-
"@
|
|
129
|
-
"@
|
|
130
|
-
"@
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"react": "
|
|
137
|
-
"
|
|
138
|
-
"
|
|
125
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
126
|
+
"@effect/platform": "0.96.2",
|
|
127
|
+
"@types/react": "~19.2.17",
|
|
128
|
+
"@types/react-dom": "~19.2.3",
|
|
129
|
+
"effect": "3.21.4",
|
|
130
|
+
"react": "~19.2.7",
|
|
131
|
+
"react-dom": "~19.2.7",
|
|
132
|
+
"vite": "^8.1.4",
|
|
133
|
+
"@dxos/plugin-testing": "0.11.0",
|
|
134
|
+
"@dxos/react-ui": "0.11.0",
|
|
135
|
+
"@dxos/storybook-utils": "0.11.0",
|
|
136
|
+
"@dxos/ui-theme": "0.11.0"
|
|
139
137
|
},
|
|
140
138
|
"peerDependencies": {
|
|
141
|
-
"@
|
|
142
|
-
"@
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"react-
|
|
139
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
140
|
+
"@effect/platform": "0.96.2",
|
|
141
|
+
"effect": "3.21.4",
|
|
142
|
+
"react": "~19.2.7",
|
|
143
|
+
"react-dom": "~19.2.7",
|
|
144
|
+
"@dxos/random": "0.11.0",
|
|
145
|
+
"@dxos/ui-theme": "0.11.0",
|
|
146
|
+
"@dxos/react-ui": "0.11.0"
|
|
149
147
|
},
|
|
150
148
|
"publishConfig": {
|
|
151
149
|
"access": "public"
|
|
152
150
|
}
|
|
153
|
-
}
|
|
151
|
+
}
|
package/src/DevtoolsPlugin.tsx
CHANGED
|
@@ -40,7 +40,7 @@ const setupDevtools = () => {
|
|
|
40
40
|
|
|
41
41
|
// Used to test how composer handles breaking protocol changes.
|
|
42
42
|
(globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {
|
|
43
|
-
const { changeStorageVersionInMetadata } = await import('@dxos/
|
|
43
|
+
const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');
|
|
44
44
|
const { createStorageObjects } = await import('@dxos/client-services');
|
|
45
45
|
const client: Client = (window as any).dxos.client;
|
|
46
46
|
const config = client.config;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Surface components that cannot be expressed as a `props` mapper, because they call hooks.
|
|
6
|
+
|
|
7
|
+
import React, { type ComponentType, useCallback } from 'react';
|
|
8
|
+
|
|
9
|
+
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
10
|
+
import { GraphPath, LayoutOperation } from '@dxos/app-toolkit';
|
|
11
|
+
import { useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
12
|
+
import { InvocationTraceContainer, SpaceInfoPanel, SpaceListPanel, TestingPanel } from '@dxos/devtools';
|
|
13
|
+
import { Feed } from '@dxos/echo';
|
|
14
|
+
import { log } from '@dxos/log';
|
|
15
|
+
import { ScriptOperation } from '@dxos/plugin-script';
|
|
16
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
17
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
18
|
+
|
|
19
|
+
import { Devtools } from '#types';
|
|
20
|
+
|
|
21
|
+
export type ActiveSpacePanelProps = {
|
|
22
|
+
/** Stable module-level panel component; the surface passes it through its `props` mapper. */
|
|
23
|
+
Panel: ComponentType<{ space: Space }>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Most devtools panels take the active space and render nothing without one. A mapper cannot read
|
|
28
|
+
* the active space (it is a hook) nor decline to render, so they share this wrapper.
|
|
29
|
+
*/
|
|
30
|
+
export const ActiveSpacePanel = ({ Panel }: ActiveSpacePanelProps) => {
|
|
31
|
+
const space = useActiveSpace();
|
|
32
|
+
|
|
33
|
+
return space ? <Panel space={space} /> : null;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const SpaceListSurface = () => {
|
|
37
|
+
const { invokePromise } = useOperationInvoker();
|
|
38
|
+
const handleSelect = useCallback(
|
|
39
|
+
() => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Space] }),
|
|
40
|
+
[invokePromise],
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return <SpaceListPanel onSelect={handleSelect} />;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const SpaceInfoSurface = () => {
|
|
47
|
+
const space = useActiveSpace();
|
|
48
|
+
const { invokePromise } = useOperationInvoker();
|
|
49
|
+
const handleSelect = useCallback(
|
|
50
|
+
() => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Feeds] }),
|
|
51
|
+
[invokePromise],
|
|
52
|
+
);
|
|
53
|
+
if (!space) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return <SpaceInfoPanel space={space} onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const EdgeTracesSurface = () => {
|
|
61
|
+
const space = useActiveSpace();
|
|
62
|
+
if (!space) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const feed = space.properties.invocationTraceFeed?.target;
|
|
67
|
+
const feedDXN = feed ? Feed.getFeedUri(feed) : undefined;
|
|
68
|
+
|
|
69
|
+
return <InvocationTraceContainer db={space.db} feedDXN={feedDXN} detailAxis='block' />;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const EdgeTestingSurface = () => {
|
|
73
|
+
const { invokePromise } = useOperationInvoker();
|
|
74
|
+
const onSpaceCreate = useCallback(
|
|
75
|
+
async (space: Space) => {
|
|
76
|
+
await space.waitUntilReady();
|
|
77
|
+
await invokePromise(SpaceOperation.Migrate, { space });
|
|
78
|
+
await space.db.flush();
|
|
79
|
+
},
|
|
80
|
+
[invokePromise],
|
|
81
|
+
);
|
|
82
|
+
const onScriptPluginOpen = useCallback(
|
|
83
|
+
async (space: Space) => {
|
|
84
|
+
await space.waitUntilReady();
|
|
85
|
+
const createResult = await invokePromise(ScriptOperation.CreateScript, { db: space.db });
|
|
86
|
+
if (createResult.data?.object) {
|
|
87
|
+
await invokePromise(SpaceOperation.AddObject, { target: space.db, object: createResult.data.object });
|
|
88
|
+
}
|
|
89
|
+
log.info('script created', { result: createResult });
|
|
90
|
+
if (createResult.data?.object) {
|
|
91
|
+
await invokePromise(LayoutOperation.Open, {
|
|
92
|
+
subject: [GraphPath.getObjectPathFromObject(createResult.data.object)],
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
[invokePromise],
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
return <TestingPanel onSpaceCreate={onSpaceCreate} onScriptPluginOpen={onScriptPluginOpen} />;
|
|
100
|
+
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { AppCapabilities, AppNode, AppNodeMatcher,
|
|
8
|
+
import { AppCapabilities, AppNode, AppNodeMatcher, GraphPath } from '@dxos/app-toolkit';
|
|
9
9
|
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
10
10
|
import { type Space } from '@dxos/react-client/echo';
|
|
11
11
|
import { Position } from '@dxos/util';
|
|
@@ -37,7 +37,7 @@ export default Capability.makeModule(
|
|
|
37
37
|
|
|
38
38
|
GraphBuilder.createExtension({
|
|
39
39
|
id: 'devtools',
|
|
40
|
-
match: NodeMatcher.whenAny(NodeMatcher.whenRoot, AppNodeMatcher.whenNavTreeGroup(
|
|
40
|
+
match: NodeMatcher.whenAny(NodeMatcher.whenRoot, AppNodeMatcher.whenNavTreeGroup(GraphPath.GroupTypes.system)),
|
|
41
41
|
connector: (_nodeOrSpace: Node.Node | Space, get) =>
|
|
42
42
|
Effect.gen(function* () {
|
|
43
43
|
const [graph] = get(yield* Capability.atom(AppCapabilities.AppGraph));
|
|
@@ -112,7 +112,7 @@ export default Capability.makeModule(
|
|
|
112
112
|
data: Devtools.Client.Logs,
|
|
113
113
|
type: Devtools.id,
|
|
114
114
|
properties: {
|
|
115
|
-
label: ['
|
|
115
|
+
label: ['logging.label', { ns: meta.profile.key }],
|
|
116
116
|
icon: 'ph--file-text--regular',
|
|
117
117
|
},
|
|
118
118
|
}),
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
9
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
|
+
import { EDGE_SERVICE_DEFAULTS, EdgeServiceName } from '@dxos/config';
|
|
11
|
+
import {
|
|
12
|
+
AutomergePanel,
|
|
13
|
+
ConfigPanel,
|
|
14
|
+
CredentialsPanel,
|
|
15
|
+
DeviceListPanel,
|
|
16
|
+
DiagnosticsPanel,
|
|
17
|
+
EdgeDashboardPanel,
|
|
18
|
+
FeedsPanel,
|
|
19
|
+
IdentityPanel,
|
|
20
|
+
KeyringPanel,
|
|
21
|
+
LoggingPanel,
|
|
22
|
+
MembersPanel,
|
|
23
|
+
MetadataPanel,
|
|
24
|
+
NetworkPanel,
|
|
25
|
+
ObjectsPanel,
|
|
26
|
+
QueuesPanel,
|
|
27
|
+
SchemaPanel,
|
|
28
|
+
SignalPanel,
|
|
29
|
+
SqlitePanel,
|
|
30
|
+
StoragePanel,
|
|
31
|
+
SwarmPanel,
|
|
32
|
+
WorkflowPanel,
|
|
33
|
+
} from '@dxos/devtools';
|
|
34
|
+
import { type Graph } from '@dxos/plugin-graph';
|
|
35
|
+
import { ToolsExplorer } from '@dxos/react-ui-introspect';
|
|
36
|
+
|
|
37
|
+
import { DebugGraph, DevtoolsOverviewContainer, RegistryPanel } from '#containers';
|
|
38
|
+
import { Devtools } from '#types';
|
|
39
|
+
|
|
40
|
+
import {
|
|
41
|
+
ActiveSpacePanel,
|
|
42
|
+
EdgeTestingSurface,
|
|
43
|
+
EdgeTracesSurface,
|
|
44
|
+
SpaceInfoSurface,
|
|
45
|
+
SpaceListSurface,
|
|
46
|
+
} from './DevtoolsSurfaces';
|
|
47
|
+
|
|
48
|
+
const MCP_SERVER_URL = EDGE_SERVICE_DEFAULTS[EdgeServiceName.Introspect];
|
|
49
|
+
|
|
50
|
+
type GraphDebug = {
|
|
51
|
+
graph: Graph.Graph;
|
|
52
|
+
root: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const isGraphDebug = (data: unknown): data is GraphDebug => {
|
|
56
|
+
if (typeof data !== 'object' || data === null || !('graph' in data) || !('root' in data)) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const { graph, root } = data;
|
|
61
|
+
return (
|
|
62
|
+
typeof graph === 'object' &&
|
|
63
|
+
graph !== null &&
|
|
64
|
+
'json' in graph &&
|
|
65
|
+
typeof graph.json === 'function' &&
|
|
66
|
+
typeof root === 'string'
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default Capability.makeModule(
|
|
71
|
+
Effect.fnUntraced(function* () {
|
|
72
|
+
return Capability.contributes(Capabilities.ReactSurface, [
|
|
73
|
+
Surface.create({
|
|
74
|
+
id: 'appGraph',
|
|
75
|
+
filter: AppSurface.subject(AppSurface.Article, isGraphDebug),
|
|
76
|
+
component: DebugGraph,
|
|
77
|
+
props: ({ data: { subject } }) => ({ graph: subject.graph, root: subject.root }),
|
|
78
|
+
}),
|
|
79
|
+
Surface.create({
|
|
80
|
+
id: 'toolsExplorer',
|
|
81
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.ToolsExplorer),
|
|
82
|
+
component: ToolsExplorer,
|
|
83
|
+
props: () => ({ serverUrl: MCP_SERVER_URL }),
|
|
84
|
+
}),
|
|
85
|
+
Surface.create({
|
|
86
|
+
id: 'registry',
|
|
87
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Registry),
|
|
88
|
+
component: RegistryPanel,
|
|
89
|
+
}),
|
|
90
|
+
Surface.create({
|
|
91
|
+
id: 'devtoolsOverview',
|
|
92
|
+
filter: Surface.makeFilter(AppSurface.deckCompanion('devtoolsOverview')),
|
|
93
|
+
component: DevtoolsOverviewContainer,
|
|
94
|
+
}),
|
|
95
|
+
|
|
96
|
+
//
|
|
97
|
+
// Devtools
|
|
98
|
+
//
|
|
99
|
+
|
|
100
|
+
Surface.create({
|
|
101
|
+
id: 'client.config',
|
|
102
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Config),
|
|
103
|
+
component: ConfigPanel,
|
|
104
|
+
props: () => ({ vaultSelector: false }),
|
|
105
|
+
}),
|
|
106
|
+
Surface.create({
|
|
107
|
+
id: 'client.storage',
|
|
108
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Storage),
|
|
109
|
+
component: StoragePanel,
|
|
110
|
+
}),
|
|
111
|
+
Surface.create({
|
|
112
|
+
id: 'client.sqlite',
|
|
113
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Sqlite),
|
|
114
|
+
component: SqlitePanel,
|
|
115
|
+
}),
|
|
116
|
+
Surface.create({
|
|
117
|
+
id: 'client.logs',
|
|
118
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Logs),
|
|
119
|
+
component: LoggingPanel,
|
|
120
|
+
}),
|
|
121
|
+
Surface.create({
|
|
122
|
+
id: 'client.diagnostics',
|
|
123
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Diagnostics),
|
|
124
|
+
component: DiagnosticsPanel,
|
|
125
|
+
}),
|
|
126
|
+
Surface.create({
|
|
127
|
+
id: 'halo.identity',
|
|
128
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Identity),
|
|
129
|
+
component: IdentityPanel,
|
|
130
|
+
}),
|
|
131
|
+
Surface.create({
|
|
132
|
+
id: 'halo.devices',
|
|
133
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Devices),
|
|
134
|
+
component: DeviceListPanel,
|
|
135
|
+
}),
|
|
136
|
+
Surface.create({
|
|
137
|
+
id: 'halo.keyring',
|
|
138
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Keyring),
|
|
139
|
+
component: KeyringPanel,
|
|
140
|
+
}),
|
|
141
|
+
Surface.create({
|
|
142
|
+
id: 'halo.credentials',
|
|
143
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Credentials),
|
|
144
|
+
component: ActiveSpacePanel,
|
|
145
|
+
props: () => ({ Panel: CredentialsPanel }),
|
|
146
|
+
}),
|
|
147
|
+
Surface.create({
|
|
148
|
+
id: 'echo.spaces',
|
|
149
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Spaces),
|
|
150
|
+
component: SpaceListSurface,
|
|
151
|
+
}),
|
|
152
|
+
Surface.create({
|
|
153
|
+
id: 'echo.space',
|
|
154
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Space),
|
|
155
|
+
component: SpaceInfoSurface,
|
|
156
|
+
}),
|
|
157
|
+
Surface.create({
|
|
158
|
+
id: 'echo.feeds',
|
|
159
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Feeds),
|
|
160
|
+
component: ActiveSpacePanel,
|
|
161
|
+
props: () => ({ Panel: FeedsPanel }),
|
|
162
|
+
}),
|
|
163
|
+
Surface.create({
|
|
164
|
+
id: 'echo.objects',
|
|
165
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Objects),
|
|
166
|
+
component: ActiveSpacePanel,
|
|
167
|
+
props: () => ({ Panel: ObjectsPanel }),
|
|
168
|
+
}),
|
|
169
|
+
Surface.create({
|
|
170
|
+
id: 'echo.schema',
|
|
171
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Schema),
|
|
172
|
+
component: ActiveSpacePanel,
|
|
173
|
+
props: () => ({ Panel: SchemaPanel }),
|
|
174
|
+
}),
|
|
175
|
+
Surface.create({
|
|
176
|
+
id: 'echo.automerge',
|
|
177
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Automerge),
|
|
178
|
+
component: ActiveSpacePanel,
|
|
179
|
+
props: () => ({ Panel: AutomergePanel }),
|
|
180
|
+
}),
|
|
181
|
+
Surface.create({
|
|
182
|
+
id: 'echo.queues',
|
|
183
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Queues),
|
|
184
|
+
component: QueuesPanel,
|
|
185
|
+
}),
|
|
186
|
+
Surface.create({
|
|
187
|
+
id: 'echo.members',
|
|
188
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Members),
|
|
189
|
+
component: ActiveSpacePanel,
|
|
190
|
+
props: () => ({ Panel: MembersPanel }),
|
|
191
|
+
}),
|
|
192
|
+
Surface.create({
|
|
193
|
+
id: 'echo.metadata',
|
|
194
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Metadata),
|
|
195
|
+
component: MetadataPanel,
|
|
196
|
+
}),
|
|
197
|
+
Surface.create({
|
|
198
|
+
id: 'mesh.signal',
|
|
199
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Signal),
|
|
200
|
+
component: SignalPanel,
|
|
201
|
+
}),
|
|
202
|
+
Surface.create({
|
|
203
|
+
id: 'mesh.swarm',
|
|
204
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Swarm),
|
|
205
|
+
component: SwarmPanel,
|
|
206
|
+
}),
|
|
207
|
+
Surface.create({
|
|
208
|
+
id: 'mesh.network',
|
|
209
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Network),
|
|
210
|
+
component: ActiveSpacePanel,
|
|
211
|
+
props: () => ({ Panel: NetworkPanel }),
|
|
212
|
+
}),
|
|
213
|
+
Surface.create({
|
|
214
|
+
id: 'edge.dashboard',
|
|
215
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Dashboard),
|
|
216
|
+
component: EdgeDashboardPanel,
|
|
217
|
+
}),
|
|
218
|
+
Surface.create({
|
|
219
|
+
id: 'edge.workflows',
|
|
220
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Workflows),
|
|
221
|
+
component: ActiveSpacePanel,
|
|
222
|
+
props: () => ({ Panel: WorkflowPanel }),
|
|
223
|
+
}),
|
|
224
|
+
Surface.create({
|
|
225
|
+
id: 'edge.traces',
|
|
226
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Traces),
|
|
227
|
+
component: EdgeTracesSurface,
|
|
228
|
+
}),
|
|
229
|
+
Surface.create({
|
|
230
|
+
id: 'edge.testing',
|
|
231
|
+
filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Testing),
|
|
232
|
+
component: EdgeTestingSurface,
|
|
233
|
+
}),
|
|
234
|
+
]);
|
|
235
|
+
}),
|
|
236
|
+
);
|
|
@@ -6,11 +6,22 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Tree } from '@dxos/devtools';
|
|
8
8
|
import { Graph } from '@dxos/plugin-graph';
|
|
9
|
+
import { Panel, ScrollArea } from '@dxos/react-ui';
|
|
9
10
|
|
|
10
11
|
export type DebugGraphProps = { graph: Graph.Graph; root: string };
|
|
11
12
|
|
|
12
13
|
export const DebugGraph = ({ graph, root }: DebugGraphProps) => {
|
|
13
|
-
return
|
|
14
|
+
return (
|
|
15
|
+
<Panel.Root>
|
|
16
|
+
<Panel.Content asChild>
|
|
17
|
+
<ScrollArea.Root orientation='all'>
|
|
18
|
+
<ScrollArea.Viewport>
|
|
19
|
+
<Tree data={Graph.toJSON(graph, root)} />
|
|
20
|
+
</ScrollArea.Viewport>
|
|
21
|
+
</ScrollArea.Root>
|
|
22
|
+
</Panel.Content>
|
|
23
|
+
</Panel.Root>
|
|
24
|
+
);
|
|
14
25
|
};
|
|
15
26
|
|
|
16
27
|
DebugGraph.displayName = 'DebugGraph';
|
|
@@ -13,7 +13,7 @@ import { GithubComponent } from './GithubComponent';
|
|
|
13
13
|
|
|
14
14
|
const DefaultStory = () => (
|
|
15
15
|
<GithubComponent.Root>
|
|
16
|
-
<div className='grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden h-full
|
|
16
|
+
<div className='grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden h-full w-full'>
|
|
17
17
|
<GithubComponent.Header />
|
|
18
18
|
<GithubComponent.Content />
|
|
19
19
|
<GithubComponent.StatusBar />
|
|
@@ -93,7 +93,7 @@ const Header = () => {
|
|
|
93
93
|
const { t } = useTranslation(meta.profile.key);
|
|
94
94
|
const { repo, pulls, unavailable } = useComponentContext();
|
|
95
95
|
return (
|
|
96
|
-
<header className='flex items-center justify-between gap-1 px-4 py-3
|
|
96
|
+
<header className='flex items-center justify-between gap-1 px-4 py-3 dx-modal-surface border-b border-subdued-separator'>
|
|
97
97
|
<a
|
|
98
98
|
href={`https://github.com/${repo}`}
|
|
99
99
|
target='_blank'
|
|
@@ -8,7 +8,7 @@ import { GithubComponent } from './GithubComponent';
|
|
|
8
8
|
|
|
9
9
|
export const GithubPanel = () => (
|
|
10
10
|
<GithubComponent.Root>
|
|
11
|
-
<div className='h-full grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden h-full
|
|
11
|
+
<div className='h-full grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden h-full w-full'>
|
|
12
12
|
<GithubComponent.Header />
|
|
13
13
|
<GithubComponent.Content />
|
|
14
14
|
<GithubComponent.StatusBar />
|