@dxos/plugin-debug 0.10.0 → 0.11.1
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/PLUGIN.mdl +12 -325
- package/README.md +4 -14
- package/dist/lib/DebugPlugin.mjs +29 -0
- package/dist/lib/DebugPlugin.mjs.map +1 -0
- package/dist/lib/DebugPlugin.node.mjs +10 -0
- package/dist/lib/DebugPlugin.node.mjs.map +1 -0
- package/dist/lib/DebugPlugin.workerd.mjs +8 -0
- package/dist/lib/DebugPlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +11 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-DebugObjectPanel.mjs +58 -0
- package/dist/lib/chunk-DebugObjectPanel.mjs.map +1 -0
- package/dist/lib/chunk-DebugSettings.mjs +237 -0
- package/dist/lib/chunk-DebugSettings.mjs.map +1 -0
- package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs +39 -0
- package/dist/lib/chunk-DebugSpaceObjectsPanel.mjs.map +1 -0
- package/dist/lib/chunk-DebugStatus.mjs +117 -0
- package/dist/lib/chunk-DebugStatus.mjs.map +1 -0
- package/dist/lib/chunk-LogStatus.mjs +44 -0
- package/dist/lib/chunk-LogStatus.mjs.map +1 -0
- package/dist/lib/chunk-SpaceGenerator.mjs +208 -0
- package/dist/lib/chunk-SpaceGenerator.mjs.map +1 -0
- package/dist/lib/chunk-StatsPanel.mjs +58 -0
- package/dist/lib/chunk-StatsPanel.mjs.map +1 -0
- package/dist/lib/chunk-Wireframe.mjs +60 -0
- package/dist/lib/chunk-Wireframe.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +76 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-log-recording.mjs +17 -0
- package/dist/lib/chunk-log-recording.mjs.map +1 -0
- package/dist/lib/chunk-meta.mjs +36 -0
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +193 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-settings.mjs +23 -0
- package/dist/lib/chunk-settings.mjs.map +1 -0
- package/dist/lib/chunk-stats-panel.mjs +56 -0
- package/dist/lib/chunk-stats-panel.mjs.map +1 -0
- package/dist/lib/chunk-types.mjs +60 -0
- package/dist/lib/chunk-types.mjs.map +1 -0
- package/dist/lib/components.mjs +763 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +14 -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 +38 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/DebugSurfaces.d.ts +25 -0
- package/dist/types/src/capabilities/DebugSurfaces.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts +4 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/log-recording.d.ts +10 -0
- package/dist/types/src/capabilities/log-recording.d.ts.map +1 -0
- 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/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/stats-panel.d.ts +16 -0
- package/dist/types/src/capabilities/stats-panel.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts +4 -3
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +4 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts +4 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts +30 -58
- package/dist/types/src/containers/DebugSettings/DebugSettings.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +4 -1
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -1
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts +4 -1
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -1
- package/dist/types/src/containers/LogStatus/LogStatus.d.ts +6 -0
- package/dist/types/src/containers/LogStatus/LogStatus.d.ts.map +1 -0
- package/dist/types/src/containers/LogStatus/index.d.ts +2 -0
- package/dist/types/src/containers/LogStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +1 -1
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts +6 -0
- package/dist/types/src/containers/StatsPanel/StatsPanel.d.ts.map +1 -0
- package/dist/types/src/containers/StatsPanel/index.d.ts +2 -0
- package/dist/types/src/containers/StatsPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts +4 -1
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +4 -6
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +26 -57
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/DebugNodes.d.ts +7 -0
- package/dist/types/src/types/DebugNodes.d.ts.map +1 -0
- package/dist/types/src/types/DebugSurface.d.ts +8 -0
- package/dist/types/src/types/DebugSurface.d.ts.map +1 -0
- package/dist/types/src/types/debug.d.ts +3 -1
- package/dist/types/src/types/debug.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +8 -13
- package/package.json +61 -63
- package/src/DebugPlugin.node.ts +1 -1
- package/src/DebugPlugin.tsx +10 -27
- package/src/DebugPlugin.workerd.ts +1 -1
- package/src/capabilities/DebugSurfaces.tsx +146 -0
- package/src/capabilities/app-graph-builder.ts +39 -373
- package/src/capabilities/index.ts +3 -2
- package/src/capabilities/log-recording.ts +20 -0
- package/src/capabilities/react-surface.ts +123 -0
- package/src/capabilities/stats-panel.ts +74 -0
- package/src/components/SchemaTable/SchemaTable.tsx +6 -5
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +9 -3
- package/src/components/SpaceGenerator/presets.ts +2 -2
- package/src/components/index.ts +1 -1
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +20 -20
- package/src/containers/DebugSettings/DebugSettings.tsx +4 -3
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +4 -2
- package/src/containers/DebugStatus/DebugStatus.tsx +2 -0
- package/src/containers/LogStatus/LogStatus.tsx +51 -0
- package/src/containers/LogStatus/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +108 -10
- package/src/containers/StatsPanel/StatsPanel.tsx +74 -0
- package/src/containers/StatsPanel/index.ts +5 -0
- package/src/containers/Wireframe/Wireframe.tsx +2 -0
- package/src/containers/index.ts +9 -7
- package/src/index.ts +1 -1
- package/src/meta.ts +1 -1
- package/src/plugin.ts +1 -1
- package/src/translations.ts +8 -52
- package/src/types/DebugNodes.ts +18 -0
- package/src/types/DebugSurface.ts +16 -0
- package/src/types/debug.ts +3 -1
- package/src/types/index.ts +3 -3
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs +0 -15
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs.map +0 -7
- package/dist/lib/neutral/DebugObjectPanel-QSGQJ3LM.mjs +0 -61
- package/dist/lib/neutral/DebugObjectPanel-QSGQJ3LM.mjs.map +0 -7
- package/dist/lib/neutral/DebugPlugin.mjs +0 -59
- package/dist/lib/neutral/DebugPlugin.mjs.map +0 -7
- package/dist/lib/neutral/DebugPlugin.node.mjs +0 -18
- package/dist/lib/neutral/DebugPlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/DebugPlugin.workerd.mjs +0 -12
- package/dist/lib/neutral/DebugPlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/DebugSettings-Q3WUL6YQ.mjs +0 -229
- package/dist/lib/neutral/DebugSettings-Q3WUL6YQ.mjs.map +0 -7
- package/dist/lib/neutral/DebugSpaceObjectsPanel-AXFZWEIM.mjs +0 -36
- package/dist/lib/neutral/DebugSpaceObjectsPanel-AXFZWEIM.mjs.map +0 -7
- package/dist/lib/neutral/DebugStatus-H2BAHN26.mjs +0 -122
- package/dist/lib/neutral/DebugStatus-H2BAHN26.mjs.map +0 -7
- package/dist/lib/neutral/DevtoolsOverviewContainer-DWQHTK7D.mjs +0 -24
- package/dist/lib/neutral/DevtoolsOverviewContainer-DWQHTK7D.mjs.map +0 -7
- package/dist/lib/neutral/GithubPanel-4CSJRVKE.mjs +0 -177
- package/dist/lib/neutral/GithubPanel-4CSJRVKE.mjs.map +0 -7
- package/dist/lib/neutral/RegistryPanel-64GIYJHN.mjs +0 -161
- package/dist/lib/neutral/RegistryPanel-64GIYJHN.mjs.map +0 -7
- package/dist/lib/neutral/SpaceGenerator-Y35G6DRV.mjs +0 -146
- package/dist/lib/neutral/SpaceGenerator-Y35G6DRV.mjs.map +0 -7
- package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs +0 -52
- package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-UKG4WVYK.mjs +0 -619
- package/dist/lib/neutral/app-graph-builder-UKG4WVYK.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -15
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/chunk-72QXLYMI.mjs +0 -118
- package/dist/lib/neutral/chunk-72QXLYMI.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-R5C4CKOF.mjs +0 -54
- package/dist/lib/neutral/chunk-R5C4CKOF.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -961
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -27
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -20
- 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-URESE7J4.mjs +0 -484
- package/dist/lib/neutral/react-surface-URESE7J4.mjs.map +0 -7
- package/dist/lib/neutral/settings-5I2674B6.mjs +0 -28
- package/dist/lib/neutral/settings-5I2674B6.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -91
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -16
- package/dist/lib/neutral/types/index.mjs.map +0 -7
- package/dist/types/src/DebugPlugin.test.d.ts +0 -2
- package/dist/types/src/DebugPlugin.test.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context.d.ts +0 -5
- package/dist/types/src/capabilities/react-context.d.ts.map +0 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +0 -8
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +0 -1
- package/dist/types/src/containers/DebugGraph/index.d.ts +0 -2
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +0 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts +0 -3
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +0 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +0 -2
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +0 -15
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +0 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +0 -106
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +0 -1
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts +0 -3
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts.map +0 -1
- package/dist/types/src/containers/GithubPanel/index.d.ts +0 -2
- package/dist/types/src/containers/GithubPanel/index.d.ts.map +0 -1
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts +0 -3
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts.map +0 -1
- package/dist/types/src/containers/RegistryPanel/index.d.ts +0 -2
- package/dist/types/src/containers/RegistryPanel/index.d.ts.map +0 -1
- package/dist/types/src/types/Devtools.d.ts +0 -57
- package/dist/types/src/types/Devtools.d.ts.map +0 -1
- package/dist/types/src/types/surface.d.ts +0 -4
- package/dist/types/src/types/surface.d.ts.map +0 -1
- package/src/DebugPlugin.test.ts +0 -29
- package/src/capabilities/react-context.tsx +0 -25
- package/src/capabilities/react-surface.tsx +0 -504
- package/src/containers/DebugGraph/DebugGraph.tsx +0 -14
- package/src/containers/DebugGraph/index.ts +0 -5
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +0 -27
- package/src/containers/DevtoolsOverviewContainer/index.ts +0 -5
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +0 -38
- package/src/containers/GithubPanel/GithubComponent.tsx +0 -192
- package/src/containers/GithubPanel/GithubPanel.tsx +0 -17
- package/src/containers/GithubPanel/index.ts +0 -5
- package/src/containers/RegistryPanel/RegistryPanel.tsx +0 -150
- package/src/containers/RegistryPanel/index.ts +0 -5
- package/src/types/Devtools.ts +0 -73
- package/src/types/surface.ts +0 -10
package/dx.config.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Config2 } from '@dxos/app-framework/config';
|
|
@@ -11,29 +11,24 @@ export default Config2.make({
|
|
|
11
11
|
name: 'Debug',
|
|
12
12
|
author: 'DXOS',
|
|
13
13
|
description: trim`
|
|
14
|
-
DebugPlugin
|
|
15
|
-
|
|
16
|
-
exposing panel views for config, storage, logs, diagnostics, identity, devices, feeds,
|
|
17
|
-
objects, schemas, automerge internals, network topology, EDGE workflows, and invocation
|
|
18
|
-
traces, all driven by the @dxos/devtools component library.
|
|
19
|
-
|
|
20
|
-
The plugin contributes a Debug companion tab to every ECHO object in the deck so developers
|
|
21
|
-
can inspect raw field values and DXNs inline, and a Space Objects companion panel that lists
|
|
22
|
-
all objects in the active space with live reactive updates.
|
|
14
|
+
DebugPlugin bundles developer debugging utilities for DXOS Composer under a Debug node in the
|
|
15
|
+
SYSTEM navigation group (a sibling of the Devtools inspector).
|
|
23
16
|
|
|
24
17
|
Test-data generation is available via a SpaceGenerator article surface: developers can
|
|
25
18
|
create configurable batches of synthetic ECHO objects into any space collection, with a
|
|
26
19
|
status indicator showing when generation is running.
|
|
27
20
|
|
|
21
|
+
The plugin contributes a Debug companion tab to every ECHO object in the deck so developers
|
|
22
|
+
can inspect raw field values and DXNs inline, and a Space Objects companion panel that lists
|
|
23
|
+
all objects in the active space with live reactive updates.
|
|
24
|
+
|
|
28
25
|
Additional utilities include a wireframe overlay mode that draws labelled borders around
|
|
29
26
|
every article and section surface, a log-capture and download facility backed by an
|
|
30
|
-
IdbLogStore, a
|
|
31
|
-
globalThis helper for manual storage-version testing.
|
|
27
|
+
IdbLogStore, and a transient-stats panel for live telemetry.
|
|
32
28
|
`,
|
|
33
29
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-debug',
|
|
34
30
|
icon: { key: 'ph--bug--regular' },
|
|
35
31
|
spec: 'PLUGIN.mdl',
|
|
36
32
|
tags: ['labs'],
|
|
37
|
-
screenshots: [{ dark: 'https://dxos.network/plugin-details-debug-dark.png' }],
|
|
38
33
|
},
|
|
39
34
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-debug",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "DXOS
|
|
3
|
+
"version": "0.11.1",
|
|
4
|
+
"description": "DXOS developer debugging utilities plugin.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
7
|
"repository": {
|
|
@@ -16,22 +16,22 @@
|
|
|
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
|
"#components": {
|
|
22
22
|
"source": "./src/components/index.ts",
|
|
23
23
|
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
-
"default": "./dist/lib/
|
|
24
|
+
"default": "./dist/lib/components.mjs"
|
|
25
25
|
},
|
|
26
26
|
"#containers": {
|
|
27
27
|
"source": "./src/containers/index.ts",
|
|
28
28
|
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
-
"default": "./dist/lib/
|
|
29
|
+
"default": "./dist/lib/containers.mjs"
|
|
30
30
|
},
|
|
31
31
|
"#meta": {
|
|
32
32
|
"source": "./src/meta.ts",
|
|
33
33
|
"types": "./dist/types/src/meta.d.ts",
|
|
34
|
-
"default": "./dist/lib/
|
|
34
|
+
"default": "./dist/lib/meta.mjs"
|
|
35
35
|
},
|
|
36
36
|
"#plugin": {
|
|
37
37
|
"source": {
|
|
@@ -40,37 +40,37 @@
|
|
|
40
40
|
"default": "./src/DebugPlugin.tsx"
|
|
41
41
|
},
|
|
42
42
|
"types": "./dist/types/src/DebugPlugin.d.ts",
|
|
43
|
-
"workerd": "./dist/lib/
|
|
44
|
-
"node": "./dist/lib/
|
|
45
|
-
"default": "./dist/lib/
|
|
43
|
+
"workerd": "./dist/lib/DebugPlugin.workerd.mjs",
|
|
44
|
+
"node": "./dist/lib/DebugPlugin.node.mjs",
|
|
45
|
+
"default": "./dist/lib/DebugPlugin.mjs"
|
|
46
46
|
},
|
|
47
47
|
"#translations": {
|
|
48
48
|
"source": "./src/translations.ts",
|
|
49
49
|
"types": "./dist/types/src/translations.d.ts",
|
|
50
|
-
"default": "./dist/lib/
|
|
50
|
+
"default": "./dist/lib/translations.mjs"
|
|
51
51
|
},
|
|
52
52
|
"#types": {
|
|
53
53
|
"source": "./src/types/index.ts",
|
|
54
54
|
"types": "./dist/types/src/types/index.d.ts",
|
|
55
|
-
"default": "./dist/lib/
|
|
55
|
+
"default": "./dist/lib/types.mjs"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"exports": {
|
|
59
59
|
".": {
|
|
60
60
|
"source": "./src/index.ts",
|
|
61
61
|
"types": "./dist/types/src/index.d.ts",
|
|
62
|
-
"
|
|
62
|
+
"import": "./dist/lib/index.mjs"
|
|
63
63
|
},
|
|
64
64
|
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
65
65
|
"./plugin": {
|
|
66
66
|
"source": "./src/plugin.ts",
|
|
67
67
|
"types": "./dist/types/src/plugin.d.ts",
|
|
68
|
-
"
|
|
68
|
+
"import": "./dist/lib/plugin.mjs"
|
|
69
69
|
},
|
|
70
70
|
"./translations": {
|
|
71
71
|
"source": "./src/translations.ts",
|
|
72
72
|
"types": "./dist/types/src/translations.d.ts",
|
|
73
|
-
"
|
|
73
|
+
"import": "./dist/lib/translations.mjs"
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -83,50 +83,48 @@
|
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@antv/graphlib": "^2.0.4",
|
|
85
85
|
"@antv/layout": "^1.2.13",
|
|
86
|
+
"@effect-atom/atom": "^0.5.3",
|
|
86
87
|
"@effect-atom/atom-react": "^0.5.0",
|
|
87
88
|
"@tldraw/tldraw": "^3.0.0",
|
|
88
89
|
"react-resize-detector": "^11.0.1",
|
|
89
|
-
"@dxos/app-framework": "0.
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/async": "0.
|
|
93
|
-
"@dxos/compute": "0.
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/echo-
|
|
100
|
-
"@dxos/effect": "0.
|
|
101
|
-
"@dxos/invariant": "0.
|
|
102
|
-
"@dxos/keys": "0.
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/plugin-
|
|
109
|
-
"@dxos/plugin-
|
|
110
|
-
"@dxos/plugin-
|
|
111
|
-
"@dxos/plugin-
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/plugin-
|
|
114
|
-
"@dxos/plugin-
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/react-
|
|
118
|
-
"@dxos/react-ui-
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/react-ui-
|
|
121
|
-
"@dxos/react-ui-
|
|
122
|
-
"@dxos/react-ui-
|
|
123
|
-
"@dxos/
|
|
124
|
-
"@dxos/
|
|
125
|
-
"@dxos/
|
|
126
|
-
"@dxos/
|
|
127
|
-
"@dxos/tracing": "0.10.0",
|
|
128
|
-
"@dxos/types": "0.10.0",
|
|
129
|
-
"@dxos/util": "0.10.0"
|
|
90
|
+
"@dxos/app-framework": "0.11.1",
|
|
91
|
+
"@dxos/assistant-toolkit": "0.11.1",
|
|
92
|
+
"@dxos/app-toolkit": "0.11.1",
|
|
93
|
+
"@dxos/async": "0.11.1",
|
|
94
|
+
"@dxos/compute": "0.11.1",
|
|
95
|
+
"@dxos/compute-hyperformula": "0.11.1",
|
|
96
|
+
"@dxos/conductor": "0.11.1",
|
|
97
|
+
"@dxos/config": "0.11.1",
|
|
98
|
+
"@dxos/devtools": "0.11.1",
|
|
99
|
+
"@dxos/echo": "0.11.1",
|
|
100
|
+
"@dxos/echo-react": "0.11.1",
|
|
101
|
+
"@dxos/effect": "0.11.1",
|
|
102
|
+
"@dxos/invariant": "0.11.1",
|
|
103
|
+
"@dxos/keys": "0.11.1",
|
|
104
|
+
"@dxos/log": "0.11.1",
|
|
105
|
+
"@dxos/log-store-idb": "0.11.1",
|
|
106
|
+
"@dxos/operation": "0.11.1",
|
|
107
|
+
"@dxos/plugin-graph": "0.11.1",
|
|
108
|
+
"@dxos/plugin-illustrator": "0.11.1",
|
|
109
|
+
"@dxos/plugin-inbox": "0.11.1",
|
|
110
|
+
"@dxos/plugin-sheet": "0.11.1",
|
|
111
|
+
"@dxos/plugin-markdown": "0.11.1",
|
|
112
|
+
"@dxos/plugin-tldraw": "0.11.1",
|
|
113
|
+
"@dxos/protocols": "0.11.1",
|
|
114
|
+
"@dxos/plugin-status-bar": "0.11.1",
|
|
115
|
+
"@dxos/plugin-space": "0.11.1",
|
|
116
|
+
"@dxos/random": "0.11.1",
|
|
117
|
+
"@dxos/react-client": "0.11.1",
|
|
118
|
+
"@dxos/react-ui-attention": "0.11.1",
|
|
119
|
+
"@dxos/react-ui-canvas-compute": "0.11.1",
|
|
120
|
+
"@dxos/react-ui-canvas-editor": "0.11.1",
|
|
121
|
+
"@dxos/react-ui-syntax-highlighter": "0.11.1",
|
|
122
|
+
"@dxos/react-ui-debug": "0.11.1",
|
|
123
|
+
"@dxos/react-ui-form": "0.11.1",
|
|
124
|
+
"@dxos/schema": "0.11.1",
|
|
125
|
+
"@dxos/tracing": "0.11.1",
|
|
126
|
+
"@dxos/types": "0.11.1",
|
|
127
|
+
"@dxos/util": "0.11.1"
|
|
130
128
|
},
|
|
131
129
|
"devDependencies": {
|
|
132
130
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -136,11 +134,11 @@
|
|
|
136
134
|
"effect": "3.21.4",
|
|
137
135
|
"react": "~19.2.7",
|
|
138
136
|
"react-dom": "~19.2.7",
|
|
139
|
-
"vite": "^8.
|
|
140
|
-
"@dxos/
|
|
141
|
-
"@dxos/
|
|
142
|
-
"@dxos/
|
|
143
|
-
"@dxos/
|
|
137
|
+
"vite": "^8.1.4",
|
|
138
|
+
"@dxos/plugin-testing": "0.11.1",
|
|
139
|
+
"@dxos/react-ui": "0.11.1",
|
|
140
|
+
"@dxos/storybook-utils": "0.11.1",
|
|
141
|
+
"@dxos/ui-theme": "0.11.1"
|
|
144
142
|
},
|
|
145
143
|
"peerDependencies": {
|
|
146
144
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -148,9 +146,9 @@
|
|
|
148
146
|
"effect": "3.21.4",
|
|
149
147
|
"react": "~19.2.7",
|
|
150
148
|
"react-dom": "~19.2.7",
|
|
151
|
-
"@dxos/random": "0.
|
|
152
|
-
"@dxos/react-ui": "0.
|
|
153
|
-
"@dxos/ui-theme": "0.
|
|
149
|
+
"@dxos/random": "^0.11.1",
|
|
150
|
+
"@dxos/react-ui": "^0.11.1",
|
|
151
|
+
"@dxos/ui-theme": "^0.11.1"
|
|
154
152
|
},
|
|
155
153
|
"publishConfig": {
|
|
156
154
|
"access": "public"
|
package/src/DebugPlugin.node.ts
CHANGED
package/src/DebugPlugin.tsx
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
5
|
import { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';
|
|
8
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
-
import { type Client } from '@dxos/react-client';
|
|
10
7
|
|
|
11
|
-
import { AppGraphBuilder, DebugSettings,
|
|
8
|
+
import { AppGraphBuilder, DebugSettings, LogRecording, ReactSurface, StatsPanel } from '#capabilities';
|
|
12
9
|
import { meta } from '#meta';
|
|
13
10
|
import { translations } from '#translations';
|
|
14
11
|
import { type DebugPluginOptions } from '#types';
|
|
@@ -16,43 +13,29 @@ import { type DebugPluginOptions } from '#types';
|
|
|
16
13
|
// eslint-disable-next-line import/no-relative-packages
|
|
17
14
|
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
18
15
|
|
|
19
|
-
// TODO(wittjosiah): Factor out DevtoolsPlugin?
|
|
20
|
-
|
|
21
16
|
export const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(
|
|
22
17
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
23
|
-
AppPlugin.addReactContextModule({ activate: ReactContext }),
|
|
24
18
|
AppPlugin.addSettingsModule({ activate: DebugSettings }),
|
|
25
19
|
Plugin.addModule(({ logStore }) => ({
|
|
26
20
|
id: Capability.getModuleTag(ReactSurface) ?? 'surfaces',
|
|
27
21
|
activatesOn: ActivationEvents.SetupReactSurface,
|
|
28
22
|
activate: () => ReactSurface({ logStore }),
|
|
29
23
|
})),
|
|
30
|
-
AppPlugin.addTranslationsModule({ translations }),
|
|
31
24
|
Plugin.addModule({
|
|
32
|
-
id: '
|
|
25
|
+
id: 'log-recording',
|
|
33
26
|
activatesOn: ActivationEvents.Startup,
|
|
34
|
-
activate:
|
|
27
|
+
activate: LogRecording,
|
|
35
28
|
}),
|
|
29
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
30
|
+
Plugin.addModule(({ persistStats }) => ({
|
|
31
|
+
id: 'stats-panel',
|
|
32
|
+
activatesOn: ActivationEvents.Startup,
|
|
33
|
+
activate: () => StatsPanel({ persist: persistStats ?? true }),
|
|
34
|
+
})),
|
|
36
35
|
AppPlugin.addPluginAssetModule({
|
|
37
36
|
asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
38
37
|
}),
|
|
39
38
|
Plugin.make,
|
|
40
39
|
);
|
|
41
40
|
|
|
42
|
-
const setupDevtools = () => {
|
|
43
|
-
(globalThis as any).composer ??= {};
|
|
44
|
-
|
|
45
|
-
// Used to test how composer handles breaking protocol changes.
|
|
46
|
-
(globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {
|
|
47
|
-
const { changeStorageVersionInMetadata } = await import('@dxos/echo-host/testing');
|
|
48
|
-
const { createStorageObjects } = await import('@dxos/client-services');
|
|
49
|
-
const client: Client = (window as any).dxos.client;
|
|
50
|
-
const config = client.config;
|
|
51
|
-
await client.destroy();
|
|
52
|
-
const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? {});
|
|
53
|
-
await changeStorageVersionInMetadata(storage, version);
|
|
54
|
-
location.pathname = '/';
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
|
|
58
41
|
export default DebugPlugin;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// Surface components that cannot be expressed as a `props` mapper, because they call hooks or compose.
|
|
6
|
+
|
|
7
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
8
|
+
import * as Option from 'effect/Option';
|
|
9
|
+
import React, { useCallback, useMemo } from 'react';
|
|
10
|
+
|
|
11
|
+
import { useAtomCapability, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';
|
|
12
|
+
import { AppAnnotation, type AppCapabilities, GraphPath, LayoutOperation } from '@dxos/app-toolkit';
|
|
13
|
+
import { useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
14
|
+
import { Annotation, Collection, Entity, Filter, Obj, Type } from '@dxos/echo';
|
|
15
|
+
import { HiddenAnnotation } from '@dxos/echo/Annotation';
|
|
16
|
+
import { type IdbLogStore } from '@dxos/log-store-idb';
|
|
17
|
+
import { SpaceCapabilities, SpaceOperation } from '@dxos/plugin-space';
|
|
18
|
+
import { useClient } from '@dxos/react-client';
|
|
19
|
+
import { type Space, SpaceState } from '@dxos/react-client/echo';
|
|
20
|
+
import { Panel } from '@dxos/react-ui';
|
|
21
|
+
import { Logger } from '@dxos/react-ui-debug';
|
|
22
|
+
|
|
23
|
+
import { DebugObjectPanel, DebugSettings, DebugSpaceObjectsPanel, SpaceGenerator } from '#containers';
|
|
24
|
+
import { type Settings } from '#types';
|
|
25
|
+
|
|
26
|
+
/** Returns `onOpen` and `canOpen` for the ObjectsTree "Open" action. */
|
|
27
|
+
const useObjectOpenAction = (invokePromise: ReturnType<typeof useOperationInvoker>['invokePromise']) => {
|
|
28
|
+
const client = useClient();
|
|
29
|
+
const spaceSettings = useAtomCapability(SpaceCapabilities.Settings);
|
|
30
|
+
const showHidden = spaceSettings?.showHidden ?? false;
|
|
31
|
+
|
|
32
|
+
const allTypes = useAtomValue(useMemo(() => client.graph.registry.query(Filter.type(Type.Type)).atom, [client]));
|
|
33
|
+
|
|
34
|
+
const hiddenTypenames = useMemo(() => {
|
|
35
|
+
const result = new Set<string>();
|
|
36
|
+
for (const typeEntity of allTypes) {
|
|
37
|
+
const schema = Type.getSchema(typeEntity);
|
|
38
|
+
if (HiddenAnnotation.get(schema).pipe(Option.getOrElse(() => false))) {
|
|
39
|
+
result.add(Type.getTypename(typeEntity));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}, [allTypes]);
|
|
44
|
+
|
|
45
|
+
const onOpen = useCallback(
|
|
46
|
+
(object: Obj.Unknown) => {
|
|
47
|
+
void invokePromise(LayoutOperation.Open, { subject: [GraphPath.getObjectPathFromObject(object)] });
|
|
48
|
+
},
|
|
49
|
+
[invokePromise],
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const canOpen = useCallback(
|
|
53
|
+
(entity: Entity.Snapshot) => {
|
|
54
|
+
if (showHidden) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
const typename = Entity.getTypename(entity);
|
|
58
|
+
return !hiddenTypenames.has(typename ?? '');
|
|
59
|
+
},
|
|
60
|
+
[showHidden, hiddenTypenames],
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
return { onOpen, canOpen };
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type DebugSettingsSurfaceProps = {
|
|
67
|
+
subject: AppCapabilities.Settings;
|
|
68
|
+
logStore?: IdbLogStore;
|
|
69
|
+
onUpload?: AppCapabilities.FileUploader;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const DebugSettingsSurface = ({ subject, logStore, onUpload }: DebugSettingsSurfaceProps) => {
|
|
73
|
+
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<DebugSettings settings={settings} onSettingsChange={updateSettings} logStore={logStore} onUpload={onUpload} />
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type SpaceGeneratorSurfaceProps = {
|
|
81
|
+
role: string;
|
|
82
|
+
space: Space;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** Generated objects are added to the space's root collection, resolved at invocation time. */
|
|
86
|
+
export const SpaceGeneratorSurface = ({ role, space }: SpaceGeneratorSurfaceProps) => {
|
|
87
|
+
const { invokePromise } = useOperationInvoker();
|
|
88
|
+
const handleCreateObjects = useCallback(
|
|
89
|
+
(objects: Obj.Unknown[]) => {
|
|
90
|
+
const collection =
|
|
91
|
+
space.state.get() === SpaceState.SPACE_READY &&
|
|
92
|
+
Annotation.get(space.properties, AppAnnotation.RootCollectionAnnotation).pipe(Option.getOrUndefined)?.target;
|
|
93
|
+
if (!Obj.instanceOf(Collection.Collection, collection)) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
objects.forEach((object) => {
|
|
98
|
+
void invokePromise(SpaceOperation.AddObject, { target: collection, object });
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
[space, invokePromise],
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
return <SpaceGenerator role={role} space={space} onCreateObjects={handleCreateObjects} />;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type ObjectDebugSurfaceProps = {
|
|
108
|
+
role: string;
|
|
109
|
+
companionTo: Obj.Unknown;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const ObjectDebugSurface = ({ role, companionTo }: ObjectDebugSurfaceProps) => {
|
|
113
|
+
const { invokePromise } = useOperationInvoker();
|
|
114
|
+
const { onOpen, canOpen } = useObjectOpenAction(invokePromise);
|
|
115
|
+
|
|
116
|
+
return <DebugObjectPanel role={role} companionTo={companionTo} onOpen={onOpen} canOpen={canOpen} />;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const SpaceObjectsSurface = () => {
|
|
120
|
+
const space = useActiveSpace();
|
|
121
|
+
const { invokePromise } = useOperationInvoker();
|
|
122
|
+
const { onOpen, canOpen } = useObjectOpenAction(invokePromise);
|
|
123
|
+
if (!space) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return <DebugSpaceObjectsPanel space={space} onOpen={onOpen} canOpen={canOpen} />;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const LoggerSurface = () => (
|
|
131
|
+
<Logger.Root>
|
|
132
|
+
<Panel.Root>
|
|
133
|
+
<Panel.Toolbar asChild>
|
|
134
|
+
<Logger.Toolbar />
|
|
135
|
+
</Panel.Toolbar>
|
|
136
|
+
<Panel.Content asChild>
|
|
137
|
+
<Logger.Content>
|
|
138
|
+
<Logger.List />
|
|
139
|
+
</Logger.Content>
|
|
140
|
+
</Panel.Content>
|
|
141
|
+
<Panel.Statusbar asChild>
|
|
142
|
+
<Logger.Filter />
|
|
143
|
+
</Panel.Statusbar>
|
|
144
|
+
</Panel.Root>
|
|
145
|
+
</Logger.Root>
|
|
146
|
+
);
|