@dxos/plugin-debug 0.8.4-main.72ec0f3 → 0.8.4-main.937b3ca

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/lib/browser/DebugGraph-6VMEOKEV.mjs +15 -0
  2. package/dist/lib/browser/DebugGraph-6VMEOKEV.mjs.map +7 -0
  3. package/dist/lib/browser/DevtoolsOverviewContainer-77PKFLYV.mjs +19 -0
  4. package/dist/lib/browser/{DevtoolsOverviewContainer-JXVZVPHN.mjs.map → DevtoolsOverviewContainer-77PKFLYV.mjs.map} +1 -1
  5. package/dist/lib/browser/{SpaceGenerator-46TAISVE.mjs → SpaceGenerator-ZHVZWGM7.mjs} +192 -195
  6. package/dist/lib/browser/SpaceGenerator-ZHVZWGM7.mjs.map +7 -0
  7. package/dist/lib/browser/app-graph-builder-FBDRMMYF.mjs +597 -0
  8. package/dist/lib/browser/app-graph-builder-FBDRMMYF.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-SRV2AIGJ.mjs → chunk-4UFQXPP7.mjs} +11 -1
  10. package/dist/lib/browser/chunk-4UFQXPP7.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-WZFZ4ESO.mjs → chunk-A5H5GRV6.mjs} +1 -1
  12. package/dist/lib/browser/chunk-A5H5GRV6.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +33 -38
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/react-context-FSWBT3MH.mjs +17 -0
  17. package/dist/lib/browser/react-context-FSWBT3MH.mjs.map +7 -0
  18. package/dist/lib/browser/react-surface-W62RJ32U.mjs +757 -0
  19. package/dist/lib/browser/react-surface-W62RJ32U.mjs.map +7 -0
  20. package/dist/lib/browser/settings-KA4GN73K.mjs +31 -0
  21. package/dist/lib/browser/settings-KA4GN73K.mjs.map +7 -0
  22. package/dist/types/src/DebugPlugin.d.ts +2 -1
  23. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  25. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  26. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  27. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  28. package/dist/types/src/capabilities/index.d.ts +4 -8
  29. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/react-context/index.d.ts +7 -0
  31. package/dist/types/src/capabilities/react-context/index.d.ts.map +1 -0
  32. package/dist/types/src/capabilities/react-context/react-context.d.ts +10 -0
  33. package/dist/types/src/capabilities/react-context/react-context.d.ts.map +1 -0
  34. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  35. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  36. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  37. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  38. package/dist/types/src/capabilities/settings/index.d.ts +3 -0
  39. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  40. package/dist/types/src/capabilities/settings/settings.d.ts +5 -0
  41. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  42. package/dist/types/src/components/DebugGraph.d.ts +5 -4
  43. package/dist/types/src/components/DebugGraph.d.ts.map +1 -1
  44. package/dist/types/src/components/DebugObjectPanel.d.ts +1 -1
  45. package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
  46. package/dist/types/src/components/DebugSettings.d.ts +4 -2
  47. package/dist/types/src/components/DebugSettings.d.ts.map +1 -1
  48. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +5 -5
  49. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
  50. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +2 -2
  51. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  52. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +1 -1
  53. package/dist/types/src/components/SpaceGenerator/presets.d.ts +1 -4
  54. package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
  55. package/dist/types/src/components/Wireframe.d.ts +1 -1
  56. package/dist/types/src/components/Wireframe.d.ts.map +1 -1
  57. package/dist/types/src/components/index.d.ts +4 -4
  58. package/dist/types/src/components/index.d.ts.map +1 -1
  59. package/dist/types/src/meta.d.ts +2 -2
  60. package/dist/types/src/meta.d.ts.map +1 -1
  61. package/dist/types/src/types.d.ts +5 -0
  62. package/dist/types/src/types.d.ts.map +1 -1
  63. package/dist/types/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +76 -71
  65. package/src/DebugPlugin.tsx +16 -31
  66. package/src/capabilities/app-graph-builder/app-graph-builder.ts +419 -0
  67. package/src/capabilities/app-graph-builder/index.ts +7 -0
  68. package/src/capabilities/index.ts +4 -6
  69. package/src/capabilities/react-context/index.ts +7 -0
  70. package/src/capabilities/react-context/react-context.tsx +20 -0
  71. package/src/capabilities/react-surface/index.ts +7 -0
  72. package/src/capabilities/react-surface/react-surface.tsx +409 -0
  73. package/src/capabilities/settings/index.ts +7 -0
  74. package/src/capabilities/settings/settings.ts +30 -0
  75. package/src/components/DebugGraph.tsx +4 -3
  76. package/src/components/DebugObjectPanel.tsx +4 -4
  77. package/src/components/DebugSettings.tsx +10 -5
  78. package/src/components/SpaceGenerator/ObjectGenerator.tsx +15 -16
  79. package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +7 -5
  80. package/src/components/SpaceGenerator/SpaceGenerator.tsx +17 -12
  81. package/src/components/SpaceGenerator/presets.ts +151 -37
  82. package/src/components/Wireframe.tsx +2 -2
  83. package/src/components/index.ts +4 -1
  84. package/src/meta.ts +2 -2
  85. package/src/types.ts +8 -0
  86. package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs +0 -20
  87. package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs.map +0 -7
  88. package/dist/lib/browser/DevtoolsOverviewContainer-JXVZVPHN.mjs +0 -25
  89. package/dist/lib/browser/SpaceGenerator-46TAISVE.mjs.map +0 -7
  90. package/dist/lib/browser/app-graph-builder-CRH2HJKT.mjs +0 -588
  91. package/dist/lib/browser/app-graph-builder-CRH2HJKT.mjs.map +0 -7
  92. package/dist/lib/browser/chunk-SRV2AIGJ.mjs.map +0 -7
  93. package/dist/lib/browser/chunk-WZFZ4ESO.mjs.map +0 -7
  94. package/dist/lib/browser/react-context-P2YDWEWI.mjs +0 -16
  95. package/dist/lib/browser/react-context-P2YDWEWI.mjs.map +0 -7
  96. package/dist/lib/browser/react-surface-2SNVZDEA.mjs +0 -774
  97. package/dist/lib/browser/react-surface-2SNVZDEA.mjs.map +0 -7
  98. package/dist/lib/browser/settings-SQXR3OAH.mjs +0 -22
  99. package/dist/lib/browser/settings-SQXR3OAH.mjs.map +0 -7
  100. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  101. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  102. package/dist/types/src/capabilities/react-context.d.ts +0 -8
  103. package/dist/types/src/capabilities/react-context.d.ts.map +0 -1
  104. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  105. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  106. package/dist/types/src/capabilities/settings.d.ts +0 -4
  107. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  108. package/src/capabilities/app-graph-builder.ts +0 -431
  109. package/src/capabilities/react-context.tsx +0 -16
  110. package/src/capabilities/react-surface.tsx +0 -418
  111. package/src/capabilities/settings.ts +0 -19
package/package.json CHANGED
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "name": "@dxos/plugin-debug",
3
- "version": "0.8.4-main.72ec0f3",
3
+ "version": "0.8.4-main.937b3ca",
4
4
  "description": "DXOS Surface plugin for testing.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
10
14
  "type": "module",
11
15
  "exports": {
12
16
  ".": {
17
+ "browser": "./dist/lib/browser/index.mjs",
13
18
  "source": "./src/index.ts",
14
- "types": "./dist/types/src/index.d.ts",
15
- "browser": "./dist/lib/browser/index.mjs"
19
+ "types": "./dist/types/src/index.d.ts"
16
20
  }
17
21
  },
18
22
  "types": "dist/types/src/index.d.ts",
@@ -26,84 +30,85 @@
26
30
  "dependencies": {
27
31
  "@antv/graphlib": "^2.0.4",
28
32
  "@antv/layout": "^1.2.13",
29
- "@automerge/automerge": "3.1.2",
30
- "@preact-signals/safe-react": "^0.9.0",
31
- "@preact/signals-core": "^1.12.1",
33
+ "@automerge/automerge": "3.2.3",
34
+ "@effect-atom/atom": "^0.4.13",
35
+ "@effect-atom/atom-react": "^0.4.6",
32
36
  "@tldraw/tldraw": "^3.0.0",
33
37
  "date-fns": "^3.3.1",
34
38
  "react-json-tree": "^0.18.0",
35
39
  "react-resize-detector": "^11.0.1",
36
40
  "workerize-loader": "^2.0.2",
37
- "@dxos/app-framework": "0.8.4-main.72ec0f3",
38
- "@dxos/assistant-toolkit": "0.8.4-main.72ec0f3",
39
- "@dxos/async": "0.8.4-main.72ec0f3",
40
- "@dxos/blueprints": "0.8.4-main.72ec0f3",
41
- "@dxos/compute": "0.8.4-main.72ec0f3",
42
- "@dxos/client-services": "0.8.4-main.72ec0f3",
43
- "@dxos/conductor": "0.8.4-main.72ec0f3",
44
- "@dxos/config": "0.8.4-main.72ec0f3",
45
- "@dxos/context": "0.8.4-main.72ec0f3",
46
- "@dxos/devtools": "0.8.4-main.72ec0f3",
47
- "@dxos/echo": "0.8.4-main.72ec0f3",
48
- "@dxos/echo-generator": "0.8.4-main.72ec0f3",
49
- "@dxos/echo-pipeline": "0.8.4-main.72ec0f3",
50
- "@dxos/invariant": "0.8.4-main.72ec0f3",
51
- "@dxos/keys": "0.8.4-main.72ec0f3",
52
- "@dxos/live-object": "0.8.4-main.72ec0f3",
53
- "@dxos/local-storage": "0.8.4-main.72ec0f3",
54
- "@dxos/log": "0.8.4-main.72ec0f3",
55
- "@dxos/plugin-deck": "0.8.4-main.72ec0f3",
56
- "@dxos/plugin-client": "0.8.4-main.72ec0f3",
57
- "@dxos/functions": "0.8.4-main.72ec0f3",
58
- "@dxos/plugin-graph": "0.8.4-main.72ec0f3",
59
- "@dxos/plugin-inbox": "0.8.4-main.72ec0f3",
60
- "@dxos/plugin-markdown": "0.8.4-main.72ec0f3",
61
- "@dxos/plugin-script": "0.8.4-main.72ec0f3",
62
- "@dxos/plugin-sketch": "0.8.4-main.72ec0f3",
63
- "@dxos/plugin-meeting": "0.8.4-main.72ec0f3",
64
- "@dxos/plugin-sheet": "0.8.4-main.72ec0f3",
65
- "@dxos/plugin-space": "0.8.4-main.72ec0f3",
66
- "@dxos/plugin-status-bar": "0.8.4-main.72ec0f3",
67
- "@dxos/plugin-theme": "0.8.4-main.72ec0f3",
68
- "@dxos/plugin-table": "0.8.4-main.72ec0f3",
69
- "@dxos/random": "0.8.4-main.72ec0f3",
70
- "@dxos/protocols": "0.8.4-main.72ec0f3",
71
- "@dxos/react-client": "0.8.4-main.72ec0f3",
72
- "@dxos/react-hooks": "0.8.4-main.72ec0f3",
73
- "@dxos/react-ui-attention": "0.8.4-main.72ec0f3",
74
- "@dxos/react-ui-canvas-editor": "0.8.4-main.72ec0f3",
75
- "@dxos/react-ui-stack": "0.8.4-main.72ec0f3",
76
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.72ec0f3",
77
- "@dxos/react-ui-table": "0.8.4-main.72ec0f3",
78
- "@dxos/react-ui-kanban": "0.8.4-main.72ec0f3",
79
- "@dxos/types": "0.8.4-main.72ec0f3",
80
- "@dxos/schema": "0.8.4-main.72ec0f3",
81
- "@dxos/util": "0.8.4-main.72ec0f3",
82
- "@dxos/react-ui-form": "0.8.4-main.72ec0f3",
83
- "@dxos/react-ui-canvas-compute": "0.8.4-main.72ec0f3"
41
+ "@dxos/assistant-toolkit": "0.8.4-main.937b3ca",
42
+ "@dxos/app-framework": "0.8.4-main.937b3ca",
43
+ "@dxos/async": "0.8.4-main.937b3ca",
44
+ "@dxos/blueprints": "0.8.4-main.937b3ca",
45
+ "@dxos/client-services": "0.8.4-main.937b3ca",
46
+ "@dxos/conductor": "0.8.4-main.937b3ca",
47
+ "@dxos/config": "0.8.4-main.937b3ca",
48
+ "@dxos/context": "0.8.4-main.937b3ca",
49
+ "@dxos/compute": "0.8.4-main.937b3ca",
50
+ "@dxos/devtools": "0.8.4-main.937b3ca",
51
+ "@dxos/echo-generator": "0.8.4-main.937b3ca",
52
+ "@dxos/echo": "0.8.4-main.937b3ca",
53
+ "@dxos/effect": "0.8.4-main.937b3ca",
54
+ "@dxos/echo-pipeline": "0.8.4-main.937b3ca",
55
+ "@dxos/invariant": "0.8.4-main.937b3ca",
56
+ "@dxos/functions": "0.8.4-main.937b3ca",
57
+ "@dxos/keys": "0.8.4-main.937b3ca",
58
+ "@dxos/log": "0.8.4-main.937b3ca",
59
+ "@dxos/operation": "0.8.4-main.937b3ca",
60
+ "@dxos/plugin-client": "0.8.4-main.937b3ca",
61
+ "@dxos/plugin-graph": "0.8.4-main.937b3ca",
62
+ "@dxos/plugin-deck": "0.8.4-main.937b3ca",
63
+ "@dxos/plugin-markdown": "0.8.4-main.937b3ca",
64
+ "@dxos/plugin-script": "0.8.4-main.937b3ca",
65
+ "@dxos/plugin-meeting": "0.8.4-main.937b3ca",
66
+ "@dxos/plugin-sheet": "0.8.4-main.937b3ca",
67
+ "@dxos/plugin-inbox": "0.8.4-main.937b3ca",
68
+ "@dxos/plugin-sketch": "0.8.4-main.937b3ca",
69
+ "@dxos/plugin-space": "0.8.4-main.937b3ca",
70
+ "@dxos/plugin-status-bar": "0.8.4-main.937b3ca",
71
+ "@dxos/plugin-theme": "0.8.4-main.937b3ca",
72
+ "@dxos/plugin-table": "0.8.4-main.937b3ca",
73
+ "@dxos/protocols": "0.8.4-main.937b3ca",
74
+ "@dxos/react-hooks": "0.8.4-main.937b3ca",
75
+ "@dxos/react-client": "0.8.4-main.937b3ca",
76
+ "@dxos/react-ui-attention": "0.8.4-main.937b3ca",
77
+ "@dxos/react-ui-canvas-editor": "0.8.4-main.937b3ca",
78
+ "@dxos/random": "0.8.4-main.937b3ca",
79
+ "@dxos/react-ui-form": "0.8.4-main.937b3ca",
80
+ "@dxos/react-ui-kanban": "0.8.4-main.937b3ca",
81
+ "@dxos/react-ui-stack": "0.8.4-main.937b3ca",
82
+ "@dxos/react-ui-table": "0.8.4-main.937b3ca",
83
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.937b3ca",
84
+ "@dxos/react-ui-mosaic": "0.8.4-main.937b3ca",
85
+ "@dxos/schema": "0.8.4-main.937b3ca",
86
+ "@dxos/types": "0.8.4-main.937b3ca",
87
+ "@dxos/util": "0.8.4-main.937b3ca",
88
+ "@dxos/react-ui-canvas-compute": "0.8.4-main.937b3ca"
84
89
  },
85
90
  "devDependencies": {
86
- "@effect-atom/atom-react": "^0.3.4",
87
- "@effect/platform": "0.92.1",
88
- "@types/react": "~19.2.2",
89
- "@types/react-dom": "~19.2.2",
90
- "effect": "3.18.3",
91
- "react": "~19.2.0",
92
- "react-dom": "~19.2.0",
91
+ "@effect-atom/atom-react": "^0.4.6",
92
+ "@effect/platform": "0.93.6",
93
+ "@types/react": "~19.2.7",
94
+ "@types/react-dom": "~19.2.3",
95
+ "effect": "3.19.11",
96
+ "react": "~19.2.3",
97
+ "react-dom": "~19.2.3",
93
98
  "vite": "7.1.9",
94
- "@dxos/react-ui": "0.8.4-main.72ec0f3",
95
- "@dxos/react-ui-theme": "0.8.4-main.72ec0f3",
96
- "@dxos/storybook-utils": "0.8.4-main.72ec0f3"
99
+ "@dxos/storybook-utils": "0.8.4-main.937b3ca",
100
+ "@dxos/react-ui": "0.8.4-main.937b3ca",
101
+ "@dxos/ui-theme": "0.8.4-main.937b3ca"
97
102
  },
98
103
  "peerDependencies": {
99
- "@effect-atom/atom-react": "^0.3.4",
100
- "@effect/platform": "^0.80.12",
101
- "effect": "^3.13.3",
102
- "react": "~19.2.0",
103
- "react-dom": "~19.2.0",
104
- "@dxos/random": "0.8.4-main.72ec0f3",
105
- "@dxos/react-ui": "0.8.4-main.72ec0f3",
106
- "@dxos/react-ui-theme": "0.8.4-main.72ec0f3"
104
+ "@effect-atom/atom-react": "^0.4.6",
105
+ "@effect/platform": "0.93.6",
106
+ "effect": "3.19.11",
107
+ "react": "~19.2.3",
108
+ "react-dom": "~19.2.3",
109
+ "@dxos/react-ui": "0.8.4-main.937b3ca",
110
+ "@dxos/random": "0.8.4-main.937b3ca",
111
+ "@dxos/ui-theme": "0.8.4-main.937b3ca"
107
112
  },
108
113
  "publishConfig": {
109
114
  "access": "public"
@@ -2,7 +2,9 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Common, Plugin } from '@dxos/app-framework';
6
8
  import { type Client } from '@dxos/react-client';
7
9
 
8
10
  import { AppGraphBuilder, DebugSettings, ReactContext, ReactSurface } from './capabilities';
@@ -10,36 +12,19 @@ import { meta } from './meta';
10
12
  import { translations } from './translations';
11
13
 
12
14
  // TODO(wittjosiah): Factor out DevtoolsPlugin?
13
- export const DebugPlugin = definePlugin(meta, () => {
14
- setupDevtools();
15
- return [
16
- defineModule({
17
- id: `${meta.id}/module/settings`,
18
- activatesOn: Events.SetupSettings,
19
- activate: DebugSettings,
20
- }),
21
- defineModule({
22
- id: `${meta.id}/module/translations`,
23
- activatesOn: Events.SetupTranslations,
24
- activate: () => contributes(Capabilities.Translations, translations),
25
- }),
26
- defineModule({
27
- id: `${meta.id}/module/react-context`,
28
- activatesOn: Events.Startup,
29
- activate: ReactContext,
30
- }),
31
- defineModule({
32
- id: `${meta.id}/module/react-surface`,
33
- activatesOn: Events.SetupReactSurface,
34
- activate: ReactSurface,
35
- }),
36
- defineModule({
37
- id: `${meta.id}/module/app-graph-builder`,
38
- activatesOn: Events.SetupAppGraph,
39
- activate: AppGraphBuilder,
40
- }),
41
- ];
42
- });
15
+ export const DebugPlugin = Plugin.define(meta).pipe(
16
+ Plugin.addModule({
17
+ id: 'setup-devtools',
18
+ activatesOn: Common.ActivationEvent.Startup,
19
+ activate: () => Effect.sync(() => setupDevtools()),
20
+ }),
21
+ Common.Plugin.addSettingsModule({ activate: DebugSettings }),
22
+ Common.Plugin.addTranslationsModule({ translations }),
23
+ Common.Plugin.addReactContextModule({ activate: ReactContext }),
24
+ Common.Plugin.addSurfaceModule({ activate: ReactSurface }),
25
+ Common.Plugin.addAppGraphModule({ activate: AppGraphBuilder }),
26
+ Plugin.make,
27
+ );
43
28
 
44
29
  const setupDevtools = () => {
45
30
  (globalThis as any).composer ??= {};
@@ -0,0 +1,419 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability, Common } from '@dxos/app-framework';
8
+ import { ClientCapabilities } from '@dxos/plugin-client';
9
+ import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
10
+ import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
11
+ import { meta as spaceMeta } from '@dxos/plugin-space';
12
+ import { parseId } from '@dxos/react-client/echo';
13
+
14
+ import { meta } from '../../meta';
15
+ import { Devtools } from '../../types';
16
+
17
+ const DEVTOOLS_TYPE = `${meta.id}/devtools`;
18
+
19
+ export default Capability.makeModule(
20
+ Effect.fnUntraced(function* () {
21
+ const extensions = yield* Effect.all([
22
+ // Devtools node.
23
+ GraphBuilder.createExtension({
24
+ id: `${meta.id}/devtools`,
25
+ match: NodeMatcher.whenAny(NodeMatcher.whenRoot, NodeMatcher.whenNodeType(`${spaceMeta.id}/settings`)),
26
+ connector: (node, get) =>
27
+ Effect.gen(function* () {
28
+ const client = yield* Capability.get(ClientCapabilities.Client);
29
+ const layoutAtom = get(yield* Capability.atom(Common.Capability.Layout))[0];
30
+ const layout = layoutAtom ? get(layoutAtom) : undefined;
31
+ const { spaceId } = parseId(layout?.workspace);
32
+ const space = spaceId ? client.spaces.get(spaceId) : undefined;
33
+ const [graph] = get(yield* Capability.atom(Common.Capability.AppGraph));
34
+
35
+ return [
36
+ {
37
+ id: `${Devtools.id}-${node.id}`,
38
+ data: null,
39
+ type: DEVTOOLS_TYPE,
40
+ properties: {
41
+ label: ['devtools label', { ns: meta.id }],
42
+ icon: 'ph--hammer--regular',
43
+ disposition: 'pin-end',
44
+ position: 'fallback',
45
+ },
46
+ nodes: [
47
+ ...(space && node.type === `${spaceMeta.id}/settings`
48
+ ? [
49
+ {
50
+ id: `debug-${node.id}`,
51
+ type: `${meta.id}/space`,
52
+ data: { space, type: `${meta.id}/space` },
53
+ properties: {
54
+ label: ['debug label', { ns: meta.id }],
55
+ icon: 'ph--bug--regular',
56
+ },
57
+ },
58
+ ]
59
+ : []),
60
+ {
61
+ id: `app-graph-${node.id}`,
62
+ type: `${meta.id}/app-graph`,
63
+ data: { graph: graph?.graph, root: space ? space.id : Node.RootId },
64
+ properties: {
65
+ label: ['debug app graph label', { ns: meta.id }],
66
+ icon: 'ph--graph--regular',
67
+ },
68
+ },
69
+ {
70
+ id: `${Devtools.Client.id}-${node.id}`,
71
+ data: null,
72
+ type: DEVTOOLS_TYPE,
73
+ properties: {
74
+ label: ['client label', { ns: meta.id }],
75
+ icon: 'ph--users--regular',
76
+ },
77
+ nodes: [
78
+ {
79
+ id: `${Devtools.Client.Config}-${node.id}`,
80
+ data: Devtools.Client.Config,
81
+ type: DEVTOOLS_TYPE,
82
+ properties: {
83
+ label: ['config label', { ns: meta.id }],
84
+ icon: 'ph--gear--regular',
85
+ },
86
+ },
87
+ {
88
+ id: `${Devtools.Client.Storage}-${node.id}`,
89
+ data: Devtools.Client.Storage,
90
+ type: DEVTOOLS_TYPE,
91
+ properties: {
92
+ label: ['storage label', { ns: meta.id }],
93
+ icon: 'ph--hard-drives--regular',
94
+ },
95
+ },
96
+ {
97
+ id: `${Devtools.Client.Logs}-${node.id}`,
98
+ data: Devtools.Client.Logs,
99
+ type: DEVTOOLS_TYPE,
100
+ properties: {
101
+ label: ['logs label', { ns: meta.id }],
102
+ icon: 'ph--file-text--regular',
103
+ },
104
+ },
105
+ {
106
+ id: `${Devtools.Client.Diagnostics}-${node.id}`,
107
+ data: Devtools.Client.Diagnostics,
108
+ type: DEVTOOLS_TYPE,
109
+ properties: {
110
+ label: ['diagnostics label', { ns: meta.id }],
111
+ icon: 'ph--chart-line--regular',
112
+ },
113
+ },
114
+ {
115
+ id: `${Devtools.Client.Tracing}-${node.id}`,
116
+ data: Devtools.Client.Tracing,
117
+ type: DEVTOOLS_TYPE,
118
+ properties: {
119
+ label: ['tracing label', { ns: meta.id }],
120
+ icon: 'ph--fire--regular',
121
+ },
122
+ },
123
+ ],
124
+ },
125
+ {
126
+ id: `${Devtools.Halo.id}-${node.id}`,
127
+ data: null,
128
+ type: DEVTOOLS_TYPE,
129
+ properties: {
130
+ label: ['halo label', { ns: meta.id }],
131
+ icon: 'ph--identification-badge--regular',
132
+ },
133
+ nodes: [
134
+ {
135
+ id: `${Devtools.Halo.Identity}-${node.id}`,
136
+ data: Devtools.Halo.Identity,
137
+ type: DEVTOOLS_TYPE,
138
+ properties: {
139
+ label: ['identity label', { ns: meta.id }],
140
+ icon: 'ph--identification-badge--regular',
141
+ },
142
+ },
143
+ {
144
+ id: `${Devtools.Halo.Devices}-${node.id}`,
145
+ data: Devtools.Halo.Devices,
146
+ type: DEVTOOLS_TYPE,
147
+ properties: {
148
+ label: ['devices label', { ns: meta.id }],
149
+ icon: 'ph--devices--regular',
150
+ },
151
+ },
152
+ {
153
+ id: `${Devtools.Halo.Keyring}-${node.id}`,
154
+ data: Devtools.Halo.Keyring,
155
+ type: DEVTOOLS_TYPE,
156
+ properties: {
157
+ label: ['keyring label', { ns: meta.id }],
158
+ icon: 'ph--key--regular',
159
+ },
160
+ },
161
+ {
162
+ id: `${Devtools.Halo.Credentials}-${node.id}`,
163
+ data: Devtools.Halo.Credentials,
164
+ type: DEVTOOLS_TYPE,
165
+ properties: {
166
+ label: ['credentials label', { ns: meta.id }],
167
+ icon: 'ph--credit-card--regular',
168
+ },
169
+ },
170
+ ],
171
+ },
172
+ {
173
+ id: `${Devtools.Echo.id}-${node.id}`,
174
+ data: null,
175
+ type: DEVTOOLS_TYPE,
176
+ properties: {
177
+ label: ['echo label', { ns: meta.id }],
178
+ icon: 'ph--database--regular',
179
+ },
180
+ nodes: [
181
+ {
182
+ id: `${Devtools.Echo.Spaces}-${node.id}`,
183
+ data: Devtools.Echo.Spaces,
184
+ type: DEVTOOLS_TYPE,
185
+ properties: {
186
+ label: ['spaces label', { ns: meta.id }],
187
+ icon: 'ph--graph--regular',
188
+ },
189
+ },
190
+ {
191
+ id: `${Devtools.Echo.Space}-${node.id}`,
192
+ data: Devtools.Echo.Space,
193
+ type: DEVTOOLS_TYPE,
194
+ properties: {
195
+ label: ['space label', { ns: meta.id }],
196
+ icon: 'ph--planet--regular',
197
+ },
198
+ },
199
+ {
200
+ id: `${Devtools.Echo.Feeds}-${node.id}`,
201
+ data: Devtools.Echo.Feeds,
202
+ type: DEVTOOLS_TYPE,
203
+ properties: {
204
+ label: ['feeds label', { ns: meta.id }],
205
+ icon: 'ph--list-bullets--regular',
206
+ },
207
+ },
208
+ {
209
+ id: `${Devtools.Echo.Objects}-${node.id}`,
210
+ data: Devtools.Echo.Objects,
211
+ type: DEVTOOLS_TYPE,
212
+ properties: {
213
+ label: ['objects label', { ns: meta.id }],
214
+ icon: 'ph--cube--regular',
215
+ },
216
+ },
217
+ {
218
+ id: `${Devtools.Echo.Schema}-${node.id}`,
219
+ data: Devtools.Echo.Schema,
220
+ type: DEVTOOLS_TYPE,
221
+ properties: {
222
+ label: ['schema label', { ns: meta.id }],
223
+ icon: 'ph--database--regular',
224
+ },
225
+ },
226
+ {
227
+ id: `${Devtools.Echo.Automerge}-${node.id}`,
228
+ data: Devtools.Echo.Automerge,
229
+ type: DEVTOOLS_TYPE,
230
+ properties: {
231
+ label: ['automerge label', { ns: meta.id }],
232
+ icon: 'ph--gear-six--regular',
233
+ },
234
+ },
235
+ {
236
+ id: `${Devtools.Echo.Queues}-${node.id}`,
237
+ data: Devtools.Echo.Queues,
238
+ type: DEVTOOLS_TYPE,
239
+ properties: {
240
+ label: ['queues label', { ns: meta.id }],
241
+ icon: 'ph--queue--regular',
242
+ },
243
+ },
244
+ {
245
+ id: `${Devtools.Echo.Members}-${node.id}`,
246
+ data: Devtools.Echo.Members,
247
+ type: DEVTOOLS_TYPE,
248
+ properties: {
249
+ label: ['members label', { ns: meta.id }],
250
+ icon: 'ph--users--regular',
251
+ },
252
+ },
253
+ {
254
+ id: `${Devtools.Echo.Metadata}-${node.id}`,
255
+ data: Devtools.Echo.Metadata,
256
+ type: DEVTOOLS_TYPE,
257
+ properties: {
258
+ label: ['metadata label', { ns: meta.id }],
259
+ icon: 'ph--hard-drive--regular',
260
+ },
261
+ },
262
+ ],
263
+ },
264
+ {
265
+ id: `${Devtools.Mesh.id}-${node.id}`,
266
+ data: null,
267
+ type: DEVTOOLS_TYPE,
268
+ properties: {
269
+ label: ['mesh label', { ns: meta.id }],
270
+ icon: 'ph--graph--regular',
271
+ },
272
+ nodes: [
273
+ {
274
+ id: `${Devtools.Mesh.Signal}-${node.id}`,
275
+ data: Devtools.Mesh.Signal,
276
+ type: DEVTOOLS_TYPE,
277
+ properties: {
278
+ label: ['signal label', { ns: meta.id }],
279
+ icon: 'ph--wifi-high--regular',
280
+ },
281
+ },
282
+ {
283
+ id: `${Devtools.Mesh.Swarm}-${node.id}`,
284
+ data: Devtools.Mesh.Swarm,
285
+ type: DEVTOOLS_TYPE,
286
+ properties: {
287
+ label: ['swarm label', { ns: meta.id }],
288
+ icon: 'ph--users-three--regular',
289
+ },
290
+ },
291
+ {
292
+ id: `${Devtools.Mesh.Network}-${node.id}`,
293
+ data: Devtools.Mesh.Network,
294
+ type: DEVTOOLS_TYPE,
295
+ properties: {
296
+ label: ['network label', { ns: meta.id }],
297
+ icon: 'ph--polygon--regular',
298
+ },
299
+ },
300
+ ],
301
+ },
302
+ // TODO(wittjosiah): Remove?
303
+ // {
304
+ // id: `${prefix}-${Devtools.Agent.id}`,
305
+ // data: null,
306
+ // type: DEVTOOLS_TYPE,
307
+ // properties: {
308
+ // label: ['agent label', { ns: meta.id }],
309
+ // icon: 'ph--robot--regular',
310
+ // },
311
+ // nodes: [
312
+ // {
313
+ // id: `${prefix}-${Devtools.Agent.Dashboard}`,
314
+ // data: Devtools.Agent.Dashboard,
315
+ // type: DEVTOOLS_TYPE,
316
+ // properties: {
317
+ // label: ['dashboard label', { ns: meta.id }],
318
+ // icon: 'ph--computer-tower--regular',
319
+ // },
320
+ // },
321
+ // ],
322
+ // },
323
+ {
324
+ id: `${Devtools.Edge.id}-${node.id}`,
325
+ data: null,
326
+ type: DEVTOOLS_TYPE,
327
+ properties: {
328
+ label: ['edge label', { ns: meta.id }],
329
+ icon: 'ph--cloud--regular',
330
+ },
331
+ nodes: [
332
+ {
333
+ id: `${Devtools.Edge.Dashboard}-${node.id}`,
334
+ data: Devtools.Edge.Dashboard,
335
+ type: DEVTOOLS_TYPE,
336
+ properties: {
337
+ label: ['dashboard label', { ns: meta.id }],
338
+ icon: 'ph--computer-tower--regular',
339
+ },
340
+ },
341
+ {
342
+ id: `${Devtools.Edge.Workflows}-${node.id}`,
343
+ data: Devtools.Edge.Workflows,
344
+ type: DEVTOOLS_TYPE,
345
+ properties: {
346
+ label: ['workflows label', { ns: meta.id }],
347
+ icon: 'ph--function--regular',
348
+ },
349
+ },
350
+ {
351
+ id: `${Devtools.Edge.Traces}-${node.id}`,
352
+ data: Devtools.Edge.Traces,
353
+ type: DEVTOOLS_TYPE,
354
+ properties: {
355
+ label: ['traces label', { ns: meta.id }],
356
+ icon: 'ph--line-segments--regular',
357
+ },
358
+ },
359
+ {
360
+ id: `${Devtools.Edge.Testing}-${node.id}`,
361
+ data: Devtools.Edge.Testing,
362
+ type: DEVTOOLS_TYPE,
363
+ properties: {
364
+ label: ['testing label', { ns: meta.id }],
365
+ icon: 'ph--flask--regular',
366
+ },
367
+ },
368
+ ],
369
+ },
370
+ ],
371
+ },
372
+ ];
373
+ }),
374
+ }),
375
+
376
+ // Debug object companion.
377
+ GraphBuilder.createExtension({
378
+ id: `${meta.id}/debug-object`,
379
+ match: NodeMatcher.whenEchoObject,
380
+ connector: (node) =>
381
+ Effect.succeed([
382
+ {
383
+ id: [node.id, 'debug'].join(ATTENDABLE_PATH_SEPARATOR),
384
+ type: PLANK_COMPANION_TYPE,
385
+ data: 'debug',
386
+ properties: {
387
+ label: ['debug label', { ns: meta.id }],
388
+ icon: 'ph--bug--regular',
389
+ disposition: 'hidden',
390
+ position: 'fallback',
391
+ },
392
+ },
393
+ ]),
394
+ }),
395
+
396
+ // Devtools deck companion.
397
+ GraphBuilder.createExtension({
398
+ id: `${meta.id}/devtools-overview`,
399
+ match: NodeMatcher.whenRoot,
400
+ connector: (node) =>
401
+ Effect.succeed([
402
+ {
403
+ id: [node.id, 'devtools'].join(ATTENDABLE_PATH_SEPARATOR),
404
+ type: DECK_COMPANION_TYPE,
405
+ data: null,
406
+ properties: {
407
+ label: ['devtools overview label', { ns: meta.id }],
408
+ icon: 'ph--equalizer--regular',
409
+ disposition: 'hidden',
410
+ position: 'fallback',
411
+ },
412
+ },
413
+ ]),
414
+ }),
415
+ ]);
416
+
417
+ return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);
418
+ }),
419
+ );
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capability } from '@dxos/app-framework';
6
+
7
+ export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));