@dxos/plugin-conductor 0.8.3 → 0.8.4-main.1068cf700f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/chunk-GV4DJFU6.mjs +24 -0
- package/dist/lib/browser/chunk-GV4DJFU6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +39 -68
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-FRVZG3LI.mjs +112 -0
- package/dist/lib/browser/react-surface-FRVZG3LI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DILME6SD.mjs +26 -0
- package/dist/lib/node-esm/chunk-DILME6SD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +39 -68
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-S6UQA6XL.mjs +113 -0
- package/dist/lib/node-esm/react-surface-S6UQA6XL.mjs.map +7 -0
- package/dist/types/src/ConductorPlugin.d.ts +2 -1
- package/dist/types/src/ConductorPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/CanvasContainer.d.ts +4 -5
- package/dist/types/src/components/CanvasContainer.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +17 -23
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +43 -46
- package/src/ConductorPlugin.tsx +25 -55
- package/src/capabilities/index.ts +1 -4
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +29 -0
- package/src/components/CanvasContainer.tsx +49 -48
- package/src/components/index.ts +1 -3
- package/src/meta.ts +9 -7
- package/src/translations.ts +10 -7
- package/src/types/index.ts +3 -0
- package/dist/lib/browser/CanvasContainer-IAWAWKZK.mjs +0 -98
- package/dist/lib/browser/CanvasContainer-IAWAWKZK.mjs.map +0 -7
- package/dist/lib/browser/chunk-4EJT5EIW.mjs +0 -26
- package/dist/lib/browser/chunk-4EJT5EIW.mjs.map +0 -7
- package/dist/lib/browser/chunk-B4FDW7Y7.mjs +0 -21
- package/dist/lib/browser/chunk-B4FDW7Y7.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-6YY3BXWS.mjs +0 -34
- package/dist/lib/browser/intent-resolver-6YY3BXWS.mjs.map +0 -7
- package/dist/lib/browser/react-surface-I4XNNFSF.mjs +0 -31
- package/dist/lib/browser/react-surface-I4XNNFSF.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -8
- package/dist/lib/browser/types.mjs.map +0 -7
- package/dist/lib/node/CanvasContainer-BORU64NX.cjs +0 -131
- package/dist/lib/node/CanvasContainer-BORU64NX.cjs.map +0 -7
- package/dist/lib/node/chunk-QBA2VGYG.cjs +0 -45
- package/dist/lib/node/chunk-QBA2VGYG.cjs.map +0 -7
- package/dist/lib/node/chunk-V22Y2ZJE.cjs +0 -44
- package/dist/lib/node/chunk-V22Y2ZJE.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -116
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-LR2DNPAH.cjs +0 -50
- package/dist/lib/node/intent-resolver-LR2DNPAH.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-5UCYIK4Q.cjs +0 -53
- package/dist/lib/node/react-surface-5UCYIK4Q.cjs.map +0 -7
- package/dist/lib/node/types.cjs +0 -30
- package/dist/lib/node/types.cjs.map +0 -7
- package/dist/lib/node-esm/CanvasContainer-XFNPFWLN.mjs +0 -100
- package/dist/lib/node-esm/CanvasContainer-XFNPFWLN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7644E2YF.mjs +0 -27
- package/dist/lib/node-esm/chunk-7644E2YF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PYF2G3G4.mjs +0 -23
- package/dist/lib/node-esm/chunk-PYF2G3G4.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-OMXIT5KT.mjs +0 -35
- package/dist/lib/node-esm/intent-resolver-OMXIT5KT.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-WZFA32UY.mjs +0 -32
- package/dist/lib/node-esm/react-surface-WZFA32UY.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -9
- package/dist/lib/node-esm/types.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -18
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -27
- package/src/capabilities/react-surface.tsx +0 -23
- package/src/types.ts +0 -22
|
@@ -0,0 +1,24 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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,39 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ConductorAction
|
|
3
|
-
} from "./chunk-4EJT5EIW.mjs";
|
|
4
|
-
import {
|
|
5
|
-
CONDUCTOR_PLUGIN,
|
|
6
2
|
meta
|
|
7
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GV4DJFU6.mjs";
|
|
8
4
|
|
|
9
|
-
//
|
|
10
|
-
import
|
|
5
|
+
// src/ConductorPlugin.tsx
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import { Plugin } from "@dxos/app-framework";
|
|
8
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
11
9
|
import { ComputeGraph } from "@dxos/conductor";
|
|
12
|
-
import {
|
|
13
|
-
import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
|
|
14
|
-
import { SpaceCapabilities } from "@dxos/plugin-space";
|
|
15
|
-
import { defineObjectForm } from "@dxos/plugin-space/types";
|
|
16
|
-
import { CanvasBoardType as CanvasBoardType2 } from "@dxos/react-ui-canvas-editor";
|
|
10
|
+
import { CanvasBoard as CanvasBoard2 } from "@dxos/react-ui-canvas-editor";
|
|
17
11
|
|
|
18
|
-
//
|
|
19
|
-
import {
|
|
20
|
-
var
|
|
21
|
-
var ReactSurface = lazy(() => import("./react-surface-I4XNNFSF.mjs"));
|
|
12
|
+
// src/capabilities/react-surface/index.ts
|
|
13
|
+
import { Capability } from "@dxos/app-framework";
|
|
14
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-FRVZG3LI.mjs"));
|
|
22
15
|
|
|
23
|
-
//
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
var translations_default = [
|
|
16
|
+
// src/translations.ts
|
|
17
|
+
import { CanvasBoard } from "@dxos/react-ui-canvas-editor";
|
|
18
|
+
var translations = [
|
|
27
19
|
{
|
|
28
20
|
"en-US": {
|
|
29
|
-
[
|
|
21
|
+
[CanvasBoard.CanvasBoard.typename]: {
|
|
30
22
|
"typename label": "Circuit",
|
|
31
23
|
"typename label_zero": "Circuits",
|
|
32
24
|
"typename label_one": "Circuit",
|
|
33
25
|
"typename label_other": "Circuits",
|
|
34
|
-
"object name placeholder": "New circuit"
|
|
26
|
+
"object name placeholder": "New circuit",
|
|
27
|
+
"rename object label": "Rename circuit",
|
|
28
|
+
"delete object label": "Delete circuit",
|
|
29
|
+
"object deleted label": "Circuit deleted"
|
|
35
30
|
},
|
|
36
|
-
[
|
|
31
|
+
[meta.id]: {
|
|
37
32
|
"plugin name": "Conductor",
|
|
38
33
|
"content placeholder": "Enter text..."
|
|
39
34
|
}
|
|
@@ -41,52 +36,28 @@ var translations_default = [
|
|
|
41
36
|
}
|
|
42
37
|
];
|
|
43
38
|
|
|
44
|
-
//
|
|
45
|
-
var ConductorPlugin = ()
|
|
46
|
-
|
|
47
|
-
id:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
objectSchema: CanvasBoardType2,
|
|
66
|
-
getIntent: () => createIntent(ConductorAction.Create)
|
|
67
|
-
}))
|
|
68
|
-
}),
|
|
69
|
-
defineModule({
|
|
70
|
-
id: `${meta.id}/module/schema`,
|
|
71
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
72
|
-
activate: () => contributes(ClientCapabilities.Schema, [
|
|
73
|
-
ComputeGraph,
|
|
74
|
-
FunctionTrigger
|
|
75
|
-
])
|
|
76
|
-
}),
|
|
77
|
-
defineModule({
|
|
78
|
-
id: `${meta.id}/module/react-surface`,
|
|
79
|
-
activatesOn: Events.SetupReactSurface,
|
|
80
|
-
activate: ReactSurface
|
|
81
|
-
}),
|
|
82
|
-
defineModule({
|
|
83
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
84
|
-
activatesOn: Events.SetupIntentResolver,
|
|
85
|
-
activate: IntentResolver
|
|
86
|
-
})
|
|
87
|
-
]);
|
|
39
|
+
// src/ConductorPlugin.tsx
|
|
40
|
+
var ConductorPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
|
|
41
|
+
metadata: {
|
|
42
|
+
id: CanvasBoard2.CanvasBoard.typename,
|
|
43
|
+
metadata: {
|
|
44
|
+
icon: "ph--infinity--regular",
|
|
45
|
+
iconHue: "sky",
|
|
46
|
+
createObject: (props) => Effect.sync(() => CanvasBoard2.make(props)),
|
|
47
|
+
addToCollectionOnCreate: true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}), AppPlugin.addSchemaModule({
|
|
51
|
+
schema: [
|
|
52
|
+
CanvasBoard2.CanvasBoard,
|
|
53
|
+
ComputeGraph
|
|
54
|
+
]
|
|
55
|
+
}), AppPlugin.addSurfaceModule({
|
|
56
|
+
activate: ReactSurface
|
|
57
|
+
}), AppPlugin.addTranslationsModule({
|
|
58
|
+
translations
|
|
59
|
+
}), Plugin.make);
|
|
88
60
|
export {
|
|
89
|
-
CONDUCTOR_PLUGIN,
|
|
90
61
|
ConductorPlugin,
|
|
91
62
|
meta
|
|
92
63
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ConductorPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/ConductorPlugin.tsx", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { ComputeGraph } from '@dxos/conductor';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { CanvasBoard } from '@dxos/react-ui-canvas-editor';\n\nimport { ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const ConductorPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: CanvasBoard.CanvasBoard.typename,\n metadata: {\n icon: 'ph--infinity--regular',\n iconHue: 'sky',\n createObject: ((props) => Effect.sync(() => CanvasBoard.make(props))) satisfies CreateObject,\n addToCollectionOnCreate: true,\n },\n },\n }),\n AppPlugin.addSchemaModule({ schema: [CanvasBoard.CanvasBoard, ComputeGraph] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { CanvasBoard } from '@dxos/react-ui-canvas-editor';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [CanvasBoard.CanvasBoard.typename]: {\n 'typename label': 'Circuit',\n 'typename label_zero': 'Circuits',\n 'typename label_one': 'Circuit',\n 'typename label_other': 'Circuits',\n 'object name placeholder': 'New circuit',\n 'rename object label': 'Rename circuit',\n 'delete object label': 'Delete circuit',\n 'object deleted label': 'Circuit deleted',\n },\n [meta.id]: {\n 'plugin name': 'Conductor',\n 'content placeholder': 'Enter text...',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,oBAAoB;AAE7B,SAASC,eAAAA,oBAAmB;;;ACN5B,SAASC,kBAAkB;AAEpB,IAAMC,eAAeC,WAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACDzE,SAASC,mBAAmB;AAIrB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,YAAYA,YAAYC,QAAQ,GAAG;QAClC,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,uBAAuB;MACzB;IACF;EACF;;;;AFXK,IAAMC,kBAAkBC,OAAOC,OAAOC,IAAAA,EAAMC,KACjDC,UAAUC,kBAAkB;EAC1BC,UAAU;IACRC,IAAIC,aAAYA,YAAYC;IAC5BH,UAAU;MACRI,MAAM;MACNC,SAAS;MACTC,cAAe,CAACC,UAAiBC,YAAK,MAAMN,aAAYO,KAAKF,KAAAA,CAAAA;MAC7DG,yBAAyB;IAC3B;EACF;AACF,CAAA,GACAZ,UAAUa,gBAAgB;EAAEC,QAAQ;IAACV,aAAYA;IAAaW;;AAAc,CAAA,GAC5Ef,UAAUgB,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpDlB,UAAUmB,sBAAsB;EAAEC;AAAa,CAAA,GAC/CxB,OAAOe,IAAI;",
|
|
6
|
+
"names": ["Effect", "Plugin", "AppPlugin", "ComputeGraph", "CanvasBoard", "Capability", "ReactSurface", "Capability", "lazy", "CanvasBoard", "translations", "CanvasBoard", "typename", "meta", "id", "ConductorPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "CanvasBoard", "typename", "icon", "iconHue", "createObject", "props", "sync", "make", "addToCollectionOnCreate", "addSchemaModule", "schema", "ComputeGraph", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-conductor/src/meta.ts":{"bytes":2262,"imports":[],"format":"esm"},"packages/plugins/plugin-conductor/src/types.ts":{"bytes":2361,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-conductor/src/capabilities/intent-resolver.ts":{"bytes":3436,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-conductor/src/components/CanvasContainer.tsx":{"bytes":12481,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-compute","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-conductor/src/components/index.ts":{"bytes":776,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/src/components/CanvasContainer.tsx","kind":"dynamic-import","original":"./CanvasContainer"}],"format":"esm"},"packages/plugins/plugin-conductor/src/capabilities/react-surface.tsx":{"bytes":2925,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-conductor/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-conductor/src/capabilities/index.ts":{"bytes":1052,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-conductor/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-conductor/src/translations.ts":{"bytes":2358,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-conductor/src/ConductorPlugin.tsx":{"bytes":8046,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-conductor/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-conductor/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-conductor/src/index.ts":{"bytes":572,"imports":[{"path":"packages/plugins/plugin-conductor/src/ConductorPlugin.tsx","kind":"import-statement","original":"./ConductorPlugin"},{"path":"packages/plugins/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-conductor/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5507},"packages/plugins/plugin-conductor/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-conductor/dist/lib/browser/chunk-4EJT5EIW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-conductor/dist/lib/browser/chunk-B4FDW7Y7.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/dist/lib/browser/intent-resolver-6YY3BXWS.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-conductor/dist/lib/browser/react-surface-I4XNNFSF.mjs","kind":"dynamic-import"},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["CONDUCTOR_PLUGIN","ConductorPlugin","meta"],"entryPoint":"packages/plugins/plugin-conductor/src/index.ts","inputs":{"packages/plugins/plugin-conductor/src/ConductorPlugin.tsx":{"bytesInOutput":1777},"packages/plugins/plugin-conductor/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/plugin-conductor/src/translations.ts":{"bytesInOutput":547},"packages/plugins/plugin-conductor/src/index.ts":{"bytesInOutput":0}},"bytes":2978},"packages/plugins/plugin-conductor/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-conductor/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-conductor/dist/lib/browser/chunk-4EJT5EIW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-conductor/dist/lib/browser/chunk-B4FDW7Y7.mjs","kind":"import-statement"}],"exports":["ConductorAction"],"entryPoint":"packages/plugins/plugin-conductor/src/types.ts","inputs":{},"bytes":154},"packages/plugins/plugin-conductor/dist/lib/browser/intent-resolver-6YY3BXWS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1696},"packages/plugins/plugin-conductor/dist/lib/browser/intent-resolver-6YY3BXWS.mjs":{"imports":[{"path":"packages/plugins/plugin-conductor/dist/lib/browser/chunk-4EJT5EIW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-conductor/dist/lib/browser/chunk-B4FDW7Y7.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-conductor/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-conductor/src/capabilities/intent-resolver.ts":{"bytesInOutput":695}},"bytes":961},"packages/plugins/plugin-conductor/dist/lib/browser/chunk-4EJT5EIW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1192},"packages/plugins/plugin-conductor/dist/lib/browser/chunk-4EJT5EIW.mjs":{"imports":[{"path":"packages/plugins/plugin-conductor/dist/lib/browser/chunk-B4FDW7Y7.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["ConductorAction"],"inputs":{"packages/plugins/plugin-conductor/src/types.ts":{"bytesInOutput":518}},"bytes":703},"packages/plugins/plugin-conductor/dist/lib/browser/CanvasContainer-IAWAWKZK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6800},"packages/plugins/plugin-conductor/dist/lib/browser/CanvasContainer-IAWAWKZK.mjs":{"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-compute","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["CanvasContainer","default"],"entryPoint":"packages/plugins/plugin-conductor/src/components/CanvasContainer.tsx","inputs":{"packages/plugins/plugin-conductor/src/components/CanvasContainer.tsx":{"bytesInOutput":3278}},"bytes":3472},"packages/plugins/plugin-conductor/dist/lib/browser/react-surface-I4XNNFSF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1762},"packages/plugins/plugin-conductor/dist/lib/browser/react-surface-I4XNNFSF.mjs":{"imports":[{"path":"packages/plugins/plugin-conductor/dist/lib/browser/chunk-B4FDW7Y7.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-conductor/dist/lib/browser/CanvasContainer-IAWAWKZK.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-conductor/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-conductor/src/capabilities/react-surface.tsx":{"bytesInOutput":562},"packages/plugins/plugin-conductor/src/components/index.ts":{"bytesInOutput":106}},"bytes":1034},"packages/plugins/plugin-conductor/dist/lib/browser/chunk-B4FDW7Y7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1065},"packages/plugins/plugin-conductor/dist/lib/browser/chunk-B4FDW7Y7.mjs":{"imports":[],"exports":["CONDUCTOR_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-conductor/src/meta.ts":{"bytesInOutput":590}},"bytes":723}}}
|
|
1
|
+
{"inputs":{"src/components/CanvasContainer.tsx":{"bytes":11298,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-automation","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-compute","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"format":"esm"},"src/components/index.ts":{"bytes":572,"imports":[{"path":"src/components/CanvasContainer.tsx","kind":"import-statement","original":"./CanvasContainer"}],"format":"esm"},"src/meta.ts":{"bytes":2257,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":3436,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":913,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":490,"imports":[{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":2754,"imports":[{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/ConductorPlugin.tsx":{"bytes":4119,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":559,"imports":[{"path":"src/ConductorPlugin.tsx","kind":"import-statement","original":"./ConductorPlugin"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3708},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GV4DJFU6.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-FRVZG3LI.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["ConductorPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/ConductorPlugin.tsx":{"bytesInOutput":813},"src/capabilities/react-surface/index.ts":{"bytesInOutput":148},"src/capabilities/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":639},"src/index.ts":{"bytesInOutput":0}},"bytes":1844},"dist/lib/browser/react-surface-FRVZG3LI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7964},"dist/lib/browser/react-surface-FRVZG3LI.mjs":{"imports":[{"path":"dist/lib/browser/chunk-GV4DJFU6.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-automation","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-compute","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":695},"src/components/CanvasContainer.tsx":{"bytesInOutput":2782},"src/components/index.ts":{"bytesInOutput":0}},"bytes":3768},"dist/lib/browser/chunk-GV4DJFU6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1067},"dist/lib/browser/chunk-GV4DJFU6.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":589}},"bytes":668}}}
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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 };\n }, [controller]);\n\n return controller;\n};\n\nexport default CanvasContainer;\n"],
|
|
5
|
+
"mappings": "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",
|
|
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
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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,40 +1,35 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
ConductorAction
|
|
4
|
-
} from "./chunk-7644E2YF.mjs";
|
|
5
|
-
import {
|
|
6
|
-
CONDUCTOR_PLUGIN,
|
|
7
3
|
meta
|
|
8
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DILME6SD.mjs";
|
|
9
5
|
|
|
10
|
-
//
|
|
11
|
-
import
|
|
6
|
+
// src/ConductorPlugin.tsx
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import { Plugin } from "@dxos/app-framework";
|
|
9
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
12
10
|
import { ComputeGraph } from "@dxos/conductor";
|
|
13
|
-
import {
|
|
14
|
-
import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
|
|
15
|
-
import { SpaceCapabilities } from "@dxos/plugin-space";
|
|
16
|
-
import { defineObjectForm } from "@dxos/plugin-space/types";
|
|
17
|
-
import { CanvasBoardType as CanvasBoardType2 } from "@dxos/react-ui-canvas-editor";
|
|
11
|
+
import { CanvasBoard as CanvasBoard2 } from "@dxos/react-ui-canvas-editor";
|
|
18
12
|
|
|
19
|
-
//
|
|
20
|
-
import {
|
|
21
|
-
var
|
|
22
|
-
var ReactSurface = lazy(() => import("./react-surface-WZFA32UY.mjs"));
|
|
13
|
+
// src/capabilities/react-surface/index.ts
|
|
14
|
+
import { Capability } from "@dxos/app-framework";
|
|
15
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-S6UQA6XL.mjs"));
|
|
23
16
|
|
|
24
|
-
//
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
var translations_default = [
|
|
17
|
+
// src/translations.ts
|
|
18
|
+
import { CanvasBoard } from "@dxos/react-ui-canvas-editor";
|
|
19
|
+
var translations = [
|
|
28
20
|
{
|
|
29
21
|
"en-US": {
|
|
30
|
-
[
|
|
22
|
+
[CanvasBoard.CanvasBoard.typename]: {
|
|
31
23
|
"typename label": "Circuit",
|
|
32
24
|
"typename label_zero": "Circuits",
|
|
33
25
|
"typename label_one": "Circuit",
|
|
34
26
|
"typename label_other": "Circuits",
|
|
35
|
-
"object name placeholder": "New circuit"
|
|
27
|
+
"object name placeholder": "New circuit",
|
|
28
|
+
"rename object label": "Rename circuit",
|
|
29
|
+
"delete object label": "Delete circuit",
|
|
30
|
+
"object deleted label": "Circuit deleted"
|
|
36
31
|
},
|
|
37
|
-
[
|
|
32
|
+
[meta.id]: {
|
|
38
33
|
"plugin name": "Conductor",
|
|
39
34
|
"content placeholder": "Enter text..."
|
|
40
35
|
}
|
|
@@ -42,52 +37,28 @@ var translations_default = [
|
|
|
42
37
|
}
|
|
43
38
|
];
|
|
44
39
|
|
|
45
|
-
//
|
|
46
|
-
var ConductorPlugin = ()
|
|
47
|
-
|
|
48
|
-
id:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
objectSchema: CanvasBoardType2,
|
|
67
|
-
getIntent: () => createIntent(ConductorAction.Create)
|
|
68
|
-
}))
|
|
69
|
-
}),
|
|
70
|
-
defineModule({
|
|
71
|
-
id: `${meta.id}/module/schema`,
|
|
72
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
73
|
-
activate: () => contributes(ClientCapabilities.Schema, [
|
|
74
|
-
ComputeGraph,
|
|
75
|
-
FunctionTrigger
|
|
76
|
-
])
|
|
77
|
-
}),
|
|
78
|
-
defineModule({
|
|
79
|
-
id: `${meta.id}/module/react-surface`,
|
|
80
|
-
activatesOn: Events.SetupReactSurface,
|
|
81
|
-
activate: ReactSurface
|
|
82
|
-
}),
|
|
83
|
-
defineModule({
|
|
84
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
85
|
-
activatesOn: Events.SetupIntentResolver,
|
|
86
|
-
activate: IntentResolver
|
|
87
|
-
})
|
|
88
|
-
]);
|
|
40
|
+
// src/ConductorPlugin.tsx
|
|
41
|
+
var ConductorPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
|
|
42
|
+
metadata: {
|
|
43
|
+
id: CanvasBoard2.CanvasBoard.typename,
|
|
44
|
+
metadata: {
|
|
45
|
+
icon: "ph--infinity--regular",
|
|
46
|
+
iconHue: "sky",
|
|
47
|
+
createObject: (props) => Effect.sync(() => CanvasBoard2.make(props)),
|
|
48
|
+
addToCollectionOnCreate: true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}), AppPlugin.addSchemaModule({
|
|
52
|
+
schema: [
|
|
53
|
+
CanvasBoard2.CanvasBoard,
|
|
54
|
+
ComputeGraph
|
|
55
|
+
]
|
|
56
|
+
}), AppPlugin.addSurfaceModule({
|
|
57
|
+
activate: ReactSurface
|
|
58
|
+
}), AppPlugin.addTranslationsModule({
|
|
59
|
+
translations
|
|
60
|
+
}), Plugin.make);
|
|
89
61
|
export {
|
|
90
|
-
CONDUCTOR_PLUGIN,
|
|
91
62
|
ConductorPlugin,
|
|
92
63
|
meta
|
|
93
64
|
};
|