@dxos/plugin-debug 0.8.4-main.ae835ea → 0.8.4-main.bc674ce

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