@dxos/plugin-devtools 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/LICENSE +105 -0
  2. package/PLUGIN.mdl +373 -0
  3. package/README.md +15 -0
  4. package/dist/lib/neutral/DebugGraph-F7AMZXKW.mjs +16 -0
  5. package/dist/lib/neutral/DebugGraph-F7AMZXKW.mjs.map +7 -0
  6. package/dist/lib/neutral/DevtoolsOverviewContainer-DCNZFKK5.mjs +51 -0
  7. package/dist/lib/neutral/DevtoolsOverviewContainer-DCNZFKK5.mjs.map +7 -0
  8. package/dist/lib/neutral/DevtoolsPlugin.mjs +55 -0
  9. package/dist/lib/neutral/DevtoolsPlugin.mjs.map +7 -0
  10. package/dist/lib/neutral/DevtoolsPlugin.node.mjs +16 -0
  11. package/dist/lib/neutral/DevtoolsPlugin.node.mjs.map +7 -0
  12. package/dist/lib/neutral/DevtoolsPlugin.workerd.mjs +12 -0
  13. package/dist/lib/neutral/DevtoolsPlugin.workerd.mjs.map +7 -0
  14. package/dist/lib/neutral/GithubPanel-DWFZXZUK.mjs +178 -0
  15. package/dist/lib/neutral/GithubPanel-DWFZXZUK.mjs.map +7 -0
  16. package/dist/lib/neutral/RegistryPanel-CVETZUZV.mjs +162 -0
  17. package/dist/lib/neutral/RegistryPanel-CVETZUZV.mjs.map +7 -0
  18. package/dist/lib/neutral/app-graph-builder-KHZ65O2Q.mjs +560 -0
  19. package/dist/lib/neutral/app-graph-builder-KHZ65O2Q.mjs.map +7 -0
  20. package/dist/lib/neutral/capabilities/index.mjs +13 -0
  21. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  22. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  23. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
  24. package/dist/lib/neutral/chunk-PJNVAE7D.mjs +81 -0
  25. package/dist/lib/neutral/chunk-PJNVAE7D.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-QCL4JV4T.mjs +39 -0
  27. package/dist/lib/neutral/chunk-QCL4JV4T.mjs.map +7 -0
  28. package/dist/lib/neutral/containers/index.mjs +15 -0
  29. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  30. package/dist/lib/neutral/index.mjs +12 -0
  31. package/dist/lib/neutral/index.mjs.map +7 -0
  32. package/dist/lib/neutral/meta.json +1 -0
  33. package/dist/lib/neutral/meta.mjs +8 -0
  34. package/dist/lib/neutral/meta.mjs.map +7 -0
  35. package/dist/lib/neutral/plugin.mjs +12 -0
  36. package/dist/lib/neutral/plugin.mjs.map +7 -0
  37. package/dist/lib/neutral/react-context-UJURDOO6.mjs +17 -0
  38. package/dist/lib/neutral/react-context-UJURDOO6.mjs.map +7 -0
  39. package/dist/lib/neutral/react-surface-XILLHGRR.mjs +332 -0
  40. package/dist/lib/neutral/react-surface-XILLHGRR.mjs.map +7 -0
  41. package/dist/lib/neutral/translations.mjs +65 -0
  42. package/dist/lib/neutral/translations.mjs.map +7 -0
  43. package/dist/lib/neutral/types/index.mjs +8 -0
  44. package/dist/lib/neutral/types/index.mjs.map +7 -0
  45. package/dist/types/dx.config.d.ts +28 -0
  46. package/dist/types/dx.config.d.ts.map +1 -0
  47. package/dist/types/src/DevtoolsPlugin.d.ts +4 -0
  48. package/dist/types/src/DevtoolsPlugin.d.ts.map +1 -0
  49. package/dist/types/src/DevtoolsPlugin.node.d.ts +4 -0
  50. package/dist/types/src/DevtoolsPlugin.node.d.ts.map +1 -0
  51. package/dist/types/src/DevtoolsPlugin.test.d.ts +2 -0
  52. package/dist/types/src/DevtoolsPlugin.test.d.ts.map +1 -0
  53. package/dist/types/src/DevtoolsPlugin.workerd.d.ts +4 -0
  54. package/dist/types/src/DevtoolsPlugin.workerd.d.ts.map +1 -0
  55. package/dist/types/src/capabilities/app-graph-builder.d.ts +5 -0
  56. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  57. package/dist/types/src/capabilities/index.d.ts +5 -0
  58. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  59. package/dist/types/src/capabilities/react-context.d.ts +5 -0
  60. package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
  61. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  62. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  63. package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +11 -0
  64. package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
  65. package/dist/types/src/containers/DebugGraph/index.d.ts +2 -0
  66. package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
  67. package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts +6 -0
  68. package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -0
  69. package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +2 -0
  70. package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
  71. package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +15 -0
  72. package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -0
  73. package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +80 -0
  74. package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -0
  75. package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts +6 -0
  76. package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts.map +1 -0
  77. package/dist/types/src/containers/GithubPanel/index.d.ts +2 -0
  78. package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -0
  79. package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts +6 -0
  80. package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts.map +1 -0
  81. package/dist/types/src/containers/RegistryPanel/index.d.ts +2 -0
  82. package/dist/types/src/containers/RegistryPanel/index.d.ts.map +1 -0
  83. package/dist/types/src/containers/index.d.ts +6 -0
  84. package/dist/types/src/containers/index.d.ts.map +1 -0
  85. package/dist/types/src/index.d.ts +3 -0
  86. package/dist/types/src/index.d.ts.map +1 -0
  87. package/dist/types/src/meta.d.ts +33 -0
  88. package/dist/types/src/meta.d.ts.map +1 -0
  89. package/dist/types/src/plugin.d.ts +3 -0
  90. package/dist/types/src/plugin.d.ts.map +1 -0
  91. package/dist/types/src/translations.d.ts +67 -0
  92. package/dist/types/src/translations.d.ts.map +1 -0
  93. package/dist/types/src/types/Devtools.d.ts +56 -0
  94. package/dist/types/src/types/Devtools.d.ts.map +1 -0
  95. package/dist/types/src/types/index.d.ts +2 -0
  96. package/dist/types/src/types/index.d.ts.map +1 -0
  97. package/dist/types/tsconfig.tsbuildinfo +1 -0
  98. package/dx.config.ts +28 -0
  99. package/package.json +153 -0
  100. package/src/DevtoolsPlugin.node.ts +16 -0
  101. package/src/DevtoolsPlugin.test.ts +24 -0
  102. package/src/DevtoolsPlugin.tsx +54 -0
  103. package/src/DevtoolsPlugin.workerd.ts +11 -0
  104. package/src/capabilities/app-graph-builder.ts +388 -0
  105. package/src/capabilities/index.ts +9 -0
  106. package/src/capabilities/react-context.tsx +25 -0
  107. package/src/capabilities/react-surface.tsx +331 -0
  108. package/src/containers/DebugGraph/DebugGraph.tsx +16 -0
  109. package/src/containers/DebugGraph/index.ts +5 -0
  110. package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +52 -0
  111. package/src/containers/DevtoolsOverviewContainer/index.ts +5 -0
  112. package/src/containers/GithubPanel/GithubComponent.stories.tsx +38 -0
  113. package/src/containers/GithubPanel/GithubComponent.tsx +192 -0
  114. package/src/containers/GithubPanel/GithubPanel.tsx +19 -0
  115. package/src/containers/GithubPanel/index.ts +5 -0
  116. package/src/containers/RegistryPanel/RegistryPanel.tsx +152 -0
  117. package/src/containers/RegistryPanel/index.ts +5 -0
  118. package/src/containers/index.ts +10 -0
  119. package/src/index.ts +6 -0
  120. package/src/meta.ts +9 -0
  121. package/src/plugin.ts +9 -0
  122. package/src/translations.ts +66 -0
  123. package/src/types/Devtools.ts +72 -0
  124. package/src/types/index.ts +5 -0
  125. package/src/vite-env.d.ts +10 -0
package/dx.config.ts ADDED
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Config2 } from '@dxos/app-framework/config';
6
+ import { trim } from '@dxos/util';
7
+
8
+ export default Config2.make({
9
+ plugin: {
10
+ key: 'org.dxos.plugin.devtools',
11
+ name: 'Devtools',
12
+ author: 'DXOS',
13
+ description: trim`
14
+ DevtoolsPlugin is the developer inspector for DXOS Composer. It adds a structured Devtools node
15
+ to the navigation graph — grouped into Client, HALO, ECHO, Mesh, and EDGE sub-sections —
16
+ exposing panel views for config, storage, logs, diagnostics, identity, devices, feeds,
17
+ objects, schemas, automerge internals, network topology, EDGE workflows, and invocation
18
+ traces, all driven by the @dxos/devtools component library.
19
+
20
+ Additional utilities include an app-graph inspector, a ToolsExplorer connected to the DXOS MCP
21
+ introspect service, and a globalThis helper for manual storage-version testing.
22
+ `,
23
+ source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-devtools',
24
+ icon: { key: 'ph--toolbox--regular' },
25
+ spec: 'PLUGIN.mdl',
26
+ tags: ['labs'],
27
+ },
28
+ });
package/package.json ADDED
@@ -0,0 +1,153 @@
1
+ {
2
+ "name": "@dxos/plugin-devtools",
3
+ "version": "0.10.0",
4
+ "description": "DXOS developer inspector plugin.",
5
+ "homepage": "https://dxos.org",
6
+ "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
11
+ "license": "FSL-1.1-Apache-2.0",
12
+ "author": "DXOS.org",
13
+ "sideEffects": true,
14
+ "type": "module",
15
+ "imports": {
16
+ "#capabilities": {
17
+ "source": "./src/capabilities/index.ts",
18
+ "types": "./dist/types/src/capabilities/index.d.ts",
19
+ "default": "./dist/lib/neutral/capabilities/index.mjs"
20
+ },
21
+ "#containers": {
22
+ "source": "./src/containers/index.ts",
23
+ "types": "./dist/types/src/containers/index.d.ts",
24
+ "default": "./dist/lib/neutral/containers/index.mjs"
25
+ },
26
+ "#meta": {
27
+ "source": "./src/meta.ts",
28
+ "types": "./dist/types/src/meta.d.ts",
29
+ "default": "./dist/lib/neutral/meta.mjs"
30
+ },
31
+ "#plugin": {
32
+ "source": {
33
+ "workerd": "./src/DevtoolsPlugin.workerd.ts",
34
+ "node": "./src/DevtoolsPlugin.node.ts",
35
+ "default": "./src/DevtoolsPlugin.tsx"
36
+ },
37
+ "types": "./dist/types/src/DevtoolsPlugin.d.ts",
38
+ "workerd": "./dist/lib/neutral/DevtoolsPlugin.workerd.mjs",
39
+ "node": "./dist/lib/neutral/DevtoolsPlugin.node.mjs",
40
+ "default": "./dist/lib/neutral/DevtoolsPlugin.mjs"
41
+ },
42
+ "#translations": {
43
+ "source": "./src/translations.ts",
44
+ "types": "./dist/types/src/translations.d.ts",
45
+ "default": "./dist/lib/neutral/translations.mjs"
46
+ },
47
+ "#types": {
48
+ "source": "./src/types/index.ts",
49
+ "types": "./dist/types/src/types/index.d.ts",
50
+ "default": "./dist/lib/neutral/types/index.mjs"
51
+ }
52
+ },
53
+ "exports": {
54
+ ".": {
55
+ "source": "./src/index.ts",
56
+ "types": "./dist/types/src/index.d.ts",
57
+ "default": "./dist/lib/neutral/index.mjs"
58
+ },
59
+ "./assets/PLUGIN.mdl": "./PLUGIN.mdl",
60
+ "./plugin": {
61
+ "source": "./src/plugin.ts",
62
+ "types": "./dist/types/src/plugin.d.ts",
63
+ "default": "./dist/lib/neutral/plugin.mjs"
64
+ },
65
+ "./translations": {
66
+ "source": "./src/translations.ts",
67
+ "types": "./dist/types/src/translations.d.ts",
68
+ "default": "./dist/lib/neutral/translations.mjs"
69
+ }
70
+ },
71
+ "types": "dist/types/src/index.d.ts",
72
+ "files": [
73
+ "dist",
74
+ "dx.config.ts",
75
+ "src",
76
+ "PLUGIN.mdl"
77
+ ],
78
+ "dependencies": {
79
+ "@antv/graphlib": "catalog:",
80
+ "@antv/layout": "catalog:",
81
+ "@dxos/app-framework": "workspace:*",
82
+ "@dxos/app-toolkit": "workspace:*",
83
+ "@dxos/assistant-toolkit": "workspace:*",
84
+ "@dxos/async": "workspace:*",
85
+ "@dxos/client-services": "workspace:*",
86
+ "@dxos/compute": "workspace:*",
87
+ "@dxos/compute-hyperformula": "workspace:*",
88
+ "@dxos/conductor": "workspace:*",
89
+ "@dxos/config": "workspace:*",
90
+ "@dxos/devtools": "workspace:*",
91
+ "@dxos/echo": "workspace:*",
92
+ "@dxos/echo-host": "workspace:*",
93
+ "@dxos/effect": "workspace:*",
94
+ "@dxos/invariant": "workspace:*",
95
+ "@dxos/keys": "workspace:*",
96
+ "@dxos/log": "workspace:*",
97
+ "@dxos/log-store-idb": "workspace:*",
98
+ "@dxos/operation": "workspace:*",
99
+ "@dxos/plugin-client": "workspace:*",
100
+ "@dxos/plugin-graph": "workspace:*",
101
+ "@dxos/plugin-inbox": "workspace:*",
102
+ "@dxos/plugin-markdown": "workspace:*",
103
+ "@dxos/plugin-script": "workspace:*",
104
+ "@dxos/plugin-sheet": "workspace:*",
105
+ "@dxos/plugin-sketch": "workspace:*",
106
+ "@dxos/plugin-space": "workspace:*",
107
+ "@dxos/plugin-status-bar": "workspace:*",
108
+ "@dxos/protocols": "workspace:*",
109
+ "@dxos/random": "workspace:*",
110
+ "@dxos/react-client": "workspace:*",
111
+ "@dxos/react-ui-attention": "workspace:*",
112
+ "@dxos/react-ui-canvas-compute": "workspace:*",
113
+ "@dxos/react-ui-canvas-editor": "workspace:*",
114
+ "@dxos/react-ui-form": "workspace:*",
115
+ "@dxos/react-ui-introspect": "workspace:*",
116
+ "@dxos/react-ui-syntax-highlighter": "workspace:*",
117
+ "@dxos/react-ui-table": "workspace:*",
118
+ "@dxos/schema": "workspace:*",
119
+ "@dxos/tracing": "workspace:*",
120
+ "@dxos/types": "workspace:*",
121
+ "@dxos/util": "workspace:*",
122
+ "@effect-atom/atom-react": "catalog:",
123
+ "@tldraw/tldraw": "catalog:",
124
+ "react-resize-detector": "catalog:"
125
+ },
126
+ "devDependencies": {
127
+ "@dxos/plugin-testing": "workspace:*",
128
+ "@dxos/react-ui": "workspace:*",
129
+ "@dxos/storybook-utils": "workspace:*",
130
+ "@dxos/ui-theme": "workspace:*",
131
+ "@effect-atom/atom-react": "catalog:",
132
+ "@effect/platform": "catalog:",
133
+ "@types/react": "catalog:",
134
+ "@types/react-dom": "catalog:",
135
+ "effect": "catalog:",
136
+ "react": "catalog:",
137
+ "react-dom": "catalog:",
138
+ "vite": "catalog:"
139
+ },
140
+ "peerDependencies": {
141
+ "@dxos/random": "workspace:*",
142
+ "@dxos/react-ui": "workspace:*",
143
+ "@dxos/ui-theme": "workspace:*",
144
+ "@effect-atom/atom-react": "catalog:",
145
+ "@effect/platform": "catalog:",
146
+ "effect": "catalog:",
147
+ "react": "catalog:",
148
+ "react-dom": "catalog:"
149
+ },
150
+ "publishConfig": {
151
+ "access": "public"
152
+ }
153
+ }
@@ -0,0 +1,16 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
7
+
8
+ import { AppGraphBuilder } from '#capabilities';
9
+ import { meta } from '#meta';
10
+
11
+ export const DevtoolsPlugin = Plugin.define(meta).pipe(
12
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
13
+ Plugin.make,
14
+ );
15
+
16
+ export default DevtoolsPlugin;
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
8
+
9
+ import { DevtoolsPlugin } from '#plugin';
10
+
11
+ import { meta } from './meta';
12
+
13
+ const moduleId = (name: string) => `${meta.profile.key}.module.${name}`;
14
+
15
+ describe('DevtoolsPlugin', () => {
16
+ test('modules activate on the expected events', async ({ expect }) => {
17
+ await using harness = await createComposerTestApp({
18
+ plugins: [DevtoolsPlugin()],
19
+ });
20
+
21
+ // AppGraphBuilder auto-cascades from Startup (SetupAppGraph).
22
+ expect(harness.manager.getActive()).toContain(moduleId('AppGraphBuilder'));
23
+ });
24
+ });
@@ -0,0 +1,54 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';
8
+ import { AppPlugin } from '@dxos/app-toolkit';
9
+ import { type Client } from '@dxos/react-client';
10
+
11
+ import { AppGraphBuilder, ReactContext, ReactSurface } from '#capabilities';
12
+ import { meta } from '#meta';
13
+ import { translations } from '#translations';
14
+
15
+ // eslint-disable-next-line import/no-relative-packages
16
+ import pluginSpec from '../PLUGIN.mdl?raw';
17
+
18
+ export const DevtoolsPlugin = Plugin.define(meta).pipe(
19
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
20
+ AppPlugin.addReactContextModule({ activate: ReactContext }),
21
+ Plugin.addModule({
22
+ id: Capability.getModuleTag(ReactSurface) ?? 'surfaces',
23
+ activatesOn: ActivationEvents.SetupReactSurface,
24
+ activate: () => ReactSurface(),
25
+ }),
26
+ AppPlugin.addTranslationsModule({ translations }),
27
+ Plugin.addModule({
28
+ id: 'setup-devtools',
29
+ activatesOn: ActivationEvents.Startup,
30
+ activate: () => Effect.sync(() => setupDevtools()),
31
+ }),
32
+ AppPlugin.addPluginAssetModule({
33
+ asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
34
+ }),
35
+ Plugin.make,
36
+ );
37
+
38
+ const setupDevtools = () => {
39
+ (globalThis as any).composer ??= {};
40
+
41
+ // Used to test how composer handles breaking protocol changes.
42
+ (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {
43
+ const { changeStorageVersionInMetadata } = await import('@dxos/echo-host/testing');
44
+ const { createStorageObjects } = await import('@dxos/client-services');
45
+ const client: Client = (window as any).dxos.client;
46
+ const config = client.config;
47
+ await client.destroy();
48
+ const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? {});
49
+ await changeStorageVersionInMetadata(storage, version);
50
+ location.pathname = '/';
51
+ };
52
+ };
53
+
54
+ export default DevtoolsPlugin;
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from '#meta';
8
+
9
+ export const DevtoolsPlugin = Plugin.define(meta).pipe(Plugin.make);
10
+
11
+ export default DevtoolsPlugin;
@@ -0,0 +1,388 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities, AppNode, AppNodeMatcher, Paths } from '@dxos/app-toolkit';
9
+ import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
10
+ import { type Space } from '@dxos/react-client/echo';
11
+ import { Position } from '@dxos/util';
12
+
13
+ import { meta } from '#meta';
14
+ import { Devtools } from '#types';
15
+
16
+ export default Capability.makeModule(
17
+ Effect.fnUntraced(function* () {
18
+ const extensions = yield* Effect.all([
19
+ GraphBuilder.createExtension({
20
+ id: 'root',
21
+ match: NodeMatcher.whenRoot,
22
+ actions: () =>
23
+ Effect.succeed([
24
+ Node.makeAction({
25
+ id: 'resetData',
26
+ data: () =>
27
+ Effect.sync(() => {
28
+ window.location.href = '/reset.html#continue';
29
+ }),
30
+ properties: {
31
+ label: ['reset-data.label', { ns: meta.profile.key }],
32
+ icon: 'ph--warning--regular',
33
+ },
34
+ }),
35
+ ]),
36
+ }),
37
+
38
+ GraphBuilder.createExtension({
39
+ id: 'devtools',
40
+ match: NodeMatcher.whenAny(NodeMatcher.whenRoot, AppNodeMatcher.whenNavTreeGroup(Paths.GroupTypes.system)),
41
+ connector: (_nodeOrSpace: Node.Node | Space, get) =>
42
+ Effect.gen(function* () {
43
+ const [graph] = get(yield* Capability.atom(AppCapabilities.AppGraph));
44
+
45
+ return [
46
+ Node.make({
47
+ id: Devtools.nodeId(Devtools.id),
48
+ data: null,
49
+ type: Devtools.id,
50
+ properties: {
51
+ label: ['devtools.label', { ns: meta.profile.key }],
52
+ icon: 'ph--toolbox--regular',
53
+ position: Position.last,
54
+ },
55
+ nodes: [
56
+ Node.make({
57
+ id: Devtools.nodeId(Devtools.AppGraph),
58
+ type: `${meta.profile.key}.app-graph`,
59
+ data: { graph: graph?.graph, root: Node.RootId },
60
+ properties: {
61
+ label: ['debug-app-graph.label', { ns: meta.profile.key }],
62
+ icon: 'ph--graph--regular',
63
+ },
64
+ }),
65
+ Node.make({
66
+ id: Devtools.nodeId(Devtools.ToolsExplorer),
67
+ data: Devtools.ToolsExplorer,
68
+ type: Devtools.id,
69
+ properties: {
70
+ label: ['debug-tools-explorer.label', { ns: meta.profile.key }],
71
+ icon: 'ph--toolbox--regular',
72
+ },
73
+ }),
74
+ Node.make({
75
+ id: Devtools.nodeId(Devtools.Client.id),
76
+ data: null,
77
+ type: Devtools.id,
78
+ properties: {
79
+ label: ['client.label', { ns: meta.profile.key }],
80
+ icon: 'ph--users--regular',
81
+ },
82
+ nodes: [
83
+ Node.make({
84
+ id: Devtools.nodeId(Devtools.Client.Config),
85
+ data: Devtools.Client.Config,
86
+ type: Devtools.id,
87
+ properties: {
88
+ label: ['config.label', { ns: meta.profile.key }],
89
+ icon: 'ph--gear--regular',
90
+ },
91
+ }),
92
+ Node.make({
93
+ id: Devtools.nodeId(Devtools.Client.Storage),
94
+ data: Devtools.Client.Storage,
95
+ type: Devtools.id,
96
+ properties: {
97
+ label: ['storage.label', { ns: meta.profile.key }],
98
+ icon: 'ph--hard-drives--regular',
99
+ },
100
+ }),
101
+ Node.make({
102
+ id: Devtools.nodeId(Devtools.Client.Sqlite),
103
+ data: Devtools.Client.Sqlite,
104
+ type: Devtools.id,
105
+ properties: {
106
+ label: ['sqlite.label', { ns: meta.profile.key }],
107
+ icon: 'ph--database--regular',
108
+ },
109
+ }),
110
+ Node.make({
111
+ id: Devtools.nodeId(Devtools.Client.Logs),
112
+ data: Devtools.Client.Logs,
113
+ type: Devtools.id,
114
+ properties: {
115
+ label: ['logs.label', { ns: meta.profile.key }],
116
+ icon: 'ph--file-text--regular',
117
+ },
118
+ }),
119
+ Node.make({
120
+ id: Devtools.nodeId(Devtools.Client.Diagnostics),
121
+ data: Devtools.Client.Diagnostics,
122
+ type: Devtools.id,
123
+ properties: {
124
+ label: ['diagnostics.label', { ns: meta.profile.key }],
125
+ icon: 'ph--chart-line--regular',
126
+ },
127
+ }),
128
+ ],
129
+ }),
130
+ Node.make({
131
+ id: Devtools.nodeId(Devtools.Halo.id),
132
+ data: null,
133
+ type: Devtools.id,
134
+ properties: {
135
+ label: ['halo.label', { ns: meta.profile.key }],
136
+ icon: 'ph--identification-badge--regular',
137
+ },
138
+ nodes: [
139
+ Node.make({
140
+ id: Devtools.nodeId(Devtools.Halo.Identity),
141
+ data: Devtools.Halo.Identity,
142
+ type: Devtools.id,
143
+ properties: {
144
+ label: ['identity.label', { ns: meta.profile.key }],
145
+ icon: 'ph--identification-badge--regular',
146
+ },
147
+ }),
148
+ Node.make({
149
+ id: Devtools.nodeId(Devtools.Halo.Devices),
150
+ data: Devtools.Halo.Devices,
151
+ type: Devtools.id,
152
+ properties: {
153
+ label: ['devices.label', { ns: meta.profile.key }],
154
+ icon: 'ph--devices--regular',
155
+ },
156
+ }),
157
+ Node.make({
158
+ id: Devtools.nodeId(Devtools.Halo.Keyring),
159
+ data: Devtools.Halo.Keyring,
160
+ type: Devtools.id,
161
+ properties: {
162
+ label: ['keyring.label', { ns: meta.profile.key }],
163
+ icon: 'ph--key--regular',
164
+ },
165
+ }),
166
+ Node.make({
167
+ id: Devtools.nodeId(Devtools.Halo.Credentials),
168
+ data: Devtools.Halo.Credentials,
169
+ type: Devtools.id,
170
+ properties: {
171
+ label: ['credentials.label', { ns: meta.profile.key }],
172
+ icon: 'ph--credit-card--regular',
173
+ },
174
+ }),
175
+ ],
176
+ }),
177
+ Node.make({
178
+ id: Devtools.nodeId(Devtools.Echo.id),
179
+ data: null,
180
+ type: Devtools.id,
181
+ properties: {
182
+ label: ['echo.label', { ns: meta.profile.key }],
183
+ icon: 'ph--database--regular',
184
+ },
185
+ nodes: [
186
+ Node.make({
187
+ id: Devtools.nodeId(Devtools.Echo.Spaces),
188
+ data: Devtools.Echo.Spaces,
189
+ type: Devtools.id,
190
+ properties: {
191
+ label: ['spaces.label', { ns: meta.profile.key }],
192
+ icon: 'ph--graph--regular',
193
+ },
194
+ }),
195
+ Node.make({
196
+ id: Devtools.nodeId(Devtools.Echo.Space),
197
+ data: Devtools.Echo.Space,
198
+ type: Devtools.id,
199
+ properties: {
200
+ label: ['space.label', { ns: meta.profile.key }],
201
+ icon: 'ph--planet--regular',
202
+ },
203
+ }),
204
+ Node.make({
205
+ id: Devtools.nodeId(Devtools.Echo.Feeds),
206
+ data: Devtools.Echo.Feeds,
207
+ type: Devtools.id,
208
+ properties: {
209
+ label: ['feeds.label', { ns: meta.profile.key }],
210
+ icon: 'ph--list-bullets--regular',
211
+ },
212
+ }),
213
+ Node.make({
214
+ id: Devtools.nodeId(Devtools.Echo.Objects),
215
+ data: Devtools.Echo.Objects,
216
+ type: Devtools.id,
217
+ properties: {
218
+ label: ['objects.label', { ns: meta.profile.key }],
219
+ icon: 'ph--cube--regular',
220
+ },
221
+ }),
222
+ Node.make({
223
+ id: Devtools.nodeId(Devtools.Echo.Schema),
224
+ data: Devtools.Echo.Schema,
225
+ type: Devtools.id,
226
+ properties: {
227
+ label: ['schema.label', { ns: meta.profile.key }],
228
+ icon: 'ph--database--regular',
229
+ },
230
+ }),
231
+ Node.make({
232
+ id: Devtools.nodeId(Devtools.Echo.Registry),
233
+ data: Devtools.Echo.Registry,
234
+ type: Devtools.id,
235
+ properties: {
236
+ label: ['registry.label', { ns: meta.profile.key }],
237
+ icon: 'ph--books--regular',
238
+ },
239
+ }),
240
+ Node.make({
241
+ id: Devtools.nodeId(Devtools.Echo.Automerge),
242
+ data: Devtools.Echo.Automerge,
243
+ type: Devtools.id,
244
+ properties: {
245
+ label: ['automerge.label', { ns: meta.profile.key }],
246
+ icon: 'ph--gear-six--regular',
247
+ },
248
+ }),
249
+ Node.make({
250
+ id: Devtools.nodeId(Devtools.Echo.Queues),
251
+ data: Devtools.Echo.Queues,
252
+ type: Devtools.id,
253
+ properties: {
254
+ label: ['queues.label', { ns: meta.profile.key }],
255
+ icon: 'ph--queue--regular',
256
+ },
257
+ }),
258
+ Node.make({
259
+ id: Devtools.nodeId(Devtools.Echo.Members),
260
+ data: Devtools.Echo.Members,
261
+ type: Devtools.id,
262
+ properties: {
263
+ label: ['members.label', { ns: meta.profile.key }],
264
+ icon: 'ph--users--regular',
265
+ },
266
+ }),
267
+ Node.make({
268
+ id: Devtools.nodeId(Devtools.Echo.Metadata),
269
+ data: Devtools.Echo.Metadata,
270
+ type: Devtools.id,
271
+ properties: {
272
+ label: ['metadata.label', { ns: meta.profile.key }],
273
+ icon: 'ph--hard-drive--regular',
274
+ },
275
+ }),
276
+ ],
277
+ }),
278
+ Node.make({
279
+ id: Devtools.nodeId(Devtools.Mesh.id),
280
+ data: null,
281
+ type: Devtools.id,
282
+ properties: {
283
+ label: ['mesh.label', { ns: meta.profile.key }],
284
+ icon: 'ph--graph--regular',
285
+ },
286
+ nodes: [
287
+ Node.make({
288
+ id: Devtools.nodeId(Devtools.Mesh.Signal),
289
+ data: Devtools.Mesh.Signal,
290
+ type: Devtools.id,
291
+ properties: {
292
+ label: ['signal.label', { ns: meta.profile.key }],
293
+ icon: 'ph--wifi-high--regular',
294
+ },
295
+ }),
296
+ Node.make({
297
+ id: Devtools.nodeId(Devtools.Mesh.Swarm),
298
+ data: Devtools.Mesh.Swarm,
299
+ type: Devtools.id,
300
+ properties: {
301
+ label: ['swarm.label', { ns: meta.profile.key }],
302
+ icon: 'ph--users-three--regular',
303
+ },
304
+ }),
305
+ Node.make({
306
+ id: Devtools.nodeId(Devtools.Mesh.Network),
307
+ data: Devtools.Mesh.Network,
308
+ type: Devtools.id,
309
+ properties: {
310
+ label: ['network.label', { ns: meta.profile.key }],
311
+ icon: 'ph--polygon--regular',
312
+ },
313
+ }),
314
+ ],
315
+ }),
316
+ Node.make({
317
+ id: Devtools.nodeId(Devtools.Edge.id),
318
+ data: null,
319
+ type: Devtools.id,
320
+ properties: {
321
+ label: ['edge.label', { ns: meta.profile.key }],
322
+ icon: 'ph--cloud--regular',
323
+ },
324
+ nodes: [
325
+ Node.make({
326
+ id: Devtools.nodeId(Devtools.Edge.Dashboard),
327
+ data: Devtools.Edge.Dashboard,
328
+ type: Devtools.id,
329
+ properties: {
330
+ label: ['dashboard.label', { ns: meta.profile.key }],
331
+ icon: 'ph--computer-tower--regular',
332
+ },
333
+ }),
334
+ Node.make({
335
+ id: Devtools.nodeId(Devtools.Edge.Workflows),
336
+ data: Devtools.Edge.Workflows,
337
+ type: Devtools.id,
338
+ properties: {
339
+ label: ['workflows.label', { ns: meta.profile.key }],
340
+ icon: 'ph--function--regular',
341
+ },
342
+ }),
343
+ Node.make({
344
+ id: Devtools.nodeId(Devtools.Edge.Traces),
345
+ data: Devtools.Edge.Traces,
346
+ type: Devtools.id,
347
+ properties: {
348
+ label: ['traces.label', { ns: meta.profile.key }],
349
+ icon: 'ph--line-segments--regular',
350
+ },
351
+ }),
352
+ Node.make({
353
+ id: Devtools.nodeId(Devtools.Edge.Testing),
354
+ data: Devtools.Edge.Testing,
355
+ type: Devtools.id,
356
+ properties: {
357
+ label: ['testing.label', { ns: meta.profile.key }],
358
+ icon: 'ph--flask--regular',
359
+ },
360
+ }),
361
+ ],
362
+ }),
363
+ ],
364
+ }),
365
+ ];
366
+ }),
367
+ }),
368
+
369
+ // Devtools deck companion.
370
+ GraphBuilder.createExtension({
371
+ id: 'devtoolsOverview',
372
+ match: NodeMatcher.whenRoot,
373
+ connector: () =>
374
+ Effect.succeed([
375
+ AppNode.makeDeckCompanion({
376
+ id: 'devtoolsOverview',
377
+ label: ['devtools-overview.label', { ns: meta.profile.key }],
378
+ icon: 'ph--equalizer--regular',
379
+ data: 'devtoolsOverview' as const,
380
+ position: Position.last,
381
+ }),
382
+ ]),
383
+ }),
384
+ ]);
385
+
386
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
387
+ }),
388
+ );