@dxos/plugin-conductor 0.8.4-main.1068cf700f → 0.8.4-main.1c7ec43d41
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/ConductorPlugin-YYCCUBUG.mjs +26 -0
- package/dist/lib/browser/ConductorPlugin-YYCCUBUG.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +22 -56
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +28 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/node-esm/ConductorPlugin-55I2R2LW.mjs +28 -0
- package/dist/lib/node-esm/ConductorPlugin-55I2R2LW.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +22 -55
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/translations.mjs +30 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/types/src/ConductorPlugin.d.ts +1 -0
- package/dist/types/src/ConductorPlugin.d.ts.map +1 -1
- package/dist/types/src/ConductorPlugin.test.d.ts +2 -0
- package/dist/types/src/ConductorPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -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 +2 -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/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +24 -15
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +45 -31
- package/src/ConductorPlugin.test.ts +27 -0
- package/src/ConductorPlugin.tsx +6 -17
- package/src/capabilities/create-object.ts +29 -0
- package/src/capabilities/index.ts +4 -1
- package/src/capabilities/react-surface.tsx +32 -0
- package/src/components/index.ts +1 -3
- package/src/{components → containers/CanvasContainer}/CanvasContainer.tsx +9 -11
- package/src/containers/CanvasContainer/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/index.ts +6 -1
- package/src/meta.ts +1 -1
- package/src/translations.ts +12 -11
- 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-FRVZG3LI.mjs +0 -112
- package/dist/lib/browser/react-surface-FRVZG3LI.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-S6UQA6XL.mjs +0 -113
- package/dist/lib/node-esm/react-surface-S6UQA6XL.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 -29
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.1c7ec43d41",
|
|
4
4
|
"description": "Composer plugin for conductor.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,12 +12,27 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#plugin": "./src/ConductorPlugin.tsx",
|
|
17
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
18
|
+
"#components": "./src/components/index.ts",
|
|
19
|
+
"#containers": "./src/containers/index.ts",
|
|
20
|
+
"#meta": "./src/meta.ts",
|
|
21
|
+
"#translations": "./src/translations.ts",
|
|
22
|
+
"#types": "./src/types/index.ts"
|
|
23
|
+
},
|
|
15
24
|
"exports": {
|
|
16
25
|
".": {
|
|
26
|
+
"source": "./src/index.ts",
|
|
17
27
|
"browser": "./dist/lib/browser/index.mjs",
|
|
18
28
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
-
"source": "./src/index.ts",
|
|
20
29
|
"types": "./dist/types/src/index.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"./translations": {
|
|
32
|
+
"source": "./src/translations.ts",
|
|
33
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
34
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
35
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
21
36
|
}
|
|
22
37
|
},
|
|
23
38
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -26,45 +41,44 @@
|
|
|
26
41
|
"src"
|
|
27
42
|
],
|
|
28
43
|
"dependencies": {
|
|
29
|
-
"effect": "3.
|
|
30
|
-
"@dxos/
|
|
31
|
-
"@dxos/app-toolkit": "0.8.4-main.
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/plugin-client": "0.8.4-main.
|
|
42
|
-
"@dxos/react-client": "0.8.4-main.
|
|
43
|
-
"@dxos/plugin-
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/react-ui-
|
|
46
|
-
"@dxos/react-ui-canvas-editor": "0.8.4-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.1068cf700f",
|
|
50
|
-
"@dxos/plugin-space": "0.8.4-main.1068cf700f"
|
|
44
|
+
"effect": "3.20.0",
|
|
45
|
+
"@dxos/ai": "0.8.4-main.1c7ec43d41",
|
|
46
|
+
"@dxos/app-toolkit": "0.8.4-main.1c7ec43d41",
|
|
47
|
+
"@dxos/app-framework": "0.8.4-main.1c7ec43d41",
|
|
48
|
+
"@dxos/assistant": "0.8.4-main.1c7ec43d41",
|
|
49
|
+
"@dxos/debug": "0.8.4-main.1c7ec43d41",
|
|
50
|
+
"@dxos/compute": "0.8.4-main.1c7ec43d41",
|
|
51
|
+
"@dxos/echo": "0.8.4-main.1c7ec43d41",
|
|
52
|
+
"@dxos/conductor": "0.8.4-main.1c7ec43d41",
|
|
53
|
+
"@dxos/edge-client": "0.8.4-main.1c7ec43d41",
|
|
54
|
+
"@dxos/log": "0.8.4-main.1c7ec43d41",
|
|
55
|
+
"@dxos/plugin-automation": "0.8.4-main.1c7ec43d41",
|
|
56
|
+
"@dxos/plugin-client": "0.8.4-main.1c7ec43d41",
|
|
57
|
+
"@dxos/react-client": "0.8.4-main.1c7ec43d41",
|
|
58
|
+
"@dxos/plugin-space": "0.8.4-main.1c7ec43d41",
|
|
59
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.1c7ec43d41",
|
|
60
|
+
"@dxos/react-ui-stack": "0.8.4-main.1c7ec43d41",
|
|
61
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.1c7ec43d41",
|
|
62
|
+
"@dxos/react-ui-canvas-compute": "0.8.4-main.1c7ec43d41",
|
|
63
|
+
"@dxos/util": "0.8.4-main.1c7ec43d41"
|
|
51
64
|
},
|
|
52
65
|
"devDependencies": {
|
|
53
66
|
"@types/react": "~19.2.7",
|
|
54
67
|
"@types/react-dom": "~19.2.3",
|
|
55
68
|
"react": "~19.2.3",
|
|
56
69
|
"react-dom": "~19.2.3",
|
|
57
|
-
"vite": "
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
70
|
+
"vite": "^8.0.10",
|
|
71
|
+
"@dxos/plugin-testing": "0.8.4-main.1c7ec43d41",
|
|
72
|
+
"@dxos/react-ui": "0.8.4-main.1c7ec43d41",
|
|
73
|
+
"@dxos/ui-theme": "0.8.4-main.1c7ec43d41",
|
|
74
|
+
"@dxos/storybook-utils": "0.8.4-main.1c7ec43d41"
|
|
61
75
|
},
|
|
62
76
|
"peerDependencies": {
|
|
63
|
-
"effect": "3.
|
|
77
|
+
"effect": "3.20.0",
|
|
64
78
|
"react": "~19.2.3",
|
|
65
79
|
"react-dom": "~19.2.3",
|
|
66
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
67
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
80
|
+
"@dxos/ui-theme": "0.8.4-main.1c7ec43d41",
|
|
81
|
+
"@dxos/react-ui": "0.8.4-main.1c7ec43d41"
|
|
68
82
|
},
|
|
69
83
|
"publishConfig": {
|
|
70
84
|
"access": "public"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { ConductorPlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('ConductorPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), ConductorPlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Modules expected to be active after a normal startup.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(
|
|
24
|
+
expect.arrayContaining([moduleId('CreateObject'), moduleId('schema'), moduleId('ReactSurface')]),
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
});
|
package/src/ConductorPlugin.tsx
CHANGED
|
@@ -2,32 +2,21 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
5
|
import { Plugin } from '@dxos/app-framework';
|
|
8
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
7
|
import { ComputeGraph } from '@dxos/conductor';
|
|
10
|
-
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
11
8
|
import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
12
9
|
|
|
13
|
-
import { ReactSurface } from '
|
|
14
|
-
import { meta } from '
|
|
15
|
-
import { translations } from '
|
|
10
|
+
import { CreateObject, ReactSurface } from '#capabilities';
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { translations } from '#translations';
|
|
16
13
|
|
|
17
14
|
export const ConductorPlugin = Plugin.define(meta).pipe(
|
|
18
|
-
AppPlugin.
|
|
19
|
-
metadata: {
|
|
20
|
-
id: CanvasBoard.CanvasBoard.typename,
|
|
21
|
-
metadata: {
|
|
22
|
-
icon: 'ph--infinity--regular',
|
|
23
|
-
iconHue: 'sky',
|
|
24
|
-
createObject: ((props) => Effect.sync(() => CanvasBoard.make(props))) satisfies CreateObject,
|
|
25
|
-
addToCollectionOnCreate: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
}),
|
|
15
|
+
AppPlugin.addCreateObjectModule({ activate: CreateObject }),
|
|
29
16
|
AppPlugin.addSchemaModule({ schema: [CanvasBoard.CanvasBoard, ComputeGraph] }),
|
|
30
17
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
31
18
|
AppPlugin.addTranslationsModule({ translations }),
|
|
32
19
|
Plugin.make,
|
|
33
20
|
);
|
|
21
|
+
|
|
22
|
+
export default ConductorPlugin;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
10
|
+
import { SpaceCapabilities } from '@dxos/plugin-space/types';
|
|
11
|
+
import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
12
|
+
|
|
13
|
+
export default Capability.makeModule(
|
|
14
|
+
Effect.fnUntraced(function* () {
|
|
15
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
16
|
+
id: CanvasBoard.CanvasBoard.typename,
|
|
17
|
+
createObject: (props, options) =>
|
|
18
|
+
Effect.gen(function* () {
|
|
19
|
+
const object = CanvasBoard.make(props);
|
|
20
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
21
|
+
object,
|
|
22
|
+
target: options.target,
|
|
23
|
+
hidden: true,
|
|
24
|
+
targetNodeId: options.targetNodeId,
|
|
25
|
+
});
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
@@ -2,4 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
8
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
|
+
import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
12
|
+
|
|
13
|
+
import { CanvasContainer } from '#containers';
|
|
14
|
+
|
|
15
|
+
export default Capability.makeModule(() =>
|
|
16
|
+
Effect.succeed(
|
|
17
|
+
Capability.contributes(
|
|
18
|
+
Capabilities.ReactSurface,
|
|
19
|
+
Surface.create({
|
|
20
|
+
id: 'root',
|
|
21
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
22
|
+
filter: AppSurface.oneOf(
|
|
23
|
+
AppSurface.object(AppSurface.Article, CanvasBoard.CanvasBoard),
|
|
24
|
+
AppSurface.object(AppSurface.Section, CanvasBoard.CanvasBoard),
|
|
25
|
+
),
|
|
26
|
+
component: ({ data, role }) => (
|
|
27
|
+
<CanvasContainer role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
28
|
+
),
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
),
|
|
32
|
+
);
|
package/src/components/index.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import React, { Fragment, useEffect, useMemo, useRef } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useCapability } from '@dxos/app-framework/ui';
|
|
8
|
-
import { type
|
|
8
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
9
|
import { ComputeGraphModel } from '@dxos/conductor';
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
|
-
import { AutomationCapabilities } from '@dxos/plugin-automation';
|
|
11
|
+
import { AutomationCapabilities } from '@dxos/plugin-automation/types';
|
|
12
12
|
import { useObject } from '@dxos/react-client/echo';
|
|
13
13
|
import { Flex, type FlexProps } from '@dxos/react-ui';
|
|
14
14
|
import {
|
|
@@ -29,16 +29,16 @@ import {
|
|
|
29
29
|
ShapeRegistry,
|
|
30
30
|
} from '@dxos/react-ui-canvas-editor';
|
|
31
31
|
|
|
32
|
-
export type CanvasContainerProps =
|
|
32
|
+
export type CanvasContainerProps = AppSurface.ObjectArticleProps<CanvasBoard.CanvasBoard>;
|
|
33
33
|
|
|
34
|
-
export const CanvasContainer = ({ role, subject:
|
|
35
|
-
const
|
|
36
|
-
|
|
34
|
+
export const CanvasContainer = ({ role, subject, attendableId: _attendableId }: CanvasContainerProps) => {
|
|
35
|
+
const [canvas] = useObject(subject);
|
|
36
|
+
const id = Obj.getDXN(canvas).toString();
|
|
37
37
|
const graph = useMemo(
|
|
38
|
-
() => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.
|
|
39
|
-
[canvas],
|
|
38
|
+
() => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.update(subject, fn)),
|
|
39
|
+
[subject, canvas.layout],
|
|
40
40
|
);
|
|
41
|
-
const controller = useGraphController(
|
|
41
|
+
const controller = useGraphController(subject);
|
|
42
42
|
const graphMonitor = useGraphMonitor(controller?.graph);
|
|
43
43
|
const registry = useMemo(() => new ShapeRegistry(computeShapes), []);
|
|
44
44
|
const editorRef = useRef<EditorController>(null);
|
|
@@ -105,5 +105,3 @@ const useGraphController = (canvas: CanvasBoard.CanvasBoard) => {
|
|
|
105
105
|
|
|
106
106
|
return controller;
|
|
107
107
|
};
|
|
108
|
-
|
|
109
|
-
export default CanvasContainer;
|
package/src/index.ts
CHANGED
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const ConductorPlugin = Plugin.lazy(meta, () => import('./ConductorPlugin'));
|
|
10
|
+
|
|
6
11
|
export * from './meta';
|
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
|
@@ -5,24 +5,25 @@
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
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
13
|
[CanvasBoard.CanvasBoard.typename]: {
|
|
14
|
-
'typename
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'object
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'object
|
|
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,112 +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 { Capabilities, Capability } from "@dxos/app-framework";
|
|
9
|
-
import { Surface } from "@dxos/app-framework/ui";
|
|
10
|
-
import { Obj as Obj2 } from "@dxos/echo";
|
|
11
|
-
import { CanvasBoard } from "@dxos/react-ui-canvas-editor";
|
|
12
|
-
|
|
13
|
-
// src/components/CanvasContainer.tsx
|
|
14
|
-
import React, { Fragment, useEffect, useMemo, useRef } from "react";
|
|
15
|
-
import { useCapability } from "@dxos/app-framework/ui";
|
|
16
|
-
import { ComputeGraphModel } from "@dxos/conductor";
|
|
17
|
-
import { Obj } from "@dxos/echo";
|
|
18
|
-
import { AutomationCapabilities } from "@dxos/plugin-automation";
|
|
19
|
-
import { useObject } from "@dxos/react-client/echo";
|
|
20
|
-
import { Flex } from "@dxos/react-ui";
|
|
21
|
-
import { ComputeContext, ComputeGraphController, ComputeShapeLayout, computeShapes, useComputeGraphController, useGraphMonitor } from "@dxos/react-ui-canvas-compute";
|
|
22
|
-
import { CanvasGraphModel, Editor, KeyboardContainer, ShapeRegistry } from "@dxos/react-ui-canvas-editor";
|
|
23
|
-
var CanvasContainer = ({ role, subject: canvas }) => {
|
|
24
|
-
const id = Obj.getDXN(canvas).toString();
|
|
25
|
-
useObject(canvas);
|
|
26
|
-
const graph = useMemo(() => CanvasGraphModel.create(canvas.layout, (fn) => Obj.change(canvas, fn)), [
|
|
27
|
-
canvas
|
|
28
|
-
]);
|
|
29
|
-
const controller = useGraphController(canvas);
|
|
30
|
-
const graphMonitor = useGraphMonitor(controller?.graph);
|
|
31
|
-
const registry = useMemo(() => new ShapeRegistry(computeShapes), []);
|
|
32
|
-
const editorRef = useRef(null);
|
|
33
|
-
useComputeGraphController({
|
|
34
|
-
controller,
|
|
35
|
-
graph,
|
|
36
|
-
editorRef
|
|
37
|
-
});
|
|
38
|
-
const layout = useMemo(() => controller && registry ? new ComputeShapeLayout(controller, registry) : void 0, [
|
|
39
|
-
controller,
|
|
40
|
-
registry
|
|
41
|
-
]);
|
|
42
|
-
if (!controller) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const Root = role === "section" ? Container : Fragment;
|
|
46
|
-
return /* @__PURE__ */ React.createElement(ComputeContext.Provider, {
|
|
47
|
-
value: {
|
|
48
|
-
controller
|
|
49
|
-
}
|
|
50
|
-
}, /* @__PURE__ */ React.createElement(Root, null, /* @__PURE__ */ React.createElement(KeyboardContainer, {
|
|
51
|
-
id
|
|
52
|
-
}, /* @__PURE__ */ React.createElement(Editor.Root, {
|
|
53
|
-
id,
|
|
54
|
-
ref: editorRef,
|
|
55
|
-
graph,
|
|
56
|
-
graphMonitor,
|
|
57
|
-
registry,
|
|
58
|
-
layout
|
|
59
|
-
}, /* @__PURE__ */ React.createElement(Editor.Canvas, null), /* @__PURE__ */ React.createElement(Editor.UI, {
|
|
60
|
-
showTools: true
|
|
61
|
-
})))));
|
|
62
|
-
};
|
|
63
|
-
var Container = (props) => /* @__PURE__ */ React.createElement(Flex, {
|
|
64
|
-
...props,
|
|
65
|
-
classNames: "aspect-square"
|
|
66
|
-
});
|
|
67
|
-
var useGraphController = (canvas) => {
|
|
68
|
-
const db = Obj.getDatabase(canvas);
|
|
69
|
-
const runtime = useCapability(AutomationCapabilities.ComputeRuntime);
|
|
70
|
-
const [computeGraph] = useObject(canvas.computeGraph);
|
|
71
|
-
const controller = useMemo(() => {
|
|
72
|
-
if (!canvas.computeGraph?.target || !db) {
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
const model = new ComputeGraphModel(canvas.computeGraph?.target);
|
|
76
|
-
const controller2 = new ComputeGraphController(runtime.getRuntime(db.spaceId), model);
|
|
77
|
-
return controller2;
|
|
78
|
-
}, [
|
|
79
|
-
computeGraph,
|
|
80
|
-
db
|
|
81
|
-
]);
|
|
82
|
-
useEffect(() => {
|
|
83
|
-
if (!controller) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
void controller.open();
|
|
87
|
-
return () => {
|
|
88
|
-
void controller.close();
|
|
89
|
-
};
|
|
90
|
-
}, [
|
|
91
|
-
controller
|
|
92
|
-
]);
|
|
93
|
-
return controller;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
97
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, Surface.create({
|
|
98
|
-
id: meta.id,
|
|
99
|
-
role: [
|
|
100
|
-
"article",
|
|
101
|
-
"section"
|
|
102
|
-
],
|
|
103
|
-
filter: (data) => Obj2.instanceOf(CanvasBoard.CanvasBoard, data.subject),
|
|
104
|
-
component: ({ data, role }) => /* @__PURE__ */ React2.createElement(CanvasContainer, {
|
|
105
|
-
role,
|
|
106
|
-
subject: data.subject
|
|
107
|
-
})
|
|
108
|
-
}))));
|
|
109
|
-
export {
|
|
110
|
-
react_surface_default as default
|
|
111
|
-
};
|
|
112
|
-
//# sourceMappingURL=react-surface-FRVZG3LI.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 { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { Obj } from '@dxos/echo';\nimport { CanvasBoard } 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 Capabilities.ReactSurface,\n Surface.create({\n id: meta.id,\n role: ['article', 'section'],\n filter: (data): data is { subject: CanvasBoard.CanvasBoard } =>\n Obj.instanceOf(CanvasBoard.CanvasBoard, 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 { useCapability } from '@dxos/app-framework/ui';\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { ComputeGraphModel } from '@dxos/conductor';\nimport { Obj } from '@dxos/echo';\nimport { AutomationCapabilities } from '@dxos/plugin-automation';\nimport { useObject } from '@dxos/react-client/echo';\nimport { Flex, type FlexProps } from '@dxos/react-ui';\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 CanvasBoard,\n CanvasGraphModel,\n Editor,\n type EditorController,\n KeyboardContainer,\n ShapeRegistry,\n} from '@dxos/react-ui-canvas-editor';\n\nexport type CanvasContainerProps = SurfaceComponentProps<CanvasBoard.CanvasBoard>;\n\nexport const CanvasContainer = ({ role, subject: canvas }: CanvasContainerProps) => {\n const id = Obj.getDXN(canvas as any).toString();\n useObject(canvas);\n const graph = useMemo(\n () => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.change(canvas, fn)),\n [canvas],\n );\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: FlexProps) => <Flex {...props} classNames='aspect-square' />;\n\nconst useGraphController = (canvas: CanvasBoard.CanvasBoard) => {\n const db = Obj.getDatabase(canvas);\n const runtime = useCapability(AutomationCapabilities.ComputeRuntime);\n const [computeGraph] = useObject(canvas.computeGraph);\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 }, [computeGraph, db]);\n\n useEffect(() => {\n if (!controller) {\n return;\n }\n\n void controller.open();\n return () => {\n void controller.close();\n };\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O,gBAAAQ,OAAA,cAACC,iBAAAA;IAAgBT;IAAYM,SAASJ,KAAKI;;AAC5E,CAAA,CAAA,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "Obj", "CanvasBoard", "React", "Fragment", "useEffect", "useMemo", "useRef", "useCapability", "ComputeGraphModel", "Obj", "AutomationCapabilities", "useObject", "Flex", "ComputeContext", "ComputeGraphController", "ComputeShapeLayout", "computeShapes", "useComputeGraphController", "useGraphMonitor", "CanvasGraphModel", "Editor", "KeyboardContainer", "ShapeRegistry", "CanvasContainer", "role", "subject", "canvas", "id", "Obj", "getDXN", "toString", "useObject", "graph", "useMemo", "CanvasGraphModel", "create", "layout", "fn", "change", "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", "Flex", "classNames", "db", "getDatabase", "runtime", "useCapability", "AutomationCapabilities", "ComputeRuntime", "computeGraph", "target", "model", "ComputeGraphModel", "ComputeGraphController", "getRuntime", "spaceId", "useEffect", "open", "close", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "CanvasBoard", "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
|
-
}
|