@dxos/plugin-conductor 0.8.0 → 0.8.1-main.013e445
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/{CanvasContainer-2LHBQGCB.mjs → CanvasContainer-XJMJHW3L.mjs} +9 -4
- package/dist/lib/browser/CanvasContainer-XJMJHW3L.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DUUJXCVO.mjs → chunk-BRSQGILA.mjs} +1 -1
- package/dist/lib/browser/chunk-BRSQGILA.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KTJBLHAY.mjs → chunk-S6UYKZNN.mjs} +2 -2
- package/dist/lib/browser/index.mjs +6 -13
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-IKITW45C.mjs → intent-resolver-U7G6ZHGW.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-KAJ3W4G5.mjs → react-surface-ACS2VMEE.mjs} +5 -4
- package/dist/lib/browser/react-surface-ACS2VMEE.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +2 -2
- package/dist/lib/node/{CanvasContainer-YQK4QVL6.cjs → CanvasContainer-CY5KP4RX.cjs} +10 -5
- package/dist/lib/node/CanvasContainer-CY5KP4RX.cjs.map +7 -0
- package/dist/lib/node/{chunk-3WWLHGNO.cjs → chunk-4LVYIOVH.cjs} +6 -6
- package/dist/lib/node/{chunk-Y3VOCBBO.cjs → chunk-77WLIW54.cjs} +4 -4
- package/dist/lib/node/chunk-77WLIW54.cjs.map +7 -0
- package/dist/lib/node/index.cjs +17 -24
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-P6OSOKYW.cjs → intent-resolver-N2D4SLD4.cjs} +7 -7
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-NA74HMQP.cjs → react-surface-YXXBLFUX.cjs} +9 -8
- package/dist/lib/node/react-surface-YXXBLFUX.cjs.map +7 -0
- package/dist/lib/node/types.cjs +3 -3
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/{CanvasContainer-CJHLFVHB.mjs → CanvasContainer-JSGMRCQ7.mjs} +9 -4
- package/dist/lib/node-esm/CanvasContainer-JSGMRCQ7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ML7CFPFL.mjs → chunk-7HVDMRLN.mjs} +1 -1
- package/dist/lib/node-esm/chunk-7HVDMRLN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ZJLM74FY.mjs → chunk-BVBQK3ST.mjs} +2 -2
- package/dist/lib/node-esm/index.mjs +6 -13
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-LUU6EZQI.mjs → intent-resolver-H2DKT2UH.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-DX25CX6P.mjs → react-surface-TZB6XBCI.mjs} +5 -4
- package/dist/lib/node-esm/react-surface-TZB6XBCI.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +2 -2
- package/dist/types/src/ConductorPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/CanvasContainer.d.ts +2 -1
- package/dist/types/src/components/CanvasContainer.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -9
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/ConductorPlugin.tsx +1 -2
- package/src/capabilities/react-surface.tsx +2 -1
- package/src/components/CanvasContainer.tsx +4 -2
- package/src/meta.ts +2 -2
- package/src/translations.ts +1 -2
- package/dist/lib/browser/CanvasContainer-2LHBQGCB.mjs.map +0 -7
- package/dist/lib/browser/chunk-DUUJXCVO.mjs.map +0 -7
- package/dist/lib/browser/react-surface-KAJ3W4G5.mjs.map +0 -7
- package/dist/lib/node/CanvasContainer-YQK4QVL6.cjs.map +0 -7
- package/dist/lib/node/chunk-Y3VOCBBO.cjs.map +0 -7
- package/dist/lib/node/react-surface-NA74HMQP.cjs.map +0 -7
- package/dist/lib/node-esm/CanvasContainer-CJHLFVHB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ML7CFPFL.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-DX25CX6P.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-KTJBLHAY.mjs.map → chunk-S6UYKZNN.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-IKITW45C.mjs.map → intent-resolver-U7G6ZHGW.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-3WWLHGNO.cjs.map → chunk-4LVYIOVH.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-P6OSOKYW.cjs.map → intent-resolver-N2D4SLD4.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-ZJLM74FY.mjs.map → chunk-BVBQK3ST.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-LUU6EZQI.mjs.map → intent-resolver-H2DKT2UH.mjs.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// packages/plugins/experimental/plugin-conductor/src/components/CanvasContainer.tsx
|
|
2
2
|
import React, { useEffect, useMemo, useRef } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { AIServiceEdgeClient } from "@dxos/assistant";
|
|
4
4
|
import { ComputeGraphModel, EdgeGpt } from "@dxos/conductor";
|
|
5
5
|
import { createStubEdgeIdentity, EdgeClient, EdgeHttpClient } from "@dxos/edge-client";
|
|
6
6
|
import { useConfig } from "@dxos/react-client";
|
|
7
7
|
import { fullyQualifiedId, getSpace } from "@dxos/react-client/echo";
|
|
8
|
-
import { ComputeContext, ComputeGraphController, ComputeShapeLayout, computeShapes, useGraphMonitor } from "@dxos/react-ui-canvas-compute";
|
|
8
|
+
import { ComputeContext, ComputeGraphController, ComputeShapeLayout, computeShapes, useComputeGraphController, useGraphMonitor } from "@dxos/react-ui-canvas-compute";
|
|
9
9
|
import { CanvasGraphModel, Editor, KeyboardContainer, ShapeRegistry } from "@dxos/react-ui-canvas-editor";
|
|
10
10
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
11
11
|
var createServices = (config, space) => {
|
|
@@ -14,7 +14,7 @@ var createServices = (config, space) => {
|
|
|
14
14
|
spaceId: space.id,
|
|
15
15
|
db: space.db
|
|
16
16
|
},
|
|
17
|
-
gpt: config.values.runtime?.services?.ai?.server == null ? void 0 : new EdgeGpt(new
|
|
17
|
+
gpt: config.values.runtime?.services?.ai?.server == null ? void 0 : new EdgeGpt(new AIServiceEdgeClient({
|
|
18
18
|
endpoint: config.values.runtime?.services?.ai?.server
|
|
19
19
|
})),
|
|
20
20
|
edgeClient: config.values.runtime?.services?.edge?.url == null ? void 0 : new EdgeClient(createStubEdgeIdentity(), {
|
|
@@ -60,6 +60,11 @@ var CanvasContainer = ({ canvas, role }) => {
|
|
|
60
60
|
const graphMonitor = useGraphMonitor(controller?.graph);
|
|
61
61
|
const registry = useMemo(() => new ShapeRegistry(computeShapes), []);
|
|
62
62
|
const editorRef = useRef(null);
|
|
63
|
+
useComputeGraphController({
|
|
64
|
+
controller,
|
|
65
|
+
graph,
|
|
66
|
+
editorRef
|
|
67
|
+
});
|
|
63
68
|
const layout = useMemo(() => controller && registry ? new ComputeShapeLayout(controller, registry) : void 0, [
|
|
64
69
|
controller,
|
|
65
70
|
registry
|
|
@@ -92,4 +97,4 @@ export {
|
|
|
92
97
|
CanvasContainer,
|
|
93
98
|
CanvasContainer_default as default
|
|
94
99
|
};
|
|
95
|
-
//# sourceMappingURL=CanvasContainer-
|
|
100
|
+
//# sourceMappingURL=CanvasContainer-XJMJHW3L.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/CanvasContainer.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useEffect, useMemo, useRef } from 'react';\n\nimport { AIServiceEdgeClient } from '@dxos/assistant';\nimport { type Config } from '@dxos/client';\nimport { ComputeGraphModel, EdgeGpt } from '@dxos/conductor';\nimport { createStubEdgeIdentity, EdgeClient, EdgeHttpClient } from '@dxos/edge-client';\nimport { useConfig } from '@dxos/react-client';\nimport { fullyQualifiedId, getSpace, type Space } from '@dxos/react-client/echo';\nimport {\n ComputeContext,\n ComputeGraphController,\n type ComputeShape,\n ComputeShapeLayout,\n computeShapes,\n type Services,\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 { StackItem } from '@dxos/react-ui-stack';\n\nconst createServices = (config: Config, space?: Space): Partial<Services> => {\n return {\n spaceService:\n space == null\n ? undefined\n : {\n spaceId: space.id,\n db: space.db,\n },\n gpt:\n config.values.runtime?.services?.ai?.server == null\n ? undefined\n : new EdgeGpt(new AIServiceEdgeClient({ endpoint: config.values.runtime?.services?.ai?.server })),\n edgeClient:\n config.values.runtime?.services?.edge?.url == null\n ? undefined\n : new EdgeClient(createStubEdgeIdentity(), { socketEndpoint: config.values.runtime?.services?.edge?.url }),\n edgeHttpClient:\n config.values.runtime?.services?.edge?.url == null\n ? undefined\n : new EdgeHttpClient(config.values.runtime?.services?.edge?.url),\n };\n};\n\nconst useGraphController = (canvas: CanvasBoardType) => {\n const config = useConfig();\n const space = getSpace(canvas);\n const controller = useMemo(() => {\n if (!canvas.computeGraph?.target) {\n return null;\n }\n const model = new ComputeGraphModel(canvas.computeGraph?.target);\n const controller = new ComputeGraphController(model);\n controller.setServices(createServices(config, space));\n return controller;\n }, [canvas.computeGraph?.target, space]);\n\n useEffect(() => {\n if (!controller) {\n return;\n }\n void controller.open();\n return () => {\n void controller.close();\n };\n }, [controller]);\n\n return controller;\n};\n\nexport const CanvasContainer = ({ canvas, role }: { canvas: CanvasBoardType; role: string }) => {\n const id = fullyQualifiedId(canvas);\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 return (\n <ComputeContext.Provider value={{ controller }}>\n <StackItem.Content toolbar={false} size={role === 'section' ? 'square' : 'intrinsic'}>\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 </StackItem.Content>\n </ComputeContext.Provider>\n );\n};\n\nexport default CanvasContainer;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "useEffect", "useMemo", "useRef", "AIServiceEdgeClient", "ComputeGraphModel", "EdgeGpt", "createStubEdgeIdentity", "EdgeClient", "EdgeHttpClient", "useConfig", "fullyQualifiedId", "getSpace", "ComputeContext", "ComputeGraphController", "ComputeShapeLayout", "computeShapes", "useComputeGraphController", "useGraphMonitor", "CanvasGraphModel", "Editor", "KeyboardContainer", "ShapeRegistry", "StackItem", "createServices", "config", "space", "spaceService", "undefined", "spaceId", "id", "db", "gpt", "values", "runtime", "services", "ai", "server", "EdgeGpt", "AIServiceEdgeClient", "endpoint", "edgeClient", "edge", "url", "EdgeClient", "createStubEdgeIdentity", "socketEndpoint", "edgeHttpClient", "EdgeHttpClient", "useGraphController", "canvas", "useConfig", "getSpace", "controller", "useMemo", "computeGraph", "target", "model", "ComputeGraphModel", "ComputeGraphController", "setServices", "useEffect", "open", "close", "CanvasContainer", "role", "fullyQualifiedId", "graph", "CanvasGraphModel", "create", "layout", "graphMonitor", "useGraphMonitor", "registry", "ShapeRegistry", "computeShapes", "editorRef", "useRef", "useComputeGraphController", "ComputeShapeLayout", "ComputeContext", "Provider", "value", "StackItem", "Content", "toolbar", "size", "KeyboardContainer", "Editor", "Root", "ref", "Canvas", "UI", "showTools"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CONDUCTOR_PLUGIN = 'dxos.org/plugin/conductor';\n\nexport const meta: PluginMeta = {\n id: CONDUCTOR_PLUGIN,\n name: 'Conductor',\n description:\n 'Conductor allows you to build a node based compute graph that can handle complex workflows inside of Composer. Leverage your collaborative data along with custom scripts to orchestrate agentic workflows that operate in the background.',\n icon: 'ph--infinity--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-conductor',\n tags: ['experimental'],\n screenshots: ['https://dxos.network/plugin-details-canvas-dark.png'],\n};\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,mBAAmB;AAEzB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;",
|
|
6
|
+
"names": ["CONDUCTOR_PLUGIN", "meta", "id", "name", "description", "icon", "source", "tags", "screenshots"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CONDUCTOR_PLUGIN
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BRSQGILA.mjs";
|
|
4
4
|
|
|
5
5
|
// packages/plugins/experimental/plugin-conductor/src/types.ts
|
|
6
6
|
import { S } from "@dxos/echo-schema";
|
|
@@ -23,4 +23,4 @@ var ConductorAction;
|
|
|
23
23
|
export {
|
|
24
24
|
ConductorAction
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-S6UYKZNN.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConductorAction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S6UYKZNN.mjs";
|
|
4
4
|
import {
|
|
5
5
|
CONDUCTOR_PLUGIN,
|
|
6
6
|
meta
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BRSQGILA.mjs";
|
|
8
8
|
|
|
9
9
|
// packages/plugins/experimental/plugin-conductor/src/ConductorPlugin.tsx
|
|
10
10
|
import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
|
|
@@ -17,8 +17,8 @@ import { CanvasBoardType as CanvasBoardType2 } from "@dxos/react-ui-canvas-edito
|
|
|
17
17
|
|
|
18
18
|
// packages/plugins/experimental/plugin-conductor/src/capabilities/index.ts
|
|
19
19
|
import { lazy } from "@dxos/app-framework";
|
|
20
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
21
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
20
|
+
var IntentResolver = lazy(() => import("./intent-resolver-U7G6ZHGW.mjs"));
|
|
21
|
+
var ReactSurface = lazy(() => import("./react-surface-ACS2VMEE.mjs"));
|
|
22
22
|
|
|
23
23
|
// packages/plugins/experimental/plugin-conductor/src/translations.ts
|
|
24
24
|
import { CanvasBoardType } from "@dxos/react-ui-canvas-editor";
|
|
@@ -26,12 +26,11 @@ var translations_default = [
|
|
|
26
26
|
{
|
|
27
27
|
"en-US": {
|
|
28
28
|
[CanvasBoardType.typename]: {
|
|
29
|
-
"typename label": "Circuit"
|
|
29
|
+
"typename label": "Circuit",
|
|
30
|
+
"object name placeholder": "New circuit"
|
|
30
31
|
},
|
|
31
32
|
[CONDUCTOR_PLUGIN]: {
|
|
32
33
|
"plugin name": "Conductor",
|
|
33
|
-
"canvas title placeholder": "New circuit",
|
|
34
|
-
"create canvas label": "Create circuit",
|
|
35
34
|
"content placeholder": "Enter text..."
|
|
36
35
|
}
|
|
37
36
|
}
|
|
@@ -51,12 +50,6 @@ var ConductorPlugin = () => definePlugin(meta, [
|
|
|
51
50
|
activate: () => contributes(Capabilities.Metadata, {
|
|
52
51
|
id: CanvasBoardType2.typename,
|
|
53
52
|
metadata: {
|
|
54
|
-
placeholder: [
|
|
55
|
-
"canvas title placeholder",
|
|
56
|
-
{
|
|
57
|
-
ns: CONDUCTOR_PLUGIN
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
53
|
icon: "ph--infinity--regular"
|
|
61
54
|
}
|
|
62
55
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/ConductorPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ComputeGraph } from '@dxos/conductor';\nimport { FunctionTrigger } from '@dxos/functions/types';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\nimport { CanvasBoardType } from '@dxos/react-ui-canvas-editor';\n\nimport { IntentResolver, ReactSurface } from './capabilities';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoB;AAC7B,SAASC,uBAAuB;AAChC,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;AACjC,SAASC,mBAAAA,wBAAuB;;;ACNhC,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACH9C,SAASE,uBAAuB;AAIhC,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,gBAAgBC,QAAQ,GAAG;QAC1B,kBAAkB;
|
|
6
|
-
"names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ComputeGraph", "FunctionTrigger", "ClientCapabilities", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "CanvasBoardType", "lazy", "IntentResolver", "lazy", "ReactSurface", "CanvasBoardType", "CanvasBoardType", "typename", "CONDUCTOR_PLUGIN", "ConductorPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "CanvasBoardType", "typename", "metadata", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ComputeGraph } from '@dxos/conductor';\nimport { FunctionTrigger } from '@dxos/functions/types';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\nimport { CanvasBoardType } from '@dxos/react-ui-canvas-editor';\n\nimport { IntentResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { ConductorAction } from './types';\n\nexport const ConductorPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: CanvasBoardType.typename,\n metadata: {\n icon: 'ph--infinity--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: CanvasBoardType,\n getIntent: () => createIntent(ConductorAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [ComputeGraph, FunctionTrigger]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CanvasBoardType } from '@dxos/react-ui-canvas-editor';\n\nimport { CONDUCTOR_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [CanvasBoardType.typename]: {\n 'typename label': 'Circuit',\n 'object name placeholder': 'New circuit',\n },\n [CONDUCTOR_PLUGIN]: {\n 'plugin name': 'Conductor',\n 'content placeholder': 'Enter text...',\n },\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoB;AAC7B,SAASC,uBAAuB;AAChC,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;AACjC,SAASC,mBAAAA,wBAAuB;;;ACNhC,SAASC,YAAY;AAEd,IAAMC,iBAAiBC,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAMC,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACH9C,SAASE,uBAAuB;AAIhC,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,gBAAgBC,QAAQ,GAAG;QAC1B,kBAAkB;QAClB,2BAA2B;MAC7B;MACA,CAACC,gBAAAA,GAAmB;QAClB,eAAe;QACf,uBAAuB;MACzB;IACF;EACF;;;;AFHK,IAAMC,kBAAkB,MAC7BC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,iBAAgBC;MACpBC,UAAU;QACRC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAac,aAAaC;IAC1BZ,UAAU,MACRC,YACEY,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcT;MACdU,WAAW,MAAMC,aAAaC,gBAAgBC,MAAM;IACtD,CAAA,CAAA;EAEN,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAac,aAAaC;IAC1BZ,UAAU,MAAMC,YAAYoB,mBAAmBC,QAAQ;MAACC;MAAcC;KAAgB;EACxF,CAAA;EACA7B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO2B;IACpBzB,UAAU0B;EACZ,CAAA;EACA/B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO6B;IACpB3B,UAAU4B;EACZ,CAAA;CACD;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ComputeGraph", "FunctionTrigger", "ClientCapabilities", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "CanvasBoardType", "lazy", "IntentResolver", "lazy", "ReactSurface", "CanvasBoardType", "CanvasBoardType", "typename", "CONDUCTOR_PLUGIN", "ConductorPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "CanvasBoardType", "typename", "metadata", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ConductorAction", "Create", "ClientCapabilities", "Schema", "ComputeGraph", "FunctionTrigger", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConductorAction
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-S6UYKZNN.mjs";
|
|
4
|
+
import "./chunk-BRSQGILA.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts
|
|
7
7
|
import { Capabilities, contributes, createResolver } from "@dxos/app-framework";
|
|
@@ -31,4 +31,4 @@ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, cre
|
|
|
31
31
|
export {
|
|
32
32
|
intent_resolver_default as default
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=intent-resolver-
|
|
34
|
+
//# sourceMappingURL=intent-resolver-U7G6ZHGW.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/experimental/plugin-conductor/src/meta.ts":{"bytes":2384,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/types.ts":{"bytes":2387,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts":{"bytes":3490,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/components/CanvasContainer.tsx":{"bytes":13257,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/edge-client","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/experimental/plugin-conductor/src/components/index.ts":{"bytes":821,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/components/CanvasContainer.tsx","kind":"dynamic-import","original":"./CanvasContainer"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx":{"bytes":2810,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/capabilities/index.ts":{"bytes":1097,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/translations.ts":{"bytes":2025,"imports":[{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/ConductorPlugin.tsx":{"bytes":8758,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/functions/types","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/experimental/plugin-conductor/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-conductor/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-conductor/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/index.ts":{"bytes":617,"imports":[{"path":"packages/plugins/experimental/plugin-conductor/src/ConductorPlugin.tsx","kind":"import-statement","original":"./ConductorPlugin"},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-conductor/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5500},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-KTJBLHAY.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-DUUJXCVO.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/functions/types","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/experimental/plugin-conductor/dist/lib/browser/intent-resolver-IKITW45C.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/react-surface-KAJ3W4G5.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["CONDUCTOR_PLUGIN","ConductorPlugin","meta"],"entryPoint":"packages/plugins/experimental/plugin-conductor/src/index.ts","inputs":{"packages/plugins/experimental/plugin-conductor/src/ConductorPlugin.tsx":{"bytesInOutput":1912},"packages/plugins/experimental/plugin-conductor/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/experimental/plugin-conductor/src/translations.ts":{"bytesInOutput":425},"packages/plugins/experimental/plugin-conductor/src/index.ts":{"bytesInOutput":0}},"bytes":3043},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-KTJBLHAY.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-DUUJXCVO.mjs","kind":"import-statement"}],"exports":["ConductorAction"],"entryPoint":"packages/plugins/experimental/plugin-conductor/src/types.ts","inputs":{},"bytes":154},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/intent-resolver-IKITW45C.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1693},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/intent-resolver-IKITW45C.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-KTJBLHAY.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-DUUJXCVO.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts":{"bytesInOutput":704}},"bytes":983},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-KTJBLHAY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1159},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-KTJBLHAY.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-DUUJXCVO.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["ConductorAction"],"inputs":{"packages/plugins/experimental/plugin-conductor/src/types.ts":{"bytesInOutput":499}},"bytes":697},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/CanvasContainer-2LHBQGCB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7298},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/CanvasContainer-2LHBQGCB.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/edge-client","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/experimental/plugin-conductor/src/components/CanvasContainer.tsx","inputs":{"packages/plugins/experimental/plugin-conductor/src/components/CanvasContainer.tsx":{"bytesInOutput":3251}},"bytes":3458},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/react-surface-KAJ3W4G5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1659},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/react-surface-KAJ3W4G5.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-DUUJXCVO.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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/experimental/plugin-conductor/dist/lib/browser/CanvasContainer-2LHBQGCB.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx":{"bytesInOutput":522},"packages/plugins/experimental/plugin-conductor/src/components/index.ts":{"bytesInOutput":106}},"bytes":1033},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-DUUJXCVO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1094},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-DUUJXCVO.mjs":{"imports":[],"exports":["CONDUCTOR_PLUGIN","meta"],"inputs":{"packages/plugins/experimental/plugin-conductor/src/meta.ts":{"bytesInOutput":611}},"bytes":757}}}
|
|
1
|
+
{"inputs":{"packages/plugins/experimental/plugin-conductor/src/meta.ts":{"bytes":2372,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/types.ts":{"bytes":2387,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts":{"bytes":3490,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/components/CanvasContainer.tsx":{"bytes":13617,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/edge-client","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/experimental/plugin-conductor/src/components/index.ts":{"bytes":821,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/components/CanvasContainer.tsx","kind":"dynamic-import","original":"./CanvasContainer"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx":{"bytes":3008,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/capabilities/index.ts":{"bytes":1097,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/translations.ts":{"bytes":1879,"imports":[{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/ConductorPlugin.tsx":{"bytes":8217,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/functions/types","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/experimental/plugin-conductor/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-conductor/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-conductor/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-conductor/src/index.ts":{"bytes":617,"imports":[{"path":"packages/plugins/experimental/plugin-conductor/src/ConductorPlugin.tsx","kind":"import-statement","original":"./ConductorPlugin"},{"path":"packages/plugins/experimental/plugin-conductor/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-conductor/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5250},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-S6UYKZNN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-BRSQGILA.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/functions/types","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/experimental/plugin-conductor/dist/lib/browser/intent-resolver-U7G6ZHGW.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/react-surface-ACS2VMEE.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["CONDUCTOR_PLUGIN","ConductorPlugin","meta"],"entryPoint":"packages/plugins/experimental/plugin-conductor/src/index.ts","inputs":{"packages/plugins/experimental/plugin-conductor/src/ConductorPlugin.tsx":{"bytesInOutput":1783},"packages/plugins/experimental/plugin-conductor/src/capabilities/index.ts":{"bytesInOutput":190},"packages/plugins/experimental/plugin-conductor/src/translations.ts":{"bytesInOutput":375},"packages/plugins/experimental/plugin-conductor/src/index.ts":{"bytesInOutput":0}},"bytes":2864},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-S6UYKZNN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-BRSQGILA.mjs","kind":"import-statement"}],"exports":["ConductorAction"],"entryPoint":"packages/plugins/experimental/plugin-conductor/src/types.ts","inputs":{},"bytes":154},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/intent-resolver-U7G6ZHGW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1693},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/intent-resolver-U7G6ZHGW.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-S6UYKZNN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-BRSQGILA.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/experimental/plugin-conductor/src/capabilities/intent-resolver.ts":{"bytesInOutput":704}},"bytes":983},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-S6UYKZNN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1159},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-S6UYKZNN.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-BRSQGILA.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["ConductorAction"],"inputs":{"packages/plugins/experimental/plugin-conductor/src/types.ts":{"bytesInOutput":499}},"bytes":697},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/CanvasContainer-XJMJHW3L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7500},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/CanvasContainer-XJMJHW3L.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/edge-client","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/experimental/plugin-conductor/src/components/CanvasContainer.tsx","inputs":{"packages/plugins/experimental/plugin-conductor/src/components/CanvasContainer.tsx":{"bytesInOutput":3355}},"bytes":3562},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/react-surface-ACS2VMEE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1776},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/react-surface-ACS2VMEE.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-BRSQGILA.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","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/experimental/plugin-conductor/dist/lib/browser/CanvasContainer-XJMJHW3L.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx":{"bytesInOutput":576},"packages/plugins/experimental/plugin-conductor/src/components/index.ts":{"bytesInOutput":106}},"bytes":1087},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-BRSQGILA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1086},"packages/plugins/experimental/plugin-conductor/dist/lib/browser/chunk-BRSQGILA.mjs":{"imports":[],"exports":["CONDUCTOR_PLUGIN","meta"],"inputs":{"packages/plugins/experimental/plugin-conductor/src/meta.ts":{"bytesInOutput":611}},"bytes":757}}}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CONDUCTOR_PLUGIN
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BRSQGILA.mjs";
|
|
4
4
|
|
|
5
5
|
// packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
8
|
+
import { isInstanceOf } from "@dxos/echo-schema";
|
|
8
9
|
import { CanvasBoardType } from "@dxos/react-ui-canvas-editor";
|
|
9
10
|
|
|
10
11
|
// packages/plugins/experimental/plugin-conductor/src/components/index.ts
|
|
11
12
|
import { lazy } from "react";
|
|
12
|
-
var CanvasContainer = lazy(() => import("./CanvasContainer-
|
|
13
|
+
var CanvasContainer = lazy(() => import("./CanvasContainer-XJMJHW3L.mjs"));
|
|
13
14
|
|
|
14
15
|
// packages/plugins/experimental/plugin-conductor/src/capabilities/react-surface.tsx
|
|
15
16
|
var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
|
|
@@ -18,7 +19,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
|
|
|
18
19
|
"article",
|
|
19
20
|
"section"
|
|
20
21
|
],
|
|
21
|
-
filter: (data) => data.subject
|
|
22
|
+
filter: (data) => isInstanceOf(CanvasBoardType, data.subject),
|
|
22
23
|
component: ({ data, role }) => /* @__PURE__ */ React.createElement(CanvasContainer, {
|
|
23
24
|
canvas: data.subject,
|
|
24
25
|
role
|
|
@@ -27,4 +28,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
|
|
|
27
28
|
export {
|
|
28
29
|
react_surface_default as default
|
|
29
30
|
};
|
|
30
|
-
//# sourceMappingURL=react-surface-
|
|
31
|
+
//# sourceMappingURL=react-surface-ACS2VMEE.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { CanvasBoardType } from '@dxos/react-ui-canvas-editor';\n\nimport { CanvasContainer } from '../components';\nimport { CONDUCTOR_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: CONDUCTOR_PLUGIN,\n role: ['article', 'section'],\n filter: (data): data is { subject: CanvasBoardType } => isInstanceOf(CanvasBoardType, data.subject),\n component: ({ data, role }) => <CanvasContainer canvas={data.subject} role={role} />,\n }),\n );\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const CanvasContainer = lazy(() => import('./CanvasContainer'));\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,oBAAoB;AAC7B,SAASC,uBAAuB;;;ACJhC,SAASC,YAAY;AAEd,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,gCAAA,CAAA;;;ADOjD,IAAA,wBAAe,MACbC,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAIC;EACJC,MAAM;IAAC;IAAW;;EAClBC,QAAQ,CAACC,SAA+CC,aAAaC,iBAAiBF,KAAKG,OAAO;EAClGC,WAAW,CAAC,EAAEJ,MAAMF,KAAI,MAAO,sBAAA,cAACO,iBAAAA;IAAgBC,QAAQN,KAAKG;IAASL;;AACxE,CAAA,CAAA;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "createSurface", "isInstanceOf", "CanvasBoardType", "lazy", "CanvasContainer", "lazy", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "CONDUCTOR_PLUGIN", "role", "filter", "data", "isInstanceOf", "CanvasBoardType", "subject", "component", "CanvasContainer", "canvas"]
|
|
7
|
+
}
|
|
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var CanvasContainer_CY5KP4RX_exports = {};
|
|
30
|
+
__export(CanvasContainer_CY5KP4RX_exports, {
|
|
31
31
|
CanvasContainer: () => CanvasContainer,
|
|
32
32
|
default: () => CanvasContainer_default
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(CanvasContainer_CY5KP4RX_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_assistant = require("@dxos/assistant");
|
|
37
37
|
var import_conductor = require("@dxos/conductor");
|
|
@@ -47,7 +47,7 @@ var createServices = (config, space) => {
|
|
|
47
47
|
spaceId: space.id,
|
|
48
48
|
db: space.db
|
|
49
49
|
},
|
|
50
|
-
gpt: config.values.runtime?.services?.ai?.server == null ? void 0 : new import_conductor.EdgeGpt(new import_assistant.
|
|
50
|
+
gpt: config.values.runtime?.services?.ai?.server == null ? void 0 : new import_conductor.EdgeGpt(new import_assistant.AIServiceEdgeClient({
|
|
51
51
|
endpoint: config.values.runtime?.services?.ai?.server
|
|
52
52
|
})),
|
|
53
53
|
edgeClient: config.values.runtime?.services?.edge?.url == null ? void 0 : new import_edge_client.EdgeClient((0, import_edge_client.createStubEdgeIdentity)(), {
|
|
@@ -93,6 +93,11 @@ var CanvasContainer = ({ canvas, role }) => {
|
|
|
93
93
|
const graphMonitor = (0, import_react_ui_canvas_compute.useGraphMonitor)(controller?.graph);
|
|
94
94
|
const registry = (0, import_react.useMemo)(() => new import_react_ui_canvas_editor.ShapeRegistry(import_react_ui_canvas_compute.computeShapes), []);
|
|
95
95
|
const editorRef = (0, import_react.useRef)(null);
|
|
96
|
+
(0, import_react_ui_canvas_compute.useComputeGraphController)({
|
|
97
|
+
controller,
|
|
98
|
+
graph,
|
|
99
|
+
editorRef
|
|
100
|
+
});
|
|
96
101
|
const layout = (0, import_react.useMemo)(() => controller && registry ? new import_react_ui_canvas_compute.ComputeShapeLayout(controller, registry) : void 0, [
|
|
97
102
|
controller,
|
|
98
103
|
registry
|
|
@@ -125,4 +130,4 @@ var CanvasContainer_default = CanvasContainer;
|
|
|
125
130
|
0 && (module.exports = {
|
|
126
131
|
CanvasContainer
|
|
127
132
|
});
|
|
128
|
-
//# sourceMappingURL=CanvasContainer-
|
|
133
|
+
//# sourceMappingURL=CanvasContainer-CY5KP4RX.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/CanvasContainer.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useEffect, useMemo, useRef } from 'react';\n\nimport { AIServiceEdgeClient } from '@dxos/assistant';\nimport { type Config } from '@dxos/client';\nimport { ComputeGraphModel, EdgeGpt } from '@dxos/conductor';\nimport { createStubEdgeIdentity, EdgeClient, EdgeHttpClient } from '@dxos/edge-client';\nimport { useConfig } from '@dxos/react-client';\nimport { fullyQualifiedId, getSpace, type Space } from '@dxos/react-client/echo';\nimport {\n ComputeContext,\n ComputeGraphController,\n type ComputeShape,\n ComputeShapeLayout,\n computeShapes,\n type Services,\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 { StackItem } from '@dxos/react-ui-stack';\n\nconst createServices = (config: Config, space?: Space): Partial<Services> => {\n return {\n spaceService:\n space == null\n ? undefined\n : {\n spaceId: space.id,\n db: space.db,\n },\n gpt:\n config.values.runtime?.services?.ai?.server == null\n ? undefined\n : new EdgeGpt(new AIServiceEdgeClient({ endpoint: config.values.runtime?.services?.ai?.server })),\n edgeClient:\n config.values.runtime?.services?.edge?.url == null\n ? undefined\n : new EdgeClient(createStubEdgeIdentity(), { socketEndpoint: config.values.runtime?.services?.edge?.url }),\n edgeHttpClient:\n config.values.runtime?.services?.edge?.url == null\n ? undefined\n : new EdgeHttpClient(config.values.runtime?.services?.edge?.url),\n };\n};\n\nconst useGraphController = (canvas: CanvasBoardType) => {\n const config = useConfig();\n const space = getSpace(canvas);\n const controller = useMemo(() => {\n if (!canvas.computeGraph?.target) {\n return null;\n }\n const model = new ComputeGraphModel(canvas.computeGraph?.target);\n const controller = new ComputeGraphController(model);\n controller.setServices(createServices(config, space));\n return controller;\n }, [canvas.computeGraph?.target, space]);\n\n useEffect(() => {\n if (!controller) {\n return;\n }\n void controller.open();\n return () => {\n void controller.close();\n };\n }, [controller]);\n\n return controller;\n};\n\nexport const CanvasContainer = ({ canvas, role }: { canvas: CanvasBoardType; role: string }) => {\n const id = fullyQualifiedId(canvas);\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 return (\n <ComputeContext.Provider value={{ controller }}>\n <StackItem.Content toolbar={false} size={role === 'section' ? 'square' : 'intrinsic'}>\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 </StackItem.Content>\n </ComputeContext.Provider>\n );\n};\n\nexport default CanvasContainer;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["createServices", "config", "space", "spaceService", "undefined", "spaceId", "id", "db", "gpt", "values", "runtime", "services", "ai", "server", "EdgeGpt", "AIServiceEdgeClient", "endpoint", "edgeClient", "edge", "url", "EdgeClient", "createStubEdgeIdentity", "socketEndpoint", "edgeHttpClient", "EdgeHttpClient", "useGraphController", "canvas", "useConfig", "getSpace", "controller", "useMemo", "computeGraph", "target", "model", "ComputeGraphModel", "ComputeGraphController", "setServices", "useEffect", "open", "close", "CanvasContainer", "role", "fullyQualifiedId", "graph", "CanvasGraphModel", "create", "layout", "graphMonitor", "useGraphMonitor", "registry", "ShapeRegistry", "computeShapes", "editorRef", "useRef", "useComputeGraphController", "ComputeShapeLayout", "React", "ComputeContext", "Provider", "value", "StackItem", "Content", "toolbar", "size", "KeyboardContainer", "Editor", "Root", "ref", "Canvas", "UI", "showTools"]
|
|
7
|
+
}
|
|
@@ -16,17 +16,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_4LVYIOVH_exports = {};
|
|
20
|
+
__export(chunk_4LVYIOVH_exports, {
|
|
21
21
|
ConductorAction: () => ConductorAction
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_4LVYIOVH_exports);
|
|
24
|
+
var import_chunk_77WLIW54 = require("./chunk-77WLIW54.cjs");
|
|
25
25
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
26
26
|
var import_react_ui_canvas_editor = require("@dxos/react-ui-canvas-editor");
|
|
27
27
|
var ConductorAction;
|
|
28
28
|
(function(ConductorAction2) {
|
|
29
|
-
const CONDUCTOR_ACTION = `${
|
|
29
|
+
const CONDUCTOR_ACTION = `${import_chunk_77WLIW54.CONDUCTOR_PLUGIN}/action`;
|
|
30
30
|
class Create extends import_echo_schema.S.TaggedClass()(`${CONDUCTOR_ACTION}/create`, {
|
|
31
31
|
input: import_echo_schema.S.Struct({
|
|
32
32
|
name: import_echo_schema.S.optional(import_echo_schema.S.String)
|
|
@@ -42,4 +42,4 @@ var ConductorAction;
|
|
|
42
42
|
0 && (module.exports = {
|
|
43
43
|
ConductorAction
|
|
44
44
|
});
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-4LVYIOVH.cjs.map
|
|
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_77WLIW54_exports = {};
|
|
20
|
+
__export(chunk_77WLIW54_exports, {
|
|
21
21
|
CONDUCTOR_PLUGIN: () => CONDUCTOR_PLUGIN,
|
|
22
22
|
meta: () => meta
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_77WLIW54_exports);
|
|
25
25
|
var CONDUCTOR_PLUGIN = "dxos.org/plugin/conductor";
|
|
26
26
|
var meta = {
|
|
27
27
|
id: CONDUCTOR_PLUGIN,
|
|
@@ -41,4 +41,4 @@ var meta = {
|
|
|
41
41
|
CONDUCTOR_PLUGIN,
|
|
42
42
|
meta
|
|
43
43
|
});
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-77WLIW54.cjs.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 PluginMeta } from '@dxos/app-framework';\n\nexport const CONDUCTOR_PLUGIN = 'dxos.org/plugin/conductor';\n\nexport const meta: PluginMeta = {\n id: CONDUCTOR_PLUGIN,\n name: 'Conductor',\n description:\n 'Conductor allows you to build a node based compute graph that can handle complex workflows inside of Composer. Leverage your collaborative data along with custom scripts to orchestrate agentic workflows that operate in the background.',\n icon: 'ph--infinity--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-conductor',\n tags: ['experimental'],\n screenshots: ['https://dxos.network/plugin-details-canvas-dark.png'],\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,mBAAmB;AAEzB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB;",
|
|
6
|
+
"names": ["CONDUCTOR_PLUGIN", "meta", "id", "name", "description", "icon", "source", "tags", "screenshots"]
|
|
7
|
+
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -28,13 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
|
-
CONDUCTOR_PLUGIN: () =>
|
|
31
|
+
CONDUCTOR_PLUGIN: () => import_chunk_77WLIW54.CONDUCTOR_PLUGIN,
|
|
32
32
|
ConductorPlugin: () => ConductorPlugin,
|
|
33
|
-
meta: () =>
|
|
33
|
+
meta: () => import_chunk_77WLIW54.meta
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(node_exports);
|
|
36
|
-
var
|
|
37
|
-
var
|
|
36
|
+
var import_chunk_4LVYIOVH = require("./chunk-4LVYIOVH.cjs");
|
|
37
|
+
var import_chunk_77WLIW54 = require("./chunk-77WLIW54.cjs");
|
|
38
38
|
var import_app_framework = require("@dxos/app-framework");
|
|
39
39
|
var import_conductor = require("@dxos/conductor");
|
|
40
40
|
var import_types = require("@dxos/functions/types");
|
|
@@ -44,55 +44,48 @@ var import_types2 = require("@dxos/plugin-space/types");
|
|
|
44
44
|
var import_react_ui_canvas_editor = require("@dxos/react-ui-canvas-editor");
|
|
45
45
|
var import_app_framework2 = require("@dxos/app-framework");
|
|
46
46
|
var import_react_ui_canvas_editor2 = require("@dxos/react-ui-canvas-editor");
|
|
47
|
-
var IntentResolver = (0, import_app_framework2.lazy)(() => import("./intent-resolver-
|
|
48
|
-
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-
|
|
47
|
+
var IntentResolver = (0, import_app_framework2.lazy)(() => import("./intent-resolver-N2D4SLD4.cjs"));
|
|
48
|
+
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-YXXBLFUX.cjs"));
|
|
49
49
|
var translations_default = [
|
|
50
50
|
{
|
|
51
51
|
"en-US": {
|
|
52
52
|
[import_react_ui_canvas_editor2.CanvasBoardType.typename]: {
|
|
53
|
-
"typename label": "Circuit"
|
|
53
|
+
"typename label": "Circuit",
|
|
54
|
+
"object name placeholder": "New circuit"
|
|
54
55
|
},
|
|
55
|
-
[
|
|
56
|
+
[import_chunk_77WLIW54.CONDUCTOR_PLUGIN]: {
|
|
56
57
|
"plugin name": "Conductor",
|
|
57
|
-
"canvas title placeholder": "New circuit",
|
|
58
|
-
"create canvas label": "Create circuit",
|
|
59
58
|
"content placeholder": "Enter text..."
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
];
|
|
64
|
-
var ConductorPlugin = () => (0, import_app_framework.definePlugin)(
|
|
63
|
+
var ConductorPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_77WLIW54.meta, [
|
|
65
64
|
(0, import_app_framework.defineModule)({
|
|
66
|
-
id: `${
|
|
65
|
+
id: `${import_chunk_77WLIW54.meta.id}/module/translations`,
|
|
67
66
|
activatesOn: import_app_framework.Events.SetupTranslations,
|
|
68
67
|
activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
|
|
69
68
|
}),
|
|
70
69
|
(0, import_app_framework.defineModule)({
|
|
71
|
-
id: `${
|
|
70
|
+
id: `${import_chunk_77WLIW54.meta.id}/module/metadata`,
|
|
72
71
|
activatesOn: import_app_framework.Events.SetupMetadata,
|
|
73
72
|
activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Metadata, {
|
|
74
73
|
id: import_react_ui_canvas_editor.CanvasBoardType.typename,
|
|
75
74
|
metadata: {
|
|
76
|
-
placeholder: [
|
|
77
|
-
"canvas title placeholder",
|
|
78
|
-
{
|
|
79
|
-
ns: import_chunk_Y3VOCBBO.CONDUCTOR_PLUGIN
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
75
|
icon: "ph--infinity--regular"
|
|
83
76
|
}
|
|
84
77
|
})
|
|
85
78
|
}),
|
|
86
79
|
(0, import_app_framework.defineModule)({
|
|
87
|
-
id: `${
|
|
80
|
+
id: `${import_chunk_77WLIW54.meta.id}/module/object-form`,
|
|
88
81
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
89
82
|
activate: () => (0, import_app_framework.contributes)(import_plugin_space.SpaceCapabilities.ObjectForm, (0, import_types2.defineObjectForm)({
|
|
90
83
|
objectSchema: import_react_ui_canvas_editor.CanvasBoardType,
|
|
91
|
-
getIntent: () => (0, import_app_framework.createIntent)(
|
|
84
|
+
getIntent: () => (0, import_app_framework.createIntent)(import_chunk_4LVYIOVH.ConductorAction.Create)
|
|
92
85
|
}))
|
|
93
86
|
}),
|
|
94
87
|
(0, import_app_framework.defineModule)({
|
|
95
|
-
id: `${
|
|
88
|
+
id: `${import_chunk_77WLIW54.meta.id}/module/schema`,
|
|
96
89
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
97
90
|
activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.Schema, [
|
|
98
91
|
import_conductor.ComputeGraph,
|
|
@@ -100,12 +93,12 @@ var ConductorPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_
|
|
|
100
93
|
])
|
|
101
94
|
}),
|
|
102
95
|
(0, import_app_framework.defineModule)({
|
|
103
|
-
id: `${
|
|
96
|
+
id: `${import_chunk_77WLIW54.meta.id}/module/react-surface`,
|
|
104
97
|
activatesOn: import_app_framework.Events.SetupReactSurface,
|
|
105
98
|
activate: ReactSurface
|
|
106
99
|
}),
|
|
107
100
|
(0, import_app_framework.defineModule)({
|
|
108
|
-
id: `${
|
|
101
|
+
id: `${import_chunk_77WLIW54.meta.id}/module/intent-resolver`,
|
|
109
102
|
activatesOn: import_app_framework.Events.SetupIntentResolver,
|
|
110
103
|
activate: IntentResolver
|
|
111
104
|
})
|