@dxos/plugin-debug 0.8.4-main.ead640a → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs +15 -0
- package/dist/lib/neutral/DebugGraph-G4FWS57E.mjs.map +7 -0
- package/dist/lib/neutral/DebugObjectPanel-UJ63CV25.mjs +59 -0
- package/dist/lib/neutral/DebugObjectPanel-UJ63CV25.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.mjs +47 -0
- package/dist/lib/neutral/DebugPlugin.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs +18 -0
- package/dist/lib/neutral/DebugPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs +12 -0
- package/dist/lib/neutral/DebugPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DebugSettings-Z3XADRNK.mjs +224 -0
- package/dist/lib/neutral/DebugSettings-Z3XADRNK.mjs.map +7 -0
- package/dist/lib/neutral/DebugSpaceObjectsPanel-NISULU6U.mjs +34 -0
- package/dist/lib/neutral/DebugSpaceObjectsPanel-NISULU6U.mjs.map +7 -0
- package/dist/lib/neutral/DebugStatus-YB3KFP7G.mjs +121 -0
- package/dist/lib/neutral/DebugStatus-YB3KFP7G.mjs.map +7 -0
- package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs +23 -0
- package/dist/lib/neutral/DevtoolsOverviewContainer-YX7Z3D2H.mjs.map +7 -0
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs +177 -0
- package/dist/lib/neutral/GithubPanel-QJKDJRVQ.mjs.map +7 -0
- package/dist/lib/neutral/SpaceGenerator-IQLBDY6R.mjs +143 -0
- package/dist/lib/neutral/SpaceGenerator-IQLBDY6R.mjs.map +7 -0
- package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs +52 -0
- package/dist/lib/neutral/Wireframe-WD7S2AUU.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-ZNMWIDDF.mjs +598 -0
- package/dist/lib/neutral/app-graph-builder-ZNMWIDDF.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +15 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/{browser/chunk-SRV2AIGJ.mjs → neutral/chunk-NFIOTQRZ.mjs} +30 -9
- package/dist/lib/neutral/chunk-NFIOTQRZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SAJFZGX5.mjs +41 -0
- package/dist/lib/neutral/chunk-SAJFZGX5.mjs.map +7 -0
- package/dist/lib/{browser/SpaceGenerator-VMWHGAJZ.mjs → neutral/components/index.mjs} +347 -527
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +23 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +12 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-context-MUZ3KVLU.mjs +17 -0
- package/dist/lib/neutral/react-context-MUZ3KVLU.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-T4NYONZ7.mjs +419 -0
- package/dist/lib/neutral/react-surface-T4NYONZ7.mjs.map +7 -0
- package/dist/lib/neutral/settings-MPM6YUP4.mjs +28 -0
- package/dist/lib/neutral/settings-MPM6YUP4.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +90 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/DebugPlugin.d.ts +4 -1
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/DebugPlugin.node.d.ts +5 -0
- package/dist/types/src/DebugPlugin.node.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.test.d.ts +2 -0
- package/dist/types/src/DebugPlugin.test.d.ts.map +1 -0
- package/dist/types/src/DebugPlugin.workerd.d.ts +5 -0
- package/dist/types/src/DebugPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +7 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts +11 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts +105 -0
- package/dist/types/src/components/DebugSettings/DebugSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/DebugSettings/index.d.ts +2 -0
- package/dist/types/src/components/DebugSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/SchemaTable.d.ts.map +1 -0
- package/dist/types/src/components/SchemaTable/index.d.ts +2 -0
- package/dist/types/src/components/SchemaTable/index.d.ts.map +1 -0
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +4 -5
- package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/index.d.ts +2 -2
- package/dist/types/src/components/SpaceGenerator/index.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/presets.d.ts +2 -5
- package/dist/types/src/components/SpaceGenerator/presets.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts +8 -0
- package/dist/types/src/containers/DebugGraph/DebugGraph.d.ts.map +1 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts +2 -0
- package/dist/types/src/containers/DebugGraph/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts +6 -0
- package/dist/types/src/containers/DebugObjectPanel/DebugObjectPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts +2 -0
- package/dist/types/src/containers/DebugObjectPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts +5 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.d.ts.map +1 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts +2 -0
- package/dist/types/src/containers/DebugSpaceObjectsPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/DebugStatus.d.ts.map +1 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts +2 -0
- package/dist/types/src/containers/DebugStatus/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/DevtoolsOverviewContainer}/DevtoolsOverviewContainer.d.ts +0 -1
- package/dist/types/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts +2 -0
- package/dist/types/src/containers/DevtoolsOverviewContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts +15 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts +105 -0
- package/dist/types/src/containers/GithubPanel/GithubComponent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts +3 -0
- package/dist/types/src/containers/GithubPanel/GithubPanel.d.ts.map +1 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts +2 -0
- package/dist/types/src/containers/GithubPanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts +11 -0
- package/dist/types/src/containers/SpaceGenerator/SpaceGenerator.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceGenerator/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceGenerator/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/Wireframe}/Wireframe.d.ts +2 -2
- package/dist/types/src/containers/Wireframe/Wireframe.d.ts.map +1 -0
- package/dist/types/src/containers/Wireframe/index.d.ts +2 -0
- package/dist/types/src/containers/Wireframe/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +86 -59
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +8 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +69 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +134 -75
- package/src/DebugPlugin.node.ts +18 -0
- package/src/DebugPlugin.test.ts +29 -0
- package/src/DebugPlugin.tsx +28 -34
- package/src/DebugPlugin.workerd.ts +12 -0
- package/src/capabilities/app-graph-builder.ts +381 -388
- package/src/capabilities/index.ts +5 -5
- package/src/capabilities/react-context.tsx +16 -7
- package/src/capabilities/react-surface.tsx +378 -339
- package/src/capabilities/settings.ts +24 -12
- package/src/components/DebugSettings/DebugSettings.stories.tsx +36 -0
- package/src/components/DebugSettings/DebugSettings.tsx +262 -0
- package/src/components/DebugSettings/index.ts +5 -0
- package/src/components/SchemaTable/index.ts +5 -0
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +34 -44
- package/src/components/SpaceGenerator/draw-util.ts +8 -8
- package/src/components/SpaceGenerator/index.ts +2 -3
- package/src/components/SpaceGenerator/presets.ts +241 -139
- package/src/components/index.ts +4 -8
- package/src/containers/DebugGraph/DebugGraph.tsx +14 -0
- package/src/containers/DebugGraph/index.ts +5 -0
- package/src/containers/DebugObjectPanel/DebugObjectPanel.tsx +76 -0
- package/src/containers/DebugObjectPanel/index.ts +5 -0
- package/src/containers/DebugSpaceObjectsPanel/DebugSpaceObjectsPanel.tsx +47 -0
- package/src/containers/DebugSpaceObjectsPanel/index.ts +5 -0
- package/src/{components → containers/DebugStatus}/DebugStatus.tsx +41 -19
- package/src/containers/DebugStatus/index.ts +5 -0
- package/src/containers/DevtoolsOverviewContainer/DevtoolsOverviewContainer.tsx +25 -0
- package/src/containers/DevtoolsOverviewContainer/index.ts +5 -0
- package/src/containers/GithubPanel/GithubComponent.stories.tsx +38 -0
- package/src/containers/GithubPanel/GithubComponent.tsx +192 -0
- package/src/containers/GithubPanel/GithubPanel.tsx +17 -0
- package/src/containers/GithubPanel/index.ts +5 -0
- package/src/containers/SpaceGenerator/SpaceGenerator.tsx +126 -0
- package/src/containers/SpaceGenerator/index.ts +5 -0
- package/src/{components → containers/Wireframe}/Wireframe.tsx +7 -12
- package/src/containers/Wireframe/index.ts +5 -0
- package/src/containers/index.ts +14 -0
- package/src/index.ts +1 -1
- package/src/meta.ts +27 -5
- package/src/plugin.ts +10 -0
- package/src/translations.ts +82 -58
- package/src/types/Settings.ts +16 -0
- package/src/{types.ts → types/index.ts} +20 -11
- package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs +0 -20
- package/dist/lib/browser/DebugGraph-EDOH6R2G.mjs.map +0 -7
- package/dist/lib/browser/DevtoolsOverviewContainer-EPD6EWT5.mjs +0 -25
- package/dist/lib/browser/DevtoolsOverviewContainer-EPD6EWT5.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-VMWHGAJZ.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-I4IHBKKN.mjs +0 -588
- package/dist/lib/browser/app-graph-builder-I4IHBKKN.mjs.map +0 -7
- package/dist/lib/browser/chunk-SRV2AIGJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-SVCKCXCL.mjs +0 -16
- package/dist/lib/browser/chunk-SVCKCXCL.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -131
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-context-QLZE7VSQ.mjs +0 -16
- package/dist/lib/browser/react-context-QLZE7VSQ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-GFORPA3A.mjs +0 -772
- package/dist/lib/browser/react-surface-GFORPA3A.mjs.map +0 -7
- package/dist/lib/browser/settings-EBVICEEW.mjs +0 -22
- package/dist/lib/browser/settings-EBVICEEW.mjs.map +0 -7
- package/dist/types/src/components/Container.d.ts +0 -5
- package/dist/types/src/components/Container.d.ts.map +0 -1
- package/dist/types/src/components/DebugGraph.d.ts +0 -8
- package/dist/types/src/components/DebugGraph.d.ts.map +0 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts +0 -7
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +0 -1
- package/dist/types/src/components/DebugSettings.d.ts +0 -6
- package/dist/types/src/components/DebugSettings.d.ts.map +0 -1
- package/dist/types/src/components/DebugStatus.d.ts.map +0 -1
- package/dist/types/src/components/DevtoolsOverviewContainer.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +0 -9
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +0 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts +0 -15
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.stories.d.ts.map +0 -1
- package/dist/types/src/components/Wireframe.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -63
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/components/Container.tsx +0 -15
- package/src/components/DebugGraph.tsx +0 -14
- package/src/components/DebugObjectPanel.tsx +0 -33
- package/src/components/DebugSettings.tsx +0 -159
- package/src/components/DevtoolsOverviewContainer.tsx +0 -20
- package/src/components/SpaceGenerator/SpaceGenerator.stories.tsx +0 -52
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +0 -122
- /package/dist/types/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.d.ts +0 -0
- /package/dist/types/src/{components → containers/DebugStatus}/DebugStatus.d.ts +0 -0
- /package/src/components/{SpaceGenerator → SchemaTable}/SchemaTable.tsx +0 -0
|
@@ -5,36 +5,31 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { useResizeDetector } from 'react-resize-detector';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
10
9
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
11
10
|
import { useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
12
|
-
import {
|
|
13
|
-
import { mx } from '@dxos/
|
|
11
|
+
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
12
|
+
import { mx } from '@dxos/ui-theme';
|
|
14
13
|
|
|
15
14
|
// TODO(burdon): Create generic container with wireframe mode.
|
|
16
15
|
export type WireframeProps = ThemedClassName<{
|
|
16
|
+
object: Obj.Unknown;
|
|
17
17
|
label?: string;
|
|
18
|
-
object: Obj.Any;
|
|
19
18
|
}>;
|
|
20
19
|
|
|
21
20
|
// TODO(burdon): Make focusable and attendable with input.
|
|
22
21
|
export const Wireframe = ({ classNames, label, object }: WireframeProps) => {
|
|
23
|
-
const attentionAttrs = useAttentionAttributes(
|
|
22
|
+
const attentionAttrs = useAttentionAttributes(Obj.getURI(object));
|
|
24
23
|
const { width, height, ref } = useResizeDetector();
|
|
25
24
|
|
|
26
25
|
return (
|
|
27
|
-
<div ref={ref} className={mx('relative grow min-
|
|
26
|
+
<div ref={ref} className={mx('relative grow min-h-96', classNames)} {...attentionAttrs}>
|
|
28
27
|
<div className='absolute inset-2 flex flex-col gap-2 overflow-hidden font-mono'>
|
|
29
28
|
<div className='flex justify-between'>
|
|
30
29
|
<div>{label}</div>
|
|
31
30
|
<div>{`[${width}x${height}]`}</div>
|
|
32
31
|
</div>
|
|
33
|
-
{object &&
|
|
34
|
-
<SyntaxHighlighter language='json' classNames='text-xs opacity-75 rounded'>
|
|
35
|
-
{JSON.stringify(object, undefined, 2)}
|
|
36
|
-
</SyntaxHighlighter>
|
|
37
|
-
)}
|
|
32
|
+
{object && <JsonHighlighter data={object} classNames='text-xs opacity-75 rounded-sm' />}
|
|
38
33
|
</div>
|
|
39
34
|
<svg width={width} height={height} className='bg-transparent *:text-subdued'>
|
|
40
35
|
<rect x={0} y={0} width={width} height={height} strokeWidth={1} fill='none' />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ComponentType, lazy } from 'react';
|
|
6
|
+
|
|
7
|
+
export const DebugGraph: ComponentType<any> = lazy(() => import('./DebugGraph'));
|
|
8
|
+
export const DebugObjectPanel: ComponentType<any> = lazy(() => import('./DebugObjectPanel'));
|
|
9
|
+
export const DebugStatus: ComponentType<any> = lazy(() => import('./DebugStatus'));
|
|
10
|
+
export const DevtoolsOverviewContainer: ComponentType<any> = lazy(() => import('./DevtoolsOverviewContainer'));
|
|
11
|
+
export const SpaceGenerator: ComponentType<any> = lazy(() => import('./SpaceGenerator'));
|
|
12
|
+
export const Wireframe: ComponentType<any> = lazy(() => import('./Wireframe'));
|
|
13
|
+
export const DebugSpaceObjectsPanel: ComponentType<any> = lazy(() => import('./DebugSpaceObjectsPanel'));
|
|
14
|
+
export const GithubPanel: ComponentType<any> = lazy(() => import('./GithubPanel'));
|
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -2,14 +2,36 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
5
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
6
7
|
|
|
7
|
-
export const meta:
|
|
8
|
-
id: 'dxos.
|
|
8
|
+
export const meta: Plugin.Meta = {
|
|
9
|
+
id: 'org.dxos.plugin.debug',
|
|
9
10
|
name: 'Debug',
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
author: 'DXOS',
|
|
12
|
+
spec: 'PLUGIN.mdl',
|
|
13
|
+
description: trim`
|
|
14
|
+
DebugPlugin is the developer toolkit for DXOS Composer. It adds a structured Devtools node
|
|
15
|
+
to the navigation graph — grouped into Client, HALO, ECHO, Mesh, and EDGE sub-sections —
|
|
16
|
+
exposing panel views for config, storage, logs, diagnostics, identity, devices, feeds,
|
|
17
|
+
objects, schemas, automerge internals, network topology, EDGE workflows, and invocation
|
|
18
|
+
traces, all driven by the @dxos/devtools component library.
|
|
19
|
+
|
|
20
|
+
The plugin contributes a Debug companion tab to every ECHO object in the deck so developers
|
|
21
|
+
can inspect raw field values and DXNs inline, and a Space Objects companion panel that lists
|
|
22
|
+
all objects in the active space with live reactive updates.
|
|
23
|
+
|
|
24
|
+
Test-data generation is available via a SpaceGenerator article surface: developers can
|
|
25
|
+
create configurable batches of synthetic ECHO objects into any space collection, with a
|
|
26
|
+
status indicator showing when generation is running.
|
|
27
|
+
|
|
28
|
+
Additional utilities include a wireframe overlay mode that draws labelled borders around
|
|
29
|
+
every article and section surface, a log-capture and download facility backed by an
|
|
30
|
+
IdbLogStore, a ToolsExplorer connected to the DXOS MCP introspect service, and a
|
|
31
|
+
globalThis helper for manual storage-version testing.
|
|
32
|
+
`,
|
|
12
33
|
icon: 'ph--bug--regular',
|
|
13
34
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-debug',
|
|
14
35
|
screenshots: ['https://dxos.network/plugin-details-debug-dark.png'],
|
|
36
|
+
tags: ['labs'],
|
|
15
37
|
};
|
package/src/plugin.ts
ADDED
package/src/translations.ts
CHANGED
|
@@ -3,71 +3,95 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
|
+
import { translations as introspectTranslations } from '@dxos/react-ui-introspect/translations';
|
|
6
7
|
|
|
7
|
-
import { meta } from '
|
|
8
|
+
import { meta } from '#meta';
|
|
8
9
|
|
|
9
10
|
export const translations = [
|
|
11
|
+
...introspectTranslations,
|
|
10
12
|
{
|
|
11
13
|
'en-US': {
|
|
12
14
|
[meta.id]: {
|
|
13
|
-
'plugin
|
|
14
|
-
'settings
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'debug
|
|
22
|
-
'
|
|
23
|
-
|
|
24
|
-
'settings
|
|
25
|
-
'settings
|
|
26
|
-
'settings
|
|
27
|
-
'settings
|
|
28
|
-
|
|
29
|
-
'settings
|
|
30
|
-
'settings
|
|
31
|
-
'settings
|
|
32
|
-
'settings
|
|
33
|
-
'settings
|
|
34
|
-
'settings
|
|
35
|
-
|
|
15
|
+
'plugin.name': 'Debug',
|
|
16
|
+
'settings.title': 'Debug settings',
|
|
17
|
+
'open-devtools.label': 'Open DevTools',
|
|
18
|
+
'devtools.label': 'DevTools',
|
|
19
|
+
'devtools-overview.label': 'Stats',
|
|
20
|
+
'space-objects.label': 'Database',
|
|
21
|
+
'debug.label': 'Debug',
|
|
22
|
+
'generate-objects.label': 'Generate Objects',
|
|
23
|
+
'debug-app-graph.label': 'App Graph',
|
|
24
|
+
'debug-tools-explorer.label': 'SDK Explorer',
|
|
25
|
+
|
|
26
|
+
'settings.wireframe.label': 'Show wireframes.',
|
|
27
|
+
'settings.wireframe.description': 'Overlay wireframe outlines on UI components for debugging layout.',
|
|
28
|
+
'settings.trace-all.label': 'Trace all requests (100% sampling).',
|
|
29
|
+
'settings.trace-all.description':
|
|
30
|
+
'Override the default 30% sampling rate to capture all traces. Requires page reload to take effect.',
|
|
31
|
+
'settings.tracing-panel.label': 'Open tracing panel.',
|
|
32
|
+
'settings.tracing-panel.description': 'Open the tracing dashboard to inspect captured spans.',
|
|
33
|
+
'settings.repair.label': 'Run repair tool.',
|
|
34
|
+
'settings.repair.description': 'Attempt to detect and fix inconsistencies in local data storage.',
|
|
35
|
+
'settings.download-diagnostics.label': 'Download diagnostics.',
|
|
36
|
+
'settings.download-diagnostics.description':
|
|
37
|
+
'Export a JSON file containing client diagnostics for troubleshooting.',
|
|
38
|
+
'settings.download-logs.label': 'Download log buffer.',
|
|
39
|
+
'settings.download-logs.description': 'Export the in-memory log buffer as an NDJSON file.',
|
|
40
|
+
'settings.uploaded.message': 'Settings uploaded.',
|
|
41
|
+
'settings.uploaded.description': 'URL copied to clipboard.',
|
|
42
|
+
'settings.choose-storage-adaptor.label': 'Storage adaptor (worker reload required).',
|
|
43
|
+
'settings.choose-storage-adaptor.description':
|
|
44
|
+
'Select the browser storage backend. Changing this requires a worker reload and may make existing data unavailable.',
|
|
45
|
+
'settings.repair-success.message': 'Repair succeeded',
|
|
46
|
+
'settings.repair-failed.message': 'Repair failed',
|
|
47
|
+
|
|
48
|
+
'settings.storage-adaptor.idb.label': 'IndexedDB',
|
|
49
|
+
'settings.storage-adaptor.opfs.label': 'OPFS',
|
|
50
|
+
'settings.storage-adapter.changed-alert.message':
|
|
36
51
|
'Warning: Swapping the storage adapter will make your data unavailable.',
|
|
37
|
-
|
|
38
|
-
'
|
|
39
|
-
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
'
|
|
52
|
+
|
|
53
|
+
'settings.data-store.label': 'Data Store',
|
|
54
|
+
|
|
55
|
+
'reset-data.label': 'Reset data (ERASES ALL DATA)',
|
|
56
|
+
'open-debug-panel.label': 'Show Debug',
|
|
57
|
+
'client.label': 'Client',
|
|
58
|
+
'config.label': 'Config',
|
|
59
|
+
'storage.label': 'Storage',
|
|
60
|
+
'logs.label': 'Logs',
|
|
61
|
+
'diagnostics.label': 'Diagnostics',
|
|
62
|
+
'tracing.label': 'Tracing',
|
|
63
|
+
'halo.label': 'HALO',
|
|
64
|
+
'identity.label': 'Identity',
|
|
65
|
+
'devices.label': 'Devices',
|
|
66
|
+
'keyring.label': 'Keyring',
|
|
67
|
+
'credentials.label': 'Credentials',
|
|
68
|
+
'echo.label': 'ECHO',
|
|
69
|
+
'spaces.label': 'Spaces',
|
|
70
|
+
'space.label': 'Space',
|
|
71
|
+
'feeds.label': 'Feeds',
|
|
72
|
+
'objects.label': 'Objects',
|
|
73
|
+
'schema.label': 'Schema',
|
|
74
|
+
'automerge.label': 'Automerge',
|
|
75
|
+
'queues.label': 'Queues',
|
|
76
|
+
'members.label': 'Members',
|
|
77
|
+
'metadata.label': 'Metadata',
|
|
78
|
+
'mesh.label': 'MESH',
|
|
79
|
+
'signal.label': 'Signal',
|
|
80
|
+
'swarm.label': 'Swarm',
|
|
81
|
+
'network.label': 'Network',
|
|
82
|
+
'agent.label': 'Agent',
|
|
83
|
+
'dashboard.label': 'Dashboard',
|
|
84
|
+
'search.label': 'Search',
|
|
85
|
+
'edge.label': 'EDGE',
|
|
86
|
+
'workflows.label': 'Workflows',
|
|
87
|
+
'traces.label': 'Traces',
|
|
88
|
+
'testing.label': 'Testing',
|
|
89
|
+
// GitHub (deck-companion--github surface).
|
|
90
|
+
'github-loading.message': 'Loading…',
|
|
91
|
+
'github-unavailable.message': 'GitHub feed unavailable.',
|
|
92
|
+
'recent-prs.label_one': '{{count}} recent PR',
|
|
93
|
+
'recent-prs.label_other': '{{count}} recent PRs',
|
|
94
|
+
'view-on-github.button': 'View on GitHub',
|
|
71
95
|
},
|
|
72
96
|
},
|
|
73
97
|
},
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
export const Settings = Schema.mutable(
|
|
10
|
+
Schema.Struct({
|
|
11
|
+
wireframe: Schema.optional(Schema.Boolean),
|
|
12
|
+
traceAll: Schema.optional(Schema.Boolean),
|
|
13
|
+
}),
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export interface Settings extends Schema.Schema.Type<typeof Settings> {}
|
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
6
6
|
import { type Context, createContext } from 'react';
|
|
7
7
|
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
9
|
import type { TimerCallback, TimerOptions } from '@dxos/async';
|
|
10
|
+
import { type IdbLogStore } from '@dxos/log-store-idb';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
import * as Settings from './Settings';
|
|
15
|
+
|
|
16
|
+
export * as Settings from './Settings';
|
|
17
|
+
|
|
18
|
+
export type DebugPluginOptions = {
|
|
19
|
+
/** Shared persistent log store for capturing and downloading logs. */
|
|
20
|
+
logStore?: IdbLogStore;
|
|
21
|
+
};
|
|
9
22
|
|
|
10
23
|
export type DebugContextType = {
|
|
11
24
|
running: boolean;
|
|
@@ -19,17 +32,14 @@ export const DebugContext: Context<DebugContextType> = createContext<DebugContex
|
|
|
19
32
|
stop: () => {},
|
|
20
33
|
});
|
|
21
34
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}),
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export interface DebugSettingsProps extends Schema.Schema.Type<typeof DebugSettingsSchema> {}
|
|
35
|
+
export namespace DebugCapabilities {
|
|
36
|
+
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);
|
|
37
|
+
}
|
|
29
38
|
|
|
30
39
|
export namespace Devtools {
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
export const id = `${meta.id}.devtools`;
|
|
41
|
+
|
|
42
|
+
export const ToolsExplorer = `${Devtools.id}.tools-explorer`;
|
|
33
43
|
|
|
34
44
|
export namespace Client {
|
|
35
45
|
export const id = `${Devtools.id}.client`;
|
|
@@ -37,7 +47,6 @@ export namespace Devtools {
|
|
|
37
47
|
export const Storage = `${Devtools.Client.id}.storage`;
|
|
38
48
|
export const Logs = `${Devtools.Client.id}.logs`;
|
|
39
49
|
export const Diagnostics = `${Devtools.Client.id}.diagnostics`;
|
|
40
|
-
export const Tracing = `${Devtools.Client.id}.tracing`;
|
|
41
50
|
}
|
|
42
51
|
|
|
43
52
|
export namespace Halo {
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/components/DebugGraph.tsx
|
|
2
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Tree } from "@dxos/devtools";
|
|
5
|
-
var DebugGraph = ({ graph, root }) => {
|
|
6
|
-
var _effect = _useSignals();
|
|
7
|
-
try {
|
|
8
|
-
return /* @__PURE__ */ React.createElement(Tree, {
|
|
9
|
-
data: graph.toJSON(root)
|
|
10
|
-
});
|
|
11
|
-
} finally {
|
|
12
|
-
_effect.f();
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
var DebugGraph_default = DebugGraph;
|
|
16
|
-
export {
|
|
17
|
-
DebugGraph,
|
|
18
|
-
DebugGraph_default as default
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=DebugGraph-EDOH6R2G.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/DebugGraph.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\nimport { Tree } from '@dxos/devtools';\nimport { type Graph } from '@dxos/plugin-graph';\n\nexport const DebugGraph: FC<{ graph: Graph; root: string }> = ({ graph, root }) => {\n return <Tree data={graph.toJSON(root)} />;\n};\n\nexport default DebugGraph;\n"],
|
|
5
|
-
"mappings": ";;AAIA,OAAOA,WAAwB;AAE/B,SAASC,YAAY;AAGd,IAAMC,aAAiD,CAAC,EAAEC,OAAOC,KAAI,MAAE;;;AAC5E,WAAO,sBAAA,cAACC,MAAAA;MAAKC,MAAMH,MAAMI,OAAOH,IAAAA;;;;;AAClC;AAEA,IAAA,qBAAeF;",
|
|
6
|
-
"names": ["React", "Tree", "DebugGraph", "graph", "root", "Tree", "data", "toJSON"]
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// src/components/DevtoolsOverviewContainer.tsx
|
|
2
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Surface } from "@dxos/app-framework";
|
|
5
|
-
import { StatsPanel, useStats } from "@dxos/devtools";
|
|
6
|
-
var DevtoolsOverviewContainer = () => {
|
|
7
|
-
var _effect = _useSignals();
|
|
8
|
-
try {
|
|
9
|
-
const [stats, refreshStats] = useStats();
|
|
10
|
-
return /* @__PURE__ */ React.createElement(StatsPanel, {
|
|
11
|
-
stats,
|
|
12
|
-
onRefresh: refreshStats
|
|
13
|
-
}, /* @__PURE__ */ React.createElement(Surface, {
|
|
14
|
-
role: "devtools-overview"
|
|
15
|
-
}));
|
|
16
|
-
} finally {
|
|
17
|
-
_effect.f();
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
var DevtoolsOverviewContainer_default = DevtoolsOverviewContainer;
|
|
21
|
-
export {
|
|
22
|
-
DevtoolsOverviewContainer,
|
|
23
|
-
DevtoolsOverviewContainer_default as default
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=DevtoolsOverviewContainer-EPD6EWT5.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/DevtoolsOverviewContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { StatsPanel, useStats } from '@dxos/devtools';\n\nexport const DevtoolsOverviewContainer = () => {\n const [stats, refreshStats] = useStats();\n\n return (\n <StatsPanel stats={stats} onRefresh={refreshStats}>\n <Surface role='devtools-overview' />\n </StatsPanel>\n );\n};\n\nexport default DevtoolsOverviewContainer;\n"],
|
|
5
|
-
"mappings": ";;AAIA,OAAOA,WAAW;AAElB,SAASC,eAAe;AACxB,SAASC,YAAYC,gBAAgB;AAE9B,IAAMC,4BAA4B,MAAA;;;AACvC,UAAM,CAACC,OAAOC,YAAAA,IAAgBC,SAAAA;AAE9B,WACE,sBAAA,cAACC,YAAAA;MAAWH;MAAcI,WAAWH;OACnC,sBAAA,cAACI,SAAAA;MAAQC,MAAK;;;;;AAGpB;AAEA,IAAA,oCAAeP;",
|
|
6
|
-
"names": ["React", "Surface", "StatsPanel", "useStats", "DevtoolsOverviewContainer", "stats", "refreshStats", "useStats", "StatsPanel", "onRefresh", "Surface", "role"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/SpaceGenerator/SpaceGenerator.tsx", "../../../src/components/SpaceGenerator/ObjectGenerator.tsx", "../../../src/components/SpaceGenerator/presets.ts", "../../../src/components/SpaceGenerator/SchemaTable.tsx", "../../../src/components/SpaceGenerator/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useCallback, useMemo, useState } from 'react';\n\nimport { useIntentDispatcher } from '@dxos/app-framework';\nimport { ComputeGraph } from '@dxos/conductor';\nimport { Filter, type Obj } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { SheetType } from '@dxos/plugin-sheet/types';\nimport { DiagramType } from '@dxos/plugin-sketch/types';\nimport { useClient } from '@dxos/react-client';\nimport { type Space, getTypename } from '@dxos/react-client/echo';\nimport { IconButton, Input, Toolbar, useAsyncEffect } from '@dxos/react-ui';\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport { DataType } from '@dxos/schema';\nimport { jsonKeyReplacer, sortKeys } from '@dxos/util';\n\nimport { type ObjectGenerator, createGenerator, staticGenerators } from './ObjectGenerator';\nimport { generator } from './presets';\nimport { SchemaTable } from './SchemaTable';\n\nexport type SpaceGeneratorProps = {\n space: Space;\n onCreateObjects?: (objects: Obj.Any[]) => void;\n};\n\nexport const SpaceGenerator = ({ space, onCreateObjects }: SpaceGeneratorProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const client = useClient();\n const staticTypes = [Markdown.Document, DiagramType, SheetType, ComputeGraph]; // TODO(burdon): Make extensible.\n const recordTypes = [DataType.Organization, DataType.Person, DataType.Task];\n const [count, setCount] = useState(1);\n const [info, setInfo] = useState<any>({});\n const presets = useMemo(() => generator(), []);\n\n // Create type generators.\n const typeMap = useMemo(() => {\n client.addTypes([...staticTypes, ...recordTypes, ...presets.schemas]);\n const recordGenerators = new Map<string, ObjectGenerator<any>>(\n recordTypes.map((type) => [type.typename, createGenerator(client, dispatch, type as any)]),\n );\n\n return new Map([...staticGenerators, ...presets.items, ...recordGenerators]);\n }, [client, recordTypes]);\n\n // Query space to get info.\n const updateInfo = async () => {\n // Create schema map.\n const echoSchema = await space.db.schemaRegistry.query().run();\n const staticSchema = space.db.graph.schemaRegistry.schemas;\n\n // Create object map.\n const { objects } = await space.db.query(Filter.everything()).run();\n const objectMap = sortKeys(\n objects.reduce<Record<string, number>>((map, obj) => {\n const type = getTypename(obj);\n if (type) {\n const count = map[type] ?? 0;\n map[type] = count + 1;\n }\n return map;\n }, {}),\n );\n\n setInfo({\n schema: {\n static: staticSchema.length,\n mutable: echoSchema.length,\n },\n objects: objectMap,\n });\n };\n\n useAsyncEffect(updateInfo, [space]);\n\n const handleCreateData = useCallback(\n async (typename: string) => {\n const constructor = typeMap.get(typename);\n if (constructor) {\n // TODO(burdon): Input to specify number of objects.\n await constructor(space, count, onCreateObjects);\n await updateInfo();\n }\n },\n [typeMap, count],\n );\n\n return (\n <div role='none' className='flex flex-col grow overflow-hidden'>\n <Toolbar.Root classNames='border-be border-subduedSeparator'>\n <IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Refresh' onClick={updateInfo} />\n <Toolbar.Separator variant='gap' />\n <Input.Root>\n <Input.TextInput\n type='number'\n min={1}\n max={100}\n placeholder={'Count'}\n classNames='!w-[4rem] !text-right'\n size={8}\n value={count}\n onChange={(ev) => setCount(parseInt(ev.target.value))}\n />\n </Input.Root>\n </Toolbar.Root>\n\n <div className='flex flex-col overflow-y-auto divide-y divide-separator'>\n <SchemaTable types={staticTypes} objects={info.objects} label='Static Types' onClick={handleCreateData} />\n <SchemaTable types={recordTypes} objects={info.objects} label='Record Types' onClick={handleCreateData} />\n <SchemaTable types={presets.types} objects={info.objects} label='Presets' onClick={handleCreateData} />\n\n <div>\n <SyntaxHighlighter language='json' classNames='text-xs'>\n {JSON.stringify({ space, ...info }, jsonKeyReplacer({ truncate: true }), 2)}\n </SyntaxHighlighter>\n </div>\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PromiseIntentDispatcher, createIntent } from '@dxos/app-framework';\nimport { addressToA1Notation } from '@dxos/compute';\nimport { ComputeGraph, ComputeGraphModel, DEFAULT_OUTPUT, NODE_INPUT, NODE_OUTPUT } from '@dxos/conductor';\nimport { DXN, Filter, Key, Obj, Ref, Type } from '@dxos/echo';\nimport { type TypedObject } from '@dxos/echo/internal';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { createSheet } from '@dxos/plugin-sheet/types';\nimport { type CellValue, SheetType } from '@dxos/plugin-sheet/types';\nimport { CanvasType, DiagramType } from '@dxos/plugin-sketch/types';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { faker } from '@dxos/random';\nimport { type Client } from '@dxos/react-client';\nimport { type Space } from '@dxos/react-client/echo';\nimport { DataType, getTypenameFromQuery } from '@dxos/schema';\nimport { type ValueGenerator, createAsyncGenerator } from '@dxos/schema/testing';\nimport { range } from '@dxos/util';\n\nconst generator: ValueGenerator = faker as any;\n\nconst findViewByTypename = async (views: DataType.View[], typename: string) => {\n return views.find((view) => getTypenameFromQuery(view.query.ast) === typename);\n};\n\nexport type ObjectGenerator<T extends Obj.Any> = (space: Space, n: number, cb?: (objects: T[]) => void) => Promise<T[]>;\n\nexport const createGenerator = <T extends Obj.Any>(\n client: Client,\n dispatch: PromiseIntentDispatcher,\n schema: TypedObject<T>,\n): ObjectGenerator<T> => {\n return async (space: Space, n: number): Promise<T[]> => {\n const typename = schema.typename;\n\n // Find or create table and view.\n const { objects: views } = await space.db.query(Filter.type(DataType.View)).run();\n const view = await findViewByTypename(views, typename);\n const staticSchema = client?.graph.schemaRegistry.schemas.find((schema) => Type.getTypename(schema) === typename);\n if (!view && !staticSchema) {\n await dispatch(createIntent(SpaceAction.AddSchema, { space, schema, show: false }));\n } else if (!view && staticSchema) {\n await dispatch(createIntent(SpaceAction.UseStaticSchema, { space, typename, show: false }));\n }\n\n // Create objects.\n const generate = createAsyncGenerator(generator, schema, { db: space.db });\n return generate.createObjects(n);\n };\n};\n\nexport const staticGenerators = new Map<string, ObjectGenerator<any>>([\n [\n Markdown.Document.typename,\n async (space, n, cb) => {\n const objects = range(n).map(() => {\n return space.db.add(\n Markdown.makeDocument({\n name: faker.commerce.productName(),\n content: faker.lorem.sentences(5),\n }),\n );\n });\n\n cb?.(objects);\n return objects;\n },\n ],\n [\n DiagramType.typename,\n async (space, n, cb) => {\n const objects = range(n).map(() => {\n // TODO(burdon): Generate diagram.\n const obj = space.db.add(\n Obj.make(DiagramType, {\n name: faker.commerce.productName(),\n canvas: Ref.make(Obj.make(CanvasType, { content: {} })),\n }),\n );\n\n return obj;\n });\n\n cb?.(objects);\n return objects;\n },\n ],\n // TODO(burdon): Create unit tests.\n [\n SheetType.typename,\n async (space, n, cb) => {\n const objects = range(n).map(() => {\n const cells: Record<string, CellValue> = {};\n const year = new Date().getFullYear();\n const cols = 4;\n const rows = 16;\n for (let col = 1; col <= cols; col++) {\n for (let row = 1; row <= rows; row++) {\n const cell = addressToA1Notation({ col, row });\n if (row === 1) {\n cells[cell] = { value: `${year} Q${col}` };\n } else if (row === rows) {\n const from = addressToA1Notation({ col, row: 2 });\n const to = addressToA1Notation({ col, row: rows - 1 });\n cells[cell] = { value: `=SUM(${from}:${to})` };\n } else if (row > 2 && row < rows - 1) {\n cells[cell] = { value: Math.floor(Math.random() * 10_000) };\n }\n }\n }\n\n // TODO(burdon): Set width.\n // TODO(burdon): Set formatting for columns.\n return space.db.add(\n createSheet({\n name: faker.commerce.productName(),\n cells,\n }),\n );\n });\n\n cb?.(objects);\n return objects;\n },\n ],\n [\n ComputeGraph.typename,\n async (space, n, cb) => {\n const objects = range(n, () => {\n const model = ComputeGraphModel.create();\n model.builder\n .createNode({ id: 'gpt-INPUT', type: NODE_INPUT })\n .createNode({ id: 'gpt-GPT', type: 'gpt' })\n .createNode({\n id: 'gpt-QUEUE_ID',\n type: 'constant',\n value: new DXN(DXN.kind.QUEUE, ['data', space.id, Key.ObjectId.random()]).toString(),\n })\n .createNode({ id: 'gpt-APPEND', type: 'append' })\n .createNode({ id: 'gpt-OUTPUT', type: NODE_OUTPUT })\n .createEdge({ node: 'gpt-INPUT', property: 'prompt' }, { node: 'gpt-GPT', property: 'prompt' })\n .createEdge({ node: 'gpt-GPT', property: 'text' }, { node: 'gpt-OUTPUT', property: 'text' })\n .createEdge({ node: 'gpt-QUEUE_ID', property: DEFAULT_OUTPUT }, { node: 'gpt-APPEND', property: 'id' })\n .createEdge({ node: 'gpt-GPT', property: 'messages' }, { node: 'gpt-APPEND', property: 'items' })\n .createEdge({ node: 'gpt-QUEUE_ID', property: DEFAULT_OUTPUT }, { node: 'gpt-OUTPUT', property: 'queue' });\n\n return space.db.add(model.root);\n });\n cb?.(objects);\n return objects;\n },\n ],\n]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { RESEARCH_BLUEPRINT, agent, entityExtraction } from '@dxos/assistant-testing';\nimport { Prompt } from '@dxos/blueprints';\nimport { type ComputeGraphModel, NODE_INPUT } from '@dxos/conductor';\nimport { DXN, Filter, Key, Obj, Query, Ref, Tag, Type } from '@dxos/echo';\nimport { FunctionTrigger, type TriggerKind, type TriggerType, serializeFunction } from '@dxos/functions';\nimport { invariant } from '@dxos/invariant';\nimport { sync } from '@dxos/plugin-inbox';\nimport { Mailbox } from '@dxos/plugin-inbox/types';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { type Space } from '@dxos/react-client/echo';\nimport {\n type ComputeShape,\n createAppend,\n createChat,\n createComputeGraph,\n createConstant,\n createFunction,\n createGpt,\n createQueue,\n createRandom,\n createSurface,\n createTemplate,\n createText,\n createTrigger,\n} from '@dxos/react-ui-canvas-compute';\nimport {\n CanvasBoardType,\n CanvasGraphModel,\n pointMultiply,\n pointsToRect,\n rectToPoints,\n} from '@dxos/react-ui-canvas-editor';\nimport { DataType, createView } from '@dxos/schema';\nimport { range } from '@dxos/util';\n\nimport { type ObjectGenerator } from './ObjectGenerator';\n\nexport enum PresetName {\n DXOS_TEAM = 'dxos-team',\n ORG_RESEARCH_PROJECT = 'org-research-project',\n // EMAIL_TABLE = 'email-table',\n GPT_QUEUE = 'webhook-gpt-queue',\n CHAT_GPT = 'chat-gpt-text',\n // EMAIL_WITH_SUMMARY = 'email-gptSummary-table',\n OBJECT_CHANGE_QUEUE = 'objectChange-queue',\n FOREX_FUNCTION_CALL = 'forex-function-call',\n TIMER_TICK_QUEUE = 'timerTick-queue',\n DISCORD_MESSAGES = 'discord-messages',\n // KANBAN_QUEUE = 'kanban-queue',\n}\n\nexport const generator = () => ({\n schemas: [CanvasBoardType, FunctionTrigger],\n types: Object.values(PresetName).map((name) => ({ typename: name })),\n items: [\n [\n PresetName.DXOS_TEAM,\n async (space, n, cb) => {\n const objects = range(n, () => {\n const tag = space.db.add(Tag.make({ label: 'Investor' }));\n const tagDxn = Obj.getDXN(tag).toString();\n\n const org = space.db.add(Obj.make(DataType.Organization, { name: 'DXOS', website: 'https://dxos.org' }));\n\n const doc = space.db.add(\n Markdown.makeDocument({\n name: 'DXOS Research',\n content: 'DXOS builds Composer, an open-source AI-powered malleable application.',\n }),\n );\n Obj.getMeta(doc).tags = [tagDxn];\n // space.db.add(\n // Relation.make(ResearchOn, {\n // [Relation.Source]: doc,\n // [Relation.Target]: org,\n // completedAt: new Date().toISOString(),\n // }),\n // );\n\n space.db.add(\n Obj.make(DataType.Person, { fullName: 'Rich', organization: Ref.make(org) }, { tags: [tagDxn] }),\n );\n space.db.add(Obj.make(DataType.Person, { fullName: 'Josiah', organization: Ref.make(org) }));\n space.db.add(Obj.make(DataType.Person, { fullName: 'Dima', organization: Ref.make(org) }));\n space.db.add(Obj.make(DataType.Person, { fullName: 'Mykola', organization: Ref.make(org) }));\n space.db.add(Obj.make(DataType.Person, { fullName: 'Will', organization: Ref.make(org) }));\n\n return doc;\n });\n cb?.(objects);\n return objects;\n },\n ],\n [\n PresetName.ORG_RESEARCH_PROJECT,\n async (space, n, cb) => {\n const mailbox = await space.db.query(Filter.type(Mailbox.Mailbox)).first();\n const tag = await space.db.query(Filter.type(Tag.Tag, { label: 'Investor' })).first();\n const tagDxn = Obj.getDXN(tag).toString();\n\n const objects = range(n, () => {\n const contactsQuery = Query.select(Filter.type(DataType.Person)).select(Filter.tag(tagDxn));\n const organizationsQuery = Query.select(Filter.type(DataType.Organization)).select(Filter.tag(tagDxn));\n const notesQuery = Query.select(Filter.type(Markdown.Document)).select(Filter.tag(tagDxn));\n\n const emailSyncTrigger = Obj.make(FunctionTrigger, {\n enabled: true,\n spec: {\n kind: 'timer',\n cron: '* * * * *', // Every minute.\n },\n function: Ref.make(serializeFunction(sync)),\n input: {\n mailboxId: Obj.getDXN(mailbox).toString(),\n },\n });\n space.db.add(emailSyncTrigger);\n\n const contactExtractionTrigger = Obj.make(FunctionTrigger, {\n enabled: true,\n // TODO(wittjosiah): Queue trigger doesn't support matching query of the column.\n spec: {\n kind: 'queue',\n queue: mailbox.queue.dxn.toString(),\n },\n function: Ref.make(serializeFunction(entityExtraction)),\n input: {\n source: '{{event.item}}',\n },\n });\n space.db.add(contactExtractionTrigger);\n\n const researchPrompt = space.db.add(\n Prompt.make({\n name: 'Research',\n description: 'Research organization',\n input: Schema.Struct({\n org: Schema.Any,\n }),\n output: Schema.Any,\n\n // TODO(dmaretskyi): This mocks research (returns pre-baked result), the actual research might take compute minutes.\n // Remove the mock prompt to do the actual research.\n instructions:\n 'Research the organization provided as input. Create a research note for it at the end. NOTE: Do mocked reseach (set mockSearch to true).',\n blueprints: [Ref.make(RESEARCH_BLUEPRINT)],\n }),\n );\n\n const researchTrigger = Obj.make(FunctionTrigger, {\n enabled: true,\n spec: {\n kind: 'subscription',\n query: {\n ast: organizationsQuery.ast,\n },\n },\n function: Ref.make(serializeFunction(agent)),\n input: {\n prompt: Ref.make(researchPrompt),\n input: '{{event.subject}}',\n },\n });\n space.db.add(researchTrigger);\n\n const mailboxView = createView({\n name: 'Mailbox',\n query: Query.select(\n Filter.type(DataType.Message, { properties: { labels: Filter.contains('investor') } }),\n ).options({\n queues: [mailbox.queue.dxn.toString()],\n }),\n jsonSchema: Type.toJsonSchema(DataType.Message),\n presentation: Obj.make(DataType.Collection, { objects: [] }),\n });\n const contactsView = createView({\n name: 'Contacts',\n query: contactsQuery,\n jsonSchema: Type.toJsonSchema(DataType.Person),\n presentation: Obj.make(DataType.Collection, { objects: [] }),\n });\n const organizationsView = createView({\n name: 'Organizations',\n query: organizationsQuery,\n jsonSchema: Type.toJsonSchema(DataType.Organization),\n presentation: Obj.make(DataType.Collection, { objects: [] }),\n });\n const notesView = createView({\n name: 'Notes',\n query: notesQuery,\n jsonSchema: Type.toJsonSchema(Markdown.Document),\n presentation: Obj.make(DataType.Collection, { objects: [] }),\n });\n\n return space.db.add(\n DataType.makeProject({\n name: 'Investor Research',\n collections: [mailboxView, contactsView, organizationsView, notesView].map((view) => Ref.make(view)),\n }),\n );\n });\n cb?.(objects.flat());\n return objects.flat();\n },\n ],\n [\n PresetName.GPT_QUEUE,\n async (space, n, cb) => {\n const objects = range(n, () => {\n const canvasModel = CanvasGraphModel.create<ComputeShape>();\n\n let functionTrigger: FunctionTrigger | undefined;\n canvasModel.builder.call((builder) => {\n const gpt = canvasModel.createNode(createGpt(position({ x: 0, y: -14 })));\n const triggerShape = createTrigger({\n spaceId: space.id,\n triggerKind: 'webhook',\n ...position({ x: -18, y: -2 }),\n });\n const trigger = canvasModel.createNode(triggerShape);\n const text = canvasModel.createNode(createText(position({ x: 19, y: 3, width: 10, height: 10 })));\n const { queueId } = setupQueue(space, canvasModel);\n const append = canvasModel.createNode(createAppend(position({ x: 10, y: 6 })));\n\n builder\n .createEdge({ source: trigger.id, target: gpt.id, input: 'prompt', output: 'bodyText' })\n .createEdge({ source: gpt.id, target: text.id, output: 'text' })\n .createEdge({ source: queueId.id, target: append.id, input: 'id' })\n .createEdge({ source: gpt.id, target: append.id, output: 'messages', input: 'items' });\n\n functionTrigger = triggerShape.functionTrigger!.target!;\n });\n\n const computeModel = createComputeGraph(canvasModel);\n\n attachTrigger(functionTrigger, computeModel);\n\n return addToSpace(PresetName.GPT_QUEUE, space, canvasModel, computeModel);\n });\n cb?.(objects);\n return objects;\n },\n ],\n\n [\n PresetName.OBJECT_CHANGE_QUEUE,\n async (space, n, cb) => {\n const objects = range(n, () => {\n const { canvasModel, computeModel } = createQueueSinkPreset(\n space,\n 'subscription',\n (triggerSpec) =>\n (triggerSpec.query = {\n ast: Query.select(Filter.typename('dxos.org/type/Chess')).ast,\n }),\n 'type',\n );\n return addToSpace(PresetName.OBJECT_CHANGE_QUEUE, space, canvasModel, computeModel);\n });\n cb?.(objects);\n return objects;\n },\n ],\n\n [\n PresetName.TIMER_TICK_QUEUE,\n async (space, n, cb) => {\n const objects = range(n, () => {\n const { canvasModel, computeModel } = createQueueSinkPreset(\n space,\n 'timer',\n (triggerSpec) => (triggerSpec.cron = '*/5 * * * * *'),\n 'result',\n );\n return addToSpace(PresetName.TIMER_TICK_QUEUE, space, canvasModel, computeModel);\n });\n cb?.(objects);\n return objects;\n },\n ],\n\n // TODO(wittjosiah): Remove?\n // [\n // PresetName.EMAIL_TABLE,\n // async (space, n, cb) => {\n // const objects = range(n, () => {\n // const canvasModel = CanvasGraphModel.create<ComputeShape>();\n\n // const results = space.db.query(Filter.type(TableType)).runSync();\n // const emailTable = results.find((r) => r.object?.view?.target?.query?.typename?.endsWith('Email'));\n // invariant(emailTable, 'Email table not found.');\n\n // const template = canvasModel.createNode(\n // createTemplate({\n // valueType: 'object',\n // ...rawPosition({ centerX: -80, centerY: -64, width: 320, height: 320 }),\n // }),\n // );\n // const templateContent = ['{'];\n\n // let functionTrigger: FunctionTrigger | undefined;\n // canvasModel.builder.call((builder) => {\n // const triggerShape = createTrigger({\n // spaceId: space.id,\n // triggerKind: 'email',\n // ...position({ x: -18, y: -2 }),\n // });\n // const trigger = canvasModel.createNode(triggerShape);\n\n // const tableId = canvasModel.createNode(\n // createConstant({\n // value: DXN.fromLocalObjectId(emailTable.id).toString(),\n // ...position({ x: -18, y: 5, width: 8, height: 6 }),\n // }),\n // );\n\n // const appendToTable = canvasModel.createNode(createAppend(position({ x: 10, y: 6 })));\n\n // const properties = SchemaAST.getPropertySignatures(EmailTriggerOutput.ast);\n // for (let i = 0; i < properties.length; i++) {\n // const propName = properties[i].name.toString();\n // builder.createEdge({ source: trigger.id, target: template.id, input: propName, output: propName });\n // templateContent.push(` \"${propName}\": \"{{${propName}}}\"` + (i === properties.length - 1 ? '' : ','));\n // }\n // templateContent.push('}');\n\n // builder\n // .createEdge({ source: tableId.id, target: appendToTable.id, input: 'id' })\n // .createEdge({ source: template.id, target: appendToTable.id, input: 'items' });\n\n // functionTrigger = triggerShape.functionTrigger!.target!;\n // });\n\n // const computeModel = createComputeGraph(canvasModel);\n\n // const templateComputeNode = computeModel.nodes.find((n) => n.id === template.node);\n // invariant(templateComputeNode, 'Template compute node was not created.');\n // templateComputeNode.value = templateContent.join('\\n');\n // templateComputeNode.inputSchema = Type.toJsonSchema(EmailTriggerOutput);\n\n // attachTrigger(functionTrigger, computeModel);\n\n // return addToSpace(PresetName.EMAIL_TABLE, space, canvasModel, computeModel);\n // });\n // cb?.(objects);\n // return objects;\n // },\n // ],\n\n [\n PresetName.CHAT_GPT,\n async (space, n, cb) => {\n const objects = range(n, () => {\n const canvasModel = CanvasGraphModel.create<ComputeShape>();\n\n canvasModel.builder.call((builder) => {\n const gpt = canvasModel.createNode(createGpt(position({ x: 0, y: -14 })));\n const chat = canvasModel.createNode(createChat(position({ x: -18, y: -2 })));\n const text = canvasModel.createNode(createText(position({ x: 19, y: 3, width: 10, height: 10 })));\n const { queueId } = setupQueue(space, canvasModel);\n\n const append = canvasModel.createNode(createAppend(position({ x: 10, y: 6 })));\n\n builder\n .createEdge({ source: chat.id, target: gpt.id, input: 'prompt' })\n .createEdge({ source: gpt.id, target: text.id, output: 'text' })\n .createEdge({ source: queueId.id, target: append.id, input: 'id' })\n .createEdge({ source: gpt.id, target: append.id, output: 'messages', input: 'items' });\n });\n\n const computeModel = createComputeGraph(canvasModel);\n\n return addToSpace(PresetName.CHAT_GPT, space, canvasModel, computeModel);\n });\n cb?.(objects);\n return objects;\n },\n ],\n\n // TODO(wittjosiah): Remove?\n // [\n // PresetName.EMAIL_WITH_SUMMARY,\n // async (space, n, cb) => {\n // const objects = range(n, () => {\n // const canvasModel = CanvasGraphModel.create<ComputeShape>();\n\n // const results = space.db.query(Filter.type(TableType)).runSync();\n // const emailTable = results.find((r) => r.object?.view?.target?.query?.typename?.endsWith('Email'));\n // invariant(emailTable, 'Email table not found.');\n\n // const template = canvasModel.createNode(\n // createTemplate({\n // valueType: 'object',\n // ...rawPosition({ centerX: 192, centerY: -176, width: 320, height: 320 }),\n // }),\n // );\n // const templateContent = ['{'];\n\n // let functionTrigger: FunctionTrigger | undefined;\n // canvasModel.builder.call((builder) => {\n // const gpt = canvasModel.createNode(\n // createGpt(rawPosition({ centerX: -400, centerY: -112, width: 256, height: 202 })),\n // );\n // const systemPrompt = canvasModel.createNode(\n // createConstant({\n // value: \"use one word to describe content category. don't write anything else\",\n // ...rawPosition({ centerX: -800, centerY: -160, width: 192, height: 128 }),\n // }),\n // );\n // const triggerShape = createTrigger({\n // spaceId: space.id,\n // triggerKind: 'email',\n // ...rawPosition({ centerX: -736, centerY: -384, width: 182, height: 192 }),\n // });\n // const trigger = canvasModel.createNode(triggerShape);\n\n // const { queueId } = setupQueue(space, canvasModel, {\n // idPosition: { centerX: -720, centerY: 224, width: 192, height: 256 },\n // queuePosition: { centerX: -144, centerY: 416, width: 320, height: 448 },\n // });\n // const appendToQueue = canvasModel.createNode(\n // createAppend(rawPosition({ centerX: -80, centerY: 96, width: 122, height: 128 })),\n // );\n\n // const tableId = canvasModel.createNode(\n // createConstant({\n // value: DXN.fromLocalObjectId(emailTable.id).toString(),\n // ...rawPosition({ centerX: -112, centerY: -544, width: 192, height: 256 }),\n // }),\n // );\n\n // const appendToTable = canvasModel.createNode(\n // createAppend(rawPosition({ centerX: 560, centerY: -416, width: 128, height: 122 })),\n // );\n\n // templateContent.push(' \"category\": \"{{text}}\",');\n // builder.createEdge({ source: gpt.id, target: template.id, input: 'text', output: 'text' });\n\n // const properties = SchemaAST.getPropertySignatures(EmailTriggerOutput.ast);\n // for (let i = 0; i < properties.length; i++) {\n // const propName = properties[i].name.toString();\n // builder.createEdge({ source: trigger.id, target: template.id, input: propName, output: propName });\n // templateContent.push(` \"${propName}\": \"{{${propName}}}\"` + (i === properties.length - 1 ? '' : ','));\n // }\n // templateContent.push('}');\n\n // builder\n // .createEdge({ source: tableId.id, target: appendToTable.id, input: 'id' })\n // .createEdge({ source: queueId.id, target: appendToQueue.id, input: 'id' })\n // .createEdge({ source: gpt.id, target: appendToQueue.id, output: 'messages', input: 'items' })\n // .createEdge({ source: systemPrompt.id, target: gpt.id, input: 'systemPrompt' })\n // .createEdge({ source: trigger.id, target: gpt.id, input: 'prompt', output: 'body' })\n // .createEdge({ source: template.id, target: appendToTable.id, input: 'items' });\n\n // functionTrigger = triggerShape.functionTrigger!.target!;\n // });\n\n // const computeModel = createComputeGraph(canvasModel);\n\n // const templateComputeNode = computeModel.nodes.find((n) => n.id === template.node);\n // invariant(templateComputeNode, 'Template compute node was not created.');\n // templateComputeNode.value = templateContent.join('\\n');\n // const extendedSchema = Schema.extend(EmailTriggerOutput, Schema.Struct({ text: Schema.String }));\n // templateComputeNode.inputSchema = Type.toJsonSchema(extendedSchema);\n\n // attachTrigger(functionTrigger, computeModel);\n\n // return addToSpace(PresetName.EMAIL_WITH_SUMMARY, space, canvasModel, computeModel);\n // });\n // cb?.(objects);\n // return objects;\n // },\n // ],\n\n [\n PresetName.FOREX_FUNCTION_CALL,\n async (space, n, cb) => {\n const objects = range(n, () => {\n const canvasModel = CanvasGraphModel.create<ComputeShape>();\n\n canvasModel.builder.call((builder) => {\n const sourceCurrency = canvasModel.createNode(\n createConstant({ value: 'USD', ...position({ x: -10, y: -5 }) }),\n );\n const targetCurrency = canvasModel.createNode(\n createConstant({ value: 'EUR', ...position({ x: -10, y: 5 }) }),\n );\n const converter = canvasModel.createNode(createFunction(position({ x: 0, y: 0 })));\n const view = canvasModel.createNode(createSurface(position({ x: 12, y: 0 })));\n\n builder\n .createEdge({ source: sourceCurrency.id, target: converter.id, input: 'from' })\n .createEdge({ source: targetCurrency.id, target: converter.id, input: 'to' })\n .createEdge({ source: converter.id, target: view.id, output: 'rate' });\n });\n\n const computeModel = createComputeGraph(canvasModel);\n\n return addToSpace(PresetName.FOREX_FUNCTION_CALL, space, canvasModel, computeModel);\n });\n cb?.(objects);\n return objects;\n },\n ],\n\n [\n PresetName.DISCORD_MESSAGES,\n async (space, n, cb) => {\n const objects = range(n, () => {\n const canvasModel = CanvasGraphModel.create<ComputeShape>();\n\n let functionTrigger: FunctionTrigger | undefined;\n canvasModel.builder.call((builder) => {\n const triggerShape = createTrigger({\n spaceId: space.id,\n triggerKind: 'timer',\n ...position({ x: -10, y: -5 }),\n });\n const trigger = canvasModel.createNode(triggerShape);\n // DXOS dev-null channel.\n const channelId = canvasModel.createNode(\n createConstant({ value: '1088569858767212554', ...position({ x: -10, y: 0 }) }),\n );\n const queueId = canvasModel.createNode(\n createConstant({\n value: new DXN(DXN.kind.QUEUE, ['data', space.id, Key.ObjectId.random()]).toString(),\n ...position({ x: -10, y: 5 }),\n }),\n );\n const converter = canvasModel.createNode(createFunction(position({ x: 0, y: 0 })));\n const view = canvasModel.createNode(createText(position({ x: 12, y: 0 })));\n const queue = canvasModel.createNode(createQueue(position({ x: 0, y: 12 })));\n\n builder\n .createEdge({ source: trigger.id, target: converter.id, input: 'tick' })\n .createEdge({ source: channelId.id, target: converter.id, input: 'channelId' })\n .createEdge({ source: queueId.id, target: converter.id, input: 'queueId' })\n .createEdge({ source: converter.id, target: view.id, output: 'newMessages' })\n .createEdge({ source: queueId.id, target: queue.id, input: 'input' });\n\n functionTrigger = triggerShape.functionTrigger!.target!;\n });\n\n const computeModel = createComputeGraph(canvasModel);\n attachTrigger(functionTrigger, computeModel);\n\n return addToSpace(PresetName.DISCORD_MESSAGES, space, canvasModel, computeModel);\n });\n cb?.(objects);\n return objects;\n },\n ],\n\n // TODO(wittjosiah): Remove?\n // [\n // PresetName.KANBAN_QUEUE,\n // async (space, n, cb) => {\n // const objects = range(n, () => {\n // const canvasModel = CanvasGraphModel.create<ComputeShape>();\n\n // // TODO(wittjosiah): Integrate directly w/ Kanban.\n // // const results = space.db.query(Filter.type(KanbanType)).runSync();\n // // const kanban = results.find((r) => r.object?.cardView?.target?.query?.type?.endsWith('Message'));\n // // invariant(kanban, 'Kanban not found.');\n\n // const results = space.db.query(Filter.type(TableType)).runSync();\n // const messages = results.find((r) => r.object?.view?.target?.query?.typename?.endsWith('Message'));\n // invariant(messages, 'Table not found.');\n\n // let functionTrigger: FunctionTrigger | undefined;\n // canvasModel.builder.call((builder) => {\n // const triggerShape = createTrigger({\n // spaceId: space.id,\n // triggerKind: 'queue',\n // ...position({ x: -10, y: -5 }),\n // });\n // const trigger = canvasModel.createNode(triggerShape);\n\n // const tableId = canvasModel.createNode(\n // createConstant({\n // value: DXN.fromLocalObjectId(messages.id).toString(),\n // ...position({ x: -10, y: 5 }),\n // }),\n // );\n // const appendToTable = canvasModel.createNode(createAppend(position({ x: 10, y: 0 })));\n\n // builder\n // .createEdge({ source: tableId.id, target: appendToTable.id, input: 'id' })\n // .createEdge({ source: trigger.id, target: appendToTable.id, input: 'items', output: 'item' });\n\n // functionTrigger = triggerShape.functionTrigger!.target!;\n // });\n\n // const computeModel = createComputeGraph(canvasModel);\n // attachTrigger(functionTrigger, computeModel);\n\n // return addToSpace(PresetName.KANBAN_QUEUE, space, canvasModel, computeModel);\n // });\n // cb?.(objects);\n // return objects;\n // },\n // ],\n ] as [PresetName, ObjectGenerator<any>][],\n});\n\nconst createQueueSinkPreset = <SpecType extends TriggerKind>(\n space: Space,\n triggerKind: SpecType,\n initSpec: (spec: Extract<TriggerType, { kind: SpecType }>) => void,\n triggerOutputName: string,\n) => {\n const canvasModel = CanvasGraphModel.create<ComputeShape>();\n\n const template = canvasModel.createNode(\n createTemplate({\n valueType: 'object',\n ...rawPosition({ centerX: -64, centerY: -79, width: 320, height: 320 }),\n }),\n );\n\n let functionTrigger: FunctionTrigger | undefined;\n canvasModel.builder.call((builder) => {\n const triggerShape = createTrigger({\n spaceId: space.id,\n triggerKind,\n ...rawPosition({ centerX: -578, centerY: -187, height: 320, width: 320 }),\n });\n const trigger = canvasModel.createNode(triggerShape);\n const { queueId } = setupQueue(space, canvasModel, {\n queuePosition: { centerX: -80, centerY: 378, width: 320, height: 448 },\n });\n const append = canvasModel.createNode(\n createAppend(rawPosition({ centerX: 320, centerY: 192, width: 128, height: 122 })),\n );\n const random = canvasModel.createNode(\n createRandom(rawPosition({ centerX: -509, centerY: -30, width: 64, height: 64 })),\n );\n\n builder\n .createEdge({ source: queueId.id, target: append.id, input: 'id' })\n .createEdge({ source: template.id, target: append.id, input: 'items' })\n .createEdge({ source: trigger.id, target: template.id, output: triggerOutputName, input: 'type' })\n .createEdge({\n source: random.id,\n target: template.id,\n input: 'changeId',\n });\n\n functionTrigger = triggerShape.functionTrigger!.target!;\n const triggerSpec = functionTrigger.spec;\n invariant(triggerSpec && triggerSpec.kind === triggerKind, 'No trigger spec.');\n initSpec(triggerSpec as any);\n });\n\n const computeModel = createComputeGraph(canvasModel);\n\n const templateComputeNode = computeModel.nodes.find((n) => n.id === template.node);\n invariant(templateComputeNode, 'Template compute node was not created.');\n templateComputeNode.value = ['{', ' \"@type\": \"{{type}}\",', ' \"id\": \"@{{changeId}}\"', '}'].join('\\n');\n templateComputeNode.inputSchema = Type.toJsonSchema(Schema.Struct({ type: Schema.String, changeId: Schema.String }));\n attachTrigger(functionTrigger, computeModel);\n\n return { canvasModel, computeModel };\n};\n\nconst addToSpace = (name: string, space: Space, canvas: CanvasGraphModel, compute: ComputeGraphModel) => {\n return space.db.add(\n Obj.make(CanvasBoardType, {\n name,\n computeGraph: Ref.make(compute.root),\n layout: canvas.graph,\n }),\n );\n};\n\nconst setupQueue = (\n space: Space,\n canvasModel: CanvasGraphModel,\n args?: { idPosition?: RawPositionInput; queuePosition?: RawPositionInput },\n) => {\n const queueId = canvasModel.createNode(\n createConstant({\n value: new DXN(DXN.kind.QUEUE, ['data', space.id, Key.ObjectId.random()]).toString(),\n ...(args?.idPosition ? rawPosition(args.idPosition) : position({ x: -18, y: 5, width: 8, height: 6 })),\n }),\n );\n const queue = canvasModel.createNode(\n createQueue(\n args?.queuePosition ? rawPosition(args.queuePosition) : position({ x: -3, y: 3, width: 14, height: 10 }),\n ),\n );\n canvasModel.createEdge({ source: queueId.id, target: queue.id });\n return { queue, queueId };\n};\n\nconst attachTrigger = (functionTrigger: FunctionTrigger | undefined, computeModel: ComputeGraphModel) => {\n invariant(functionTrigger);\n functionTrigger.function = Ref.make(computeModel.root);\n const inputNode = computeModel.nodes.find((node) => node.type === NODE_INPUT)!;\n functionTrigger.inputNodeId = inputNode.id;\n};\n\ntype RawPositionInput = { centerX: number; centerY: number; width: number; height: number };\n\nconst rawPosition = (args: RawPositionInput) => {\n return { center: { x: args.centerX, y: args.centerY }, size: { width: args.width, height: args.height } };\n};\n\nconst position = (rect: { x: number; y: number; width?: number; height?: number }) => {\n const snap = 32;\n const [center, size] = rectToPoints({ width: 0, height: 0, ...rect });\n const { x, y, width, height } = pointsToRect([pointMultiply(center, snap), pointMultiply(size, snap)]);\n if (width && height) {\n return { center: { x, y }, size: width && height ? { width, height } : undefined };\n } else {\n return { center: { x, y } };\n }\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { IconButton } from '@dxos/react-ui';\n\nexport type SchemaTableProps = {\n types: any[];\n objects?: Record<string, number | undefined>;\n label: string;\n onClick: (typename: string) => void;\n};\n\nexport const SchemaTable = ({ types, objects = {}, label, onClick }: SchemaTableProps) => {\n return (\n <div className='grid grid-cols-[1fr_80px_40px] gap-1 overflow-none'>\n <h2 className='p-2'>{label}</h2>\n {types.map((type) => (\n <div key={type.typename} className='grid grid-cols-subgrid col-span-3 items-center'>\n <div className='px-2 text-sm font-mono text-subdued'>{type.typename}</div>\n <div className='px-2 text-right font-mono'>{objects[type.typename] ?? 0}</div>\n <IconButton\n variant='ghost'\n icon='ph--plus--regular'\n iconOnly\n label='Create data'\n onClick={() => onClick(type.typename)}\n />\n </div>\n ))}\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SpaceGenerator } from './SpaceGenerator';\n\nexport default SpaceGenerator;\n"],
|
|
5
|
-
"mappings": ";;AAIA,OAAOA,UAASC,aAAaC,SAASC,gBAAgB;AAEtD,SAASC,2BAA2B;AACpC,SAASC,gBAAAA,qBAAoB;AAC7B,SAASC,UAAAA,eAAwB;AACjC,SAASC,YAAAA,iBAAgB;AACzB,SAASC,aAAAA,kBAAiB;AAC1B,SAASC,eAAAA,oBAAmB;AAC5B,SAASC,iBAAiB;AAC1B,SAAqBC,mBAAmB;AACxC,SAASC,cAAAA,aAAYC,OAAOC,SAASC,sBAAsB;AAC3D,SAASC,yBAAyB;AAClC,SAASC,YAAAA,iBAAgB;AACzB,SAASC,iBAAiBC,gBAAgB;;;ACb1C,SAAuCC,oBAAoB;AAC3D,SAASC,2BAA2B;AACpC,SA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AA;MAAYC,OAAO3E;MAAagC,SAASxB,KAAKwB;MAAS2B,OAAM;MAAeC,SAASf;QACtF,gBAAAI,OAAA,cAACyB,aAAAA;MAAYC,OAAOjE,QAAQiE;MAAO3C,SAASxB,KAAKwB;MAAS2B,OAAM;MAAUC,SAASf;QAEnF,gBAAAI,OAAA,cAACC,OAAAA,MACC,gBAAAD,OAAA,cAAC2B,mBAAAA;MAAkBC,UAAS;MAAOtB,YAAW;OAC3CuB,KAAKC,UAAU;MAAE5F;MAAO,GAAGqB;IAAK,GAAGwE,gBAAgB;MAAEC,UAAU;IAAK,CAAA,GAAI,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMrF;;;AInHA,IAAA,yBAAeC;",
|
|
6
|
-
"names": ["React", "useCallback", "useMemo", "useState", "useIntentDispatcher", "ComputeGraph", "Filter", "Markdown", "SheetType", "DiagramType", "useClient", "getTypename", "IconButton", "Input", "Toolbar", "useAsyncEffect", "SyntaxHighlighter", "DataType", "jsonKeyReplacer", "sortKeys", "createIntent", "addressToA1Notation", "ComputeGraph", "ComputeGraphModel", "DEFAULT_OUTPUT", "NODE_INPUT", "NODE_OUTPUT", "DXN", "Filter", "Key", "Obj", "Ref", "Type", "Markdown", "createSheet", "SheetType", "CanvasType", "DiagramType", "SpaceAction", "faker", "DataType", "getTypenameFromQuery", "createAsyncGenerator", "range", "generator", "faker", "findViewByTypename", "views", "typename", "find", "view", "getTypenameFromQuery", "query", "ast", "createGenerator", "client", "dispatch", "schema", "space", "n", "objects", "db", "Filter", "type", "DataType", "View", "run", "staticSchema", "graph", "schemaRegistry", "schemas", "Type", "getTypename", "createIntent", "SpaceAction", "AddSchema", "show", "UseStaticSchema", "generate", "createAsyncGenerator", "createObjects", "staticGenerators", "Map", "Markdown", "Document", "cb", "range", "map", "add", "makeDocument", "name", "commerce", "productName", "content", "lorem", "sentences", "DiagramType", "obj", "Obj", "make", "canvas", "Ref", "CanvasType", "SheetType", "cells", "year", "Date", "getFullYear", "cols", "rows", "col", "row", "cell", "addressToA1Notation", "value", "from", "to", "Math", "floor", "random", "createSheet", "ComputeGraph", "model", "ComputeGraphModel", "create", "builder", "createNode", "id", "NODE_INPUT", "DXN", "kind", "QUEUE", "Key", "ObjectId", "toString", "NODE_OUTPUT", "createEdge", "node", "property", "DEFAULT_OUTPUT", "root", "Schema", "RESEARCH_BLUEPRINT", "agent", "entityExtraction", "Prompt", "NODE_INPUT", "DXN", "Filter", "Key", "Obj", "Query", "Ref", "Tag", "Type", "FunctionTrigger", "serializeFunction", "invariant", "sync", "Mailbox", "Markdown", "createAppend", "createChat", "createComputeGraph", "createConstant", "createFunction", "createGpt", "createQueue", "createRandom", "createSurface", "createTemplate", "createText", "createTrigger", "CanvasBoardType", "CanvasGraphModel", "pointMultiply", "pointsToRect", "rectToPoints", "DataType", "createView", "range", "PresetName", "generator", "schemas", "types", "Object", "values", "map", "name", "typename", "items", "space", "n", "cb", "objects", "tag", "db", "add", "make", "label", "tagDxn", "getDXN", "toString", "org", "Organization", "website", "doc", "makeDocument", "content", "getMeta", "tags", "Person", "fullName", "organization", "mailbox", "query", "type", "first", "contactsQuery", "select", "organizationsQuery", "notesQuery", "Document", "emailSyncTrigger", "enabled", "spec", "kind", "cron", "function", "input", "mailboxId", "contactExtractionTrigger", "queue", "dxn", "source", "researchPrompt", "description", "Struct", "Any", "output", "instructions", "blueprints", "researchTrigger", "ast", "prompt", "mailboxView", "Message", "properties", "labels", "contains", "options", "queues", "jsonSchema", "toJsonSchema", "presentation", "Collection", "contactsView", "organizationsView", "notesView", "makeProject", "collections", "view", "flat", "canvasModel", "create", "functionTrigger", "builder", "call", "gpt", "createNode", "position", "x", "y", "triggerShape", "spaceId", "id", "triggerKind", "trigger", "text", "width", "height", "queueId", "setupQueue", "append", "createEdge", "target", "computeModel", "attachTrigger", "addToSpace", "createQueueSinkPreset", "triggerSpec", "chat", "sourceCurrency", "value", "targetCurrency", "converter", "channelId", "QUEUE", "ObjectId", "random", "initSpec", "triggerOutputName", "template", "valueType", "rawPosition", "centerX", "centerY", "queuePosition", "templateComputeNode", "nodes", "find", "node", "join", "inputSchema", "String", "changeId", "canvas", "compute", "computeGraph", "root", "layout", "graph", "args", "idPosition", "inputNode", "inputNodeId", "center", "size", "rect", "snap", "undefined", "React", "IconButton", "SchemaTable", "types", "objects", "label", "onClick", "div", "className", "h2", "map", "type", "key", "typename", "IconButton", "variant", "icon", "iconOnly", "SpaceGenerator", "space", "onCreateObjects", "dispatchPromise", "dispatch", "useIntentDispatcher", "client", "useClient", "staticTypes", "Markdown", "Document", "DiagramType", "SheetType", "ComputeGraph", "recordTypes", "DataType", "Organization", "Person", "Task", "count", "setCount", "useState", "info", "setInfo", "presets", "useMemo", "generator", "typeMap", "addTypes", "schemas", "recordGenerators", "Map", "map", "type", "typename", "createGenerator", "staticGenerators", "items", "updateInfo", "echoSchema", "db", "schemaRegistry", "query", "run", "staticSchema", "graph", "objects", "Filter", "everything", "objectMap", "sortKeys", "reduce", "obj", "getTypename", "schema", "static", "length", "mutable", "useAsyncEffect", "handleCreateData", "useCallback", "constructor", "get", "React", "div", "role", "className", "Toolbar", "Root", "classNames", "IconButton", "icon", "iconOnly", "label", "onClick", "Separator", "variant", "Input", "TextInput", "min", "max", "placeholder", "size", "value", "onChange", "ev", "parseInt", "target", "SchemaTable", "types", "SyntaxHighlighter", "language", "JSON", "stringify", "jsonKeyReplacer", "truncate", "SpaceGenerator"]
|
|
7
|
-
}
|