@dxos/plugin-debug 0.8.4-main.3eb6e50203 → 0.8.4-main.4a85c3132b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{DebugGraph-6VMEOKEV.mjs → DebugGraph-7HXJ2PS2.mjs} +4 -3
- package/dist/lib/browser/{DebugGraph-6VMEOKEV.mjs.map → DebugGraph-7HXJ2PS2.mjs.map} +4 -4
- package/dist/lib/browser/DebugObjectPanel-3TCDNUNW.mjs +33 -0
- package/dist/lib/browser/DebugObjectPanel-3TCDNUNW.mjs.map +7 -0
- package/dist/lib/browser/DebugSettings-JZMIUDYB.mjs +174 -0
- package/dist/lib/browser/DebugSettings-JZMIUDYB.mjs.map +7 -0
- package/dist/lib/browser/DebugSpaceObjectsPanel-7NRPLWZ4.mjs +50 -0
- package/dist/lib/browser/DebugSpaceObjectsPanel-7NRPLWZ4.mjs.map +7 -0
- package/dist/lib/browser/DebugStatus-COQGH37G.mjs +125 -0
- package/dist/lib/browser/DebugStatus-COQGH37G.mjs.map +7 -0
- package/dist/lib/browser/{DevtoolsOverviewContainer-2C6XMJ3L.mjs → DevtoolsOverviewContainer-C75NFVER.mjs} +4 -3
- package/dist/lib/browser/{DevtoolsOverviewContainer-2C6XMJ3L.mjs.map → DevtoolsOverviewContainer-C75NFVER.mjs.map} +4 -4
- package/dist/lib/browser/{SpaceGenerator-W3LJORYT.mjs → SpaceGenerator-SWSGJEEL.mjs} +293 -271
- package/dist/lib/browser/SpaceGenerator-SWSGJEEL.mjs.map +7 -0
- package/dist/lib/browser/Wireframe-KAGOKEFW.mjs +53 -0
- package/dist/lib/browser/Wireframe-KAGOKEFW.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-DEBTVBQG.mjs → app-graph-builder-LGUQNXHD.mjs} +28 -2
- package/dist/lib/browser/{app-graph-builder-DEBTVBQG.mjs.map → app-graph-builder-LGUQNXHD.mjs.map} +2 -2
- package/dist/lib/browser/index.mjs +12 -6
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-BTVNKKVQ.mjs +443 -0
- package/dist/lib/browser/react-surface-BTVNKKVQ.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +6 -1
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings/settings.d.ts +1 -1
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/index.d.ts +2 -0
- package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +1 -1
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/{components → containers/DebugGraph}/DebugGraph.d.ts +0 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts +3 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DebugObjectPanel}/DebugObjectPanel.d.ts +1 -1
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +3 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DebugSettings}/DebugSettings.d.ts +4 -2
- package/dist/types/src/containers/DebugSettings/DebugSettings.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSettings/index.d.ts +3 -0
- package/dist/types/src/containers/DebugSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +3 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +3 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts +3 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.d.ts +0 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +3 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +3 -0
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -0
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -0
- package/dist/types/src/containers/Wireframe/index.d.ts +3 -0
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +58 -59
- package/src/DebugPlugin.tsx +13 -3
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +21 -1
- package/src/capabilities/react-surface/react-surface.tsx +27 -10
- package/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.tsx +2 -2
- package/src/components/SchemaTable/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +3 -2
- package/src/components/SpaceGenerator/index.ts +2 -3
- package/src/components/SpaceGenerator/presets.ts +32 -24
- package/src/components/index.ts +2 -13
- package/src/{components → containers/DebugGraph}/DebugGraph.tsx +0 -2
- package/src/containers/DebugGraph/index.ts +7 -0
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +45 -0
- package/src/containers/DebugObjectPanel/index.ts +7 -0
- package/src/{components → containers/DebugSettings}/DebugSettings.tsx +20 -4
- package/src/containers/DebugSettings/index.ts +7 -0
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +60 -0
- package/src/containers/DebugSpaceObjectsPanel/index.ts +7 -0
- package/src/containers/DebugStatus/index.ts +7 -0
- package/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.tsx +0 -2
- package/src/containers/DevtoolsOverviewContainer/index.ts +7 -0
- package/src/{components → containers}/SpaceGenerator/SpaceGenerator.tsx +35 -34
- package/src/containers/SpaceGenerator/index.ts +7 -0
- package/src/{components → containers/Wireframe}/Wireframe.tsx +2 -2
- package/src/containers/Wireframe/index.ts +7 -0
- package/src/containers/index.ts +14 -0
- package/src/translations.ts +2 -0
- package/dist/lib/browser/SpaceGenerator-W3LJORYT.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FMVC5GPV.mjs +0 -758
- package/dist/lib/browser/react-surface-FMVC5GPV.mjs.map +0 -7
- package/dist/types/src/components/Container.d.ts +0 -5
- package/dist/types/src/components/Container.d.ts.map +0 -1
- package/dist/types/src/components/DebugGraph.d.ts.map +0 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +0 -1
- package/dist/types/src/components/DebugSettings.d.ts.map +0 -1
- package/dist/types/src/components/DebugStatus.d.ts.map +0 -1
- package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +0 -15
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +0 -1
- package/dist/types/src/components/Wireframe.d.ts.map +0 -1
- package/src/components/Container.tsx +0 -15
- package/src/components/DebugObjectPanel.tsx +0 -32
- package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +0 -54
- /package/dist/types/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.d.ts +0 -0
- /package/dist/types/src/{components → containers/DebugStatus}/DebugStatus.d.ts +0 -0
- /package/dist/types/src/{components → containers}/SpaceGenerator/SpaceGenerator.d.ts +0 -0
- /package/dist/types/src/{components → containers/Wireframe}/Wireframe.d.ts +0 -0
- /package/src/{components → containers/DebugStatus}/DebugStatus.tsx +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-debug",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.4a85c3132b",
|
|
4
4
|
"description": "DXOS Surface plugin for testing.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
-
"browser": "./dist/lib/browser/index.mjs",
|
|
18
17
|
"source": "./src/index.ts",
|
|
19
|
-
"types": "./dist/types/src/index.d.ts"
|
|
18
|
+
"types": "./dist/types/src/index.d.ts",
|
|
19
|
+
"browser": "./dist/lib/browser/index.mjs"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -38,55 +38,54 @@
|
|
|
38
38
|
"react-json-tree": "^0.18.0",
|
|
39
39
|
"react-resize-detector": "^11.0.1",
|
|
40
40
|
"workerize-loader": "^2.0.2",
|
|
41
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/context": "0.8.4-main.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/echo": "0.8.4-main.
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/invariant": "0.8.4-main.
|
|
58
|
-
"@dxos/keys": "0.8.4-main.
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/plugin-
|
|
64
|
-
"@dxos/plugin-
|
|
65
|
-
"@dxos/plugin-markdown": "0.8.4-main.
|
|
66
|
-
"@dxos/plugin-
|
|
67
|
-
"@dxos/plugin-
|
|
68
|
-
"@dxos/plugin-
|
|
69
|
-
"@dxos/plugin-sheet": "0.8.4-main.
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/plugin-
|
|
72
|
-
"@dxos/plugin-
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/react-client": "0.8.4-main.
|
|
76
|
-
"@dxos/react-
|
|
77
|
-
"@dxos/react-ui-
|
|
78
|
-
"@dxos/react-
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/react-ui-
|
|
81
|
-
"@dxos/react-ui-
|
|
82
|
-
"@dxos/react-ui-
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/react-ui-
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/plugin-script": "0.8.4-main.3eb6e50203"
|
|
41
|
+
"@dxos/app-framework": "0.8.4-main.4a85c3132b",
|
|
42
|
+
"@dxos/app-toolkit": "0.8.4-main.4a85c3132b",
|
|
43
|
+
"@dxos/assistant-toolkit": "0.8.4-main.4a85c3132b",
|
|
44
|
+
"@dxos/async": "0.8.4-main.4a85c3132b",
|
|
45
|
+
"@dxos/blueprints": "0.8.4-main.4a85c3132b",
|
|
46
|
+
"@dxos/client-services": "0.8.4-main.4a85c3132b",
|
|
47
|
+
"@dxos/compute": "0.8.4-main.4a85c3132b",
|
|
48
|
+
"@dxos/conductor": "0.8.4-main.4a85c3132b",
|
|
49
|
+
"@dxos/config": "0.8.4-main.4a85c3132b",
|
|
50
|
+
"@dxos/context": "0.8.4-main.4a85c3132b",
|
|
51
|
+
"@dxos/echo": "0.8.4-main.4a85c3132b",
|
|
52
|
+
"@dxos/echo-generator": "0.8.4-main.4a85c3132b",
|
|
53
|
+
"@dxos/devtools": "0.8.4-main.4a85c3132b",
|
|
54
|
+
"@dxos/effect": "0.8.4-main.4a85c3132b",
|
|
55
|
+
"@dxos/functions": "0.8.4-main.4a85c3132b",
|
|
56
|
+
"@dxos/echo-pipeline": "0.8.4-main.4a85c3132b",
|
|
57
|
+
"@dxos/invariant": "0.8.4-main.4a85c3132b",
|
|
58
|
+
"@dxos/keys": "0.8.4-main.4a85c3132b",
|
|
59
|
+
"@dxos/log": "0.8.4-main.4a85c3132b",
|
|
60
|
+
"@dxos/plugin-deck": "0.8.4-main.4a85c3132b",
|
|
61
|
+
"@dxos/plugin-client": "0.8.4-main.4a85c3132b",
|
|
62
|
+
"@dxos/operation": "0.8.4-main.4a85c3132b",
|
|
63
|
+
"@dxos/plugin-graph": "0.8.4-main.4a85c3132b",
|
|
64
|
+
"@dxos/plugin-inbox": "0.8.4-main.4a85c3132b",
|
|
65
|
+
"@dxos/plugin-markdown": "0.8.4-main.4a85c3132b",
|
|
66
|
+
"@dxos/plugin-meeting": "0.8.4-main.4a85c3132b",
|
|
67
|
+
"@dxos/plugin-script": "0.8.4-main.4a85c3132b",
|
|
68
|
+
"@dxos/plugin-sketch": "0.8.4-main.4a85c3132b",
|
|
69
|
+
"@dxos/plugin-sheet": "0.8.4-main.4a85c3132b",
|
|
70
|
+
"@dxos/plugin-space": "0.8.4-main.4a85c3132b",
|
|
71
|
+
"@dxos/plugin-status-bar": "0.8.4-main.4a85c3132b",
|
|
72
|
+
"@dxos/plugin-table": "0.8.4-main.4a85c3132b",
|
|
73
|
+
"@dxos/plugin-theme": "0.8.4-main.4a85c3132b",
|
|
74
|
+
"@dxos/protocols": "0.8.4-main.4a85c3132b",
|
|
75
|
+
"@dxos/react-client": "0.8.4-main.4a85c3132b",
|
|
76
|
+
"@dxos/react-hooks": "0.8.4-main.4a85c3132b",
|
|
77
|
+
"@dxos/react-ui-attention": "0.8.4-main.4a85c3132b",
|
|
78
|
+
"@dxos/react-ui-canvas-compute": "0.8.4-main.4a85c3132b",
|
|
79
|
+
"@dxos/random": "0.8.4-main.4a85c3132b",
|
|
80
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.4a85c3132b",
|
|
81
|
+
"@dxos/react-ui-table": "0.8.4-main.4a85c3132b",
|
|
82
|
+
"@dxos/react-ui-stack": "0.8.4-main.4a85c3132b",
|
|
83
|
+
"@dxos/schema": "0.8.4-main.4a85c3132b",
|
|
84
|
+
"@dxos/types": "0.8.4-main.4a85c3132b",
|
|
85
|
+
"@dxos/util": "0.8.4-main.4a85c3132b",
|
|
86
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.4a85c3132b",
|
|
87
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.4a85c3132b",
|
|
88
|
+
"@dxos/react-ui-form": "0.8.4-main.4a85c3132b"
|
|
90
89
|
},
|
|
91
90
|
"devDependencies": {
|
|
92
91
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -96,10 +95,10 @@
|
|
|
96
95
|
"effect": "3.19.16",
|
|
97
96
|
"react": "~19.2.3",
|
|
98
97
|
"react-dom": "~19.2.3",
|
|
99
|
-
"vite": "7.1.
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/
|
|
98
|
+
"vite": "^7.1.11",
|
|
99
|
+
"@dxos/react-ui": "0.8.4-main.4a85c3132b",
|
|
100
|
+
"@dxos/storybook-utils": "0.8.4-main.4a85c3132b",
|
|
101
|
+
"@dxos/ui-theme": "0.8.4-main.4a85c3132b"
|
|
103
102
|
},
|
|
104
103
|
"peerDependencies": {
|
|
105
104
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -107,9 +106,9 @@
|
|
|
107
106
|
"effect": "3.19.16",
|
|
108
107
|
"react": "~19.2.3",
|
|
109
108
|
"react-dom": "~19.2.3",
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
112
|
-
"@dxos/
|
|
109
|
+
"@dxos/ui-theme": "0.8.4-main.4a85c3132b",
|
|
110
|
+
"@dxos/react-ui": "0.8.4-main.4a85c3132b",
|
|
111
|
+
"@dxos/random": "0.8.4-main.4a85c3132b"
|
|
113
112
|
},
|
|
114
113
|
"publishConfig": {
|
|
115
114
|
"access": "public"
|
package/src/DebugPlugin.tsx
CHANGED
|
@@ -4,20 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
7
|
+
import { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';
|
|
8
8
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
+
import { type LogBuffer } from '@dxos/log';
|
|
9
10
|
import { type Client } from '@dxos/react-client';
|
|
10
11
|
|
|
11
12
|
import { AppGraphBuilder, DebugSettings, ReactContext, ReactSurface } from './capabilities';
|
|
12
13
|
import { meta } from './meta';
|
|
13
14
|
import { translations } from './translations';
|
|
14
15
|
|
|
16
|
+
export type DebugPluginOptions = {
|
|
17
|
+
/** Shared log buffer for capturing and downloading logs. */
|
|
18
|
+
logBuffer: LogBuffer;
|
|
19
|
+
};
|
|
20
|
+
|
|
15
21
|
// TODO(wittjosiah): Factor out DevtoolsPlugin?
|
|
16
|
-
export const DebugPlugin = Plugin.define(meta).pipe(
|
|
22
|
+
export const DebugPlugin = Plugin.define<DebugPluginOptions>(meta).pipe(
|
|
17
23
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
18
24
|
AppPlugin.addReactContextModule({ activate: ReactContext }),
|
|
19
25
|
AppPlugin.addSettingsModule({ activate: DebugSettings }),
|
|
20
|
-
|
|
26
|
+
Plugin.addModule(({ logBuffer }) => ({
|
|
27
|
+
id: Capability.getModuleTag(ReactSurface) ?? 'surfaces',
|
|
28
|
+
activatesOn: ActivationEvents.SetupReactSurface,
|
|
29
|
+
activate: () => ReactSurface({ logBuffer }),
|
|
30
|
+
})),
|
|
21
31
|
AppPlugin.addTranslationsModule({ translations }),
|
|
22
32
|
Plugin.addModule({
|
|
23
33
|
id: 'setup-devtools',
|
|
@@ -404,7 +404,7 @@ export default Capability.makeModule(
|
|
|
404
404
|
{
|
|
405
405
|
id: [node.id, 'devtools'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
406
406
|
type: DECK_COMPANION_TYPE,
|
|
407
|
-
data:
|
|
407
|
+
data: 'devtools' as const,
|
|
408
408
|
properties: {
|
|
409
409
|
label: ['devtools overview label', { ns: meta.id }],
|
|
410
410
|
icon: 'ph--equalizer--regular',
|
|
@@ -414,6 +414,26 @@ export default Capability.makeModule(
|
|
|
414
414
|
},
|
|
415
415
|
]),
|
|
416
416
|
}),
|
|
417
|
+
|
|
418
|
+
// Object explorer.
|
|
419
|
+
GraphBuilder.createExtension({
|
|
420
|
+
id: `${meta.id}/space-objects`,
|
|
421
|
+
match: NodeMatcher.whenRoot,
|
|
422
|
+
connector: (node) =>
|
|
423
|
+
Effect.succeed([
|
|
424
|
+
{
|
|
425
|
+
id: [node.id, 'space-objects'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
426
|
+
type: DECK_COMPANION_TYPE,
|
|
427
|
+
data: 'space-objects' as const,
|
|
428
|
+
properties: {
|
|
429
|
+
label: ['space objects label', { ns: meta.id }],
|
|
430
|
+
icon: 'ph--cube--regular',
|
|
431
|
+
disposition: 'hidden',
|
|
432
|
+
position: 'fallback',
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
]),
|
|
436
|
+
}),
|
|
417
437
|
]);
|
|
418
438
|
|
|
419
439
|
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
@@ -37,24 +37,26 @@ import {
|
|
|
37
37
|
WorkflowPanel,
|
|
38
38
|
} from '@dxos/devtools';
|
|
39
39
|
import { Obj } from '@dxos/echo';
|
|
40
|
+
import { Collection } from '@dxos/echo';
|
|
41
|
+
import { type LogBuffer } from '@dxos/log';
|
|
40
42
|
import { log } from '@dxos/log';
|
|
41
43
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
42
44
|
import { type Graph } from '@dxos/plugin-graph';
|
|
43
45
|
import { ScriptOperation } from '@dxos/plugin-script/types';
|
|
44
46
|
import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
45
47
|
import { type Space, SpaceState, isSpace, parseId } from '@dxos/react-client/echo';
|
|
46
|
-
import {
|
|
47
|
-
import { Collection } from '@dxos/schema';
|
|
48
|
+
import { Panel } from '@dxos/react-ui';
|
|
48
49
|
|
|
49
50
|
import {
|
|
50
51
|
DebugGraph,
|
|
51
52
|
DebugObjectPanel,
|
|
52
53
|
DebugSettings,
|
|
54
|
+
DebugSpaceObjectsPanel,
|
|
53
55
|
DebugStatus,
|
|
54
56
|
DevtoolsOverviewContainer,
|
|
55
57
|
SpaceGenerator,
|
|
56
58
|
Wireframe,
|
|
57
|
-
} from '../../
|
|
59
|
+
} from '../../containers';
|
|
58
60
|
import { meta } from '../../meta';
|
|
59
61
|
import { DebugCapabilities, type DebugSettingsProps, Devtools } from '../../types';
|
|
60
62
|
|
|
@@ -85,8 +87,12 @@ const useCurrentSpace = () => {
|
|
|
85
87
|
return space;
|
|
86
88
|
};
|
|
87
89
|
|
|
90
|
+
type ReactSurfaceOptions = {
|
|
91
|
+
logBuffer: LogBuffer;
|
|
92
|
+
};
|
|
93
|
+
|
|
88
94
|
export default Capability.makeModule(
|
|
89
|
-
Effect.fnUntraced(function* () {
|
|
95
|
+
Effect.fnUntraced(function* ({ logBuffer }: ReactSurfaceOptions) {
|
|
90
96
|
const capabilities = yield* Capability.Service;
|
|
91
97
|
const registry = capabilities.get(Capabilities.AtomRegistry);
|
|
92
98
|
const settingsAtom = capabilities.get(DebugCapabilities.Settings);
|
|
@@ -99,7 +105,7 @@ export default Capability.makeModule(
|
|
|
99
105
|
AppCapabilities.isSettings(data.subject) && data.subject.prefix === meta.id,
|
|
100
106
|
component: ({ data: { subject } }) => {
|
|
101
107
|
const { settings, updateSettings } = useSettingsState<DebugSettingsProps>(subject.atom);
|
|
102
|
-
return <DebugSettings settings={settings} onSettingsChange={updateSettings} />;
|
|
108
|
+
return <DebugSettings settings={settings} onSettingsChange={updateSettings} logBuffer={logBuffer} />;
|
|
103
109
|
},
|
|
104
110
|
}),
|
|
105
111
|
Surface.create({
|
|
@@ -133,9 +139,13 @@ export default Capability.makeModule(
|
|
|
133
139
|
);
|
|
134
140
|
|
|
135
141
|
return (
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
|
|
142
|
+
<Panel.Root role={role} className='dx-article'>
|
|
143
|
+
<Panel.Content asChild>
|
|
144
|
+
<Panel.Content asChild>
|
|
145
|
+
<SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />
|
|
146
|
+
</Panel.Content>
|
|
147
|
+
</Panel.Content>
|
|
148
|
+
</Panel.Root>
|
|
139
149
|
);
|
|
140
150
|
},
|
|
141
151
|
}),
|
|
@@ -153,7 +163,7 @@ export default Capability.makeModule(
|
|
|
153
163
|
const settings = registry.get(settingsAtom);
|
|
154
164
|
return Obj.isObject(data.subject) && !!settings.wireframe;
|
|
155
165
|
},
|
|
156
|
-
component: ({ data, role }) => (
|
|
166
|
+
component: ({ data, role, name }) => (
|
|
157
167
|
<Wireframe label={`${role}:${name}`} object={data.subject} classNames='row-span-2 overflow-hidden' />
|
|
158
168
|
),
|
|
159
169
|
}),
|
|
@@ -167,14 +177,21 @@ export default Capability.makeModule(
|
|
|
167
177
|
Surface.create({
|
|
168
178
|
id: `${meta.id}/devtools-overview`,
|
|
169
179
|
role: 'deck-companion--devtools',
|
|
180
|
+
filter: (data): data is { subject: 'devtools' } => data.subject === 'devtools',
|
|
170
181
|
component: () => <DevtoolsOverviewContainer />,
|
|
171
182
|
}),
|
|
183
|
+
Surface.create({
|
|
184
|
+
id: `${meta.id}/space-objects`,
|
|
185
|
+
role: 'deck-companion--space-objects',
|
|
186
|
+
filter: (data): data is { subject: 'space-objects' } => data.subject === 'space-objects',
|
|
187
|
+
component: () => <DebugSpaceObjectsPanel />,
|
|
188
|
+
}),
|
|
189
|
+
|
|
172
190
|
Surface.create({
|
|
173
191
|
id: `${meta.id}/status`,
|
|
174
192
|
role: 'status',
|
|
175
193
|
component: () => <DebugStatus />,
|
|
176
194
|
}),
|
|
177
|
-
|
|
178
195
|
//
|
|
179
196
|
// Devtools
|
|
180
197
|
//
|
|
@@ -19,8 +19,8 @@ export const SchemaTable = ({ types, objects = {}, label, onClick }: SchemaTable
|
|
|
19
19
|
<h2 className='p-2'>{label}</h2>
|
|
20
20
|
{types.map((type) => (
|
|
21
21
|
<div key={type.typename} className='grid grid-cols-subgrid col-span-3 items-center'>
|
|
22
|
-
<div className='
|
|
23
|
-
<div className='
|
|
22
|
+
<div className='px-2 text-sm font-mono text-subdued'>{type.typename}</div>
|
|
23
|
+
<div className='px-2 text-right font-mono'>{objects[type.typename] ?? 0}</div>
|
|
24
24
|
<IconButton
|
|
25
25
|
variant='ghost'
|
|
26
26
|
icon='ph--plus--regular'
|
|
@@ -7,6 +7,7 @@ import type * as Schema from 'effect/Schema';
|
|
|
7
7
|
import { addressToA1Notation } from '@dxos/compute';
|
|
8
8
|
import { ComputeGraph, ComputeGraphModel, DEFAULT_OUTPUT, NODE_INPUT, NODE_OUTPUT } from '@dxos/conductor';
|
|
9
9
|
import { DXN, Filter, Key, type Type } from '@dxos/echo';
|
|
10
|
+
import { View } from '@dxos/echo';
|
|
10
11
|
import { type OperationInvoker } from '@dxos/operation';
|
|
11
12
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
12
13
|
import { Sheet } from '@dxos/plugin-sheet/types';
|
|
@@ -15,7 +16,7 @@ import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
|
15
16
|
import { faker } from '@dxos/random';
|
|
16
17
|
import { type Client } from '@dxos/react-client';
|
|
17
18
|
import { type Space } from '@dxos/react-client/echo';
|
|
18
|
-
import {
|
|
19
|
+
import { getTypenameFromQuery } from '@dxos/schema';
|
|
19
20
|
import { type ValueGenerator, createAsyncGenerator } from '@dxos/schema/testing';
|
|
20
21
|
import { range } from '@dxos/util';
|
|
21
22
|
|
|
@@ -27,7 +28,7 @@ const findViewByTypename = async (views: View.View[], typename: string) => {
|
|
|
27
28
|
|
|
28
29
|
export type ObjectGenerator<T> = (space: Space, n: number, cb?: (objects: T[]) => void) => Promise<T[]>;
|
|
29
30
|
|
|
30
|
-
export const createGenerator = <S extends Type.
|
|
31
|
+
export const createGenerator = <S extends Type.AnyObj>(
|
|
31
32
|
client: Client,
|
|
32
33
|
invokePromise: OperationInvoker.OperationInvoker['invokePromise'],
|
|
33
34
|
schema: S,
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { AgentFunctions, EntityExtractionFunctions, ResearchBlueprint } from '@dxos/assistant-toolkit';
|
|
8
8
|
import { Prompt } from '@dxos/blueprints';
|
|
9
9
|
import { type ComputeGraphModel, NODE_INPUT } from '@dxos/conductor';
|
|
10
|
-
import { DXN, Filter, Key, Obj, Query, type QueryAST, Ref, Tag
|
|
10
|
+
import { DXN, Feed, Filter, JsonSchema, Key, Obj, Query, type QueryAST, Ref, Tag } from '@dxos/echo';
|
|
11
11
|
import { Trigger, serializeFunction } from '@dxos/functions';
|
|
12
12
|
import { invariant } from '@dxos/invariant';
|
|
13
|
-
import {
|
|
13
|
+
import { GmailFunctions } from '@dxos/plugin-inbox';
|
|
14
14
|
import { Mailbox } from '@dxos/plugin-inbox/types';
|
|
15
15
|
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
16
16
|
import { type Space } from '@dxos/react-client/echo';
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
createTrigger,
|
|
31
31
|
} from '@dxos/react-ui-canvas-compute';
|
|
32
32
|
import { CanvasBoard, CanvasGraphModel, pointMultiply, pointsToRect, rectToPoints } from '@dxos/react-ui-canvas-editor';
|
|
33
|
-
import {
|
|
33
|
+
import { ViewModel } from '@dxos/schema';
|
|
34
34
|
import { Message, Organization, Person, Pipeline } from '@dxos/types';
|
|
35
35
|
import { range, trim } from '@dxos/util';
|
|
36
36
|
|
|
@@ -85,7 +85,9 @@ export const generator = () => ({
|
|
|
85
85
|
// }),
|
|
86
86
|
// );
|
|
87
87
|
|
|
88
|
-
space.db.add(
|
|
88
|
+
space.db.add(
|
|
89
|
+
Obj.make(Person.Person, { [Obj.Meta]: { tags: [tagDxn] }, fullName: 'Rich', organization: Ref.make(org) }),
|
|
90
|
+
);
|
|
89
91
|
space.db.add(
|
|
90
92
|
Obj.make(Person.Person, {
|
|
91
93
|
fullName: 'Josiah',
|
|
@@ -114,7 +116,11 @@ export const generator = () => ({
|
|
|
114
116
|
[
|
|
115
117
|
PresetName.ORG_RESEARCH_PROJECT,
|
|
116
118
|
async (space, n, cb) => {
|
|
117
|
-
const
|
|
119
|
+
const feeds = await space.db.query(Filter.type(Feed.Feed)).run();
|
|
120
|
+
const mailbox = feeds.find((feed) => feed.kind === Mailbox.kind);
|
|
121
|
+
invariant(mailbox, 'Mailbox feed not found');
|
|
122
|
+
const queueDxn = Feed.getQueueDxn(mailbox)?.toString();
|
|
123
|
+
invariant(queueDxn, 'Mailbox feed missing queue DXN key');
|
|
118
124
|
const tag = await space.db.query(Filter.type(Tag.Tag, { label: 'Investor' })).first();
|
|
119
125
|
const tagDxn = Obj.getDXN(tag).toString();
|
|
120
126
|
|
|
@@ -130,7 +136,7 @@ export const generator = () => ({
|
|
|
130
136
|
kind: 'timer',
|
|
131
137
|
cron: '* * * * *', // Every minute.
|
|
132
138
|
},
|
|
133
|
-
function: Ref.make(serializeFunction(
|
|
139
|
+
function: Ref.make(serializeFunction(GmailFunctions.Sync)),
|
|
134
140
|
input: {
|
|
135
141
|
mailbox: Ref.make(mailbox),
|
|
136
142
|
},
|
|
@@ -143,9 +149,9 @@ export const generator = () => ({
|
|
|
143
149
|
// TODO(wittjosiah): Queue trigger doesn't support matching query of the column.
|
|
144
150
|
spec: {
|
|
145
151
|
kind: 'queue',
|
|
146
|
-
queue:
|
|
152
|
+
queue: queueDxn,
|
|
147
153
|
},
|
|
148
|
-
function: Ref.make(serializeFunction(
|
|
154
|
+
function: Ref.make(serializeFunction(EntityExtractionFunctions.Extract)),
|
|
149
155
|
input: {
|
|
150
156
|
source: '{{event.item}}',
|
|
151
157
|
},
|
|
@@ -168,7 +174,7 @@ export const generator = () => ({
|
|
|
168
174
|
Create a research note for it at the end.
|
|
169
175
|
NOTE: Do mocked reseach (set mockSearch to true).
|
|
170
176
|
`,
|
|
171
|
-
blueprints: [Ref.make(ResearchBlueprint)],
|
|
177
|
+
blueprints: [Ref.make(ResearchBlueprint.make())],
|
|
172
178
|
}),
|
|
173
179
|
);
|
|
174
180
|
|
|
@@ -181,7 +187,7 @@ export const generator = () => ({
|
|
|
181
187
|
ast: organizationsQuery.ast,
|
|
182
188
|
},
|
|
183
189
|
},
|
|
184
|
-
function: Ref.make(serializeFunction(
|
|
190
|
+
function: Ref.make(serializeFunction(AgentFunctions.Prompt)),
|
|
185
191
|
input: {
|
|
186
192
|
prompt: Ref.make(researchPrompt),
|
|
187
193
|
input: '{{event.subject}}',
|
|
@@ -189,27 +195,27 @@ export const generator = () => ({
|
|
|
189
195
|
}),
|
|
190
196
|
);
|
|
191
197
|
|
|
192
|
-
const mailboxView =
|
|
198
|
+
const mailboxView = ViewModel.make({
|
|
193
199
|
query: Query.select(
|
|
194
200
|
Filter.type(Message.Message, {
|
|
195
201
|
properties: { labels: Filter.contains('investor') },
|
|
196
202
|
}),
|
|
197
|
-
).
|
|
198
|
-
queues: [
|
|
203
|
+
).from({
|
|
204
|
+
queues: [queueDxn],
|
|
199
205
|
}),
|
|
200
|
-
jsonSchema:
|
|
206
|
+
jsonSchema: JsonSchema.toJsonSchema(Message.Message),
|
|
201
207
|
});
|
|
202
|
-
const contactsView =
|
|
208
|
+
const contactsView = ViewModel.make({
|
|
203
209
|
query: contactsQuery,
|
|
204
|
-
jsonSchema:
|
|
210
|
+
jsonSchema: JsonSchema.toJsonSchema(Person.Person),
|
|
205
211
|
});
|
|
206
|
-
const organizationsView =
|
|
212
|
+
const organizationsView = ViewModel.make({
|
|
207
213
|
query: organizationsQuery,
|
|
208
|
-
jsonSchema:
|
|
214
|
+
jsonSchema: JsonSchema.toJsonSchema(Organization.Organization),
|
|
209
215
|
});
|
|
210
|
-
const notesView =
|
|
216
|
+
const notesView = ViewModel.make({
|
|
211
217
|
query: notesQuery,
|
|
212
|
-
jsonSchema:
|
|
218
|
+
jsonSchema: JsonSchema.toJsonSchema(Markdown.Document),
|
|
213
219
|
});
|
|
214
220
|
|
|
215
221
|
return space.db.add(
|
|
@@ -392,7 +398,7 @@ export const generator = () => ({
|
|
|
392
398
|
// const templateComputeNode = computeModel.nodes.find((n) => n.id === template.node);
|
|
393
399
|
// invariant(templateComputeNode, 'Template compute node was not created.');
|
|
394
400
|
// templateComputeNode.value = templateContent.join('\n');
|
|
395
|
-
// templateComputeNode.inputSchema =
|
|
401
|
+
// templateComputeNode.inputSchema = JsonSchema.toJsonSchema(EmailTriggerOutput);
|
|
396
402
|
|
|
397
403
|
// attachTrigger(functionTrigger, computeModel);
|
|
398
404
|
|
|
@@ -526,7 +532,7 @@ export const generator = () => ({
|
|
|
526
532
|
// invariant(templateComputeNode, 'Template compute node was not created.');
|
|
527
533
|
// templateComputeNode.value = templateContent.join('\n');
|
|
528
534
|
// const extendedSchema = Schema.extend(EmailTriggerOutput, Schema.Struct({ text: Schema.String }));
|
|
529
|
-
// templateComputeNode.inputSchema =
|
|
535
|
+
// templateComputeNode.inputSchema = JsonSchema.toJsonSchema(extendedSchema);
|
|
530
536
|
|
|
531
537
|
// attachTrigger(functionTrigger, computeModel);
|
|
532
538
|
|
|
@@ -765,7 +771,9 @@ const createQueueSinkPreset = <SpecType extends Trigger.Kind>(
|
|
|
765
771
|
invariant(templateComputeNode, 'Template compute node was not created.');
|
|
766
772
|
// NOTE: These are plain object mutations during model construction, not ECHO object mutations.
|
|
767
773
|
templateComputeNode.value = ['{', ' "@type": "{{type}}",', ' "id": "@{{changeId}}"', '}'].join('\n');
|
|
768
|
-
templateComputeNode.inputSchema =
|
|
774
|
+
templateComputeNode.inputSchema = JsonSchema.toJsonSchema(
|
|
775
|
+
Schema.Struct({ type: Schema.String, changeId: Schema.String }),
|
|
776
|
+
);
|
|
769
777
|
attachTrigger(functionTrigger, computeModel);
|
|
770
778
|
|
|
771
779
|
return { canvasModel, computeModel };
|
package/src/components/index.ts
CHANGED
|
@@ -2,16 +2,5 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { type DebugGraphProps } from './DebugGraph';
|
|
9
|
-
|
|
10
|
-
export const DebugGraph: ReturnType<typeof lazy<FC<DebugGraphProps>>> = lazy(() => import('./DebugGraph'));
|
|
11
|
-
export const DevtoolsOverviewContainer = lazy(() => import('./DevtoolsOverviewContainer'));
|
|
12
|
-
export const SpaceGenerator = lazy(() => import('./SpaceGenerator'));
|
|
13
|
-
|
|
14
|
-
export * from './DebugObjectPanel';
|
|
15
|
-
export * from './DebugSettings';
|
|
16
|
-
export * from './DebugStatus';
|
|
17
|
-
export * from './Wireframe';
|
|
5
|
+
export * from './SchemaTable';
|
|
6
|
+
export * from './SpaceGenerator';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { ObjectsTree } from '@dxos/devtools';
|
|
8
|
+
import { Filter, Obj, Query } from '@dxos/echo';
|
|
9
|
+
import type { ObjectId } from '@dxos/keys';
|
|
10
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
11
|
+
import { Clipboard, Grid, Panel, ScrollArea } from '@dxos/react-ui';
|
|
12
|
+
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
13
|
+
|
|
14
|
+
export type DebugObjectPanelProps = {
|
|
15
|
+
object: Obj.Unknown;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const DebugObjectPanel = ({ object }: DebugObjectPanelProps) => {
|
|
19
|
+
const db = Obj.getDatabase(object);
|
|
20
|
+
|
|
21
|
+
const [selectedId, setSelectedId] = useState<ObjectId | null>(null);
|
|
22
|
+
const [selectedObject] = useQuery(
|
|
23
|
+
db,
|
|
24
|
+
Query.select(Filter.id(selectedId ?? object.id)).options({ deleted: 'include' }),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Clipboard.Provider>
|
|
29
|
+
<Panel.Root>
|
|
30
|
+
<Panel.Content asChild>
|
|
31
|
+
<Grid rows={db ? 2 : 1} classNames='divide-y divide-separator'>
|
|
32
|
+
{db && (
|
|
33
|
+
<ScrollArea.Root>
|
|
34
|
+
<ScrollArea.Viewport>
|
|
35
|
+
<ObjectsTree db={db} root={object} onSelect={(entity) => setSelectedId(entity.id)} />
|
|
36
|
+
</ScrollArea.Viewport>
|
|
37
|
+
</ScrollArea.Root>
|
|
38
|
+
)}
|
|
39
|
+
<Json data={selectedObject} />
|
|
40
|
+
</Grid>
|
|
41
|
+
</Panel.Content>
|
|
42
|
+
</Panel.Root>
|
|
43
|
+
</Clipboard.Provider>
|
|
44
|
+
);
|
|
45
|
+
};
|