@dxos/plugin-conductor 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
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/README.md +7 -3
- package/dist/lib/browser/index.mjs +62 -35
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +62 -34
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/ConductorPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CanvasContainer/CanvasContainer.d.ts +6 -0
- package/dist/types/src/containers/CanvasContainer/CanvasContainer.d.ts.map +1 -0
- package/dist/types/src/containers/CanvasContainer/index.d.ts +3 -0
- package/dist/types/src/containers/CanvasContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +14 -13
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -30
- package/src/ConductorPlugin.tsx +27 -14
- package/src/capabilities/index.ts +3 -1
- package/src/capabilities/react-surface.tsx +29 -0
- package/src/components/index.ts +1 -3
- package/src/{components → containers/CanvasContainer}/CanvasContainer.tsx +16 -11
- package/src/containers/CanvasContainer/index.ts +7 -0
- package/src/containers/index.ts +7 -0
- package/src/meta.ts +1 -1
- package/src/translations.ts +14 -13
- package/dist/lib/browser/chunk-GV4DJFU6.mjs +0 -24
- package/dist/lib/browser/chunk-GV4DJFU6.mjs.map +0 -7
- package/dist/lib/browser/react-surface-R7NR323I.mjs +0 -108
- package/dist/lib/browser/react-surface-R7NR323I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DILME6SD.mjs +0 -26
- package/dist/lib/node-esm/chunk-DILME6SD.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-4MQHAW46.mjs +0 -109
- package/dist/lib/node-esm/react-surface-4MQHAW46.mjs.map +0 -7
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/components/CanvasContainer.d.ts +0 -7
- package/dist/types/src/components/CanvasContainer.d.ts.map +0 -1
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-conductor",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.bcb3aa67d6",
|
|
4
4
|
"description": "Composer plugin for conductor.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,11 +12,18 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
17
|
+
"#components": "./src/components/index.ts",
|
|
18
|
+
"#containers": "./src/containers/index.ts",
|
|
19
|
+
"#meta": "./src/meta.ts",
|
|
20
|
+
"#types": "./src/types/index.ts"
|
|
21
|
+
},
|
|
15
22
|
"exports": {
|
|
16
23
|
".": {
|
|
24
|
+
"source": "./src/index.ts",
|
|
17
25
|
"browser": "./dist/lib/browser/index.mjs",
|
|
18
26
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
-
"source": "./src/index.ts",
|
|
20
27
|
"types": "./dist/types/src/index.d.ts"
|
|
21
28
|
}
|
|
22
29
|
},
|
|
@@ -26,44 +33,45 @@
|
|
|
26
33
|
"src"
|
|
27
34
|
],
|
|
28
35
|
"dependencies": {
|
|
29
|
-
"effect": "3.
|
|
30
|
-
"@dxos/ai": "0.8.4-main.
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/debug": "0.8.4-main.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
44
|
-
"@dxos/react-client": "0.8.4-main.
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/react-ui-canvas-compute": "0.8.4-main.
|
|
47
|
-
"@dxos/react-ui-canvas-editor": "0.8.4-main.
|
|
48
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.
|
|
49
|
-
"@dxos/
|
|
36
|
+
"effect": "3.20.0",
|
|
37
|
+
"@dxos/ai": "0.8.4-main.bcb3aa67d6",
|
|
38
|
+
"@dxos/app-toolkit": "0.8.4-main.bcb3aa67d6",
|
|
39
|
+
"@dxos/app-framework": "0.8.4-main.bcb3aa67d6",
|
|
40
|
+
"@dxos/assistant": "0.8.4-main.bcb3aa67d6",
|
|
41
|
+
"@dxos/conductor": "0.8.4-main.bcb3aa67d6",
|
|
42
|
+
"@dxos/echo": "0.8.4-main.bcb3aa67d6",
|
|
43
|
+
"@dxos/debug": "0.8.4-main.bcb3aa67d6",
|
|
44
|
+
"@dxos/edge-client": "0.8.4-main.bcb3aa67d6",
|
|
45
|
+
"@dxos/log": "0.8.4-main.bcb3aa67d6",
|
|
46
|
+
"@dxos/functions-runtime": "0.8.4-main.bcb3aa67d6",
|
|
47
|
+
"@dxos/operation": "0.8.4-main.bcb3aa67d6",
|
|
48
|
+
"@dxos/plugin-automation": "0.8.4-main.bcb3aa67d6",
|
|
49
|
+
"@dxos/functions": "0.8.4-main.bcb3aa67d6",
|
|
50
|
+
"@dxos/plugin-space": "0.8.4-main.bcb3aa67d6",
|
|
51
|
+
"@dxos/react-client": "0.8.4-main.bcb3aa67d6",
|
|
52
|
+
"@dxos/plugin-client": "0.8.4-main.bcb3aa67d6",
|
|
53
|
+
"@dxos/react-ui-canvas-compute": "0.8.4-main.bcb3aa67d6",
|
|
54
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.bcb3aa67d6",
|
|
55
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.bcb3aa67d6",
|
|
56
|
+
"@dxos/react-ui-stack": "0.8.4-main.bcb3aa67d6",
|
|
57
|
+
"@dxos/util": "0.8.4-main.bcb3aa67d6"
|
|
50
58
|
},
|
|
51
59
|
"devDependencies": {
|
|
52
60
|
"@types/react": "~19.2.7",
|
|
53
61
|
"@types/react-dom": "~19.2.3",
|
|
54
62
|
"react": "~19.2.3",
|
|
55
63
|
"react-dom": "~19.2.3",
|
|
56
|
-
"vite": "7.1.
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
64
|
+
"vite": "^7.1.11",
|
|
65
|
+
"@dxos/react-ui": "0.8.4-main.bcb3aa67d6",
|
|
66
|
+
"@dxos/storybook-utils": "0.8.4-main.bcb3aa67d6",
|
|
67
|
+
"@dxos/ui-theme": "0.8.4-main.bcb3aa67d6"
|
|
60
68
|
},
|
|
61
69
|
"peerDependencies": {
|
|
62
|
-
"effect": "3.
|
|
70
|
+
"effect": "3.20.0",
|
|
63
71
|
"react": "~19.2.3",
|
|
64
72
|
"react-dom": "~19.2.3",
|
|
65
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
66
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
73
|
+
"@dxos/react-ui": "0.8.4-main.bcb3aa67d6",
|
|
74
|
+
"@dxos/ui-theme": "0.8.4-main.bcb3aa67d6"
|
|
67
75
|
},
|
|
68
76
|
"publishConfig": {
|
|
69
77
|
"access": "public"
|
package/src/ConductorPlugin.tsx
CHANGED
|
@@ -3,31 +3,44 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import { Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Annotation } from '@dxos/echo';
|
|
8
11
|
import { ComputeGraph } from '@dxos/conductor';
|
|
9
|
-
import {
|
|
12
|
+
import { Operation } from '@dxos/operation';
|
|
10
13
|
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
11
|
-
import {
|
|
14
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
15
|
+
import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
12
16
|
|
|
13
|
-
import {
|
|
14
|
-
import { meta } from './meta';
|
|
17
|
+
import { meta } from '#meta';
|
|
15
18
|
import { translations } from './translations';
|
|
16
19
|
|
|
20
|
+
import { ReactSurface } from '#capabilities';
|
|
21
|
+
|
|
17
22
|
export const ConductorPlugin = Plugin.define(meta).pipe(
|
|
18
|
-
|
|
19
|
-
Common.Plugin.addMetadataModule({
|
|
23
|
+
AppPlugin.addMetadataModule({
|
|
20
24
|
metadata: {
|
|
21
|
-
id:
|
|
25
|
+
id: CanvasBoard.CanvasBoard.typename,
|
|
22
26
|
metadata: {
|
|
23
|
-
icon:
|
|
24
|
-
iconHue: '
|
|
25
|
-
createObject: ((props
|
|
26
|
-
|
|
27
|
+
icon: Annotation.IconAnnotation.get(CanvasBoard.CanvasBoard).pipe(Option.getOrThrow).icon,
|
|
28
|
+
iconHue: Annotation.IconAnnotation.get(CanvasBoard.CanvasBoard).pipe(Option.getOrThrow).hue ?? 'white',
|
|
29
|
+
createObject: ((props, options) =>
|
|
30
|
+
Effect.gen(function* () {
|
|
31
|
+
const object = CanvasBoard.make(props);
|
|
32
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
33
|
+
object,
|
|
34
|
+
target: options.target,
|
|
35
|
+
hidden: true,
|
|
36
|
+
targetNodeId: options.targetNodeId,
|
|
37
|
+
});
|
|
38
|
+
})) satisfies CreateObject,
|
|
27
39
|
},
|
|
28
40
|
},
|
|
29
41
|
}),
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
AppPlugin.addSchemaModule({ schema: [CanvasBoard.CanvasBoard, ComputeGraph] }),
|
|
43
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
44
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
32
45
|
Plugin.make,
|
|
33
46
|
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
12
|
+
|
|
13
|
+
import { CanvasContainer } from '#containers';
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
|
|
16
|
+
export default Capability.makeModule(() =>
|
|
17
|
+
Effect.succeed(
|
|
18
|
+
Capability.contributes(
|
|
19
|
+
Capabilities.ReactSurface,
|
|
20
|
+
Surface.create({
|
|
21
|
+
id: meta.id,
|
|
22
|
+
role: ['article', 'section'],
|
|
23
|
+
filter: (data): data is { subject: CanvasBoard.CanvasBoard } =>
|
|
24
|
+
Obj.instanceOf(CanvasBoard.CanvasBoard, data.subject),
|
|
25
|
+
component: ({ data, role }) => <CanvasContainer role={role} subject={data.subject} />,
|
|
26
|
+
}),
|
|
27
|
+
),
|
|
28
|
+
),
|
|
29
|
+
);
|
package/src/components/index.ts
CHANGED
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { Fragment, useEffect, useMemo, useRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { useCapability } from '@dxos/app-framework/ui';
|
|
8
|
+
import { type ObjectSurfaceProps } from '@dxos/app-toolkit/ui';
|
|
8
9
|
import { ComputeGraphModel } from '@dxos/conductor';
|
|
9
10
|
import { Obj } from '@dxos/echo';
|
|
10
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
11
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
12
|
+
import { useObject } from '@dxos/react-client/echo';
|
|
13
|
+
import { Flex, type FlexProps } from '@dxos/react-ui';
|
|
11
14
|
import {
|
|
12
15
|
ComputeContext,
|
|
13
16
|
ComputeGraphController,
|
|
@@ -18,20 +21,23 @@ import {
|
|
|
18
21
|
useGraphMonitor,
|
|
19
22
|
} from '@dxos/react-ui-canvas-compute';
|
|
20
23
|
import {
|
|
21
|
-
type
|
|
24
|
+
type CanvasBoard,
|
|
22
25
|
CanvasGraphModel,
|
|
23
26
|
Editor,
|
|
24
27
|
type EditorController,
|
|
25
28
|
KeyboardContainer,
|
|
26
29
|
ShapeRegistry,
|
|
27
30
|
} from '@dxos/react-ui-canvas-editor';
|
|
28
|
-
import { Layout, type LayoutFlexProps } from '@dxos/react-ui-mosaic';
|
|
29
31
|
|
|
30
|
-
export type CanvasContainerProps =
|
|
32
|
+
export type CanvasContainerProps = ObjectSurfaceProps<CanvasBoard.CanvasBoard>;
|
|
31
33
|
|
|
32
34
|
export const CanvasContainer = ({ role, subject: canvas }: CanvasContainerProps) => {
|
|
33
35
|
const id = Obj.getDXN(canvas as any).toString();
|
|
34
|
-
|
|
36
|
+
useObject(canvas);
|
|
37
|
+
const graph = useMemo(
|
|
38
|
+
() => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.change(canvas, fn)),
|
|
39
|
+
[canvas],
|
|
40
|
+
);
|
|
35
41
|
const controller = useGraphController(canvas);
|
|
36
42
|
const graphMonitor = useGraphMonitor(controller?.graph);
|
|
37
43
|
const registry = useMemo(() => new ShapeRegistry(computeShapes), []);
|
|
@@ -71,11 +77,12 @@ export const CanvasContainer = ({ role, subject: canvas }: CanvasContainerProps)
|
|
|
71
77
|
);
|
|
72
78
|
};
|
|
73
79
|
|
|
74
|
-
const Container = (props:
|
|
80
|
+
const Container = (props: FlexProps) => <Flex {...props} classNames='aspect-square' />;
|
|
75
81
|
|
|
76
|
-
const useGraphController = (canvas:
|
|
82
|
+
const useGraphController = (canvas: CanvasBoard.CanvasBoard) => {
|
|
77
83
|
const db = Obj.getDatabase(canvas);
|
|
78
84
|
const runtime = useCapability(AutomationCapabilities.ComputeRuntime);
|
|
85
|
+
const [computeGraph] = useObject(canvas.computeGraph);
|
|
79
86
|
const controller = useMemo(() => {
|
|
80
87
|
if (!canvas.computeGraph?.target || !db) {
|
|
81
88
|
return null;
|
|
@@ -83,7 +90,7 @@ const useGraphController = (canvas: CanvasBoardType) => {
|
|
|
83
90
|
const model = new ComputeGraphModel(canvas.computeGraph?.target);
|
|
84
91
|
const controller = new ComputeGraphController(runtime.getRuntime(db.spaceId), model);
|
|
85
92
|
return controller;
|
|
86
|
-
}, [
|
|
93
|
+
}, [computeGraph, db]);
|
|
87
94
|
|
|
88
95
|
useEffect(() => {
|
|
89
96
|
if (!controller) {
|
|
@@ -98,5 +105,3 @@ const useGraphController = (canvas: CanvasBoardType) => {
|
|
|
98
105
|
|
|
99
106
|
return controller;
|
|
100
107
|
};
|
|
101
|
-
|
|
102
|
-
export default CanvasContainer;
|
package/src/meta.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
|
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
export const meta: Plugin.Meta = {
|
|
9
|
-
id: 'dxos.
|
|
9
|
+
id: 'org.dxos.plugin.conductor',
|
|
10
10
|
name: 'Conductor',
|
|
11
11
|
description: trim`
|
|
12
12
|
Visual workflow builder using node-based compute graphs to orchestrate complex AI agent pipelines.
|
package/src/translations.ts
CHANGED
|
@@ -3,26 +3,27 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
|
-
import {
|
|
6
|
+
import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
7
7
|
|
|
8
|
-
import { meta } from '
|
|
8
|
+
import { meta } from '#meta';
|
|
9
9
|
|
|
10
10
|
export const translations = [
|
|
11
11
|
{
|
|
12
12
|
'en-US': {
|
|
13
|
-
[
|
|
14
|
-
'typename
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'object
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'object
|
|
13
|
+
[CanvasBoard.CanvasBoard.typename]: {
|
|
14
|
+
'typename.label': 'Circuit',
|
|
15
|
+
'typename.label_zero': 'Circuits',
|
|
16
|
+
'typename.label_one': 'Circuit',
|
|
17
|
+
'typename.label_other': 'Circuits',
|
|
18
|
+
'object-name.placeholder': 'New circuit',
|
|
19
|
+
'add-object.label': 'Add circuit',
|
|
20
|
+
'rename-object.label': 'Rename circuit',
|
|
21
|
+
'delete-object.label': 'Delete circuit',
|
|
22
|
+
'object-deleted.label': 'Circuit deleted',
|
|
22
23
|
},
|
|
23
24
|
[meta.id]: {
|
|
24
|
-
'plugin
|
|
25
|
-
'content
|
|
25
|
+
'plugin.name': 'Conductor',
|
|
26
|
+
'content.placeholder': 'Enter text...',
|
|
26
27
|
},
|
|
27
28
|
},
|
|
28
29
|
},
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { trim } from "@dxos/util";
|
|
3
|
-
var meta = {
|
|
4
|
-
id: "dxos.org/plugin/conductor",
|
|
5
|
-
name: "Conductor",
|
|
6
|
-
description: trim`
|
|
7
|
-
Visual workflow builder using node-based compute graphs to orchestrate complex AI agent pipelines.
|
|
8
|
-
Connect data sources, transformations, and AI models in a drag-and-drop interface for advanced automation.
|
|
9
|
-
`,
|
|
10
|
-
icon: "ph--infinity--regular",
|
|
11
|
-
iconHue: "sky",
|
|
12
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor",
|
|
13
|
-
tags: [
|
|
14
|
-
"labs"
|
|
15
|
-
],
|
|
16
|
-
screenshots: [
|
|
17
|
-
"https://dxos.network/plugin-details-canvas-dark.png"
|
|
18
|
-
]
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
meta
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=chunk-GV4DJFU6.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 { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/conductor',\n name: 'Conductor',\n description: trim`\n Visual workflow builder using node-based compute graphs to orchestrate complex AI agent pipelines.\n Connect data sources, transformations, and AI models in a drag-and-drop interface for advanced automation.\n `,\n icon: 'ph--infinity--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor',\n tags: ['labs'],\n screenshots: ['https://dxos.network/plugin-details-canvas-dark.png'],\n};\n"],
|
|
5
|
-
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "screenshots"]
|
|
7
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-GV4DJFU6.mjs";
|
|
4
|
-
|
|
5
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
6
|
-
import * as Effect from "effect/Effect";
|
|
7
|
-
import React2 from "react";
|
|
8
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
9
|
-
import { Obj as Obj2 } from "@dxos/echo";
|
|
10
|
-
import { CanvasBoardType } from "@dxos/react-ui-canvas-editor";
|
|
11
|
-
|
|
12
|
-
// src/components/CanvasContainer.tsx
|
|
13
|
-
import React, { Fragment, useEffect, useMemo, useRef } from "react";
|
|
14
|
-
import { useCapability } from "@dxos/app-framework/react";
|
|
15
|
-
import { ComputeGraphModel } from "@dxos/conductor";
|
|
16
|
-
import { Obj } from "@dxos/echo";
|
|
17
|
-
import { AutomationCapabilities } from "@dxos/plugin-automation";
|
|
18
|
-
import { ComputeContext, ComputeGraphController, ComputeShapeLayout, computeShapes, useComputeGraphController, useGraphMonitor } from "@dxos/react-ui-canvas-compute";
|
|
19
|
-
import { CanvasGraphModel, Editor, KeyboardContainer, ShapeRegistry } from "@dxos/react-ui-canvas-editor";
|
|
20
|
-
import { Layout } from "@dxos/react-ui-mosaic";
|
|
21
|
-
var CanvasContainer = ({ role, subject: canvas }) => {
|
|
22
|
-
const id = Obj.getDXN(canvas).toString();
|
|
23
|
-
const graph = useMemo(() => CanvasGraphModel.create(canvas.layout), [
|
|
24
|
-
canvas.layout
|
|
25
|
-
]);
|
|
26
|
-
const controller = useGraphController(canvas);
|
|
27
|
-
const graphMonitor = useGraphMonitor(controller?.graph);
|
|
28
|
-
const registry = useMemo(() => new ShapeRegistry(computeShapes), []);
|
|
29
|
-
const editorRef = useRef(null);
|
|
30
|
-
useComputeGraphController({
|
|
31
|
-
controller,
|
|
32
|
-
graph,
|
|
33
|
-
editorRef
|
|
34
|
-
});
|
|
35
|
-
const layout = useMemo(() => controller && registry ? new ComputeShapeLayout(controller, registry) : void 0, [
|
|
36
|
-
controller,
|
|
37
|
-
registry
|
|
38
|
-
]);
|
|
39
|
-
if (!controller) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const Root = role === "section" ? Container : Fragment;
|
|
43
|
-
return /* @__PURE__ */ React.createElement(ComputeContext.Provider, {
|
|
44
|
-
value: {
|
|
45
|
-
controller
|
|
46
|
-
}
|
|
47
|
-
}, /* @__PURE__ */ React.createElement(Root, null, /* @__PURE__ */ React.createElement(KeyboardContainer, {
|
|
48
|
-
id
|
|
49
|
-
}, /* @__PURE__ */ React.createElement(Editor.Root, {
|
|
50
|
-
id,
|
|
51
|
-
ref: editorRef,
|
|
52
|
-
graph,
|
|
53
|
-
graphMonitor,
|
|
54
|
-
registry,
|
|
55
|
-
layout
|
|
56
|
-
}, /* @__PURE__ */ React.createElement(Editor.Canvas, null), /* @__PURE__ */ React.createElement(Editor.UI, {
|
|
57
|
-
showTools: true
|
|
58
|
-
})))));
|
|
59
|
-
};
|
|
60
|
-
var Container = (props) => /* @__PURE__ */ React.createElement(Layout.Flex, {
|
|
61
|
-
...props,
|
|
62
|
-
classNames: "aspect-square"
|
|
63
|
-
});
|
|
64
|
-
var useGraphController = (canvas) => {
|
|
65
|
-
const db = Obj.getDatabase(canvas);
|
|
66
|
-
const runtime = useCapability(AutomationCapabilities.ComputeRuntime);
|
|
67
|
-
const controller = useMemo(() => {
|
|
68
|
-
if (!canvas.computeGraph?.target || !db) {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
const model = new ComputeGraphModel(canvas.computeGraph?.target);
|
|
72
|
-
const controller2 = new ComputeGraphController(runtime.getRuntime(db.spaceId), model);
|
|
73
|
-
return controller2;
|
|
74
|
-
}, [
|
|
75
|
-
canvas.computeGraph?.target,
|
|
76
|
-
db
|
|
77
|
-
]);
|
|
78
|
-
useEffect(() => {
|
|
79
|
-
if (!controller) {
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
void controller.open();
|
|
83
|
-
return () => {
|
|
84
|
-
void controller.close();
|
|
85
|
-
};
|
|
86
|
-
}, [
|
|
87
|
-
controller
|
|
88
|
-
]);
|
|
89
|
-
return controller;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
93
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common.Capability.ReactSurface, Common.createSurface({
|
|
94
|
-
id: meta.id,
|
|
95
|
-
role: [
|
|
96
|
-
"article",
|
|
97
|
-
"section"
|
|
98
|
-
],
|
|
99
|
-
filter: (data) => Obj2.instanceOf(CanvasBoardType, data.subject),
|
|
100
|
-
component: ({ data, role }) => /* @__PURE__ */ React2.createElement(CanvasContainer, {
|
|
101
|
-
role,
|
|
102
|
-
subject: data.subject
|
|
103
|
-
})
|
|
104
|
-
}))));
|
|
105
|
-
export {
|
|
106
|
-
react_surface_default as default
|
|
107
|
-
};
|
|
108
|
-
//# sourceMappingURL=react-surface-R7NR323I.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/components/CanvasContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { CanvasBoardType } from '@dxos/react-ui-canvas-editor';\n\nimport { CanvasContainer } from '../../components';\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(\n Common.Capability.ReactSurface,\n Common.createSurface({\n id: meta.id,\n role: ['article', 'section'],\n filter: (data): data is { subject: CanvasBoardType } => Obj.instanceOf(CanvasBoardType, data.subject),\n component: ({ data, role }) => <CanvasContainer role={role} subject={data.subject} />,\n }),\n ),\n ),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment, useEffect, useMemo, useRef } from 'react';\n\nimport { type SurfaceComponentProps, useCapability } from '@dxos/app-framework/react';\nimport { ComputeGraphModel } from '@dxos/conductor';\nimport { Obj } from '@dxos/echo';\nimport { AutomationCapabilities } from '@dxos/plugin-automation';\nimport {\n ComputeContext,\n ComputeGraphController,\n type ComputeShape,\n ComputeShapeLayout,\n computeShapes,\n useComputeGraphController,\n useGraphMonitor,\n} from '@dxos/react-ui-canvas-compute';\nimport {\n type CanvasBoardType,\n CanvasGraphModel,\n Editor,\n type EditorController,\n KeyboardContainer,\n ShapeRegistry,\n} from '@dxos/react-ui-canvas-editor';\nimport { Layout, type LayoutFlexProps } from '@dxos/react-ui-mosaic';\n\nexport type CanvasContainerProps = SurfaceComponentProps<CanvasBoardType>;\n\nexport const CanvasContainer = ({ role, subject: canvas }: CanvasContainerProps) => {\n const id = Obj.getDXN(canvas as any).toString();\n const graph = useMemo(() => CanvasGraphModel.create<ComputeShape>(canvas.layout), [canvas.layout]);\n const controller = useGraphController(canvas);\n const graphMonitor = useGraphMonitor(controller?.graph);\n const registry = useMemo(() => new ShapeRegistry(computeShapes), []);\n const editorRef = useRef<EditorController>(null);\n useComputeGraphController({ controller, graph, editorRef });\n\n // Layout.\n const layout = useMemo(\n () => (controller && registry ? new ComputeShapeLayout(controller, registry) : undefined),\n [controller, registry],\n );\n\n if (!controller) {\n return;\n }\n\n const Root = role === 'section' ? Container : Fragment;\n\n return (\n <ComputeContext.Provider value={{ controller }}>\n <Root>\n <KeyboardContainer id={id}>\n <Editor.Root\n id={id}\n ref={editorRef}\n graph={graph}\n graphMonitor={graphMonitor as any}\n registry={registry}\n layout={layout}\n >\n <Editor.Canvas />\n <Editor.UI showTools />\n </Editor.Root>\n </KeyboardContainer>\n </Root>\n </ComputeContext.Provider>\n );\n};\n\nconst Container = (props: LayoutFlexProps) => <Layout.Flex {...props} classNames='aspect-square' />;\n\nconst useGraphController = (canvas: CanvasBoardType) => {\n const db = Obj.getDatabase(canvas);\n const runtime = useCapability(AutomationCapabilities.ComputeRuntime);\n const controller = useMemo(() => {\n if (!canvas.computeGraph?.target || !db) {\n return null;\n }\n const model = new ComputeGraphModel(canvas.computeGraph?.target);\n const controller = new ComputeGraphController(runtime.getRuntime(db.spaceId), model);\n return controller;\n }, [canvas.computeGraph?.target, db]);\n\n useEffect(() => {\n if (!controller) {\n return;\n }\n\n void controller.open();\n return () => {\n void controller.close();\n };\n }, [controller]);\n\n return controller;\n};\n\nexport default CanvasContainer;\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "Obj", "CanvasBoardType", "React", "Fragment", "useEffect", "useMemo", "useRef", "useCapability", "ComputeGraphModel", "Obj", "AutomationCapabilities", "ComputeContext", "ComputeGraphController", "ComputeShapeLayout", "computeShapes", "useComputeGraphController", "useGraphMonitor", "CanvasGraphModel", "Editor", "KeyboardContainer", "ShapeRegistry", "Layout", "CanvasContainer", "role", "subject", "canvas", "id", "Obj", "getDXN", "toString", "graph", "useMemo", "CanvasGraphModel", "create", "layout", "controller", "useGraphController", "graphMonitor", "useGraphMonitor", "registry", "ShapeRegistry", "computeShapes", "editorRef", "useRef", "useComputeGraphController", "ComputeShapeLayout", "undefined", "Root", "Container", "Fragment", "ComputeContext", "Provider", "value", "KeyboardContainer", "Editor", "ref", "Canvas", "UI", "showTools", "props", "Layout", "Flex", "classNames", "db", "getDatabase", "runtime", "useCapability", "AutomationCapabilities", "ComputeRuntime", "computeGraph", "target", "model", "ComputeGraphModel", "ComputeGraphController", "getRuntime", "spaceId", "useEffect", "open", "close", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "CanvasBoardType", "subject", "component", "React", "CanvasContainer"]
|
|
7
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/meta.ts
|
|
4
|
-
import { trim } from "@dxos/util";
|
|
5
|
-
var meta = {
|
|
6
|
-
id: "dxos.org/plugin/conductor",
|
|
7
|
-
name: "Conductor",
|
|
8
|
-
description: trim`
|
|
9
|
-
Visual workflow builder using node-based compute graphs to orchestrate complex AI agent pipelines.
|
|
10
|
-
Connect data sources, transformations, and AI models in a drag-and-drop interface for advanced automation.
|
|
11
|
-
`,
|
|
12
|
-
icon: "ph--infinity--regular",
|
|
13
|
-
iconHue: "sky",
|
|
14
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor",
|
|
15
|
-
tags: [
|
|
16
|
-
"labs"
|
|
17
|
-
],
|
|
18
|
-
screenshots: [
|
|
19
|
-
"https://dxos.network/plugin-details-canvas-dark.png"
|
|
20
|
-
]
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
meta
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=chunk-DILME6SD.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 { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/conductor',\n name: 'Conductor',\n description: trim`\n Visual workflow builder using node-based compute graphs to orchestrate complex AI agent pipelines.\n Connect data sources, transformations, and AI models in a drag-and-drop interface for advanced automation.\n `,\n icon: 'ph--infinity--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor',\n tags: ['labs'],\n screenshots: ['https://dxos.network/plugin-details-canvas-dark.png'],\n};\n"],
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "screenshots"]
|
|
7
|
-
}
|