@dxos/plugin-devtools 0.12.0-next-2800d0376abcc62d5544afdd744b16b2b960434e → 0.13.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.
- package/PLUGIN.mdl +144 -57
- package/dist/lib/Devtools.mjs +9 -1
- package/dist/lib/Devtools.mjs.map +1 -1
- package/dist/lib/capabilities.browser.mjs +45 -0
- package/dist/lib/capabilities.browser.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +9 -7
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +7 -3
- package/dist/lib/capabilities.node.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +45 -0
- package/dist/lib/capabilities.tauri.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +2 -2
- package/dist/lib/capabilities.workerd.mjs.map +1 -1
- package/dist/lib/{chunk-CliPanel.mjs → chunk-CliArticle.mjs} +28 -24
- package/dist/lib/chunk-CliArticle.mjs.map +1 -0
- package/dist/lib/chunk-DebugGraph.mjs +12 -8
- package/dist/lib/chunk-DebugGraph.mjs.map +1 -1
- package/dist/lib/chunk-DevtoolsCards.mjs +108 -0
- package/dist/lib/chunk-DevtoolsCards.mjs.map +1 -0
- package/dist/lib/chunk-DevtoolsOverviewContainer.mjs +59 -22
- package/dist/lib/chunk-DevtoolsOverviewContainer.mjs.map +1 -1
- package/dist/lib/chunk-GithubPanel.mjs +13 -10
- package/dist/lib/chunk-GithubPanel.mjs.map +1 -1
- package/dist/lib/chunk-PLUGIN.mjs +6 -0
- package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
- package/dist/lib/{chunk-RegistryPanel.mjs → chunk-RegistryArticle.mjs} +26 -25
- package/dist/lib/chunk-RegistryArticle.mjs.map +1 -0
- package/dist/lib/chunk-ToolsExplorerContainer.mjs +22 -0
- package/dist/lib/chunk-ToolsExplorerContainer.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +323 -312
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-react-context.mjs +1 -1
- package/dist/lib/chunk-react-context.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +244 -92
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/containers.mjs +4 -3
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/index.mjs +0 -1
- package/dist/lib/meta.mjs +2 -2
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/translations.mjs +55 -49
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/src/capabilities/DevtoolsCards.d.ts +28 -0
- package/dist/types/src/capabilities/DevtoolsCards.d.ts.map +1 -0
- package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts +19 -6
- package/dist/types/src/capabilities/DevtoolsSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +19 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.test.d.ts +2 -0
- package/dist/types/src/capabilities/app-graph-builder.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/browser.d.ts +8 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts +8 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/containers/CliArticle/CliArticle.d.ts +8 -0
- package/dist/types/src/containers/CliArticle/CliArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{CliPanel/CliPanel.stories.d.ts → CliArticle/CliArticle.stories.d.ts} +34 -4
- package/dist/types/src/containers/CliArticle/CliArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CliArticle/index.d.ts +2 -0
- package/dist/types/src/containers/CliArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/{CliPanel → CliArticle}/useCliApp.d.ts +1 -1
- package/dist/types/src/containers/CliArticle/useCliApp.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +2 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/index.d.ts +1 -1
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +31 -1
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/GithubPanel/index.d.ts +1 -1
- package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts +8 -0
- package/dist/types/src/containers/RegistryArticle/RegistryArticle.d.ts.map +1 -0
- package/dist/types/src/containers/RegistryArticle/index.d.ts +2 -0
- package/dist/types/src/containers/RegistryArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ToolsExplorerContainer/ToolsExplorerContainer.d.ts +8 -0
- package/dist/types/src/containers/ToolsExplorerContainer/ToolsExplorerContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ToolsExplorerContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ToolsExplorerContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -2
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +31 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Devtools.d.ts +6 -0
- package/dist/types/src/types/Devtools.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +2 -2
- package/package.json +43 -39
- package/src/capabilities/DevtoolsCards.tsx +140 -0
- package/src/capabilities/DevtoolsSurfaces.tsx +32 -38
- package/src/capabilities/app-graph-builder.test.ts +75 -0
- package/src/capabilities/app-graph-builder.ts +324 -313
- package/src/capabilities/gen/browser.ts +61 -0
- package/src/capabilities/gen/node.ts +4 -4
- package/src/capabilities/gen/tauri.ts +61 -0
- package/src/capabilities/gen/workerd.ts +2 -2
- package/src/capabilities/index.ts +7 -7
- package/src/capabilities/react-context.tsx +1 -1
- package/src/capabilities/react-surface.ts +223 -85
- package/src/containers/{CliPanel/CliPanel.stories.tsx → CliArticle/CliArticle.stories.tsx} +9 -10
- package/src/containers/{CliPanel/CliPanel.tsx → CliArticle/CliArticle.tsx} +7 -7
- package/src/containers/CliArticle/index.ts +5 -0
- package/src/containers/{CliPanel → CliArticle}/useCliApp.ts +17 -12
- package/src/containers/DebugGraph/DebugGraph.tsx +7 -6
- package/src/containers/DebugGraph/index.ts +1 -1
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +72 -32
- package/src/containers/DevtoolsOverviewContainer/index.ts +1 -1
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +2 -2
- package/src/containers/GithubPanel/GithubComponent.tsx +14 -11
- package/src/containers/GithubPanel/GithubPanel.tsx +2 -2
- package/src/containers/GithubPanel/index.ts +1 -1
- package/src/containers/{RegistryPanel/RegistryPanel.tsx → RegistryArticle/RegistryArticle.tsx} +11 -10
- package/src/containers/RegistryArticle/index.ts +5 -0
- package/src/containers/ToolsExplorerContainer/ToolsExplorerContainer.tsx +26 -0
- package/src/containers/ToolsExplorerContainer/index.ts +5 -0
- package/src/containers/index.ts +6 -5
- package/src/index.ts +1 -2
- package/src/meta.ts +1 -1
- package/src/plugin.test.ts +2 -2
- package/src/translations.ts +7 -3
- package/src/types/Devtools.ts +10 -0
- package/src/types/index.ts +2 -2
- package/dist/lib/chunk-CliPanel.mjs.map +0 -1
- package/dist/lib/chunk-RegistryPanel.mjs.map +0 -1
- package/dist/types/src/containers/CliPanel/CliPanel.d.ts +0 -6
- package/dist/types/src/containers/CliPanel/CliPanel.d.ts.map +0 -1
- package/dist/types/src/containers/CliPanel/CliPanel.stories.d.ts.map +0 -1
- package/dist/types/src/containers/CliPanel/index.d.ts +0 -2
- package/dist/types/src/containers/CliPanel/index.d.ts.map +0 -1
- package/dist/types/src/containers/CliPanel/useCliApp.d.ts.map +0 -1
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts +0 -6
- package/dist/types/src/containers/RegistryPanel/RegistryPanel.d.ts.map +0 -1
- package/dist/types/src/containers/RegistryPanel/index.d.ts +0 -2
- package/dist/types/src/containers/RegistryPanel/index.d.ts.map +0 -1
- package/src/containers/CliPanel/index.ts +0 -5
- package/src/containers/RegistryPanel/index.ts +0 -5
package/PLUGIN.mdl
CHANGED
|
@@ -4,7 +4,7 @@ name: DevtoolsPlugin
|
|
|
4
4
|
version: 0.1.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Developer inspector plugin for `DXOS` Composer — structured devtools panels for Client/HALO/ECHO/Mesh/EDGE subsystems, an app-graph inspector, and a tools explorer. Debugging utilities (object generation, wireframe overlays, per-object inspection, stats) live in the sibling `@dxos/plugin-debug`.
|
|
7
|
+
Developer inspector plugin for `DXOS` Composer — structured devtools panels for Client/HALO/ECHO/Mesh/EDGE subsystems, an app-graph inspector, and a tools explorer. The tree attaches to the hidden `root/debug` app-graph category (`AppNodeMatcher.whenDebugGroup`) and is reached only through the floating debug panel that `@dxos/plugin-debug` renders from the status bar — never the main navtree, the deck, or a URL. Debugging utilities (object generation, wireframe overlays, per-object inspection, stats) live in the sibling `@dxos/plugin-debug`.
|
|
8
8
|
|
|
9
9
|
## Extensions
|
|
10
10
|
|
|
@@ -15,9 +15,10 @@ Each extension is defined in the Appendix or resolved via its URI.
|
|
|
15
15
|
|-------------|--------------------------------|
|
|
16
16
|
| `type` | `org.dxos.mdl.type@1.0` |
|
|
17
17
|
| `feat` | `org.dxos.mdl.feat@1.0` |
|
|
18
|
-
| `
|
|
18
|
+
| `scenario` | `org.dxos.mdl.scenario@1.0` |
|
|
19
19
|
| `component` | `org.dxos.mdl.component@1.0` |
|
|
20
20
|
| `op` | `org.dxos.mdl.op@1.0` |
|
|
21
|
+
| `test` | `org.dxos.mdl.test@1.0` |
|
|
21
22
|
|
|
22
23
|
## Types
|
|
23
24
|
|
|
@@ -64,17 +65,30 @@ component DebugStatus
|
|
|
64
65
|
|
|
65
66
|
```mdl
|
|
66
67
|
component DevtoolsOverviewContainer
|
|
67
|
-
desc:
|
|
68
|
+
desc: |
|
|
69
|
+
The "Stats" deck companion: polls the client's stats once (`useStats`) and renders `StatsPanel`
|
|
70
|
+
(`@dxos/devtools`) — a toolbar with refresh and live toggle over a scrolling stack of cards —
|
|
71
|
+
with one `AppSurface.DevtoolsOverview` surface as its children, passing
|
|
72
|
+
`DevtoolsCardData { stats, surfaceProfilerStats, onClearSurfaceProfiler }`. Every card is a
|
|
73
|
+
surface on that role ordered by `position`: memory, network, EDGE, performance, swarm
|
|
74
|
+
announcements, surfaces (profiler), database, replicator, messages, queries, sync, frame rate
|
|
75
|
+
(0–12), then plugin-debug's compartment cards (20) and other contributors (e.g.
|
|
76
|
+
plugin-calls). A card is a `StatCard` (`@dxos/devtools`): a `Card.Header` with an icon,
|
|
77
|
+
title, figure and one control, over compact `Card.Row`s whose leading gutter carries a status
|
|
78
|
+
icon and whose trailing gutter carries a control.
|
|
68
79
|
layout: |
|
|
69
|
-
|
|
70
|
-
│
|
|
71
|
-
|
|
72
|
-
│
|
|
73
|
-
│
|
|
74
|
-
│
|
|
75
|
-
│
|
|
76
|
-
│
|
|
77
|
-
|
|
80
|
+
┌───────────────────────────────┐
|
|
81
|
+
│ Stats ↻ ▶ │
|
|
82
|
+
├───────────────────────────────┤
|
|
83
|
+
│ ┌ ▣ Memory ──────────────────┐│
|
|
84
|
+
│ │ Used heap 42.1 MB ││
|
|
85
|
+
│ │ ⚠ Used of available 46% ││
|
|
86
|
+
│ └────────────────────────────┘│
|
|
87
|
+
│ ┌ ☁ EDGE healthy ⋮ ┐│
|
|
88
|
+
│ │ ✓ Websocket connected ││
|
|
89
|
+
│ └────────────────────────────┘│
|
|
90
|
+
│ … │
|
|
91
|
+
└───────────────────────────────┘
|
|
78
92
|
```
|
|
79
93
|
|
|
80
94
|
```mdl
|
|
@@ -137,30 +151,30 @@ The following components are thin wrappers around `@dxos/devtools` panel compone
|
|
|
137
151
|
|
|
138
152
|
| Component | Devtools node | Displays |
|
|
139
153
|
|------------------------|----------------------------|-----------------------------------------|
|
|
140
|
-
|
|
|
141
|
-
|
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
154
|
+
| ConfigArticle | Client.Config | Vault config JSON viewer |
|
|
155
|
+
| StorageArticle | Client.Storage | Local storage browser |
|
|
156
|
+
| LoggingArticle | Client.Logs | Live log stream; download via logStore |
|
|
157
|
+
| DiagnosticsArticle | Client.Diagnostics | Client health / metric charts |
|
|
158
|
+
| IdentityArticle | Halo.Identity | Local identity key + device list |
|
|
159
|
+
| DeviceListArticle | Halo.Devices | All devices paired with this identity |
|
|
160
|
+
| KeyringArticle | Halo.Keyring | Raw keyring entries |
|
|
161
|
+
| CredentialsArticle | Halo.Credentials | Credentials held in the active space |
|
|
162
|
+
| SpaceListArticle | Echo.Spaces | All spaces with state + select action |
|
|
163
|
+
| SpaceInfoArticle | Echo.Space | Selected space feeds / pipelines |
|
|
164
|
+
| FeedsArticle | Echo.Feeds | Feed entries for the active space |
|
|
165
|
+
| ObjectsArticle | Echo.Objects | All objects in the active space |
|
|
166
|
+
| SchemaArticle | Echo.Schema | Schemas registered in the active space |
|
|
167
|
+
| AutomergeArticle | Echo.Automerge | Automerge document internals |
|
|
168
|
+
| QueuesArticle | Echo.Queues | Pending queue items |
|
|
169
|
+
| MembersArticle | Echo.Members | Space members with last-seen |
|
|
170
|
+
| MetadataArticle | Echo.Metadata | Space/feed metadata blobs |
|
|
171
|
+
| SignalArticle | Mesh.Signal | Signal-server connection state |
|
|
172
|
+
| SwarmArticle | Mesh.Swarm | Active swarm peers |
|
|
173
|
+
| NetworkArticle | Mesh.Network | Full network topology for active space |
|
|
174
|
+
| EdgeDashboardArticle | Edge.Dashboard | EDGE node health / worker stats |
|
|
175
|
+
| WorkflowArticle | Edge.Workflows | Workflow definitions in active space |
|
|
162
176
|
| InvocationTraceContainer | Edge.Traces | Invocation trace timeline from feed |
|
|
163
|
-
|
|
|
177
|
+
| TestingArticle | Edge.Testing | Integration test harness for EDGE |
|
|
164
178
|
| ToolsExplorer | ToolsExplorer | MCP-backed tools explorer |
|
|
165
179
|
|
|
166
180
|
## Operations
|
|
@@ -173,12 +187,14 @@ No first-party operations are defined by DebugPlugin. The plugin invokes `SpaceO
|
|
|
173
187
|
feat F-1: Devtools Graph Node
|
|
174
188
|
|
|
175
189
|
req F-1.1:
|
|
176
|
-
when:
|
|
177
|
-
then: a "
|
|
190
|
+
when: DevtoolsPlugin is loaded
|
|
191
|
+
then: a "DevTools" branch (`root/debug/devtools`) appears under the hidden `root/debug` category, listed in the floating debug panel's sidebar after Console and Logs
|
|
178
192
|
|
|
179
|
-
req F-1.2: The
|
|
180
|
-
req F-1.3: An app-graph sub-node renders DebugGraph rooted at the
|
|
193
|
+
req F-1.2: The DevTools branch contains sub-trees for Client, HALO, ECHO, MESH, and EDGE categories, plus App Graph, SDK Explorer, and CLI pages.
|
|
194
|
+
req F-1.3: An app-graph sub-node renders DebugGraph rooted at the graph root.
|
|
181
195
|
req F-1.4: A tools-explorer sub-node renders ToolsExplorer connected to the MCP introspect service.
|
|
196
|
+
req F-1.5: No devtools node declares a URL binding; selecting one renders its article in the panel and leaves `window.location` unchanged.
|
|
197
|
+
req F-1.6: A space-scoped inspector resolves the active workspace's space at render time; no space travels in node data.
|
|
182
198
|
```
|
|
183
199
|
|
|
184
200
|
```mdl
|
|
@@ -205,18 +221,18 @@ feat F-3: Space Object Explorer
|
|
|
205
221
|
feat F-4: Devtools Overview Companion
|
|
206
222
|
|
|
207
223
|
req F-4.1:
|
|
208
|
-
when: user opens the "
|
|
209
|
-
then: DevtoolsOverviewContainer renders
|
|
224
|
+
when: user opens the "Stats" deck companion
|
|
225
|
+
then: DevtoolsOverviewContainer renders the card stack, one card per `AppSurface.DevtoolsOverview` contribution
|
|
210
226
|
|
|
211
|
-
req F-4.2:
|
|
227
|
+
req F-4.2: Every devtools page is an article — `Panel.Root role` with an optional toolbar over its content — registered on its `Devtools.*` id from `react-surface.ts`; `@dxos/devtools` exports them as `*Article` from `containers/panels`.
|
|
212
228
|
```
|
|
213
229
|
|
|
214
230
|
```mdl
|
|
215
231
|
feat F-5: Space Data Generator
|
|
216
232
|
|
|
217
233
|
req F-5.1:
|
|
218
|
-
when: user
|
|
219
|
-
then: SpaceGenerator is rendered as the article
|
|
234
|
+
when: user selects Debug → Generate objects in the debug panel
|
|
235
|
+
then: SpaceGenerator is rendered as the panel's article, bound to the active workspace's space
|
|
220
236
|
|
|
221
237
|
req F-5.2:
|
|
222
238
|
when: user triggers object generation
|
|
@@ -242,7 +258,7 @@ feat F-7: Log Capture and Download
|
|
|
242
258
|
|
|
243
259
|
req F-7.1:
|
|
244
260
|
when: logStore is provided in DebugPluginOptions
|
|
245
|
-
then:
|
|
261
|
+
then: LoggingArticle can stream and display captured log entries
|
|
246
262
|
|
|
247
263
|
req F-7.2:
|
|
248
264
|
when: user clicks download in DebugSettings
|
|
@@ -262,16 +278,17 @@ feat F-8: Global Dev Utilities
|
|
|
262
278
|
## Acceptance
|
|
263
279
|
|
|
264
280
|
```mdl
|
|
265
|
-
|
|
266
|
-
given: Composer loaded with DebugPlugin enabled
|
|
267
|
-
when: user opens the
|
|
281
|
+
scenario T-1: Devtools tree appears in the debug panel
|
|
282
|
+
given: Composer loaded with DevtoolsPlugin and DebugPlugin enabled
|
|
283
|
+
when: user opens the debug panel from the status bar
|
|
268
284
|
then:
|
|
269
|
-
-
|
|
270
|
-
-
|
|
285
|
+
- the sidebar lists Console, Logs, DevTools, Debug
|
|
286
|
+
- expanding DevTools shows App Graph, SDK Explorer, CLI, Client, HALO, ECHO, MESH, EDGE
|
|
287
|
+
- the main navtree's SYSTEM group shows only Database
|
|
271
288
|
```
|
|
272
289
|
|
|
273
290
|
```mdl
|
|
274
|
-
|
|
291
|
+
scenario T-2: Debug companion on ECHO object
|
|
275
292
|
given: a Document is open in the deck
|
|
276
293
|
when: user clicks the "Debug" companion tab
|
|
277
294
|
then:
|
|
@@ -279,7 +296,7 @@ test T-2: Debug companion on ECHO object
|
|
|
279
296
|
```
|
|
280
297
|
|
|
281
298
|
```mdl
|
|
282
|
-
|
|
299
|
+
scenario T-3: Wireframe overlay toggle
|
|
283
300
|
given: DebugPlugin settings panel is open
|
|
284
301
|
when: user enables the wireframe toggle
|
|
285
302
|
then:
|
|
@@ -290,16 +307,16 @@ test T-3: Wireframe overlay toggle
|
|
|
290
307
|
```
|
|
291
308
|
|
|
292
309
|
```mdl
|
|
293
|
-
|
|
310
|
+
scenario T-4: Space object generation
|
|
294
311
|
given: a space with an empty collection is active
|
|
295
|
-
when: user opens the debug
|
|
312
|
+
when: user opens Debug → Generate objects in the debug panel and generates 10 objects
|
|
296
313
|
then:
|
|
297
314
|
- 10 new objects appear in the active collection
|
|
298
315
|
- DebugStatus shows "running" while generation is in progress
|
|
299
316
|
```
|
|
300
317
|
|
|
301
318
|
```mdl
|
|
302
|
-
|
|
319
|
+
scenario T-5: Log download
|
|
303
320
|
given: logStore is configured and some log entries have been captured
|
|
304
321
|
when: user clicks "Download Logs" in DebugSettings
|
|
305
322
|
then:
|
|
@@ -308,6 +325,76 @@ test T-5: Log download
|
|
|
308
325
|
|
|
309
326
|
---
|
|
310
327
|
|
|
328
|
+
## QA
|
|
329
|
+
|
|
330
|
+
Executable tests. Each step carries a human instruction (`do`) and, where the step maps to an
|
|
331
|
+
invocable operation, an agent binding (`invoke`). Report failures by test and step number.
|
|
332
|
+
|
|
333
|
+
plugin-devtools defines no first-party operations (see "Operations" above), so most of its
|
|
334
|
+
journeys are navigation and settings toggles with no `invoke`. It is a dev-only default: on in
|
|
335
|
+
`isDev` builds, off otherwise (see `packages/apps/composer-app/src/plugin-defs.tsx`).
|
|
336
|
+
|
|
337
|
+
```mdl
|
|
338
|
+
test QA-1: Open the Devtools node and inspect an object
|
|
339
|
+
desc: The core devtools round-trip — navigate to the Devtools tree and open the Debug companion on an object.
|
|
340
|
+
actors: both
|
|
341
|
+
covers: [F-1.1, F-1.2, F-2.1, F-2.2, T-1, T-2]
|
|
342
|
+
status: unverified
|
|
343
|
+
given:
|
|
344
|
+
- an identity exists
|
|
345
|
+
- space: a space is open
|
|
346
|
+
- plugin-devtools is enabled (dev-only default; see above)
|
|
347
|
+
- doc1: a Document already exists in the space
|
|
348
|
+
steps:
|
|
349
|
+
- name: Open the DevTools tree in the debug panel
|
|
350
|
+
do: Click the status-bar debug button (terminal icon), then expand "DevTools" in the panel's sidebar and open Client → Config.
|
|
351
|
+
expect: the sidebar shows Client, HALO, ECHO, MESH, and EDGE sub-trees and the Config JSON renders in the panel; `window.location` is unchanged
|
|
352
|
+
note: |
|
|
353
|
+
NO `invoke` — devtools nodes have no URL binding and never open in the deck, so
|
|
354
|
+
`appToolkit.open` does not reach them. Human-only step; an agent run reports it unverified.
|
|
355
|
+
- name: Open the Debug companion on an object
|
|
356
|
+
do: Click "$given.doc1" in the navtree, then select the "Debug" companion tab.
|
|
357
|
+
invoke: org.dxos.operation.appToolkit.updateCompanion { open: true, variant: "debug" }
|
|
358
|
+
expect: DebugObjectPanel renders the object's DXN, typename, and raw field map
|
|
359
|
+
after:
|
|
360
|
+
- name: Close the companion
|
|
361
|
+
do: Click the companion toggle again.
|
|
362
|
+
invoke: org.dxos.operation.appToolkit.updateCompanion { open: false }
|
|
363
|
+
expect: the companion pane closes
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
```mdl
|
|
367
|
+
test QA-2: Generate synthetic objects into a collection
|
|
368
|
+
desc: |
|
|
369
|
+
The write path behind the Space Data Generator — the agent binding invokes the shared
|
|
370
|
+
space.addObject operation directly rather than driving the SpaceGenerator surface, so this
|
|
371
|
+
exercises F-5.2 (object creation) only, not F-5.1 (the surface rendering).
|
|
372
|
+
actors: agent
|
|
373
|
+
covers: [F-5.2, T-4]
|
|
374
|
+
status: unverified
|
|
375
|
+
given:
|
|
376
|
+
- an identity exists
|
|
377
|
+
- space: a space is open
|
|
378
|
+
- collection: a collection in that space, empty of synthetic objects
|
|
379
|
+
- plugin-devtools is enabled (dev-only default; see above)
|
|
380
|
+
- no Person named "QA Devtools Object" exists — ABORT rather than reusing one this test did
|
|
381
|
+
not create
|
|
382
|
+
steps:
|
|
383
|
+
- name: Generate one object
|
|
384
|
+
do: (agent-only — invokes space.addObject directly, bypassing the SpaceGenerator surface)
|
|
385
|
+
invoke: org.dxos.operation.space.addObject { object: { "@type": "org.dxos.type.person", fullName: "QA Devtools Object" }, target: $given.collection }
|
|
386
|
+
capture: created
|
|
387
|
+
expect: one new Person named "QA Devtools Object" appears in the active collection
|
|
388
|
+
assert: return !!$created.object
|
|
389
|
+
after:
|
|
390
|
+
- name: Delete the generated object
|
|
391
|
+
do: Right-click "QA Devtools Object" in the navtree and choose Delete.
|
|
392
|
+
invoke: org.dxos.operation.space.removeObjects { objects: [$created.object], target: $given.collection }
|
|
393
|
+
expect: the row leaves the navtree
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
311
398
|
## Appendix: Extension Definitions
|
|
312
399
|
|
|
313
400
|
```mdl
|
|
@@ -332,8 +419,8 @@ ext feat
|
|
|
332
419
|
```
|
|
333
420
|
|
|
334
421
|
```mdl
|
|
335
|
-
ext
|
|
336
|
-
uri: org.dxos.mdl.
|
|
422
|
+
ext scenario
|
|
423
|
+
uri: org.dxos.mdl.scenario@1.0
|
|
337
424
|
desc: An acceptance scenario expressed as given / when / then steps.
|
|
338
425
|
fields:
|
|
339
426
|
given?: Step | Step[]
|
package/dist/lib/Devtools.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
2
|
import { meta } from "#meta";
|
|
3
|
+
import * as GraphPath from "@dxos/app-toolkit/GraphPath";
|
|
3
4
|
//#region src/types/Devtools.ts
|
|
4
5
|
var Devtools_exports = /* @__PURE__ */ __exportAll({
|
|
5
6
|
Agent: () => Agent,
|
|
@@ -11,6 +12,7 @@ var Devtools_exports = /* @__PURE__ */ __exportAll({
|
|
|
11
12
|
Halo: () => Halo,
|
|
12
13
|
Mesh: () => Mesh,
|
|
13
14
|
ToolsExplorer: () => ToolsExplorer,
|
|
15
|
+
getNodePath: () => getNodePath,
|
|
14
16
|
id: () => id,
|
|
15
17
|
nodeId: () => nodeId
|
|
16
18
|
});
|
|
@@ -21,6 +23,11 @@ var Devtools_exports = /* @__PURE__ */ __exportAll({
|
|
|
21
23
|
*/
|
|
22
24
|
var nodeId = (fullId) => fullId.split(".").at(-1) ?? "";
|
|
23
25
|
var devtoolsId = `${meta.profile.key}.devtools`;
|
|
26
|
+
/**
|
|
27
|
+
* Qualified graph id of a devtools node: the tree under the debug category nests one node per dotted
|
|
28
|
+
* segment of the namespaced ID below the plugin key.
|
|
29
|
+
*/
|
|
30
|
+
var getNodePath = (fullId) => GraphPath.getSpacePath(GraphPath.GroupSegments.debug, ...fullId.slice(meta.profile.key.length + 1).split("."));
|
|
24
31
|
var id = devtoolsId;
|
|
25
32
|
var AppGraph = `${devtoolsId}.appGraph`;
|
|
26
33
|
var ToolsExplorer = `${devtoolsId}.toolsExplorer`;
|
|
@@ -49,6 +56,7 @@ var Echo;
|
|
|
49
56
|
_Echo.Space = `${Echo.id}.space`;
|
|
50
57
|
_Echo.Feeds = `${Echo.id}.feeds`;
|
|
51
58
|
_Echo.Objects = `${Echo.id}.objects`;
|
|
59
|
+
_Echo.Queries = `${Echo.id}.queries`;
|
|
52
60
|
_Echo.Schema = `${Echo.id}.schema`;
|
|
53
61
|
_Echo.Registry = `${Echo.id}.registry`;
|
|
54
62
|
_Echo.Automerge = `${Echo.id}.automerge`;
|
|
@@ -78,6 +86,6 @@ var Edge;
|
|
|
78
86
|
_Edge.Testing = `${Edge.id}.testing`;
|
|
79
87
|
})(Edge || (Edge = {}));
|
|
80
88
|
//#endregion
|
|
81
|
-
export { Agent, AppGraph, Cli, Client, Echo, Edge, Halo, Mesh, ToolsExplorer, id, nodeId, Devtools_exports as t };
|
|
89
|
+
export { Agent, AppGraph, Cli, Client, Echo, Edge, Halo, Mesh, ToolsExplorer, getNodePath, id, nodeId, Devtools_exports as t };
|
|
82
90
|
|
|
83
91
|
//# sourceMappingURL=Devtools.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Devtools.mjs","names":[],"sources":["../../src/types/Devtools.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { meta } from '#meta';\n\n/**\n * Extracts the last dot-separated segment of a Devtools namespaced ID string.\n * Use this as the node segment `id` when building app-graph nodes whose `data`\n * value is one of the other constants in this namespace.\n */\nexport const nodeId = (fullId: string): string => fullId.split('.').at(-1) ?? '';\n\nconst devtoolsId = `${meta.profile.key}.devtools`;\n\nexport const id = devtoolsId;\nexport const AppGraph = `${devtoolsId}.appGraph`;\nexport const ToolsExplorer = `${devtoolsId}.toolsExplorer`;\nexport const Cli = `${devtoolsId}.cli`;\n\nexport namespace Client {\n export const id = `${devtoolsId}.client`;\n export const Config = `${Client.id}.config`;\n export const Storage = `${Client.id}.storage`;\n export const Sqlite = `${Client.id}.sqlite`;\n export const Logs = `${Client.id}.logs`;\n export const Diagnostics = `${Client.id}.diagnostics`;\n}\n\nexport namespace Halo {\n export const id = `${devtoolsId}.halo`;\n export const Identity = `${Halo.id}.identity`;\n export const Devices = `${Halo.id}.devices`;\n export const Keyring = `${Halo.id}.keyring`;\n export const Credentials = `${Halo.id}.credentials`;\n}\n\nexport namespace Echo {\n export const id = `${devtoolsId}.echo`;\n export const Spaces = `${Echo.id}.spaces`;\n export const Space = `${Echo.id}.space`;\n export const Feeds = `${Echo.id}.feeds`;\n export const Objects = `${Echo.id}.objects`;\n export const Schema = `${Echo.id}.schema`;\n export const Registry = `${Echo.id}.registry`;\n export const Automerge = `${Echo.id}.automerge`;\n export const Queues = `${Echo.id}.queues`;\n export const Members = `${Echo.id}.members`;\n export const Metadata = `${Echo.id}.metadata`;\n}\n\nexport namespace Mesh {\n export const id = `${devtoolsId}.mesh`;\n export const Signal = `${Mesh.id}.signal`;\n export const Swarm = `${Mesh.id}.swarm`;\n export const Network = `${Mesh.id}.network`;\n}\n\nexport namespace Agent {\n export const id = `${devtoolsId}.agent`;\n export const Dashboard = `${Agent.id}.dashboard`;\n export const Search = `${Agent.id}.search`;\n}\n\nexport namespace Edge {\n export const id = `${devtoolsId}.edge`;\n export const Dashboard = `${Edge.id}.dashboard`;\n export const Workflows = `${Edge.id}.workflows`;\n export const Traces = `${Edge.id}.traces`;\n export const Testing = `${Edge.id}.testing`;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Devtools.mjs","names":[],"sources":["../../src/types/Devtools.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as GraphPath from '@dxos/app-toolkit/GraphPath';\n\nimport { meta } from '#meta';\n\n/**\n * Extracts the last dot-separated segment of a Devtools namespaced ID string.\n * Use this as the node segment `id` when building app-graph nodes whose `data`\n * value is one of the other constants in this namespace.\n */\nexport const nodeId = (fullId: string): string => fullId.split('.').at(-1) ?? '';\n\nconst devtoolsId = `${meta.profile.key}.devtools`;\n\n/**\n * Qualified graph id of a devtools node: the tree under the debug category nests one node per dotted\n * segment of the namespaced ID below the plugin key.\n */\nexport const getNodePath = (fullId: string): string =>\n GraphPath.getSpacePath(GraphPath.GroupSegments.debug, ...fullId.slice(meta.profile.key.length + 1).split('.'));\n\nexport const id = devtoolsId;\nexport const AppGraph = `${devtoolsId}.appGraph`;\nexport const ToolsExplorer = `${devtoolsId}.toolsExplorer`;\nexport const Cli = `${devtoolsId}.cli`;\n\nexport namespace Client {\n export const id = `${devtoolsId}.client`;\n export const Config = `${Client.id}.config`;\n export const Storage = `${Client.id}.storage`;\n export const Sqlite = `${Client.id}.sqlite`;\n export const Logs = `${Client.id}.logs`;\n export const Diagnostics = `${Client.id}.diagnostics`;\n}\n\nexport namespace Halo {\n export const id = `${devtoolsId}.halo`;\n export const Identity = `${Halo.id}.identity`;\n export const Devices = `${Halo.id}.devices`;\n export const Keyring = `${Halo.id}.keyring`;\n export const Credentials = `${Halo.id}.credentials`;\n}\n\nexport namespace Echo {\n export const id = `${devtoolsId}.echo`;\n export const Spaces = `${Echo.id}.spaces`;\n export const Space = `${Echo.id}.space`;\n export const Feeds = `${Echo.id}.feeds`;\n export const Objects = `${Echo.id}.objects`;\n export const Queries = `${Echo.id}.queries`;\n export const Schema = `${Echo.id}.schema`;\n export const Registry = `${Echo.id}.registry`;\n export const Automerge = `${Echo.id}.automerge`;\n export const Queues = `${Echo.id}.queues`;\n export const Members = `${Echo.id}.members`;\n export const Metadata = `${Echo.id}.metadata`;\n}\n\nexport namespace Mesh {\n export const id = `${devtoolsId}.mesh`;\n export const Signal = `${Mesh.id}.signal`;\n export const Swarm = `${Mesh.id}.swarm`;\n export const Network = `${Mesh.id}.network`;\n}\n\nexport namespace Agent {\n export const id = `${devtoolsId}.agent`;\n export const Dashboard = `${Agent.id}.dashboard`;\n export const Search = `${Agent.id}.search`;\n}\n\nexport namespace Edge {\n export const id = `${devtoolsId}.edge`;\n export const Dashboard = `${Edge.id}.dashboard`;\n export const Workflows = `${Edge.id}.workflows`;\n export const Traces = `${Edge.id}.traces`;\n export const Testing = `${Edge.id}.testing`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAa,UAAU,WAA2B,OAAO,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK;AAE9E,IAAM,aAAa,GAAG,KAAK,QAAQ,IAAI;;;;;AAMvC,IAAa,eAAe,WAC1B,UAAU,aAAa,UAAU,cAAc,OAAO,GAAG,OAAO,MAAM,KAAK,QAAQ,IAAI,SAAS,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;AAE/G,IAAa,KAAK;AAClB,IAAa,WAAW,GAAG,WAAW;AACtC,IAAa,gBAAgB,GAAG,WAAW;AAC3C,IAAa,MAAM,GAAG,WAAW;AAE1B,IAAU;CAAV,SAAA,SAAA;CACQ,QAAA,KAAK,GAAG,WAAW;CACnB,QAAA,SAAS,GAAG,OAAO,GAAG;CACtB,QAAA,UAAU,GAAG,OAAO,GAAG;CACvB,QAAA,SAAS,GAAG,OAAO,GAAG;CACtB,QAAA,OAAO,GAAG,OAAO,GAAG;CACpB,QAAA,cAAc,GAAG,OAAO,GAAG;AAC1C,EAAA,CAAA,WAAA,SAAA,CAAA,EAAA;AAEO,IAAU;CAAV,SAAA,OAAA;CACQ,MAAA,KAAK,GAAG,WAAW;CACnB,MAAA,WAAW,GAAG,KAAK,GAAG;CACtB,MAAA,UAAU,GAAG,KAAK,GAAG;CACrB,MAAA,UAAU,GAAG,KAAK,GAAG;CACrB,MAAA,cAAc,GAAG,KAAK,GAAG;AACxC,EAAA,CAAA,SAAA,OAAA,CAAA,EAAA;AAEO,IAAU;CAAV,SAAA,OAAA;CACQ,MAAA,KAAK,GAAG,WAAW;CACnB,MAAA,SAAS,GAAG,KAAK,GAAG;CACpB,MAAA,QAAQ,GAAG,KAAK,GAAG;CACnB,MAAA,QAAQ,GAAG,KAAK,GAAG;CACnB,MAAA,UAAU,GAAG,KAAK,GAAG;CACrB,MAAA,UAAU,GAAG,KAAK,GAAG;CACrB,MAAA,SAAS,GAAG,KAAK,GAAG;CACpB,MAAA,WAAW,GAAG,KAAK,GAAG;CACtB,MAAA,YAAY,GAAG,KAAK,GAAG;CACvB,MAAA,SAAS,GAAG,KAAK,GAAG;CACpB,MAAA,UAAU,GAAG,KAAK,GAAG;CACrB,MAAA,WAAW,GAAG,KAAK,GAAG;AACrC,EAAA,CAAA,SAAA,OAAA,CAAA,EAAA;AAEO,IAAU;CAAV,SAAA,OAAA;CACQ,MAAA,KAAK,GAAG,WAAW;CACnB,MAAA,SAAS,GAAG,KAAK,GAAG;CACpB,MAAA,QAAQ,GAAG,KAAK,GAAG;CACnB,MAAA,UAAU,GAAG,KAAK,GAAG;AACpC,EAAA,CAAA,SAAA,OAAA,CAAA,EAAA;AAEO,IAAU;CAAV,SAAA,QAAA;CACQ,OAAA,KAAK,GAAG,WAAW;CACnB,OAAA,YAAY,GAAG,MAAM,GAAG;CACxB,OAAA,SAAS,GAAG,MAAM,GAAG;AACpC,EAAA,CAAA,UAAA,QAAA,CAAA,EAAA;AAEO,IAAU;CAAV,SAAA,OAAA;CACQ,MAAA,KAAK,GAAG,WAAW;CACnB,MAAA,YAAY,GAAG,KAAK,GAAG;CACvB,MAAA,YAAY,GAAG,KAAK,GAAG;CACvB,MAAA,SAAS,GAAG,KAAK,GAAG;CACpB,MAAA,UAAU,GAAG,KAAK,GAAG;AACpC,EAAA,CAAA,SAAA,OAAA,CAAA,EAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
|
|
2
|
+
import { create } from "@bufbuild/protobuf";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
5
|
+
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
6
|
+
import { Runtime_Client_StorageSchema } from "@dxos/protocols/buf/dxos/config_pb";
|
|
7
|
+
import { translations } from "#translations";
|
|
8
|
+
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
9
|
+
import { meta } from "#meta";
|
|
10
|
+
//#region src/capabilities/gen/browser.ts
|
|
11
|
+
var setupDevtools = () => {
|
|
12
|
+
globalThis.composer ??= {};
|
|
13
|
+
globalThis.composer.changeStorageVersionInMetadata = async (version) => {
|
|
14
|
+
const { changeStorageVersionInMetadata } = await import("@dxos/client-services/testing");
|
|
15
|
+
const { Storage } = await import("@dxos/client-services");
|
|
16
|
+
const client = window.dxos.client;
|
|
17
|
+
const config = client.config;
|
|
18
|
+
await client.destroy();
|
|
19
|
+
const { storage } = Storage.createStorageObjects(config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}));
|
|
20
|
+
await changeStorageVersionInMetadata(storage, version);
|
|
21
|
+
location.pathname = "/";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), {
|
|
25
|
+
requires: [AppCapabilities.AppGraph],
|
|
26
|
+
environments: [
|
|
27
|
+
"browser",
|
|
28
|
+
"node",
|
|
29
|
+
"tauri"
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
var ReactContext = AppCapability.reactContext(() => import("./chunk-react-context.mjs"));
|
|
33
|
+
var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: ["org.dxos.plugin.debug.surface.page", "org.dxos.role.deckCompanion.devtoolsOverview"] });
|
|
34
|
+
var SetupDevtools = Capability.inlineModule("setup-devtools", { provides: [] }, () => Effect.sync(() => setupDevtools()));
|
|
35
|
+
var Translations = AppCapability.translations(translations);
|
|
36
|
+
var PluginAsset = AppCapability.pluginAsset({
|
|
37
|
+
pluginId: meta.profile.key,
|
|
38
|
+
path: "PLUGIN.mdl",
|
|
39
|
+
content: PLUGIN_default,
|
|
40
|
+
mimeType: "application/x-mdl"
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { AppGraphBuilder, PluginAsset, ReactContext, ReactSurface, SetupDevtools, Translations };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=capabilities.browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.browser.mjs","names":[],"sources":["../../src/capabilities/gen/browser.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.\n\nimport { create } from '@bufbuild/protobuf';\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport { Runtime_Client_StorageSchema } from '@dxos/protocols/buf/dxos/config_pb';\nimport { type Client } from '@dxos/react-client';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nimport pluginSpec from '../../../PLUGIN.mdl?raw';\n\nconst setupDevtools = () => {\n (globalThis as any).composer ??= {};\n\n // Used to test how composer handles breaking protocol changes.\n (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {\n const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');\n const { Storage } = await import('@dxos/client-services');\n const client: Client = (window as any).dxos.client;\n const config = client.config;\n await client.destroy();\n const { storage } = Storage.createStorageObjects(\n config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),\n );\n await changeStorageVersionInMetadata(storage, version);\n location.pathname = '/';\n };\n};\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {\n requires: [AppCapabilities.AppGraph],\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const ReactContext = AppCapability.reactContext(() => import('../react-context.tsx'));\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.plugin.debug.surface.page', 'org.dxos.role.deckCompanion.devtoolsOverview'],\n});\n\nexport const SetupDevtools = Capability.inlineModule('setup-devtools', { provides: [] }, () =>\n Effect.sync(() => setupDevtools()),\n);\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n"],"mappings":";;;;;;;;;;AAoBA,IAAM,sBAAsB;CAC1B,WAAoB,aAAa,CAAC;CAGlC,WAAoB,SAAS,iCAAiC,OAAO,YAAoB;EACvF,MAAM,EAAE,mCAAmC,MAAM,OAAO;EACxD,MAAM,EAAE,YAAY,MAAM,OAAO;EACjC,MAAM,SAAkB,OAAe,KAAK;EAC5C,MAAM,SAAS,OAAO;EACtB,MAAM,OAAO,QAAQ;EACrB,MAAM,EAAE,YAAY,QAAQ,qBAC1B,OAAO,QAAQ,SAAS,QAAQ,WAAW,OAAO,8BAA8B,CAAC,CAAC,CACpF;EACA,MAAM,+BAA+B,SAAS,OAAO;EACrD,SAAS,WAAW;CACtB;AACF;AAEA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA4B;CACpG,UAAU,CAAC,gBAAgB,QAAQ;CACnC,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,CAAC;AAED,IAAa,eAAe,cAAc,mBAAmB,OAAO,4BAAuB;AAE3F,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAwB,EACrF,OAAO,CAAC,sCAAsC,8CAA8C,EAC9F,CAAC;AAED,IAAa,gBAAgB,WAAW,aAAa,kBAAkB,EAAE,UAAU,CAAC,EAAE,SACpF,OAAO,WAAW,cAAc,CAAC,CACnC;AAEA,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
|
|
1
2
|
import { create } from "@bufbuild/protobuf";
|
|
2
3
|
import * as Effect from "effect/Effect";
|
|
3
4
|
import * as Capability from "@dxos/app-framework/Capability";
|
|
@@ -6,16 +7,17 @@ import { Runtime_Client_StorageSchema } from "@dxos/protocols/buf/dxos/config_pb
|
|
|
6
7
|
import { translations } from "#translations";
|
|
7
8
|
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
8
9
|
import { meta } from "#meta";
|
|
9
|
-
//#region PLUGIN.mdl?raw
|
|
10
|
-
var PLUGIN_default = "---\nid: org.dxos.plugin.devtools\nname: DevtoolsPlugin\nversion: 0.1.0\n---\n\nDeveloper inspector plugin for `DXOS` Composer — structured devtools panels for Client/HALO/ECHO/Mesh/EDGE subsystems, an app-graph inspector, and a tools explorer. Debugging utilities (object generation, wireframe overlays, per-object inspection, stats) live in the sibling `@dxos/plugin-debug`.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype Settings\n fields:\n wireframe?: boolean # overlay every article/section surface with a labelled border\n traceAll?: boolean # enable verbose operation tracing across all plugins\n```\n\n```mdl\ntype DebugPluginOptions\n fields:\n logStore?: IdbLogStore # shared persistent log store for capturing and downloading logs\n```\n\n```mdl\ntype DebugContextType\n fields:\n running: boolean\n start(cb: TimerCallback, options: TimerOptions): void\n stop(): void\n```\n\n## Components\n\n```mdl\ncomponent DebugSettings\n desc: Settings panel rendered in the plugin-settings article slot; controls wireframe and traceAll toggles and exposes log download.\n props:\n settings: Settings\n logStore?: IdbLogStore\n actions:\n updateSettings(patch: Partial<Settings>)\n downloadLogs()\n```\n\n```mdl\ncomponent DebugStatus\n desc: Status-indicator surface shown in the main toolbar; reflects the generator timer running state.\n state:\n running: boolean\n```\n\n```mdl\ncomponent DevtoolsOverviewContainer\n desc: Deck-companion panel that provides quick access to all devtools sections via a categorised link list.\n layout: |\n ┌─────────────────────────────┐\n │ Client ▸ Config / Storage │\n │ Logs / Diag │\n │ HALO ▸ Identity / Keys │\n │ ECHO ▸ Spaces / Feeds │\n │ Objects / Schema │\n │ Mesh ▸ Signal / Swarm │\n │ EDGE ▸ Dashboard / … │\n └─────────────────────────────┘\n```\n\n```mdl\ncomponent DebugObjectPanel\n desc: Companion panel for any ECHO object that shows raw field values, type info, and DXN.\n props:\n companionTo: string # DXN of the object being inspected\n```\n\n```mdl\ncomponent DebugSpaceObjectsPanel\n desc: Deck-companion panel listing all objects in the active space with their type, ID, and field count.\n props:\n space: Space\n```\n\n```mdl\ncomponent DebugGraph\n desc: Visual representation of the Composer app-graph as a collapsible JSON tree.\n props:\n graph: Graph.Graph\n root: string # node ID used as the traversal root\n```\n\n```mdl\ncomponent SpaceGenerator\n desc: Article view for generating synthetic ECHO objects into a space; controls count, type mix, and relation density.\n props:\n space: Space\n actions:\n generateObjects(count: number, types: string[])\n clear()\n emits:\n onCreateObjects(objects: Obj.Unknown[])\n```\n\n```mdl\ncomponent Wireframe\n desc: Transparent overlay that wraps any article or section surface and renders a labelled border for layout debugging.\n props:\n label: string # \"role:name\" descriptor shown in the corner badge\n object: Obj.Unknown\n classNames?: string\n```\n\n```mdl\ncomponent SchemaTable\n desc: Tabular display of all registered ECHO schemas with typename, fields, and version.\n```\n\n```mdl\ncomponent GithubPanel\n desc: Developer panel linking to open GitHub issues and CI run status for the current build.\n```\n```\n\n## Components (Devtools Panels)\n\nThe following components are thin wrappers around `@dxos/devtools` panel components, each bound to a specific `Devtools.*` node:\n\n| Component | Devtools node | Displays |\n|------------------------|----------------------------|-----------------------------------------|\n| ConfigPanel | Client.Config | Vault config JSON viewer |\n| StoragePanel | Client.Storage | Local storage browser |\n| LoggingPanel | Client.Logs | Live log stream; download via logStore |\n| DiagnosticsPanel | Client.Diagnostics | Client health / metric charts |\n| IdentityPanel | Halo.Identity | Local identity key + device list |\n| DeviceListPanel | Halo.Devices | All devices paired with this identity |\n| KeyringPanel | Halo.Keyring | Raw keyring entries |\n| CredentialsPanel | Halo.Credentials | Credentials held in the active space |\n| SpaceListPanel | Echo.Spaces | All spaces with state + select action |\n| SpaceInfoPanel | Echo.Space | Selected space feeds / pipelines |\n| FeedsPanel | Echo.Feeds | Feed entries for the active space |\n| ObjectsPanel | Echo.Objects | All objects in the active space |\n| SchemaPanel | Echo.Schema | Schemas registered in the active space |\n| AutomergePanel | Echo.Automerge | Automerge document internals |\n| QueuesPanel | Echo.Queues | Pending queue items |\n| MembersPanel | Echo.Members | Space members with last-seen |\n| MetadataPanel | Echo.Metadata | Space/feed metadata blobs |\n| SignalPanel | Mesh.Signal | Signal-server connection state |\n| SwarmPanel | Mesh.Swarm | Active swarm peers |\n| NetworkPanel | Mesh.Network | Full network topology for active space |\n| EdgeDashboardPanel | Edge.Dashboard | EDGE node health / worker stats |\n| WorkflowPanel | Edge.Workflows | Workflow definitions in active space |\n| InvocationTraceContainer | Edge.Traces | Invocation trace timeline from feed |\n| TestingPanel | Edge.Testing | Integration test harness for EDGE |\n| ToolsExplorer | ToolsExplorer | MCP-backed tools explorer |\n\n## Operations\n\nNo first-party operations are defined by DebugPlugin. The plugin invokes `SpaceOperation.AddObject`, `SpaceOperation.Migrate`, `LayoutOperation.Open`, and `ScriptOperation.CreateScript` from other plugins via `useOperationInvoker` inside its surfaces.\n\n## Features\n\n```mdl\nfeat F-1: Devtools Graph Node\n\n req F-1.1:\n when: DebugPlugin is loaded\n then: a \"Devtools\" node appears pinned at the end of each root and space in the nav graph\n\n req F-1.2: The Devtools node contains sub-trees for Client, HALO, ECHO, Mesh, and EDGE categories.\n req F-1.3: An app-graph sub-node renders DebugGraph rooted at the current space or root.\n req F-1.4: A tools-explorer sub-node renders ToolsExplorer connected to the MCP introspect service.\n```\n\n```mdl\nfeat F-2: Object Debug Companion\n\n req F-2.1:\n when: any ECHO object is open in the deck\n then: a \"Debug\" companion tab is injected at the last position\n\n req F-2.2: DebugObjectPanel shows raw object fields, DXN, and typename for the companion target.\n```\n\n```mdl\nfeat F-3: Space Object Explorer\n\n req F-3.1:\n when: user opens the \"Space Objects\" deck companion\n then: DebugSpaceObjectsPanel lists all ECHO objects in the active space\n\n req F-3.2: List updates reactively as objects are added or removed.\n```\n\n```mdl\nfeat F-4: Devtools Overview Companion\n\n req F-4.1:\n when: user opens the \"Devtools\" deck companion\n then: DevtoolsOverviewContainer renders a categorised link list to all devtools panels\n\n req F-4.2: Clicking a category link navigates the deck to the corresponding devtools article.\n```\n\n```mdl\nfeat F-5: Space Data Generator\n\n req F-5.1:\n when: user navigates to the debug node under a space\n then: SpaceGenerator is rendered as the article\n\n req F-5.2:\n when: user triggers object generation\n then: synthetic ECHO objects are created via op:SpaceOperation.AddObject in the active collection\n\n req F-5.3: DebugStatus indicator in the toolbar shows a running state while generation is active.\n```\n\n```mdl\nfeat F-6: Wireframe Overlay\n\n req F-6.1:\n when: settings.wireframe is true\n then: Wireframe wraps every article and section surface with a labelled border\n\n req F-6.2:\n when: settings.wireframe is false or unset\n then: no overlay is injected; the Wireframe surface filter returns false immediately\n```\n\n```mdl\nfeat F-7: Log Capture and Download\n\n req F-7.1:\n when: logStore is provided in DebugPluginOptions\n then: LoggingPanel can stream and display captured log entries\n\n req F-7.2:\n when: user clicks download in DebugSettings\n then: captured logs are serialised and offered as a file download via the file uploader capability\n```\n\n```mdl\nfeat F-8: Global Dev Utilities\n\n req F-8.1:\n when: DebugPlugin activates\n then: globalThis.composer.changeStorageVersionInMetadata is registered for manual storage-migration testing\n\n req F-8.2: The function destroys the client, rewrites the storage version metadata, and reloads the page.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Devtools node appears in nav graph\n given: Composer loaded with DebugPlugin enabled\n when: user opens the navigation tree\n then:\n - \"Devtools\" node is visible pinned at the end of the root\n - sub-nodes Client, HALO, ECHO, Mesh, EDGE are present\n```\n\n```mdl\ntest T-2: Debug companion on ECHO object\n given: a Document is open in the deck\n when: user clicks the \"Debug\" companion tab\n then:\n - DebugObjectPanel renders with the object's DXN and field map\n```\n\n```mdl\ntest T-3: Wireframe overlay toggle\n given: DebugPlugin settings panel is open\n when: user enables the wireframe toggle\n then:\n - every article and section surface shows a labelled border\n when: user disables the wireframe toggle\n then:\n - borders are removed immediately\n```\n\n```mdl\ntest T-4: Space object generation\n given: a space with an empty collection is active\n when: user opens the debug space node and generates 10 objects\n then:\n - 10 new objects appear in the active collection\n - DebugStatus shows \"running\" while generation is in progress\n```\n\n```mdl\ntest T-5: Log download\n given: logStore is configured and some log entries have been captured\n when: user clicks \"Download Logs\" in DebugSettings\n then:\n - a file download is triggered containing the serialised log entries\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n";
|
|
11
|
-
//#endregion
|
|
12
10
|
//#region src/capabilities/index.ts
|
|
13
11
|
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), {
|
|
14
12
|
requires: [AppCapabilities.AppGraph],
|
|
15
|
-
environments: [
|
|
13
|
+
environments: [
|
|
14
|
+
"browser",
|
|
15
|
+
"node",
|
|
16
|
+
"tauri"
|
|
17
|
+
]
|
|
16
18
|
});
|
|
17
19
|
var ReactContext = AppCapability.reactContext(() => import("./chunk-react-context.mjs"));
|
|
18
|
-
var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: ["org.dxos.
|
|
20
|
+
var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: ["org.dxos.plugin.debug.surface.page", "org.dxos.role.deckCompanion.devtoolsOverview"] });
|
|
19
21
|
var SetupDevtools = Capability.inlineModule("setup-devtools", { provides: [] }, () => Effect.sync(() => setupDevtools()));
|
|
20
22
|
var Translations = AppCapability.translations(translations);
|
|
21
23
|
var PluginAsset = AppCapability.pluginAsset({
|
|
@@ -28,11 +30,11 @@ var setupDevtools = () => {
|
|
|
28
30
|
globalThis.composer ??= {};
|
|
29
31
|
globalThis.composer.changeStorageVersionInMetadata = async (version) => {
|
|
30
32
|
const { changeStorageVersionInMetadata } = await import("@dxos/client-services/testing");
|
|
31
|
-
const {
|
|
33
|
+
const { Storage } = await import("@dxos/client-services");
|
|
32
34
|
const client = window.dxos.client;
|
|
33
35
|
const config = client.config;
|
|
34
36
|
await client.destroy();
|
|
35
|
-
const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}));
|
|
37
|
+
const { storage } = Storage.createStorageObjects(config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}));
|
|
36
38
|
await changeStorageVersionInMetadata(storage, version);
|
|
37
39
|
location.pathname = "/";
|
|
38
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { create } from '@bufbuild/protobuf';\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport { Runtime_Client_StorageSchema } from '@dxos/protocols/buf/dxos/config_pb';\nimport { type Client } from '@dxos/react-client';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../../PLUGIN.mdl?raw';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder'), {\n requires: [AppCapabilities.AppGraph],\n environments: ['node'],\n});\nexport const ReactContext = AppCapability.reactContext(() => import('./react-context'));\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface'), {\n roles: ['org.dxos.
|
|
1
|
+
{"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { create } from '@bufbuild/protobuf';\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport { Runtime_Client_StorageSchema } from '@dxos/protocols/buf/dxos/config_pb';\nimport { type Client } from '@dxos/react-client';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../../PLUGIN.mdl?raw';\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder.ts'), {\n requires: [AppCapabilities.AppGraph],\n environments: ['browser', 'node', 'tauri'],\n});\nexport const ReactContext = AppCapability.reactContext(() => import('./react-context.tsx'));\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface.ts'), {\n roles: ['org.dxos.plugin.debug.surface.page', 'org.dxos.role.deckCompanion.devtoolsOverview'],\n});\nexport const SetupDevtools = Capability.inlineModule('setup-devtools', { provides: [] }, () =>\n Effect.sync(() => setupDevtools()),\n);\nexport const Translations = AppCapability.translations(translations);\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n\nconst setupDevtools = () => {\n (globalThis as any).composer ??= {};\n\n // Used to test how composer handles breaking protocol changes.\n (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {\n const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');\n const { Storage } = await import('@dxos/client-services');\n const client: Client = (window as any).dxos.client;\n const config = client.config;\n await client.destroy();\n const { storage } = Storage.createStorageObjects(\n config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),\n );\n await changeStorageVersionInMetadata(storage, version);\n location.pathname = '/';\n };\n};\n"],"mappings":";;;;;;;;;;AAmBA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA2B;CACnG,UAAU,CAAC,gBAAgB,QAAQ;CACnC,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,CAAC;AACD,IAAa,eAAe,cAAc,mBAAmB,OAAO,4BAAsB;AAC1F,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAuB,EACpF,OAAO,CAAC,sCAAsC,8CAA8C,EAC9F,CAAC;AACD,IAAa,gBAAgB,WAAW,aAAa,kBAAkB,EAAE,UAAU,CAAC,EAAE,SACpF,OAAO,WAAW,cAAc,CAAC,CACnC;AACA,IAAa,eAAe,cAAc,aAAa,YAAY;AACnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC;AAED,IAAM,sBAAsB;CAC1B,WAAoB,aAAa,CAAC;CAGlC,WAAoB,SAAS,iCAAiC,OAAO,YAAoB;EACvF,MAAM,EAAE,mCAAmC,MAAM,OAAO;EACxD,MAAM,EAAE,YAAY,MAAM,OAAO;EACjC,MAAM,SAAkB,OAAe,KAAK;EAC5C,MAAM,SAAS,OAAO;EACtB,MAAM,OAAO,QAAQ;EACrB,MAAM,EAAE,YAAY,QAAQ,qBAC1B,OAAO,QAAQ,SAAS,QAAQ,WAAW,OAAO,8BAA8B,CAAC,CAAC,CACpF;EACA,MAAM,+BAA+B,SAAS,OAAO;EACrD,SAAS,WAAW;CACtB;AACF"}
|
|
@@ -10,18 +10,22 @@ var setupDevtools = () => {
|
|
|
10
10
|
globalThis.composer ??= {};
|
|
11
11
|
globalThis.composer.changeStorageVersionInMetadata = async (version) => {
|
|
12
12
|
const { changeStorageVersionInMetadata } = await import("@dxos/client-services/testing");
|
|
13
|
-
const {
|
|
13
|
+
const { Storage } = await import("@dxos/client-services");
|
|
14
14
|
const client = window.dxos.client;
|
|
15
15
|
const config = client.config;
|
|
16
16
|
await client.destroy();
|
|
17
|
-
const { storage } = createStorageObjects(config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}));
|
|
17
|
+
const { storage } = Storage.createStorageObjects(config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}));
|
|
18
18
|
await changeStorageVersionInMetadata(storage, version);
|
|
19
19
|
location.pathname = "/";
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), {
|
|
23
23
|
requires: [AppCapabilities.AppGraph],
|
|
24
|
-
environments: [
|
|
24
|
+
environments: [
|
|
25
|
+
"browser",
|
|
26
|
+
"node",
|
|
27
|
+
"tauri"
|
|
28
|
+
]
|
|
25
29
|
});
|
|
26
30
|
var SetupDevtools = Capability.inlineModule("setup-devtools", { provides: [] }, () => Effect.sync(() => setupDevtools()));
|
|
27
31
|
var Translations = AppCapability.translations(translations);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.node.mjs","names":[],"sources":["../../src/capabilities/gen/node.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'node' condition.\n\nimport { create } from '@bufbuild/protobuf';\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport { Runtime_Client_StorageSchema } from '@dxos/protocols/buf/dxos/config_pb';\nimport { type Client } from '@dxos/react-client';\n\nimport { translations } from '#translations';\n\nconst setupDevtools = () => {\n (globalThis as any).composer ??= {};\n\n // Used to test how composer handles breaking protocol changes.\n (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {\n const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');\n const {
|
|
1
|
+
{"version":3,"file":"capabilities.node.mjs","names":[],"sources":["../../src/capabilities/gen/node.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'node' condition.\n\nimport { create } from '@bufbuild/protobuf';\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport { Runtime_Client_StorageSchema } from '@dxos/protocols/buf/dxos/config_pb';\nimport { type Client } from '@dxos/react-client';\n\nimport { translations } from '#translations';\n\nconst setupDevtools = () => {\n (globalThis as any).composer ??= {};\n\n // Used to test how composer handles breaking protocol changes.\n (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {\n const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');\n const { Storage } = await import('@dxos/client-services');\n const client: Client = (window as any).dxos.client;\n const config = client.config;\n await client.destroy();\n const { storage } = Storage.createStorageObjects(\n config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),\n );\n await changeStorageVersionInMetadata(storage, version);\n location.pathname = '/';\n };\n};\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {\n requires: [AppCapabilities.AppGraph],\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const SetupDevtools = Capability.inlineModule('setup-devtools', { provides: [] }, () =>\n Effect.sync(() => setupDevtools()),\n);\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const PluginAsset = undefined;\nexport const ReactContext = undefined;\nexport const ReactSurface = undefined;\n"],"mappings":";;;;;;;;AAiBA,IAAM,sBAAsB;CAC1B,WAAoB,aAAa,CAAC;CAGlC,WAAoB,SAAS,iCAAiC,OAAO,YAAoB;EACvF,MAAM,EAAE,mCAAmC,MAAM,OAAO;EACxD,MAAM,EAAE,YAAY,MAAM,OAAO;EACjC,MAAM,SAAkB,OAAe,KAAK;EAC5C,MAAM,SAAS,OAAO;EACtB,MAAM,OAAO,QAAQ;EACrB,MAAM,EAAE,YAAY,QAAQ,qBAC1B,OAAO,QAAQ,SAAS,QAAQ,WAAW,OAAO,8BAA8B,CAAC,CAAC,CACpF;EACA,MAAM,+BAA+B,SAAS,OAAO;EACrD,SAAS,WAAW;CACtB;AACF;AAEA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA4B;CACpG,UAAU,CAAC,gBAAgB,QAAQ;CACnC,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,CAAC;AAED,IAAa,gBAAgB,WAAW,aAAa,kBAAkB,EAAE,UAAU,CAAC,EAAE,SACpF,OAAO,WAAW,cAAc,CAAC,CACnC;AAEA,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,cAAc,KAAA;AAC3B,IAAa,eAAe,KAAA;AAC5B,IAAa,eAAe,KAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
|
|
2
|
+
import { create } from "@bufbuild/protobuf";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
5
|
+
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
6
|
+
import { Runtime_Client_StorageSchema } from "@dxos/protocols/buf/dxos/config_pb";
|
|
7
|
+
import { translations } from "#translations";
|
|
8
|
+
import * as AppCapabilities from "@dxos/app-toolkit/AppCapabilities";
|
|
9
|
+
import { meta } from "#meta";
|
|
10
|
+
//#region src/capabilities/gen/tauri.ts
|
|
11
|
+
var setupDevtools = () => {
|
|
12
|
+
globalThis.composer ??= {};
|
|
13
|
+
globalThis.composer.changeStorageVersionInMetadata = async (version) => {
|
|
14
|
+
const { changeStorageVersionInMetadata } = await import("@dxos/client-services/testing");
|
|
15
|
+
const { Storage } = await import("@dxos/client-services");
|
|
16
|
+
const client = window.dxos.client;
|
|
17
|
+
const config = client.config;
|
|
18
|
+
await client.destroy();
|
|
19
|
+
const { storage } = Storage.createStorageObjects(config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}));
|
|
20
|
+
await changeStorageVersionInMetadata(storage, version);
|
|
21
|
+
location.pathname = "/";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
var AppGraphBuilder = AppCapability.appGraphBuilder(() => import("./chunk-app-graph-builder.mjs"), {
|
|
25
|
+
requires: [AppCapabilities.AppGraph],
|
|
26
|
+
environments: [
|
|
27
|
+
"browser",
|
|
28
|
+
"node",
|
|
29
|
+
"tauri"
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
var ReactContext = AppCapability.reactContext(() => import("./chunk-react-context.mjs"));
|
|
33
|
+
var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs"), { roles: ["org.dxos.plugin.debug.surface.page", "org.dxos.role.deckCompanion.devtoolsOverview"] });
|
|
34
|
+
var SetupDevtools = Capability.inlineModule("setup-devtools", { provides: [] }, () => Effect.sync(() => setupDevtools()));
|
|
35
|
+
var Translations = AppCapability.translations(translations);
|
|
36
|
+
var PluginAsset = AppCapability.pluginAsset({
|
|
37
|
+
pluginId: meta.profile.key,
|
|
38
|
+
path: "PLUGIN.mdl",
|
|
39
|
+
content: PLUGIN_default,
|
|
40
|
+
mimeType: "application/x-mdl"
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { AppGraphBuilder, PluginAsset, ReactContext, ReactSurface, SetupDevtools, Translations };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=capabilities.tauri.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.tauri.mjs","names":[],"sources":["../../src/capabilities/gen/tauri.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'tauri' condition.\n\nimport { create } from '@bufbuild/protobuf';\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport { Runtime_Client_StorageSchema } from '@dxos/protocols/buf/dxos/config_pb';\nimport { type Client } from '@dxos/react-client';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nimport pluginSpec from '../../../PLUGIN.mdl?raw';\n\nconst setupDevtools = () => {\n (globalThis as any).composer ??= {};\n\n // Used to test how composer handles breaking protocol changes.\n (globalThis as any).composer.changeStorageVersionInMetadata = async (version: number) => {\n const { changeStorageVersionInMetadata } = await import('@dxos/client-services/testing');\n const { Storage } = await import('@dxos/client-services');\n const client: Client = (window as any).dxos.client;\n const config = client.config;\n await client.destroy();\n const { storage } = Storage.createStorageObjects(\n config.values?.runtime?.client?.storage ?? create(Runtime_Client_StorageSchema, {}),\n );\n await changeStorageVersionInMetadata(storage, version);\n location.pathname = '/';\n };\n};\n\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {\n requires: [AppCapabilities.AppGraph],\n environments: ['browser', 'node', 'tauri'],\n});\n\nexport const ReactContext = AppCapability.reactContext(() => import('../react-context.tsx'));\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.plugin.debug.surface.page', 'org.dxos.role.deckCompanion.devtoolsOverview'],\n});\n\nexport const SetupDevtools = Capability.inlineModule('setup-devtools', { provides: [] }, () =>\n Effect.sync(() => setupDevtools()),\n);\n\nexport const Translations = AppCapability.translations(translations);\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: pluginSpec,\n mimeType: 'application/x-mdl',\n});\n"],"mappings":";;;;;;;;;;AAoBA,IAAM,sBAAsB;CAC1B,WAAoB,aAAa,CAAC;CAGlC,WAAoB,SAAS,iCAAiC,OAAO,YAAoB;EACvF,MAAM,EAAE,mCAAmC,MAAM,OAAO;EACxD,MAAM,EAAE,YAAY,MAAM,OAAO;EACjC,MAAM,SAAkB,OAAe,KAAK;EAC5C,MAAM,SAAS,OAAO;EACtB,MAAM,OAAO,QAAQ;EACrB,MAAM,EAAE,YAAY,QAAQ,qBAC1B,OAAO,QAAQ,SAAS,QAAQ,WAAW,OAAO,8BAA8B,CAAC,CAAC,CACpF;EACA,MAAM,+BAA+B,SAAS,OAAO;EACrD,SAAS,WAAW;CACtB;AACF;AAEA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA4B;CACpG,UAAU,CAAC,gBAAgB,QAAQ;CACnC,cAAc;EAAC;EAAW;EAAQ;CAAO;AAC3C,CAAC;AAED,IAAa,eAAe,cAAc,mBAAmB,OAAO,4BAAuB;AAE3F,IAAa,eAAe,cAAc,cAAc,OAAO,8BAAwB,EACrF,OAAO,CAAC,sCAAsC,8CAA8C,EAC9F,CAAC;AAED,IAAa,gBAAgB,WAAW,aAAa,kBAAkB,EAAE,UAAU,CAAC,EAAE,SACpF,OAAO,WAAW,cAAc,CAAC,CACnC;AAEA,IAAa,eAAe,cAAc,aAAa,YAAY;AAEnE,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,SAAS;CACT,UAAU;AACZ,CAAC"}
|