@dxos/plugin-debug 0.9.0 → 0.9.1-main.c7dcc2e112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/DebugPlugin.mjs +2 -2
- package/dist/lib/neutral/DebugPlugin.mjs.map +4 -4
- package/dist/lib/neutral/{DebugSettings-RKYNQIKH.mjs → DebugSettings-WLFIBSRV.mjs} +5 -5
- package/dist/lib/neutral/DebugSettings-WLFIBSRV.mjs.map +7 -0
- package/dist/lib/neutral/{DevtoolsOverviewContainer-YX7Z3D2H.mjs → DevtoolsOverviewContainer-DWQHTK7D.mjs} +3 -2
- package/dist/lib/neutral/DevtoolsOverviewContainer-DWQHTK7D.mjs.map +7 -0
- package/dist/lib/neutral/{GithubPanel-QJKDJRVQ.mjs → GithubPanel-4CSJRVKE.mjs} +3 -3
- package/dist/lib/neutral/GithubPanel-4CSJRVKE.mjs.map +7 -0
- package/dist/lib/neutral/{app-graph-builder-4OJQQLSH.mjs → app-graph-builder-XJHFSODX.mjs} +46 -46
- package/dist/lib/neutral/app-graph-builder-XJHFSODX.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +4 -4
- package/dist/lib/neutral/{chunk-TAST3Y2C.mjs → chunk-MIF2W4LF.mjs} +8 -3
- package/dist/lib/neutral/chunk-MIF2W4LF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-R5C4CKOF.mjs +54 -0
- package/dist/lib/neutral/chunk-R5C4CKOF.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1 -1
- package/dist/lib/neutral/containers/index.mjs +2 -2
- package/dist/lib/neutral/index.mjs +4 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +1 -1
- package/dist/lib/neutral/{react-context-MUZ3KVLU.mjs → react-context-UJURDOO6.mjs} +2 -2
- package/dist/lib/neutral/{react-context-MUZ3KVLU.mjs.map → react-context-UJURDOO6.mjs.map} +3 -3
- package/dist/lib/neutral/{react-surface-YBC4HK7I.mjs → react-surface-MUVRCB3H.mjs} +19 -22
- package/dist/lib/neutral/react-surface-MUVRCB3H.mjs.map +7 -0
- package/dist/lib/neutral/{settings-MPM6YUP4.mjs → settings-5I2674B6.mjs} +3 -3
- package/dist/lib/neutral/{settings-MPM6YUP4.mjs.map → settings-5I2674B6.mjs.map} +3 -3
- package/dist/lib/neutral/translations.mjs +1 -1
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +3 -1
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +28 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/surface.d.ts +4 -0
- package/dist/types/src/types/surface.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +39 -0
- package/package.json +50 -49
- package/src/DebugPlugin.test.ts +1 -1
- package/src/DebugPlugin.tsx +1 -1
- package/src/capabilities/app-graph-builder.ts +45 -45
- package/src/capabilities/react-context.tsx +1 -1
- package/src/capabilities/react-surface.tsx +23 -21
- package/src/capabilities/settings.ts +2 -2
- package/src/components/DebugSettings/DebugSettings.tsx +4 -4
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +3 -1
- package/src/containers/GithubPanel/GithubComponent.tsx +2 -2
- package/src/meta.ts +2 -31
- package/src/translations.ts +1 -1
- package/src/types/index.ts +3 -2
- package/src/types/surface.ts +10 -0
- package/dist/lib/neutral/DebugSettings-RKYNQIKH.mjs.map +0 -7
- package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs.map +0 -7
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-4OJQQLSH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-HOV6MV5B.mjs +0 -43
- package/dist/lib/neutral/chunk-HOV6MV5B.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TAST3Y2C.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-YBC4HK7I.mjs.map +0 -7
|
@@ -8,7 +8,7 @@ import React, { useCallback } from 'react';
|
|
|
8
8
|
|
|
9
9
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
10
|
import { Surface, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';
|
|
11
|
-
import { AppCapabilities, LayoutOperation,
|
|
11
|
+
import { AppAnnotation, AppCapabilities, LayoutOperation, Paths } from '@dxos/app-toolkit';
|
|
12
12
|
import { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';
|
|
13
13
|
import {
|
|
14
14
|
AutomergePanel,
|
|
@@ -73,7 +73,8 @@ type GraphDebug = {
|
|
|
73
73
|
root: string;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
const isSpaceDebug = (data: any): data is SpaceDebug =>
|
|
76
|
+
const isSpaceDebug = (data: any): data is SpaceDebug =>
|
|
77
|
+
data?.type === `${meta.profile.key}.space` && isSpace(data.space);
|
|
77
78
|
const isGraphDebug = (data: any): data is GraphDebug => {
|
|
78
79
|
const graph = data?.graph;
|
|
79
80
|
return (
|
|
@@ -95,7 +96,7 @@ export default Capability.makeModule(
|
|
|
95
96
|
return Capability.contributes(Capabilities.ReactSurface, [
|
|
96
97
|
Surface.create({
|
|
97
98
|
id: 'pluginSettings',
|
|
98
|
-
filter: AppSurface.settings(AppSurface.Article, meta.
|
|
99
|
+
filter: AppSurface.settings(AppSurface.Article, meta.profile.key),
|
|
99
100
|
component: ({ data: { subject } }) => {
|
|
100
101
|
const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);
|
|
101
102
|
return (
|
|
@@ -110,8 +111,7 @@ export default Capability.makeModule(
|
|
|
110
111
|
}),
|
|
111
112
|
Surface.create({
|
|
112
113
|
id: 'space',
|
|
113
|
-
|
|
114
|
-
filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),
|
|
114
|
+
filter: AppSurface.subject(AppSurface.Article, isSpaceDebug),
|
|
115
115
|
component: ({ role, data }) => {
|
|
116
116
|
const { invokePromise } = useOperationInvoker();
|
|
117
117
|
|
|
@@ -123,8 +123,9 @@ export default Capability.makeModule(
|
|
|
123
123
|
|
|
124
124
|
const collection =
|
|
125
125
|
data.subject.space.state.get() === SpaceState.SPACE_READY &&
|
|
126
|
-
Annotation.get(data.subject.space.properties, RootCollectionAnnotation).pipe(
|
|
127
|
-
|
|
126
|
+
Annotation.get(data.subject.space.properties, AppAnnotation.RootCollectionAnnotation).pipe(
|
|
127
|
+
Option.getOrUndefined,
|
|
128
|
+
)?.target;
|
|
128
129
|
if (!Obj.instanceOf(Collection.Collection, collection)) {
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
@@ -144,8 +145,7 @@ export default Capability.makeModule(
|
|
|
144
145
|
}),
|
|
145
146
|
Surface.create({
|
|
146
147
|
id: 'appGraph',
|
|
147
|
-
|
|
148
|
-
filter: (data): data is { subject: GraphDebug } => isGraphDebug(data.subject),
|
|
148
|
+
filter: AppSurface.subject(AppSurface.Article, isGraphDebug),
|
|
149
149
|
component: ({ data }) => <DebugGraph graph={data.subject.graph} root={data.subject.root} />,
|
|
150
150
|
}),
|
|
151
151
|
Surface.create({
|
|
@@ -161,12 +161,17 @@ export default Capability.makeModule(
|
|
|
161
161
|
Surface.create({
|
|
162
162
|
id: 'wireframe',
|
|
163
163
|
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
164
|
-
|
|
164
|
+
filter: AppSurface.oneOf(
|
|
165
|
+
AppSurface.subject(AppSurface.Article, (value): value is Obj.Unknown => {
|
|
166
|
+
const settings = registry.get(settingsAtom);
|
|
167
|
+
return Obj.isObject(value) && !!settings.wireframe;
|
|
168
|
+
}),
|
|
169
|
+
AppSurface.subject(AppSurface.Section, (value): value is Obj.Unknown => {
|
|
170
|
+
const settings = registry.get(settingsAtom);
|
|
171
|
+
return Obj.isObject(value) && !!settings.wireframe;
|
|
172
|
+
}),
|
|
173
|
+
),
|
|
165
174
|
position: 'first',
|
|
166
|
-
filter: (data): data is { subject: Obj.Unknown } => {
|
|
167
|
-
const settings = registry.get(settingsAtom);
|
|
168
|
-
return Obj.isObject(data.subject) && !!settings.wireframe;
|
|
169
|
-
},
|
|
170
175
|
component: ({ data, role, name }) => (
|
|
171
176
|
<Wireframe label={`${role}:${name}`} object={data.subject} classNames='row-span-2 overflow-hidden' />
|
|
172
177
|
),
|
|
@@ -181,15 +186,12 @@ export default Capability.makeModule(
|
|
|
181
186
|
}),
|
|
182
187
|
Surface.create({
|
|
183
188
|
id: 'devtoolsOverview',
|
|
184
|
-
filter:
|
|
189
|
+
filter: Surface.makeFilter(AppSurface.deckCompanion('devtools')),
|
|
185
190
|
component: () => <DevtoolsOverviewContainer />,
|
|
186
191
|
}),
|
|
187
192
|
Surface.create({
|
|
188
193
|
id: 'spaceObjects',
|
|
189
|
-
filter: AppSurface.
|
|
190
|
-
Surface.makeType<{ subject: string }>('deck-companion--space-objects'),
|
|
191
|
-
'space-objects',
|
|
192
|
-
),
|
|
194
|
+
filter: Surface.makeFilter(AppSurface.deckCompanion('spaceObjects')),
|
|
193
195
|
component: () => {
|
|
194
196
|
const space = useActiveSpace();
|
|
195
197
|
if (!space) {
|
|
@@ -202,7 +204,7 @@ export default Capability.makeModule(
|
|
|
202
204
|
|
|
203
205
|
Surface.create({
|
|
204
206
|
id: 'debugStatus',
|
|
205
|
-
|
|
207
|
+
filter: Surface.makeFilter(AppSurface.StatusIndicator),
|
|
206
208
|
position: 'first',
|
|
207
209
|
component: () => <DebugStatus />,
|
|
208
210
|
}),
|
|
@@ -438,7 +440,7 @@ export default Capability.makeModule(
|
|
|
438
440
|
log.info('script created', { result: createResult });
|
|
439
441
|
if (createResult.data?.object) {
|
|
440
442
|
await invokePromise(LayoutOperation.Open, {
|
|
441
|
-
subject: [getObjectPathFromObject(createResult.data.object)],
|
|
443
|
+
subject: [Paths.getObjectPathFromObject(createResult.data.object)],
|
|
442
444
|
});
|
|
443
445
|
}
|
|
444
446
|
},
|
|
@@ -14,7 +14,7 @@ import { DebugCapabilities, Settings } from '#types';
|
|
|
14
14
|
export default Capability.makeModule(() =>
|
|
15
15
|
Effect.sync(() => {
|
|
16
16
|
const settingsAtom = createKvsStore({
|
|
17
|
-
key: meta.
|
|
17
|
+
key: meta.profile.key,
|
|
18
18
|
schema: Settings.Settings,
|
|
19
19
|
defaultValue: () => ({}),
|
|
20
20
|
});
|
|
@@ -22,7 +22,7 @@ export default Capability.makeModule(() =>
|
|
|
22
22
|
return [
|
|
23
23
|
Capability.contributes(DebugCapabilities.Settings, settingsAtom),
|
|
24
24
|
Capability.contributes(AppCapabilities.Settings, {
|
|
25
|
-
prefix: meta.
|
|
25
|
+
prefix: meta.profile.key,
|
|
26
26
|
schema: Settings.Settings,
|
|
27
27
|
atom: settingsAtom,
|
|
28
28
|
}),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { AppCapabilities,
|
|
7
|
+
import { AppCapabilities, AppSpace } from '@dxos/app-toolkit';
|
|
8
8
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { type ConfigProto, SaveConfig, Storage, defs } from '@dxos/config';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
@@ -37,7 +37,7 @@ export type DebugSettingsProps = AppSurface.SettingsArticleProps<
|
|
|
37
37
|
>;
|
|
38
38
|
|
|
39
39
|
export const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }: DebugSettingsProps) => {
|
|
40
|
-
const { t } = useTranslation(meta.
|
|
40
|
+
const { t } = useTranslation(meta.profile.key);
|
|
41
41
|
const [toast, setToast] = useState<Toast>();
|
|
42
42
|
const download = useFileDownload();
|
|
43
43
|
const [storageConfig, setStorageConfig] = useState<ConfigProto>({});
|
|
@@ -65,7 +65,7 @@ export const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }
|
|
|
65
65
|
download(file, fileName);
|
|
66
66
|
|
|
67
67
|
if (onUpload) {
|
|
68
|
-
const personalSpace = getPersonalSpace(client);
|
|
68
|
+
const personalSpace = AppSpace.getPersonalSpace(client);
|
|
69
69
|
if (!personalSpace) {
|
|
70
70
|
log.error('no personal space available for upload');
|
|
71
71
|
return;
|
|
@@ -153,7 +153,7 @@ export const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }
|
|
|
153
153
|
|
|
154
154
|
return (
|
|
155
155
|
<SettingsForm.Viewport>
|
|
156
|
-
<SettingsForm.Section title={t('settings.title', { ns: meta.
|
|
156
|
+
<SettingsForm.Section title={t('settings.title', { ns: meta.profile.key })}>
|
|
157
157
|
<SettingsForm.Item title={t('settings.wireframe.label')} description={t('settings.wireframe.description')}>
|
|
158
158
|
<Input.Switch
|
|
159
159
|
disabled={!onSettingsChange}
|
|
@@ -7,6 +7,8 @@ import React from 'react';
|
|
|
7
7
|
import { Surface } from '@dxos/app-framework/ui';
|
|
8
8
|
import { StatsPanel, useStats } from '@dxos/devtools';
|
|
9
9
|
|
|
10
|
+
import { DevtoolsOverview } from '#types';
|
|
11
|
+
|
|
10
12
|
export const DevtoolsOverviewContainer = () => {
|
|
11
13
|
const [stats, refreshStats] = useStats();
|
|
12
14
|
const surfaceProfilerStats = Surface.useProfilerStats();
|
|
@@ -19,7 +21,7 @@ export const DevtoolsOverviewContainer = () => {
|
|
|
19
21
|
onRefresh={refreshStats}
|
|
20
22
|
onClearSurfaceProfiler={clearSurfaceProfiler}
|
|
21
23
|
>
|
|
22
|
-
<Surface.Surface
|
|
24
|
+
<Surface.Surface type={DevtoolsOverview} />
|
|
23
25
|
</StatsPanel>
|
|
24
26
|
);
|
|
25
27
|
};
|
|
@@ -90,7 +90,7 @@ const Root = ({ repo = DEFAULT_REPO, limit = DEFAULT_LIMIT, children }: GithubCo
|
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
const Header = () => {
|
|
93
|
-
const { t } = useTranslation(meta.
|
|
93
|
+
const { t } = useTranslation(meta.profile.key);
|
|
94
94
|
const { repo, pulls, unavailable } = useComponentContext();
|
|
95
95
|
return (
|
|
96
96
|
<header className='flex items-center justify-between gap-1 px-4 py-3 bg-modal-surface border-b border-subdued-separator'>
|
|
@@ -169,7 +169,7 @@ const Content = () => {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
const StatusBar = () => {
|
|
172
|
-
const { t } = useTranslation(meta.
|
|
172
|
+
const { t } = useTranslation(meta.profile.key);
|
|
173
173
|
const { repo } = useComponentContext();
|
|
174
174
|
return (
|
|
175
175
|
<IconButton
|
package/src/meta.ts
CHANGED
|
@@ -3,36 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
|
-
import { DXN } from '@dxos/keys';
|
|
7
|
-
import { trim } from '@dxos/util';
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
key: DXN.make('org.dxos.plugin.debug'),
|
|
11
|
-
name: 'Debug',
|
|
12
|
-
author: 'DXOS',
|
|
13
|
-
spec: 'PLUGIN.mdl',
|
|
14
|
-
description: trim`
|
|
15
|
-
DebugPlugin is the developer toolkit for DXOS Composer. It adds a structured Devtools node
|
|
16
|
-
to the navigation graph — grouped into Client, HALO, ECHO, Mesh, and EDGE sub-sections —
|
|
17
|
-
exposing panel views for config, storage, logs, diagnostics, identity, devices, feeds,
|
|
18
|
-
objects, schemas, automerge internals, network topology, EDGE workflows, and invocation
|
|
19
|
-
traces, all driven by the @dxos/devtools component library.
|
|
7
|
+
import config from '../dx.config';
|
|
20
8
|
|
|
21
|
-
|
|
22
|
-
can inspect raw field values and DXNs inline, and a Space Objects companion panel that lists
|
|
23
|
-
all objects in the active space with live reactive updates.
|
|
24
|
-
|
|
25
|
-
Test-data generation is available via a SpaceGenerator article surface: developers can
|
|
26
|
-
create configurable batches of synthetic ECHO objects into any space collection, with a
|
|
27
|
-
status indicator showing when generation is running.
|
|
28
|
-
|
|
29
|
-
Additional utilities include a wireframe overlay mode that draws labelled borders around
|
|
30
|
-
every article and section surface, a log-capture and download facility backed by an
|
|
31
|
-
IdbLogStore, a ToolsExplorer connected to the DXOS MCP introspect service, and a
|
|
32
|
-
globalThis helper for manual storage-version testing.
|
|
33
|
-
`,
|
|
34
|
-
icon: 'ph--bug--regular',
|
|
35
|
-
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-debug',
|
|
36
|
-
screenshots: ['https://dxos.network/plugin-details-debug-dark.png'],
|
|
37
|
-
tags: ['labs'],
|
|
38
|
-
});
|
|
9
|
+
export const meta = Plugin.getMetaFromConfig(config);
|
package/src/translations.ts
CHANGED
package/src/types/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { meta } from '#meta';
|
|
|
13
13
|
|
|
14
14
|
import * as Settings from './Settings';
|
|
15
15
|
|
|
16
|
+
export * from './surface';
|
|
16
17
|
export * as Settings from './Settings';
|
|
17
18
|
|
|
18
19
|
export type DebugPluginOptions = {
|
|
@@ -33,11 +34,11 @@ export const DebugContext: Context<DebugContextType> = createContext<DebugContex
|
|
|
33
34
|
});
|
|
34
35
|
|
|
35
36
|
export namespace DebugCapabilities {
|
|
36
|
-
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.
|
|
37
|
+
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.profile.key}.capability.settings`);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export namespace Devtools {
|
|
40
|
-
export const id = `${meta.
|
|
41
|
+
export const id = `${meta.profile.key}.devtools`;
|
|
41
42
|
|
|
42
43
|
export const ToolsExplorer = `${Devtools.id}.tools-explorer`;
|
|
43
44
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
6
|
+
|
|
7
|
+
/** Slot for the devtools-overview sub-surface inside the debug panel. */
|
|
8
|
+
export const DevtoolsOverview: Surface.RoleToken<Record<string, unknown>> = Surface.makeType(
|
|
9
|
+
'org.dxos.plugin.debug.role.devtoolsOverview',
|
|
10
|
+
);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/DebugSettings/DebugSettings.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { AppCapabilities, getPersonalSpace } from '@dxos/app-toolkit';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { type ConfigProto, SaveConfig, Storage, defs } from '@dxos/config';\nimport { log } from '@dxos/log';\nimport { type IdbLogStore } from '@dxos/log-store-idb';\nimport { useClient } from '@dxos/react-client';\nimport { IconButton, Input, Select, Toast, useFileDownload, useTranslation } from '@dxos/react-ui';\nimport { Settings as SettingsForm } from '@dxos/react-ui-form';\nimport { TRACE_ALL_KEY } from '@dxos/tracing';\nimport { setDeep } from '@dxos/util';\n\nimport { meta } from '#meta';\nimport { type Settings } from '#types';\n\ntype Toast = {\n title: string;\n description?: string;\n};\n\nconst StorageAdapters = {\n opfs: defs.Runtime.Client.Storage.StorageDriver.WEBFS,\n idb: defs.Runtime.Client.Storage.StorageDriver.IDB,\n} as const;\n\nexport type DebugSettingsProps = AppSurface.SettingsArticleProps<\n Settings.Settings,\n {\n logStore: IdbLogStore;\n onUpload?: AppCapabilities.FileUploader;\n }\n>;\n\nexport const DebugSettings = ({ settings, onSettingsChange, logStore, onUpload }: DebugSettingsProps) => {\n const { t } = useTranslation(meta.id);\n const [toast, setToast] = useState<Toast>();\n const download = useFileDownload();\n const [storageConfig, setStorageConfig] = useState<ConfigProto>({});\n const client = useClient();\n\n useEffect(() => {\n void Storage().then((config) => setStorageConfig(config));\n }, []);\n\n const handleToast = useCallback(\n (toast: Toast) => {\n setToast(toast);\n const timer = setTimeout(() => setToast(undefined), 5_000);\n return () => clearTimeout(timer);\n },\n [setToast],\n );\n\n const handleDownload = useCallback(async () => {\n const data = await client.diagnostics();\n const file = new Blob([JSON.stringify(data, undefined, 2)], {\n type: 'text/plain',\n });\n const fileName = `composer-${new Date().toISOString().replace(/\\W/g, '-')}.json`;\n download(file, fileName);\n\n if (onUpload) {\n const personalSpace = getPersonalSpace(client);\n if (!personalSpace) {\n log.error('no personal space available for upload');\n return;\n }\n const info = await onUpload(personalSpace.db, new File([file], fileName));\n if (!info) {\n log.error('diagnostics failed to upload to IPFS');\n return;\n }\n handleToast({\n title: t('settings.uploaded.message'),\n description: t('settings.uploaded.description'),\n });\n\n // TODO(nf): move to IpfsPlugin?\n const url = client.config.values.runtime!.services!.ipfs!.gateway + '/' + info.cid;\n void navigator.clipboard.writeText(url);\n handleToast({\n title: t('settings.uploaded.message'),\n description: t('settings.uploaded.description'),\n });\n log.info('diagnostics', { url });\n }\n }, [client, download, handleToast, onUpload, t]);\n\n const handleDownloadLogs = useCallback(async () => {\n const ndjson = await logStore.export();\n const file = new Blob([ndjson], { type: 'application/x-ndjson' });\n const fileName = `composer-logs-${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.ndjson`;\n download(file, fileName);\n }, [download, logStore]);\n\n const handleRepair = useCallback(async () => {\n try {\n const info = await client.repair();\n setStorageConfig(await Storage());\n handleToast({\n title: t('settings.repair-success.message'),\n description: JSON.stringify(info, undefined, 2),\n });\n } catch (err: any) {\n handleToast({\n title: t('settings.repair-failed.message'),\n description: err.message,\n });\n }\n }, [client, handleToast, t]);\n\n const handleWireframeChange = useCallback(\n (checked: boolean) => onSettingsChange?.((s) => ({ ...s, wireframe: !!checked })),\n [onSettingsChange],\n );\n\n const traceAll = useMemo(\n () => settings.traceAll ?? (typeof localStorage !== 'undefined' && localStorage.getItem(TRACE_ALL_KEY) === 'true'),\n [settings.traceAll],\n );\n\n const handleTraceAllChange = useCallback(\n (checked: boolean) => {\n const value = !!checked;\n localStorage.setItem(TRACE_ALL_KEY, String(value));\n onSettingsChange?.((s) => ({ ...s, traceAll: value }));\n },\n [onSettingsChange],\n );\n\n const handleOpenTracingPanel = useCallback(() => {\n window.open('about:blank', '_blank');\n }, []);\n\n const handleStorageAdapterChange = useCallback(\n (value: string) => {\n if (confirm(t('settings.storage-adapter.changed-alert.message'))) {\n updateConfig(\n storageConfig,\n setStorageConfig,\n ['runtime', 'client', 'storage', 'dataStore'],\n StorageAdapters[value as keyof typeof StorageAdapters],\n );\n }\n },\n [storageConfig, t],\n );\n\n return (\n <SettingsForm.Viewport>\n <SettingsForm.Section title={t('settings.title', { ns: meta.id })}>\n <SettingsForm.Item title={t('settings.wireframe.label')} description={t('settings.wireframe.description')}>\n <Input.Switch\n disabled={!onSettingsChange}\n checked={settings.wireframe}\n onCheckedChange={handleWireframeChange}\n />\n </SettingsForm.Item>\n <SettingsForm.Item title={t('settings.trace-all.label')} description={t('settings.trace-all.description')}>\n <Input.Switch disabled={!onSettingsChange} checked={traceAll} onCheckedChange={handleTraceAllChange} />\n </SettingsForm.Item>\n <SettingsForm.Item\n title={t('settings.tracing-panel.label')}\n description={t('settings.tracing-panel.description')}\n >\n <IconButton\n icon='ph--arrow-square-out--regular'\n iconOnly\n label={t('settings.tracing-panel.label')}\n onClick={handleOpenTracingPanel}\n />\n </SettingsForm.Item>\n <SettingsForm.Item\n title={t('settings.download-diagnostics.label')}\n description={t('settings.download-diagnostics.description')}\n >\n <IconButton\n icon='ph--download-simple--regular'\n iconOnly\n label={t('settings.download-diagnostics.label')}\n onClick={handleDownload}\n />\n </SettingsForm.Item>\n <SettingsForm.Item\n title={t('settings.download-logs.label')}\n description={t('settings.download-logs.description')}\n >\n <IconButton\n icon='ph--download-simple--regular'\n iconOnly\n label={t('settings.download-logs.label')}\n onClick={handleDownloadLogs}\n />\n </SettingsForm.Item>\n <SettingsForm.Item title={t('settings.repair.label')} description={t('settings.repair.description')}>\n <IconButton\n icon='ph--first-aid-kit--regular'\n iconOnly\n label={t('settings.repair.label')}\n onClick={handleRepair}\n />\n </SettingsForm.Item>\n\n {/* TODO(burdon): Move to layout? */}\n {toast && (\n <Toast.Root>\n <Toast.Title icon='ph--gift--duotone'>\n <span>{toast.title}</span>\n </Toast.Title>\n {toast.description && <Toast.Description>{toast.description}</Toast.Description>}\n </Toast.Root>\n )}\n\n <SettingsForm.Item\n title={t('settings.choose-storage-adaptor.label')}\n description={t('settings.choose-storage-adaptor.description')}\n >\n <Select.Root\n disabled={!onSettingsChange}\n value={\n Object.entries(StorageAdapters).find(\n ([_name, value]) => value === storageConfig?.runtime?.client?.storage?.dataStore,\n )?.[0]\n }\n onValueChange={handleStorageAdapterChange}\n >\n <Select.TriggerButton disabled={!onSettingsChange} placeholder={t('settings.data-store.label')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {Object.keys(StorageAdapters).map((key) => (\n <Select.Option key={key} value={key}>\n {t(`settings.storage-adaptor.${key}.label`)}\n </Select.Option>\n ))}\n </Select.Viewport>\n <Select.Arrow />\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </SettingsForm.Item>\n </SettingsForm.Section>\n </SettingsForm.Viewport>\n );\n};\n\nconst updateConfig = (config: ConfigProto, setConfig: (newConfig: ConfigProto) => void, path: string[], value: any) => {\n const storageConfigCopy = JSON.parse(JSON.stringify(config ?? {}));\n setDeep(storageConfigCopy, path, value);\n setConfig(storageConfigCopy);\n queueMicrotask(async () => {\n await SaveConfig(storageConfigCopy);\n });\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,OAAOA,SAASC,aAAaC,WAAWC,SAASC,gBAAgB;AAEjE,SAA0BC,wBAAwB;AAElD,SAA2BC,YAAYC,SAASC,YAAY;AAC5D,SAASC,WAAW;AAEpB,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,OAAOC,QAAQC,OAAOC,iBAAiBC,sBAAsB;AAClF,SAASC,YAAYC,oBAAoB;AACzC,SAASC,qBAAqB;AAC9B,SAASC,eAAe;AAExB,SAASC,YAAY;AAQrB,IAAA,eAAMC;IAEJC,kBAAkBC;EACpB,MAAA,KAAA,QAAA,OAAA,QAAA,cAAA;EAUA,KAAO,KAAMC,QAAAA,OAAgB,QAAGC,cAAUC;;AAExC,IAAOC,gBAAgB,CAAGxB,EAAAA,UAAAA,kBAAAA,UAAAA,SAAAA,MAAAA;AAC1B,QAAMyB,EAAAA,EAAAA,IAAAA,eAAWd,KAAAA,EAAAA;AACjB,QAAM,CAACe,OAAAA,QAAeC,IAAAA,SAAAA;AACtB,QAAMC,WAAStB,gBAAAA;AAEfR,QAAAA,CAAAA,eAAU,gBAAA,IAAA,SAAA,CAAA,CAAA;QACR,SAAKK,UAAgB0B;AACvB,YAAK,MAAA;AAEL,SAAMC,QAAAA,EAAAA,KAAcjC,CAAAA,WACjB2B,iBAAAA,MAAAA,CAAAA;MACCO,CAAAA;QACA,cAAcC,YAAW,CAAMD,WAAAA;AAC/B,aAAOP,MAAMS;AAEf,UAAA,QAAA,WAAA,MAAA,SAAA,MAAA,GAAA,GAAA;AAACF,WAAAA,MAAAA,aAAAA,KAAAA;KAAS;IAGZ;;QAEE,iBAAiBG,YAAK,YAAA;UAACC,OAAKC,MAAUC,OAAMC,YAAW;UAAK,OAAA,IAAA,KAAA;MAC1DC,KAAAA,UAAM,MAAA,QAAA,CAAA;IACR,GAAA;MACA,MAAMC;I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AA,sBAAAA,cAAAA,OAAAA,UAAAA,MAAAA,OAAAA,KAAAA,eAAAA,EAAAA,IAAAA,CAAAA,QAAAA,sBAAAA,cAAAA,OAAAA,QAAAA;IAC7B3B;IAYrB,OAAA;EAEI4B,GAAAA,EAAAA,4BAAkFC,GAAAA,QAAgBvB,CAAAA,CAAAA,CAAAA,GAAAA,sBAAAA,cAAAA,OAAAA,OAAAA,IAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;;IAEtGrC,eAAQ6D,CAAAA,QAAAA,WAAyBxB,MAAAA,UAAAA;AACjCyB,QAAAA,oBAAUD,KAAAA,MAAAA,KAAAA,UAAAA,UAAAA,CAAAA,CAAAA,CAAAA;AACVE,UAAAA,mBAAe,MAAA,KAAA;YACP7E,iBAAW2E;AACnB,iBAAA,YAAA;AACF,UAAA,WAAA,iBAAA;;;",
|
|
6
|
-
"names": ["React", "useCallback", "useEffect", "useMemo", "useState", "getPersonalSpace", "SaveConfig", "Storage", "defs", "log", "useClient", "IconButton", "Input", "Select", "Toast", "useFileDownload", "useTranslation", "Settings", "SettingsForm", "TRACE_ALL_KEY", "setDeep", "meta", "StorageAdapters", "idb", "Client", "DebugSettings", "settings", "onSettingsChange", "toast", "download", "storageConfig", "setStorageConfig", "client", "config", "handleToast", "setToast", "setTimeout", "clearTimeout", "Blob", "JSON", "stringify", "data", "undefined", "type", "fileName", "onUpload", "personalSpace", "error", "description", "title", "info", "t", "ndjson", "checked", "handleTraceAllChange", "localStorage", "String", "value", "handleStorageAdapterChange", "disabled", "wireframe", "onCheckedChange", "traceAll", "icon", "iconOnly", "label", "onClick", "handleOpenTracingPanel", "handleDownload", "handleDownloadLogs", "handleRepair", "span", "Object", "entries", "find", "_name", "onValueChange", "TriggerButton", "key", "updateConfig", "path", "storageConfigCopy", "setConfig", "queueMicrotask"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework/ui';\nimport { StatsPanel, useStats } from '@dxos/devtools';\n\nexport const DevtoolsOverviewContainer = () => {\n const [stats, refreshStats] = useStats();\n const surfaceProfilerStats = Surface.useProfilerStats();\n const clearSurfaceProfiler = Surface.useProfilerClear();\n\n return (\n <StatsPanel\n stats={stats}\n surfaceProfilerStats={surfaceProfilerStats}\n onRefresh={refreshStats}\n onClearSurfaceProfiler={clearSurfaceProfiler}\n >\n <Surface.Surface role='devtools-overview' />\n </StatsPanel>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,OAAOA,WAAW;AAElB,SAASC,eAAe;AACxB,SAASC,YAAYC,gBAAgB;AAE9B,IAAMC,4BAA4B,MAAA;AACvC,QAAM,CAACC,OAAOC,YAAAA,IAAgBH,SAAAA;AAC9B,QAAMI,uBAAuBN,QAAQO,iBAAgB;AACrD,QAAMC,uBAAuBR,QAAQS,iBAAgB;AAErD,SACE,sBAAA,cAACR,YAAAA;IACCG;IACAE;IACAI,WAAWL;IACXM,wBAAwBH;KAExB,sBAAA,cAACR,QAAQA,SAAO;IAACY,MAAK;;AAG5B;",
|
|
6
|
-
"names": ["React", "Surface", "StatsPanel", "useStats", "DevtoolsOverviewContainer", "stats", "refreshStats", "surfaceProfilerStats", "useProfilerStats", "clearSurfaceProfiler", "useProfilerClear", "onRefresh", "onClearSurfaceProfiler", "role"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/GithubPanel/GithubPanel.tsx", "../../../src/containers/GithubPanel/GithubComponent.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport { GithubComponent } from './GithubComponent';\n\nexport const GithubPanel = () => (\n <GithubComponent.Root>\n <div className='h-full grid grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden h-full is-full'>\n <GithubComponent.Header />\n <GithubComponent.Content />\n <GithubComponent.StatusBar />\n </div>\n </GithubComponent.Root>\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type ReactNode, createContext, useContext, useEffect, useState } from 'react';\n\nimport { IconButton, ScrollArea, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nconst DEFAULT_REPO = 'dxos/dxos';\nconst DEFAULT_LIMIT = 20;\n\ntype GithubUser = {\n login: string;\n avatar_url: string;\n html_url: string;\n};\n\ntype GithubPullRequest = {\n number: number;\n title: string;\n html_url: string;\n merged_at: string | null;\n user: GithubUser;\n};\n\ntype ComponentContextValue = {\n repo: string;\n pulls: GithubPullRequest[];\n unavailable: boolean;\n};\n\nconst ComponentContext = createContext<ComponentContextValue | null>(null);\n\nconst useComponentContext = () => {\n const ctx = useContext(ComponentContext);\n if (!ctx) {\n throw new Error('GithubComponent.* parts must be rendered inside GithubComponent.Root.');\n }\n return ctx;\n};\n\nexport type GithubComponentRootProps = {\n /** `<owner>/<name>`. Defaults to `dxos/dxos`. */\n repo?: string;\n /** Maximum number of merged PRs to fetch. */\n limit?: number;\n children?: ReactNode;\n};\n\nconst Root = ({ repo = DEFAULT_REPO, limit = DEFAULT_LIMIT, children }: GithubComponentRootProps) => {\n const [pulls, setPulls] = useState<GithubPullRequest[]>([]);\n const [unavailable, setUnavailable] = useState(false);\n\n useEffect(() => {\n const controller = new AbortController();\n setPulls([]);\n setUnavailable(false);\n void (async () => {\n try {\n const url = new URL(`https://api.github.com/repos/${repo}/pulls`);\n url.searchParams.set('state', 'closed');\n url.searchParams.set('sort', 'updated');\n url.searchParams.set('direction', 'desc');\n url.searchParams.set('per_page', String(limit * 2));\n const response = await fetch(url.toString(), {\n signal: controller.signal,\n headers: { Accept: 'application/vnd.github+json' },\n });\n if (!response.ok) {\n setUnavailable(true);\n return;\n }\n const items = (await response.json()) as GithubPullRequest[];\n setPulls(items.filter((pull) => pull.merged_at !== null).slice(0, limit));\n setUnavailable(false);\n } catch {\n if (controller.signal.aborted) {\n return;\n }\n setPulls([]);\n setUnavailable(true);\n }\n })();\n return () => controller.abort();\n }, [repo, limit]);\n\n return <ComponentContext.Provider value={{ repo, pulls, unavailable }}>{children}</ComponentContext.Provider>;\n};\n\nconst Header = () => {\n const { t } = useTranslation(meta.id);\n const { repo, pulls, unavailable } = useComponentContext();\n return (\n <header className='flex items-center justify-between gap-1 px-4 py-3 bg-modal-surface border-b border-subdued-separator'>\n <a\n href={`https://github.com/${repo}`}\n target='_blank'\n rel='noopener noreferrer'\n className='text-sm font-medium truncate'\n >\n @{repo}\n </a>\n <div className='text-xs text-description'>\n {unavailable\n ? t('github-unavailable.message')\n : pulls.length > 0\n ? t('recent-prs.label', { count: pulls.length })\n : t('github-loading.message')}\n </div>\n </header>\n );\n};\n\nconst RELATIVE_UNITS: Array<[Intl.RelativeTimeFormatUnit, number]> = [\n ['year', 60 * 60 * 24 * 365],\n ['month', 60 * 60 * 24 * 30],\n ['week', 60 * 60 * 24 * 7],\n ['day', 60 * 60 * 24],\n ['hour', 60 * 60],\n ['minute', 60],\n];\n\nconst formatRelative = (iso: string): string => {\n const formatter = new Intl.RelativeTimeFormat(undefined, { numeric: 'auto' });\n const diffSeconds = (Date.parse(iso) - Date.now()) / 1000;\n const absDiff = Math.abs(diffSeconds);\n for (const [unit, secondsInUnit] of RELATIVE_UNITS) {\n if (absDiff >= secondsInUnit) {\n return formatter.format(Math.round(diffSeconds / secondsInUnit), unit);\n }\n }\n return formatter.format(Math.round(diffSeconds), 'second');\n};\n\nconst PullRow = ({ pull }: { pull: GithubPullRequest }) => (\n <li>\n <a\n href={pull.html_url}\n target='_blank'\n rel='noopener noreferrer'\n className='flex items-start gap-2 px-2 py-1 rounded-sm hover:bg-hover-surface'\n >\n <img src={pull.user.avatar_url} alt='' className='w-6 h-6 rounded-full shrink-0 mt-0.5' />\n <div className='flex flex-col min-w-0 flex-1'>\n <span className='text-sm truncate'>{pull.title}</span>\n <span className='text-xs text-description truncate'>\n #{pull.number} · {pull.user.login} · {pull.merged_at ? formatRelative(pull.merged_at) : ''}\n </span>\n </div>\n </a>\n </li>\n);\n\nconst Content = () => {\n const { pulls } = useComponentContext();\n return (\n <ScrollArea.Root orientation='vertical'>\n <ScrollArea.Viewport>\n <ul className='flex flex-col p-1'>\n {pulls.map((pull) => (\n <PullRow key={pull.number} pull={pull} />\n ))}\n </ul>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n );\n};\n\nconst StatusBar = () => {\n const { t } = useTranslation(meta.id);\n const { repo } = useComponentContext();\n return (\n <IconButton\n icon='ph--github-logo--regular'\n label={t('view-on-github.button')}\n variant='primary'\n classNames='w-full'\n onClick={() => {\n window.open(`https://github.com/${repo}`, '_blank', 'noopener,noreferrer');\n }}\n />\n );\n};\n\nexport const GithubComponent = {\n Root,\n Header,\n Content,\n StatusBar,\n};\n"],
|
|
5
|
-
"mappings": ";;;AAIA,OAAOA,YAAW;;;ACAlB,OAAOC,SAAyBC,eAAeC,YAAYC,WAAWC,gBAAgB;AAEtF,SAASC,YAAYC,YAAYC,sBAAsB;AAEvD,SAASC,YAAY;AAErB,IAAMC,eAAe;AACrB,IAAMC,gBAAgB;AAsBtB,IAAMC,mBAAmBV,8BAA4C,IAAA;AAErE,IAAMW,sBAAsB,MAAA;AAC1B,QAAMC,MAAMX,WAAWS,gBAAAA;AACvB,MAAI,CAACE,KAAK;AACR,UAAM,IAAIC,MAAM,uEAAA;EAClB;AACA,SAAOD;AACT;AAUA,IAAME,OAAO,CAAC,EAAEC,OAAOP,cAAcQ,QAAQP,eAAeQ,SAAQ,MAA4B;AAC9F,QAAM,CAACC,OAAOC,QAAAA,IAAYhB,SAA8B,CAAA,CAAE;AAC1D,QAAM,CAACiB,aAAaC,cAAAA,IAAkBlB,SAAS,KAAA;AAE/CD,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,WAAU;GAAoBX,KAAK+C,KAAK,GAC9C,sBAAA,cAACD,QAAAA;EAAKnC,WAAU;GAAoC,KAChDX,KAAKgD,QAAO,UAAIhD,KAAK2C,KAAKM,OAAM,UAAIjD,KAAKC,YAAYmB,eAAepB,KAAKC,SAAS,IAAI,EAAA,CAAA,CAAA,CAAA;AAOlG,IAAMiD,UAAU,MAAA;AACd,QAAM,EAAEvE,MAAK,IAAKP,oBAAAA;AAClB,SACE,sBAAA,cAACN,WAAWS,MAAI;IAAC4E,aAAY;KAC3B,sBAAA,cAACrF,WAAWsF,UAAQ,MAClB,sBAAA,cAACC,MAAAA;IAAG1C,WAAU;KACXhC,MAAM2E,IAAI,CAACtD,SACV,sBAAA,cAACsC,SAAAA;IAAQiB,KAAKvD,KAAKgD;IAAQhD;;AAMvC;AAEA,IAAMwD,YAAY,MAAA;AAChB,QAAM,EAAEhD,EAAC,IAAKzC,eAAeC,KAAKyC,EAAE;AACpC,QAAM,EAAEjC,KAAI,IAAKJ,oBAAAA;AACjB,SACE,sBAAA,cAACP,YAAAA;IACC4F,MAAK;IACLC,OAAOlD,EAAE,uBAAA;IACTmD,SAAQ;IACRC,YAAW;IACXC,SAAS,MAAA;AACPC,aAAOC,KAAK,sBAAsBvF,IAAAA,IAAQ,UAAU,qBAAA;IACtD;;AAGN;AAEO,IAAMwF,kBAAkB;EAC7BzF;EACAgC;EACA2C;EACAM;AACF;;;ADvLO,IAAMS,cAAc,MACzB,gBAAAC,OAAA,cAACC,gBAAgBC,MAAI,MACnB,gBAAAF,OAAA,cAACG,OAAAA;EAAIC,WAAU;GACb,gBAAAJ,OAAA,cAACC,gBAAgBI,QAAM,IAAA,GACvB,gBAAAL,OAAA,cAACC,gBAAgBK,SAAO,IAAA,GACxB,gBAAAN,OAAA,cAACC,gBAAgBM,WAAS,IAAA,CAAA,CAAA;",
|
|
6
|
-
"names": ["React", "React", "createContext", "useContext", "useEffect", "useState", "IconButton", "ScrollArea", "useTranslation", "meta", "DEFAULT_REPO", "DEFAULT_LIMIT", "ComponentContext", "useComponentContext", "ctx", "Error", "Root", "repo", "limit", "children", "pulls", "setPulls", "unavailable", "setUnavailable", "controller", "AbortController", "url", "URL", "searchParams", "set", "String", "response", "fetch", "toString", "signal", "headers", "Accept", "ok", "items", "json", "filter", "pull", "merged_at", "slice", "aborted", "abort", "Provider", "value", "Header", "t", "id", "header", "className", "a", "href", "target", "rel", "div", "length", "count", "RELATIVE_UNITS", "formatRelative", "iso", "formatter", "Intl", "RelativeTimeFormat", "undefined", "numeric", "diffSeconds", "Date", "parse", "now", "absDiff", "Math", "abs", "unit", "secondsInUnit", "format", "round", "PullRow", "li", "html_url", "img", "src", "user", "avatar_url", "alt", "span", "title", "number", "login", "Content", "orientation", "Viewport", "ul", "map", "key", "StatusBar", "icon", "label", "variant", "classNames", "onClick", "window", "open", "GithubComponent", "GithubPanel", "React", "GithubComponent", "Root", "div", "className", "Header", "Content", "StatusBar"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppNode, getSpaceIdFromPath } from '@dxos/app-toolkit';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';\nimport { SPACE_TYPE } from '@dxos/plugin-space';\nimport { getParentId } from '@dxos/react-ui-attention';\n\nimport { meta } from '#meta';\nimport { Devtools } from '#types';\n\nconst DEVTOOLS_TYPE = `${meta.id}.devtools`;\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: 'root',\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n Node.makeAction({\n id: 'resetData',\n data: () =>\n Effect.sync(() => {\n window.location.href = '/reset.html#continue';\n }),\n properties: {\n label: ['reset-data.label', { ns: meta.id }],\n icon: 'ph--warning--regular',\n },\n }),\n ]),\n }),\n\n GraphBuilder.createExtension({\n id: 'devtools',\n match: NodeMatcher.whenAny(NodeMatcher.whenRoot, NodeMatcher.whenNodeType(SPACE_TYPE)),\n connector: (node, get) =>\n Effect.gen(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const layoutAtom = get(yield* Capability.atom(AppCapabilities.Layout))[0];\n const layout = layoutAtom ? get(layoutAtom) : undefined;\n const spaceId = layout?.workspace ? getSpaceIdFromPath(layout.workspace) : undefined;\n const space = spaceId ? client.spaces.get(spaceId) : undefined;\n const [graph] = get(yield* Capability.atom(AppCapabilities.AppGraph));\n\n return [\n Node.make({\n id: Devtools.id,\n data: null,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['devtools.label', { ns: meta.id }],\n icon: 'ph--hammer--regular',\n disposition: 'pin-end',\n position: 'last',\n },\n nodes: [\n Node.make({\n id: 'appGraph',\n type: `${meta.id}.app-graph`,\n data: { graph: graph?.graph, root: node.id === Node.RootId ? node.id : getParentId(node.id) },\n properties: {\n label: ['debug-app-graph.label', { ns: meta.id }],\n icon: 'ph--graph--regular',\n },\n }),\n Node.make({\n id: 'toolsExplorer',\n data: Devtools.ToolsExplorer,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['debug-tools-explorer.label', { ns: meta.id }],\n icon: 'ph--toolbox--regular',\n },\n }),\n ...(space && node.type === SPACE_TYPE\n ? [\n Node.make({\n id: 'debug',\n type: `${meta.id}.space`,\n data: { space, type: `${meta.id}.space` },\n properties: {\n label: ['generate-objects.label', { ns: meta.id }],\n icon: 'ph--dice-five--regular',\n },\n }),\n ]\n : []),\n Node.make({\n id: Devtools.Client.id,\n data: null,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['client.label', { ns: meta.id }],\n icon: 'ph--users--regular',\n },\n nodes: [\n Node.make({\n id: Devtools.Client.Config,\n data: Devtools.Client.Config,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['config.label', { ns: meta.id }],\n icon: 'ph--gear--regular',\n },\n }),\n Node.make({\n id: Devtools.Client.Storage,\n data: Devtools.Client.Storage,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['storage.label', { ns: meta.id }],\n icon: 'ph--hard-drives--regular',\n },\n }),\n Node.make({\n id: Devtools.Client.Sqlite,\n data: Devtools.Client.Sqlite,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['sqlite.label', { ns: meta.id }],\n icon: 'ph--database--regular',\n },\n }),\n Node.make({\n id: Devtools.Client.Logs,\n data: Devtools.Client.Logs,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['logs.label', { ns: meta.id }],\n icon: 'ph--file-text--regular',\n },\n }),\n Node.make({\n id: Devtools.Client.Diagnostics,\n data: Devtools.Client.Diagnostics,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['diagnostics.label', { ns: meta.id }],\n icon: 'ph--chart-line--regular',\n },\n }),\n ],\n }),\n Node.make({\n id: Devtools.Halo.id,\n data: null,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['halo.label', { ns: meta.id }],\n icon: 'ph--identification-badge--regular',\n },\n nodes: [\n Node.make({\n id: Devtools.Halo.Identity,\n data: Devtools.Halo.Identity,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['identity.label', { ns: meta.id }],\n icon: 'ph--identification-badge--regular',\n },\n }),\n Node.make({\n id: Devtools.Halo.Devices,\n data: Devtools.Halo.Devices,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['devices.label', { ns: meta.id }],\n icon: 'ph--devices--regular',\n },\n }),\n Node.make({\n id: Devtools.Halo.Keyring,\n data: Devtools.Halo.Keyring,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['keyring.label', { ns: meta.id }],\n icon: 'ph--key--regular',\n },\n }),\n Node.make({\n id: Devtools.Halo.Credentials,\n data: Devtools.Halo.Credentials,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['credentials.label', { ns: meta.id }],\n icon: 'ph--credit-card--regular',\n },\n }),\n ],\n }),\n Node.make({\n id: Devtools.Echo.id,\n data: null,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['echo.label', { ns: meta.id }],\n icon: 'ph--database--regular',\n },\n nodes: [\n Node.make({\n id: Devtools.Echo.Spaces,\n data: Devtools.Echo.Spaces,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['spaces.label', { ns: meta.id }],\n icon: 'ph--graph--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Space,\n data: Devtools.Echo.Space,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['space.label', { ns: meta.id }],\n icon: 'ph--planet--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Feeds,\n data: Devtools.Echo.Feeds,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['feeds.label', { ns: meta.id }],\n icon: 'ph--list-bullets--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Objects,\n data: Devtools.Echo.Objects,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['objects.label', { ns: meta.id }],\n icon: 'ph--cube--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Schema,\n data: Devtools.Echo.Schema,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['schema.label', { ns: meta.id }],\n icon: 'ph--database--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Registry,\n data: Devtools.Echo.Registry,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['registry.label', { ns: meta.id }],\n icon: 'ph--books--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Automerge,\n data: Devtools.Echo.Automerge,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['automerge.label', { ns: meta.id }],\n icon: 'ph--gear-six--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Queues,\n data: Devtools.Echo.Queues,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['queues.label', { ns: meta.id }],\n icon: 'ph--queue--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Members,\n data: Devtools.Echo.Members,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['members.label', { ns: meta.id }],\n icon: 'ph--users--regular',\n },\n }),\n Node.make({\n id: Devtools.Echo.Metadata,\n data: Devtools.Echo.Metadata,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['metadata.label', { ns: meta.id }],\n icon: 'ph--hard-drive--regular',\n },\n }),\n ],\n }),\n Node.make({\n id: Devtools.Mesh.id,\n data: null,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['mesh.label', { ns: meta.id }],\n icon: 'ph--graph--regular',\n },\n nodes: [\n Node.make({\n id: Devtools.Mesh.Signal,\n data: Devtools.Mesh.Signal,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['signal.label', { ns: meta.id }],\n icon: 'ph--wifi-high--regular',\n },\n }),\n Node.make({\n id: Devtools.Mesh.Swarm,\n data: Devtools.Mesh.Swarm,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['swarm.label', { ns: meta.id }],\n icon: 'ph--users-three--regular',\n },\n }),\n Node.make({\n id: Devtools.Mesh.Network,\n data: Devtools.Mesh.Network,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['network.label', { ns: meta.id }],\n icon: 'ph--polygon--regular',\n },\n }),\n ],\n }),\n Node.make({\n id: Devtools.Edge.id,\n data: null,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['edge.label', { ns: meta.id }],\n icon: 'ph--cloud--regular',\n },\n nodes: [\n Node.make({\n id: Devtools.Edge.Dashboard,\n data: Devtools.Edge.Dashboard,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['dashboard.label', { ns: meta.id }],\n icon: 'ph--computer-tower--regular',\n },\n }),\n Node.make({\n id: Devtools.Edge.Workflows,\n data: Devtools.Edge.Workflows,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['workflows.label', { ns: meta.id }],\n icon: 'ph--function--regular',\n },\n }),\n Node.make({\n id: Devtools.Edge.Traces,\n data: Devtools.Edge.Traces,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['traces.label', { ns: meta.id }],\n icon: 'ph--line-segments--regular',\n },\n }),\n Node.make({\n id: Devtools.Edge.Testing,\n data: Devtools.Edge.Testing,\n type: DEVTOOLS_TYPE,\n properties: {\n label: ['testing.label', { ns: meta.id }],\n icon: 'ph--flask--regular',\n },\n }),\n ],\n }),\n ],\n }),\n ];\n }),\n }),\n\n // Debug object companion.\n GraphBuilder.createExtension({\n id: 'debugObject',\n match: NodeMatcher.whenEchoObject,\n connector: () =>\n Effect.succeed([\n AppNode.makeCompanion({\n id: 'debug',\n label: ['debug.label', { ns: meta.id }],\n icon: 'ph--bug--regular',\n data: 'debug',\n position: 'last',\n }),\n ]),\n }),\n\n // Devtools deck companion.\n GraphBuilder.createExtension({\n id: 'devtoolsOverview',\n match: NodeMatcher.whenRoot,\n connector: () =>\n Effect.succeed([\n AppNode.makeDeckCompanion({\n id: 'devtools',\n label: ['devtools-overview.label', { ns: meta.id }],\n icon: 'ph--equalizer--regular',\n data: 'devtools' as const,\n position: 'last',\n }),\n ]),\n }),\n\n // Object explorer.\n GraphBuilder.createExtension({\n id: 'spaceObjects',\n match: NodeMatcher.whenRoot,\n connector: () =>\n Effect.succeed([\n AppNode.makeDeckCompanion({\n id: 'spaceObjects',\n label: ['space-objects.label', { ns: meta.id }],\n icon: 'ph--cube--regular',\n data: 'space-objects' as const,\n position: 'last',\n }),\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,SAASC,0BAA0B;AAC7D,SAASC,0BAA0B;AACnC,SAASC,cAAcC,MAAMC,mBAAmB;AAChD,SAASC,kBAAkB;AAC3B,SAASC,mBAAmB;AAE5B,S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,MAAM;oBACR;kBACF,CAAA;;cAEJ,CAAA;;UAEJ,CAAA;;MAEJ,CAAA;IACJ,CAAA;;IAGA3B,aAAaa,gBAAgB;MAC3BL,IAAI;MACJM,OAAOZ,YAAYmF;MACnBvD,WAAW,MACFb,eAAQ;QACbpB,QAAQyF,cAAc;UACpB9E,IAAI;UACJiB,OAAO;YAAC;YAAe;cAAEC,IAAIrB,KAAKG;YAAG;;UACrCmB,MAAM;UACNR,MAAM;UACN+B,UAAU;QACZ,CAAA;OACD;IACL,CAAA;;IAGAlD,aAAaa,gBAAgB;MAC3BL,IAAI;MACJM,OAAOZ,YAAYa;MACnBe,WAAW,MACFb,eAAQ;QACbpB,QAAQ0F,kBAAkB;UACxB/E,IAAI;UACJiB,OAAO;YAAC;YAA2B;cAAEC,IAAIrB,KAAKG;YAAG;;UACjDmB,MAAM;UACNR,MAAM;UACN+B,UAAU;QACZ,CAAA;OACD;IACL,CAAA;;IAGAlD,aAAaa,gBAAgB;MAC3BL,IAAI;MACJM,OAAOZ,YAAYa;MACnBe,WAAW,MACFb,eAAQ;QACbpB,QAAQ0F,kBAAkB;UACxB/E,IAAI;UACJiB,OAAO;YAAC;YAAuB;cAAEC,IAAIrB,KAAKG;YAAG;;UAC7CmB,MAAM;UACNR,MAAM;UACN+B,UAAU;QACZ,CAAA;OACD;IACL,CAAA;GACD;AAED,SAAOvD,WAAW6F,YAAY5F,gBAAgB6F,iBAAiB9E,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "AppNode", "getSpaceIdFromPath", "ClientCapabilities", "GraphBuilder", "Node", "NodeMatcher", "SPACE_TYPE", "getParentId", "meta", "Devtools", "DEVTOOLS_TYPE", "id", "makeModule", "fnUntraced", "extensions", "all", "createExtension", "match", "whenRoot", "actions", "succeed", "makeAction", "data", "sync", "window", "location", "href", "properties", "label", "ns", "icon", "whenAny", "whenNodeType", "connector", "node", "get", "gen", "client", "Client", "layoutAtom", "atom", "Layout", "layout", "undefined", "spaceId", "workspace", "space", "spaces", "graph", "AppGraph", "make", "type", "disposition", "position", "nodes", "root", "RootId", "ToolsExplorer", "Config", "Storage", "Sqlite", "Logs", "Diagnostics", "Halo", "Identity", "Devices", "Keyring", "Credentials", "Echo", "Spaces", "Space", "Feeds", "Objects", "Schema", "Registry", "Automerge", "Queues", "Members", "Metadata", "Mesh", "Signal", "Swarm", "Network", "Edge", "Dashboard", "Workflows", "Traces", "Testing", "whenEchoObject", "makeCompanion", "makeDeckCompanion", "contributes", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { Plugin } from "@dxos/app-framework";
|
|
3
|
-
import { DXN } from "@dxos/keys";
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var meta = Plugin.makeMeta({
|
|
6
|
-
key: DXN.make("org.dxos.plugin.debug"),
|
|
7
|
-
name: "Debug",
|
|
8
|
-
author: "DXOS",
|
|
9
|
-
spec: "PLUGIN.mdl",
|
|
10
|
-
description: trim`
|
|
11
|
-
DebugPlugin is the developer toolkit for DXOS Composer. It adds a structured Devtools node
|
|
12
|
-
to the navigation graph — grouped into Client, HALO, ECHO, Mesh, and EDGE sub-sections —
|
|
13
|
-
exposing panel views for config, storage, logs, diagnostics, identity, devices, feeds,
|
|
14
|
-
objects, schemas, automerge internals, network topology, EDGE workflows, and invocation
|
|
15
|
-
traces, all driven by the @dxos/devtools component library.
|
|
16
|
-
|
|
17
|
-
The plugin contributes a Debug companion tab to every ECHO object in the deck so developers
|
|
18
|
-
can inspect raw field values and DXNs inline, and a Space Objects companion panel that lists
|
|
19
|
-
all objects in the active space with live reactive updates.
|
|
20
|
-
|
|
21
|
-
Test-data generation is available via a SpaceGenerator article surface: developers can
|
|
22
|
-
create configurable batches of synthetic ECHO objects into any space collection, with a
|
|
23
|
-
status indicator showing when generation is running.
|
|
24
|
-
|
|
25
|
-
Additional utilities include a wireframe overlay mode that draws labelled borders around
|
|
26
|
-
every article and section surface, a log-capture and download facility backed by an
|
|
27
|
-
IdbLogStore, a ToolsExplorer connected to the DXOS MCP introspect service, and a
|
|
28
|
-
globalThis helper for manual storage-version testing.
|
|
29
|
-
`,
|
|
30
|
-
icon: "ph--bug--regular",
|
|
31
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-debug",
|
|
32
|
-
screenshots: [
|
|
33
|
-
"https://dxos.network/plugin-details-debug-dark.png"
|
|
34
|
-
],
|
|
35
|
-
tags: [
|
|
36
|
-
"labs"
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export {
|
|
41
|
-
meta
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=chunk-HOV6MV5B.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.debug'),\n name: 'Debug',\n author: 'DXOS',\n spec: 'PLUGIN.mdl',\n description: trim`\n DebugPlugin is the developer toolkit for DXOS Composer. It adds a structured Devtools node\n to the navigation graph — grouped into Client, HALO, ECHO, Mesh, and EDGE sub-sections —\n exposing panel views for config, storage, logs, diagnostics, identity, devices, feeds,\n objects, schemas, automerge internals, network topology, EDGE workflows, and invocation\n traces, all driven by the @dxos/devtools component library.\n\n The plugin contributes a Debug companion tab to every ECHO object in the deck so developers\n can inspect raw field values and DXNs inline, and a Space Objects companion panel that lists\n all objects in the active space with live reactive updates.\n\n Test-data generation is available via a SpaceGenerator article surface: developers can\n create configurable batches of synthetic ECHO objects into any space collection, with a\n status indicator showing when generation is running.\n\n Additional utilities include a wireframe overlay mode that draws labelled borders around\n every article and section surface, a log-capture and download facility backed by an\n IdbLogStore, a ToolsExplorer connected to the DXOS MCP introspect service, and a\n globalThis helper for manual storage-version testing.\n `,\n icon: 'ph--bug--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-debug',\n screenshots: ['https://dxos.network/plugin-details-debug-dark.png'],\n tags: ['labs'],\n});\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,uBAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,MAAM;EACNC,aAAaR;;;;;;;;;;;;;;;;;;;;EAoBbS,MAAM;EACNC,QAAQ;EACRC,aAAa;IAAC;;EACdC,MAAM;IAAC;;AACT,CAAA;",
|
|
6
|
-
"names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "spec", "description", "icon", "source", "screenshots", "tags"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/index.ts", "../../../src/types/Settings.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\nimport { type Context, createContext } from 'react';\n\nimport { Capability } from '@dxos/app-framework';\nimport type { TimerCallback, TimerOptions } from '@dxos/async';\nimport { type IdbLogStore } from '@dxos/log-store-idb';\n\nimport { meta } from '#meta';\n\nimport * as Settings from './Settings';\n\nexport * as Settings from './Settings';\n\nexport type DebugPluginOptions = {\n /** Shared persistent log store for capturing and downloading logs. */\n logStore?: IdbLogStore;\n};\n\nexport type DebugContextType = {\n running: boolean;\n start: (cb: TimerCallback, options: TimerOptions) => void;\n stop: () => void;\n};\n\nexport const DebugContext: Context<DebugContextType> = createContext<DebugContextType>({\n running: false,\n start: () => {},\n stop: () => {},\n});\n\nexport namespace DebugCapabilities {\n export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);\n}\n\nexport namespace Devtools {\n export const id = `${meta.id}.devtools`;\n\n export const ToolsExplorer = `${Devtools.id}.tools-explorer`;\n\n export namespace Client {\n export const id = `${Devtools.id}.client`;\n export const Config = `${Devtools.Client.id}.config`;\n export const Storage = `${Devtools.Client.id}.storage`;\n export const Sqlite = `${Devtools.Client.id}.sqlite`;\n export const Logs = `${Devtools.Client.id}.logs`;\n export const Diagnostics = `${Devtools.Client.id}.diagnostics`;\n }\n\n export namespace Halo {\n export const id = `${Devtools.id}.halo`;\n export const Identity = `${Devtools.Halo.id}.identity`;\n export const Devices = `${Devtools.Halo.id}.devices`;\n export const Keyring = `${Devtools.Halo.id}.keyring`;\n export const Credentials = `${Devtools.Halo.id}.credentials`;\n }\n\n export namespace Echo {\n export const id = `${Devtools.id}.echo`;\n export const Spaces = `${Devtools.Echo.id}.spaces`;\n export const Space = `${Devtools.Echo.id}.space`;\n export const Feeds = `${Devtools.Echo.id}.feeds`;\n export const Objects = `${Devtools.Echo.id}.objects`;\n export const Schema = `${Devtools.Echo.id}.schema`;\n export const Registry = `${Devtools.Echo.id}.registry`;\n export const Automerge = `${Devtools.Echo.id}.automerge`;\n export const Queues = `${Devtools.Echo.id}.queues`;\n export const Members = `${Devtools.Echo.id}.members`;\n export const Metadata = `${Devtools.Echo.id}.metadata`;\n }\n\n export namespace Mesh {\n export const id = `${Devtools.id}.mesh`;\n export const Signal = `${Devtools.Mesh.id}.signal`;\n export const Swarm = `${Devtools.Mesh.id}.swarm`;\n export const Network = `${Devtools.Mesh.id}.network`;\n }\n\n export namespace Agent {\n export const id = `${Devtools.id}.agent`;\n export const Dashboard = `${Devtools.Agent.id}.dashboard`;\n export const Search = `${Devtools.Agent.id}.search`;\n }\n\n export namespace Edge {\n export const id = `${Devtools.id}.edge`;\n export const Dashboard = `${Devtools.Edge.id}.dashboard`;\n export const Workflows = `${Devtools.Edge.id}.workflows`;\n export const Traces = `${Devtools.Edge.id}.traces`;\n export const Testing = `${Devtools.Edge.id}.testing`;\n }\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nexport const Settings = Schema.mutable(\n Schema.Struct({\n wireframe: Schema.optional(Schema.Boolean),\n traceAll: Schema.optional(Schema.Boolean),\n }),\n);\n\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n"],
|
|
5
|
-
"mappings": ";;;;;AAKA,SAAuBA,qBAAqB;AAE5C,SAASC,kBAAkB;AAI3B,SAASC,YAAY;;;ACXrB;;;;AAMA,YAAYC,YAAY;AAEjB,IAAMC,WAAkBC,eACtBC,cAAO;EACZC,WAAkBC,gBAAgBC,cAAO;EACzCC,UAAiBF,gBAAgBC,cAAO;AAC1C,CAAA,CAAA;;;ADgBK,IAAME,eAA0CC,cAAgC;EACrFC,SAAS;EACTC,OAAO,MAAA;EAAO;EACdC,MAAM,MAAA;EAAO;AACf,CAAA;UAEiBC,oBAAAA;qBACFC,WAAWC,WAAWC,KAAuC,GAAGC,KAAKC,EAAE,sBAAsB;AAC5G,GAFiBL,sBAAAA,oBAAAA,CAAAA,EAAAA;UAIAM,WAAAA;YACFD,KAAK,GAAGD,KAAKC,EAAE;YAEfE,gBAAgB,GAAGD,UAASD,EAAE;YAE1BG,QAAAA;WACFH,KAAK,GAAGC,UAASD,EAAE;WACnBI,SAAS,GAAGH,UAASE,OAAOH,EAAE;WAC9BK,UAAU,GAAGJ,UAASE,OAAOH,EAAE;WAC/BM,SAAS,GAAGL,UAASE,OAAOH,EAAE;WAC9BO,OAAO,GAAGN,UAASE,OAAOH,EAAE;WAC5BQ,cAAc,GAAGP,UAASE,OAAOH,EAAE;EAClD,GAAAC,UAPiBE,WAAAA,UAAAA,SAAAA,CAAAA,EAAAA;YASAM,MAAAA;SACFT,KAAK,GAAGC,UAASD,EAAE;SACnBU,WAAW,GAAGT,UAASQ,KAAK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,GAAG7B,UAAS+B,KAAKhC,EAAE;SAC/BiC,YAAY,GAAGhC,UAAS+B,KAAKhC,EAAE;SAC/BkC,SAAS,GAAGjC,UAAS+B,KAAKhC,EAAE;SAC5BmC,UAAU,GAAGlC,UAAS+B,KAAKhC,EAAE;EAC5C,GAAAC,UANiB+B,SAAAA,UAAAA,OAAAA,CAAAA,EAAAA;AAOnB,GAxDiB/B,aAAAA,WAAAA,CAAAA,EAAAA;;;",
|
|
6
|
-
"names": ["createContext", "Capability", "meta", "Schema", "Settings", "mutable", "Struct", "wireframe", "optional", "Boolean", "traceAll", "DebugContext", "createContext", "running", "start", "stop", "DebugCapabilities", "Settings", "Capability", "make", "meta", "id", "Devtools", "ToolsExplorer", "Client", "Config", "Storage", "Sqlite", "Logs", "Diagnostics", "Halo", "Identity", "Devices", "Keyring", "Credentials", "Echo", "Spaces", "Space", "Feeds", "Objects", "Schema", "Registry", "Automerge", "Queues", "Members", "Metadata", "Mesh", "Signal", "Swarm", "Network", "Agent", "Dashboard", "Search", "Edge", "Workflows", "Traces", "Testing"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport React, { useCallback } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface, useOperationInvoker, useSettingsState } from '@dxos/app-framework/ui';\nimport { AppCapabilities, LayoutOperation, RootCollectionAnnotation, getObjectPathFromObject } from '@dxos/app-toolkit';\nimport { AppSurface, useActiveSpace } from '@dxos/app-toolkit/ui';\nimport {\n AutomergePanel,\n ConfigPanel,\n CredentialsPanel,\n DeviceListPanel,\n DiagnosticsPanel,\n EdgeDashboardPanel,\n FeedsPanel,\n IdentityPanel,\n InvocationTraceContainer,\n KeyringPanel,\n LoggingPanel,\n MembersPanel,\n MetadataPanel,\n NetworkPanel,\n ObjectsPanel,\n QueuesPanel,\n SchemaPanel,\n SignalPanel,\n SpaceInfoPanel,\n SpaceListPanel,\n SqlitePanel,\n StoragePanel,\n SwarmPanel,\n TestingPanel,\n WorkflowPanel,\n} from '@dxos/devtools';\nimport { Annotation, Collection, Feed, Obj } from '@dxos/echo';\nimport { log } from '@dxos/log';\nimport { type IdbLogStore } from '@dxos/log-store-idb';\nimport { type Graph } from '@dxos/plugin-graph';\nimport { ScriptOperation } from '@dxos/plugin-script';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { type Space, SpaceState, isSpace } from '@dxos/react-client/echo';\nimport { ToolsExplorer } from '@dxos/react-ui-introspect';\n\nimport { DebugSettings } from '#components';\nimport {\n DebugGraph,\n DebugObjectPanel,\n DebugSpaceObjectsPanel,\n DebugStatus,\n DevtoolsOverviewContainer,\n RegistryPanel,\n SpaceGenerator,\n Wireframe,\n} from '#containers';\nimport { meta } from '#meta';\nimport { DebugCapabilities, type Settings, Devtools } from '#types';\n\n// TODO(burdon): Move to config.\nconst MCP_SERVER_URL = 'https://introspect-service-labs.dxos.workers.dev/mcp';\n\ntype SpaceDebug = {\n type: string;\n space: Space;\n};\n\ntype GraphDebug = {\n graph: Graph.Graph;\n root: string;\n};\n\nconst isSpaceDebug = (data: any): data is SpaceDebug => data?.type === `${meta.id}.space` && isSpace(data.space);\nconst isGraphDebug = (data: any): data is GraphDebug => {\n const graph = data?.graph;\n return (\n graph != null && typeof graph === 'object' && typeof graph.json === 'function' && typeof data?.root === 'string'\n );\n};\n\ntype ReactSurfaceOptions = {\n logStore?: IdbLogStore;\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* ({ logStore }: ReactSurfaceOptions) {\n const capabilities = yield* Capability.Service;\n const registry = capabilities.get(Capabilities.AtomRegistry);\n const settingsAtom = capabilities.get(DebugCapabilities.Settings);\n const fileUploader = capabilities.getAll(AppCapabilities.FileUploader)[0];\n\n return Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: 'pluginSettings',\n filter: AppSurface.settings(AppSurface.Article, meta.id),\n component: ({ data: { subject } }) => {\n const { settings, updateSettings } = useSettingsState<Settings.Settings>(subject.atom);\n return (\n <DebugSettings\n settings={settings}\n onSettingsChange={updateSettings}\n logStore={logStore}\n onUpload={fileUploader}\n />\n );\n },\n }),\n Surface.create({\n id: 'space',\n role: 'article',\n filter: (data): data is { subject: SpaceDebug } => isSpaceDebug(data.subject),\n component: ({ role, data }) => {\n const { invokePromise } = useOperationInvoker();\n\n const handleCreateObject = useCallback(\n (objects: Obj.Unknown[]) => {\n if (!isSpace(data.subject.space)) {\n return;\n }\n\n const collection =\n data.subject.space.state.get() === SpaceState.SPACE_READY &&\n Annotation.get(data.subject.space.properties, RootCollectionAnnotation).pipe(Option.getOrUndefined)\n ?.target;\n if (!Obj.instanceOf(Collection.Collection, collection)) {\n return;\n }\n\n objects.forEach((object) => {\n void invokePromise(SpaceOperation.AddObject, {\n target: collection,\n object,\n });\n });\n },\n [data.subject.space, invokePromise],\n );\n\n return <SpaceGenerator role={role} space={data.subject.space} onCreateObjects={handleCreateObject} />;\n },\n }),\n Surface.create({\n id: 'appGraph',\n role: 'article',\n filter: (data): data is { subject: GraphDebug } => isGraphDebug(data.subject),\n component: ({ data }) => <DebugGraph graph={data.subject.graph} root={data.subject.root} />,\n }),\n Surface.create({\n id: 'toolsExplorer',\n filter: AppSurface.literal(AppSurface.Article, Devtools.ToolsExplorer),\n component: () => <ToolsExplorer serverUrl={MCP_SERVER_URL} />,\n }),\n Surface.create({\n id: 'registry',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Registry),\n component: () => <RegistryPanel />,\n }),\n Surface.create({\n id: 'wireframe',\n // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.\n role: ['article', 'section'],\n position: 'first',\n filter: (data): data is { subject: Obj.Unknown } => {\n const settings = registry.get(settingsAtom);\n return Obj.isObject(data.subject) && !!settings.wireframe;\n },\n component: ({ data, role, name }) => (\n <Wireframe label={`${role}:${name}`} object={data.subject} classNames='row-span-2 overflow-hidden' />\n ),\n }),\n Surface.create({\n id: 'objectDebug',\n filter: AppSurface.allOf(\n AppSurface.literal(AppSurface.Article, 'debug'),\n AppSurface.companion(AppSurface.Article),\n ),\n component: ({ role, data }) => <DebugObjectPanel role={role} companionTo={data.companionTo} />,\n }),\n Surface.create({\n id: 'devtoolsOverview',\n filter: AppSurface.literal(Surface.makeType<{ subject: string }>('deck-companion--devtools'), 'devtools'),\n component: () => <DevtoolsOverviewContainer />,\n }),\n Surface.create({\n id: 'spaceObjects',\n filter: AppSurface.literal(\n Surface.makeType<{ subject: string }>('deck-companion--space-objects'),\n 'space-objects',\n ),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <DebugSpaceObjectsPanel space={space} />;\n },\n }),\n\n Surface.create({\n id: 'debugStatus',\n role: 'status-indicator',\n position: 'first',\n component: () => <DebugStatus />,\n }),\n\n //\n // Devtools\n //\n\n Surface.create({\n id: 'client.config',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Config),\n component: () => <ConfigPanel vaultSelector={false} />,\n }),\n Surface.create({\n id: 'client.storage',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Storage),\n component: () => <StoragePanel />,\n }),\n Surface.create({\n id: 'client.sqlite',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Sqlite),\n component: () => <SqlitePanel />,\n }),\n Surface.create({\n id: 'client.logs',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Logs),\n component: () => <LoggingPanel />,\n }),\n Surface.create({\n id: 'client.diagnostics',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Client.Diagnostics),\n component: () => <DiagnosticsPanel />,\n }),\n Surface.create({\n id: 'halo.identity',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Identity),\n component: () => <IdentityPanel />,\n }),\n Surface.create({\n id: 'halo.devices',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Devices),\n component: () => <DeviceListPanel />,\n }),\n Surface.create({\n id: 'halo.keyring',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Keyring),\n component: () => <KeyringPanel />,\n }),\n Surface.create({\n id: 'halo.credentials',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Halo.Credentials),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <CredentialsPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.spaces',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Spaces),\n component: () => {\n const { invokePromise } = useOperationInvoker();\n const handleSelect = useCallback(\n () => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Space] }),\n [invokePromise],\n );\n return <SpaceListPanel onSelect={handleSelect} />;\n },\n }),\n Surface.create({\n id: 'echo.space',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Space),\n component: () => {\n const space = useActiveSpace();\n const { invokePromise } = useOperationInvoker();\n const handleSelect = useCallback(\n () => invokePromise(LayoutOperation.Open, { subject: [Devtools.Echo.Feeds] }),\n [invokePromise],\n );\n if (!space) {\n return null;\n }\n\n return <SpaceInfoPanel space={space} onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;\n },\n }),\n Surface.create({\n id: 'echo.feeds',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Feeds),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <FeedsPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.objects',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Objects),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <ObjectsPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.schema',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Schema),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <SchemaPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.automerge',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Automerge),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <AutomergePanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.queues',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Queues),\n component: () => <QueuesPanel />,\n }),\n Surface.create({\n id: 'echo.members',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Members),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <MembersPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'echo.metadata',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Echo.Metadata),\n component: () => <MetadataPanel />,\n }),\n Surface.create({\n id: 'mesh.signal',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Signal),\n component: () => <SignalPanel />,\n }),\n Surface.create({\n id: 'mesh.swarm',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Swarm),\n component: () => <SwarmPanel />,\n }),\n Surface.create({\n id: 'mesh.network',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Mesh.Network),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <NetworkPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'edge.dashboard',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Dashboard),\n component: () => <EdgeDashboardPanel />,\n }),\n Surface.create({\n id: 'edge.workflows',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Workflows),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n return <WorkflowPanel space={space} />;\n },\n }),\n Surface.create({\n id: 'edge.traces',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Traces),\n component: () => {\n const space = useActiveSpace();\n if (!space) {\n return null;\n }\n\n const feed = space.properties.invocationTraceFeed?.target;\n const feedDXN = feed ? Feed.getQueueUri(feed) : undefined;\n return <InvocationTraceContainer db={space.db} feedDXN={feedDXN} detailAxis='block' />;\n },\n }),\n Surface.create({\n id: 'edge.testing',\n filter: AppSurface.literal(AppSurface.Article, Devtools.Edge.Testing),\n component: () => {\n const { invokePromise } = useOperationInvoker();\n const onSpaceCreate = useCallback(\n async (space: Space) => {\n await space.waitUntilReady();\n await invokePromise(SpaceOperation.Migrate, { space });\n await space.db.flush();\n },\n [invokePromise],\n );\n const onScriptPluginOpen = useCallback(\n async (space: Space) => {\n await space.waitUntilReady();\n const createResult = await invokePromise(ScriptOperation.CreateScript, { db: space.db });\n if (createResult.data?.object) {\n await invokePromise(SpaceOperation.AddObject, { target: space.db, object: createResult.data.object });\n }\n log.info('script created', { result: createResult });\n if (createResult.data?.object) {\n await invokePromise(LayoutOperation.Open, {\n subject: [getObjectPathFromObject(createResult.data.object)],\n });\n }\n },\n [invokePromise],\n );\n return <TestingPanel onSpaceCreate={onSpaceCreate} onScriptPluginOpen={onScriptPluginOpen} />;\n },\n }),\n ]);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;AAIA,YAAYA,YAAY;AACxB,YAAYC,YAAY;AACxB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,cAAcC,kBAAkB;AACzC,SAASC,SAASC,qBAAqBC,wBAAwB;AAC/D,SAASC,iBAAiBC,iBAAiBC,0BAA0BC,+BAA+B;AACpG,SAASC,YAAYC,sBAAsB;AAC3C,SACEC,gBACAC,aACAC,kBACAC,iBACAC,kBACAC,oBACAC,YACAC,eACAC,0BACAC,cACAC,cACAC,cACAC,eACAC,cACAC,cACAC,aACAC,aACAC,aACAC,gBACAC,gBACAC,aACAC,cACAC,YACAC,cACAC,qBACK;AACP,SAASC,YAAYC,YAAYC,MAAMC,WAAW;AAClD,SAASC,WAAW;AAGpB,SAASC,uBAAuB;AAChC,SAASC,sBAAsB;AAC/B,SAAqBC,YAAYC,eAAe;AAChD,SAASC,qBAAqB;AAE9B,SAASC,qBAAqB;AAC9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A,GAAAA,MAAAA;WAAc;UAEjB;;cAGI,qBAAqB,YAAMA,OAActC,UAAAA;gBAAgC6D,MAAIhB,eAAQ;AAAC,gBAAA,eAAA,MAAA,cAAA,gBAAA,cAAA;YAClFsB,IAAAA,MAAAA;;2BACsDtB,MAAMgB,QAAE;kBAAEjB,cAAQuB,eAAkBvB,WAAM;cAAC,QAAA,MAAA;cACrG,QAAA,aAAA,KAAA;YACIwB,CAAAA;;AAA8C,cAAA,KAAA,kBAAA;YAC9CD,QAAAA;2BACI7B,YAAczE,GAAAA,cAAgBwG,GAAAA,KAAM,GAAA,KAAA,CAAA;2BAC/B,MAAA,QAAA;gCAACtG,gBAAwBoG,MAAAA;uBAA0B;gBAC9D,wBAAA,aAAA,KAAA,MAAA;cACF;YAEF,CAAA;UAAC7B;WAAc;UAEjB;;eAAmDgC,sBAAoBA,cAAAA,cAAAA;;UACzE;QACF,CAAA;MACD;IAEH,CAAA;;;",
|
|
6
|
-
"names": ["Effect", "Option", "React", "useCallback", "Capabilities", "Capability", "Surface", "useOperationInvoker", "useSettingsState", "AppCapabilities", "LayoutOperation", "RootCollectionAnnotation", "getObjectPathFromObject", "AppSurface", "useActiveSpace", "AutomergePanel", "ConfigPanel", "CredentialsPanel", "DeviceListPanel", "DiagnosticsPanel", "EdgeDashboardPanel", "FeedsPanel", "IdentityPanel", "InvocationTraceContainer", "KeyringPanel", "LoggingPanel", "MembersPanel", "MetadataPanel", "NetworkPanel", "ObjectsPanel", "QueuesPanel", "SchemaPanel", "SignalPanel", "SpaceInfoPanel", "SpaceListPanel", "SqlitePanel", "StoragePanel", "SwarmPanel", "TestingPanel", "WorkflowPanel", "Annotation", "Collection", "Feed", "Obj", "log", "ScriptOperation", "SpaceOperation", "SpaceState", "isSpace", "ToolsExplorer", "DebugSettings", "DebugGraph", "DebugObjectPanel", "DebugSpaceObjectsPanel", "DebugStatus", "DevtoolsOverviewContainer", "RegistryPanel", "SpaceGenerator", "Wireframe", "meta", "DebugCapabilities", "Devtools", "isGraphDebug", "data", "graph", "makeModule", "fnUntraced", "logStore", "registry", "capabilities", "AtomRegistry", "settingsAtom", "fileUploader", "getAll", "FileUploader", "contributes", "filter", "component", "settings", "updateSettings", "onSettingsChange", "onUpload", "role", "invokePromise", "handleCreateObject", "subject", "objects", "target", "collection", "object", "space", "onCreateObjects", "root", "create", "serverUrl", "MCP_SERVER_URL", "position", "isObject", "name", "classNames", "companionTo", "vaultSelector", "handleSelect", "Echo", "onSelectPipeline", "feed", "db", "feedDXN", "detailAxis", "onSpaceCreate", "waitUntilReady", "Migrate", "createResult", "info", "Open", "onScriptPluginOpen"]
|
|
7
|
-
}
|