@dxos/plugin-conductor 0.8.4-main.406dc2a → 0.8.4-main.43cb759274
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/PLUGIN.mdl +461 -0
- package/README.md +7 -3
- package/dist/lib/neutral/CanvasArticle-KEPXL3ZT.mjs +98 -0
- package/dist/lib/neutral/CanvasArticle-KEPXL3ZT.mjs.map +7 -0
- package/dist/lib/neutral/ConductorPlugin.mjs +38 -0
- package/dist/lib/neutral/ConductorPlugin.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +9 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WDHL35VB.mjs +39 -0
- package/dist/lib/neutral/chunk-WDHL35VB.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1 -0
- package/dist/lib/neutral/containers/index.mjs +7 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-object-PTHDJAGI.mjs +26 -0
- package/dist/lib/neutral/create-object-PTHDJAGI.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +7 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +11 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-JCMKXAUY.mjs +22 -0
- package/dist/lib/neutral/react-surface-JCMKXAUY.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +29 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/types/src/ConductorPlugin.d.ts +3 -1
- package/dist/types/src/ConductorPlugin.d.ts.map +1 -1
- package/dist/types/src/ConductorPlugin.test.d.ts +2 -0
- package/dist/types/src/ConductorPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CanvasArticle/CanvasArticle.d.ts +6 -0
- package/dist/types/src/containers/CanvasArticle/CanvasArticle.d.ts.map +1 -0
- package/dist/types/src/containers/CanvasArticle/index.d.ts +2 -0
- package/dist/types/src/containers/CanvasArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +3 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +24 -14
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +83 -48
- package/src/ConductorPlugin.test.ts +27 -0
- package/src/ConductorPlugin.tsx +20 -54
- package/src/capabilities/create-object.ts +30 -0
- package/src/capabilities/index.ts +3 -3
- package/src/capabilities/react-surface.tsx +24 -15
- package/src/components/index.ts +1 -5
- package/src/containers/CanvasArticle/CanvasArticle.tsx +127 -0
- package/src/containers/CanvasArticle/index.ts +5 -0
- package/src/containers/index.ts +7 -0
- package/src/index.ts +0 -1
- package/src/meta.ts +24 -6
- package/src/plugin.ts +9 -0
- package/src/translations.ts +15 -12
- package/src/types/index.ts +0 -2
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/CanvasContainer-5TA2MZRA.mjs +0 -94
- package/dist/lib/browser/CanvasContainer-5TA2MZRA.mjs.map +0 -7
- package/dist/lib/browser/chunk-4QBTY4AV.mjs +0 -25
- package/dist/lib/browser/chunk-4QBTY4AV.mjs.map +0 -7
- package/dist/lib/browser/chunk-AETQP5S5.mjs +0 -19
- package/dist/lib/browser/chunk-AETQP5S5.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -92
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-DAIOSE5F.mjs +0 -34
- package/dist/lib/browser/intent-resolver-DAIOSE5F.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-surface-QZQ43BFX.mjs +0 -31
- package/dist/lib/browser/react-surface-QZQ43BFX.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -8
- package/dist/lib/node-esm/CanvasContainer-I35ILMX5.mjs +0 -96
- package/dist/lib/node-esm/CanvasContainer-I35ILMX5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ESN57RYB.mjs +0 -26
- package/dist/lib/node-esm/chunk-ESN57RYB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SSXOBTGB.mjs +0 -21
- package/dist/lib/node-esm/chunk-SSXOBTGB.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -93
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-B45X4BRQ.mjs +0 -35
- package/dist/lib/node-esm/intent-resolver-B45X4BRQ.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-ZPRFSLDI.mjs +0 -32
- package/dist/lib/node-esm/react-surface-ZPRFSLDI.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -9
- 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/components/CanvasContainer.d.ts +0 -8
- package/dist/types/src/components/CanvasContainer.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -18
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -27
- package/src/components/CanvasContainer.tsx +0 -104
- package/src/types/schema.ts +0 -20
- /package/dist/lib/{browser/types → neutral/components}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/CanvasArticle/CanvasArticle.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport type * as Exit from 'effect/Exit';\nimport React, { Fragment, useEffect, useMemo, useRef } from 'react';\n\nimport { AiService } from '@dxos/ai';\nimport { Capabilities } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Credential, Operation, OperationRegistry, ServiceResolver } from '@dxos/compute';\nimport { ComputeGraphModel } from '@dxos/conductor';\nimport { Database, Feed, Obj } from '@dxos/echo';\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 CanvasArticleProps = AppSurface.ObjectArticleProps<CanvasBoard.CanvasBoard>;\n\nexport const CanvasArticle = ({ role, subject, attendableId: _attendableId }: CanvasArticleProps) => {\n const [canvas] = useObject(subject);\n const id = Obj.getURI(canvas);\n const graph = useMemo(\n () => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.update(subject, fn)),\n [subject, canvas.layout],\n );\n const controller = useGraphController(subject);\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 processManagerRuntime = useCapability(Capabilities.ProcessManagerRuntime);\n const [computeGraph] = useObject(canvas.computeGraph);\n const controller = useMemo(() => {\n if (!canvas.computeGraph?.target || !db) {\n return null;\n }\n const spaceId = db.spaceId;\n const model = new ComputeGraphModel(canvas.computeGraph?.target);\n const spaceLayer = ServiceResolver.provide(\n { space: spaceId },\n AiService.AiService,\n Database.Service,\n Feed.FeedService,\n Credential.CredentialsService,\n Operation.Service,\n OperationRegistry.Service,\n );\n const computeGraphRuntime = {\n runPromiseExit: <A, E>(effect: Effect.Effect<A, E, any>): Promise<Exit.Exit<A, E>> =>\n processManagerRuntime.runPromiseExit(effect.pipe(Effect.provide(spaceLayer)) as any) as Promise<\n Exit.Exit<A, E>\n >,\n };\n const controller = new ComputeGraphController(computeGraphRuntime, model);\n return controller;\n }, [computeGraph, db, processManagerRuntime]);\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"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,OAAOC,SAASC,UAAUC,WAAWC,SAASC,cAAc;AAE5D,SAASC,iBAAiB;AAC1B,SAASC,oBAAoB;AAC7B,SAASC,qBAAqB;AAE9B,SAASC,YAAYC,WAAWC,mBAAmBC,uBAAuB;AAC1E,SAASC,yBAAyB;AAClC,SAASC,UAAUC,MAAMC,WAAW;AACpC,SAASC,iBAAiB;AAC1B,SAASC,YAA4B;AACrC,SACEC,gBACAC,wBAEAC,oBACAC,eACAC,2BACAC,uBACK;AACP,SAEEC,kBACAC,QAEAC,mBACAC,qBACK;AAIA,IAAMC,gBAAgB,CAAC,EAAEC,MAAMC,SAASC,cAAcC,cAAa,MAAsB;AAC9F,QAAM,CAACC,MAAAA,IAAUjB,UAAUc,OAAAA;AAC3B,QAAMI,KAAKnB,IAAIoB,OAAOF,MAAAA;AACtB,QAAMG,QAAQjC,QACZ,MAAMqB,iBAAiBa,OAAqBJ,OAAOK,QAAQ,CAACC,OAAOxB,IAAIyB,OAAOV,SAASS,EAAAA,CAAAA,GACvF;IAACT;IAASG,OAAOK;GAAO;AAE1B,QAAMG,aAAaC,mBAAmBZ,OAAAA;AACtC,QAAMa,eAAepB,gBAAgBkB,YAAYL,KAAAA;AACjD,QAAMQ,WAAWzC,QAAQ,MAAM,IAAIwB,cAAcN,aAAAA,GAAgB,CAAA,CAAE;AACnE,QAAMwB,YAAYzC,OAAyB,IAAA;AAC3CkB,4BAA0B;IAAEmB;IAAYL;IAAOS;EAAU,CAAA;AAGzD,QAAMP,SAASnC,QACb,MAAOsC,cAAcG,WAAW,IAAIxB,mBAAmBqB,YAAYG,QAAAA,IAAYE,QAC/E;IAACL;IAAYG;GAAS;AAGxB,MAAI,CAACH,YAAY;AACf;EACF;AAEA,QAAMM,OAAOlB,SAAS,YAAYmB,YAAY/C;AAE9C,SACE,sBAAA,cAACiB,eAAe+B,UAAQ;IAACC,OAAO;MAAET;IAAW;KAC3C,sBAAA,cAACM,MAAAA,MACC,sBAAA,cAACrB,mBAAAA;IAAkBQ;KACjB,sBAAA,cAACT,OAAOsB,MAAI;IACVb;IACAiB,KAAKN;IACLT;IACAO;IACAC;IACAN;KAEA,sBAAA,cAACb,OAAO2B,QAAM,IAAA,GACd,sBAAA,cAAC3B,OAAO4B,IAAE;IAACC,WAAAA;;AAMvB;AAEA,IAAMN,YAAY,CAACO,UAAqB,sBAAA,cAACtC,MAAAA;EAAM,GAAGsC;EAAOC,YAAW;;AAEpE,IAAMd,qBAAqB,CAACT,WAAAA;AAC1B,QAAMwB,KAAK1C,IAAI2C,YAAYzB,MAAAA;AAC3B,QAAM0B,wBAAwBpD,cAAcD,aAAasD,qBAAqB;AAC9E,QAAM,CAACC,YAAAA,IAAgB7C,UAAUiB,OAAO4B,YAAY;AACpD,QAAMpB,aAAatC,QAAQ,MAAA;AACzB,QAAI,CAAC8B,OAAO4B,cAAcC,UAAU,CAACL,IAAI;AACvC,aAAO;IACT;AACA,UAAMM,UAAUN,GAAGM;AACnB,UAAMC,QAAQ,IAAIpD,kBAAkBqB,OAAO4B,cAAcC,MAAAA;AACzD,UAAMG,aAAatD,gBAAgBuD,QACjC;MAAEC,OAAOJ;IAAQ,GACjB1D,UAAUA,WACVQ,SAASuD,SACTtD,KAAKuD,aACL7D,WAAW8D,oBACX7D,UAAU2D,SACV1D,kBAAkB0D,OAAO;AAE3B,UAAMG,sBAAsB;MAC1BC,gBAAgB,CAAOC,WACrBd,sBAAsBa,eAAeC,OAAOC,KAAYR,eAAQD,UAAAA,CAAAA,CAAAA;IAGpE;AACA,UAAMxB,cAAa,IAAItB,uBAAuBoD,qBAAqBP,KAAAA;AACnE,WAAOvB;EACT,GAAG;IAACoB;IAAcJ;IAAIE;GAAsB;AAE5CzD,YAAU,MAAA;AACR,QAAI,CAACuC,YAAY;AACf;IACF;AAEA,SAAKA,WAAWkC,KAAI;AACpB,WAAO,MAAA;AACL,WAAKlC,WAAWmC,MAAK;IACvB;EACF,GAAG;IAACnC;GAAW;AAEf,SAAOA;AACT;",
|
|
6
|
+
"names": ["Effect", "React", "Fragment", "useEffect", "useMemo", "useRef", "AiService", "Capabilities", "useCapability", "Credential", "Operation", "OperationRegistry", "ServiceResolver", "ComputeGraphModel", "Database", "Feed", "Obj", "useObject", "Flex", "ComputeContext", "ComputeGraphController", "ComputeShapeLayout", "computeShapes", "useComputeGraphController", "useGraphMonitor", "CanvasGraphModel", "Editor", "KeyboardContainer", "ShapeRegistry", "CanvasArticle", "role", "subject", "attendableId", "_attendableId", "canvas", "id", "getURI", "graph", "create", "layout", "fn", "update", "controller", "useGraphController", "graphMonitor", "registry", "editorRef", "undefined", "Root", "Container", "Provider", "value", "ref", "Canvas", "UI", "showTools", "props", "classNames", "db", "getDatabase", "processManagerRuntime", "ProcessManagerRuntime", "computeGraph", "target", "spaceId", "model", "spaceLayer", "provide", "space", "Service", "FeedService", "CredentialsService", "computeGraphRuntime", "runPromiseExit", "effect", "pipe", "open", "close"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// src/ConductorPlugin.tsx
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
4
|
+
import { ComputeGraph } from "@dxos/conductor";
|
|
5
|
+
import { CanvasBoard } from "@dxos/react-ui-canvas-editor";
|
|
6
|
+
import { CreateObject, ReactSurface } from "#capabilities";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
import { translations } from "#translations";
|
|
9
|
+
|
|
10
|
+
// raw-loader:/__w/dxos/dxos/packages/plugins/plugin-conductor/PLUGIN.mdl?raw
|
|
11
|
+
var PLUGIN_default = '---\nid: org.dxos.plugin.conductor\nname: ConductorPlugin\nversion: 0.1.0\n---\n\nVisual node-based compute graph plugin for `DXOS` Composer \u2014 wire data sources, AI models, logic, and transformations into reactive pipelines that execute in the local-first runtime.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype ComputeValueType\n literals: string | number | boolean | object\n```\n\n```mdl\ntype NodeType\n literals:\n input | output | constant | template | switch | rng |\n audio | chat | text | json | json-transform | surface |\n beacon | scope | reducer | thread | queue | make-queue | append |\n and | or | not | if | if-else |\n function | gpt | gpt-realtime |\n database | text-to-image\n```\n\n```mdl\ntype ComputeNode\n desc: A node in the compute graph persisted via ECHO.\n extends: [Graph.Node]\n fields:\n inputSchema?: JsonSchema\n outputSchema?: JsonSchema\n subgraph?: Ref<ComputeGraph> # composition: nested graph\n function?: Ref<PersistentOperation> # composition: reusable function node\n valueType?: ComputeValueType # for constant/template nodes\n value?: any # for constant and template nodes\n enabled?: boolean # for switch nodes\n```\n\n```mdl\ntype ComputeEdge\n desc: A directed edge connecting an output port on one node to an input port on another.\n extends: [Graph.Edge]\n fields:\n input: string # target node input property name\n output: string # source node output property name\n```\n\n```mdl\ntype ComputeGraph\n desc: Persistent ECHO object holding the full node-edge graph plus special I/O reference nodes.\n fields:\n graph: Graph.Graph\n input?: ComputeNode\n output?: ComputeNode\n```\n\n```mdl\ntype ValueBag\n desc: A set of named asynchronous value effects passed between nodes.\n fields:\n _tag: "ValueBag"\n values: Record<string, ValueEffect<any>>\n```\n\n## Components\n\n```mdl\ncomponent CanvasArticle\n desc: Full-screen canvas editor for a ComputeGraph; renders as an article or a section embed.\n props:\n role: "article" | "section"\n subject: CanvasBoard\n attendableId?: string\n state:\n graph: CanvasGraphModel<ComputeShape>\n controller?: ComputeGraphController\n registry: ShapeRegistry\n layout?: ComputeShapeLayout\n slots:\n toolbar?: ReactNode # injected by AppSurface frame\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [toolbar \u2014 zoom, tools, minimap] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 \u2502\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 node \u2502\u2500\u2500\u2500\u25B6\u2502 node \u2502\u2500\u2500\u2500\u25B6\u2502 node \u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2502 \u2502\n \u2502 canvas \u2014 pan / zoom / connect nodes \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\nPure operations \u2014 no effects, no service dependencies.\n\n```mdl\nop evalConstant\n desc: Returns the scalar value stored on a constant node.\n input:\n node: ComputeNode\n output: Scalar\n errors:\n MissingValue: node has no value set\n```\n\n```mdl\nop jsonTransform\n desc: Evaluates a JSONPath expression over an input value.\n input:\n input: any\n expression: string\n output: any\n errors:\n InvalidExpression: JSONPath expression could not be parsed\n```\n\n```mdl\nop boolAnd\n desc: Logical AND of two boolean inputs.\n input:\n a: boolean\n b: boolean\n output: boolean\n```\n\n```mdl\nop boolOr\n desc: Logical OR of two boolean inputs.\n input:\n a: boolean\n b: boolean\n output: boolean\n```\n\n```mdl\nop boolNot\n desc: Logical NOT of a boolean input.\n input:\n input: boolean\n output: boolean\n```\n\n```mdl\nop ifRoute\n desc: Routes a value to the true or false output port based on a condition.\n input:\n condition: boolean\n value: any\n output: IfOutput # { true?: any; false?: any }\n```\n\n```mdl\nop ifElseSelect\n desc: Ternary \u2014 returns trueValue or falseValue depending on condition.\n input:\n condition: boolean\n true: any\n false: any\n output: any\n```\n\nEffectful operations \u2014 mutate persistent state or call external services.\n\n```mdl\nop createComputeGraph\n desc: Creates a new CanvasBoard with an empty ComputeGraph and adds it to the target space.\n input:\n target?: Space | Collection\n output: string # DXN of created CanvasBoard\n effects: [echo:write]\n```\n\n```mdl\nop appendToQueue\n desc: Appends items to an ECHO queue or collection identified by DXN.\n input:\n id: string # DXN \u2014 dxn:queue or dxn:echo\n items: any[]\n output: void\n effects: [echo:write, feed:write]\n errors:\n UnsupportedDXN: DXN kind not supported\n SpaceMismatch: ECHO DXN belongs to a different space\n```\n\n```mdl\nop createQueue\n desc: Allocates a new append-only Feed and returns a Ref to it.\n input:\n output: Ref<Feed>\n effects: [feed:write]\n```\n\n```mdl\nop invokeGpt\n desc: Sends the current conversation thread to the configured AI model and streams the reply.\n input:\n thread: Ref<Thread>\n tools?: Tool[]\n systemPrompt?: string\n output: Message\n effects: [http]\n requires: [AiService]\n errors:\n ModelUnavailable: AI service could not be reached\n```\n\n```mdl\nop invokeFunction\n desc: Deserialises a PersistentOperation from ECHO and invokes it with the provided input bag.\n input:\n function: Ref<PersistentOperation>\n input: any\n output: any\n effects: [echo:read]\n requires: [Database.Service, OperationRegistry.Service]\n errors:\n FunctionNotFound: referenced operation does not exist\n InvocationFailed: operation returned an error\n```\n\n## Features\n\n```mdl\nfeat F-1: Canvas Editor\n\n req F-1.1: User can create a new compute graph via the "Create object" entry.\n req F-1.2: Canvas renders nodes as draggable, resizable shapes on an infinite panning surface.\n req F-1.3:\n when: user drags from an output port to an input port\n then: a ComputeEdge is created connecting the two ports\n req F-1.4:\n when: a ComputeEdge is deleted\n then: downstream nodes stop receiving values from the disconnected output\n```\n\n```mdl\nfeat F-2: Node Palette\n\n req F-2.1: Toolbar exposes all built-in NodeTypes; user can drag them onto the canvas.\n req F-2.2: Constant nodes display an inline editor for their scalar value and valueType.\n req F-2.3: Template nodes render a text input with {{variable}} interpolation.\n req F-2.4: Function nodes allow selecting a PersistentOperation from the space.\n```\n\n```mdl\nfeat F-3: Reactive Execution\n\n req F-3.1:\n when: any upstream node value changes\n then: ComputeGraphController re-evaluates dependent nodes in topological order\n\n req F-3.2: Node execution is lazy; nodes only run when their outputs are consumed.\n\n req F-3.3:\n when: a node fails with ConductorError\n then: downstream nodes receive a NotExecuted marker and do not throw\n\n req F-3.4:\n when: a node emits a ValueBag\n then: individual output ports can resolve at different times (async bag semantics)\n```\n\n```mdl\nfeat F-4: AI Integration\n\n req F-4.1: GPT node connects to AiService; configuration includes model, system prompt, and tools.\n req F-4.2:\n when: GPT node executes\n then: op:invokeGpt streams the model response back to the output port\n\n req F-4.3: Function node can reference any PersistentOperation registered in the space.\n```\n\n```mdl\nfeat F-5: Data Sources and Sinks\n\n req F-5.1: Queue node reads messages from a Feed referenced by DXN.\n req F-5.2: Append node writes items to a Feed or ECHO collection referenced by DXN.\n req F-5.3: Database node exposes ECHO space contents as a query tool for AI nodes.\n req F-5.4: Thread node surfaces a conversation thread with its message history.\n```\n\n```mdl\nfeat F-6: Logic and Control Flow\n\n req F-6.1: If node routes a value to true or false output port based on a boolean condition.\n req F-6.2: IfElse node selects one of two values using a ternary condition.\n req F-6.3: Reducer node collects an array of values from multiple upstream ports.\n req F-6.4: And / Or / Not nodes implement standard boolean combinators.\n```\n\n```mdl\nfeat F-7: Persistence and Collaboration\n\n req F-7.1: ComputeGraph is stored as an ECHO object; graph topology is replicated to peers.\n req F-7.2:\n when: a peer modifies a node value or edge\n then: all collaborators see the change reflected on the canvas in real time\n\n req F-7.3:\n when: a CanvasBoard is embedded as a section in another document\n then: the graph renders in the section aspect-square container and remains interactive\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Create empty graph\n given: user opens the Create Object menu\n when: user selects "Compute Graph"\n then:\n - a new CanvasBoard with an empty ComputeGraph is created in the space\n - the canvas opens with no nodes\n```\n\n```mdl\ntest T-2: Add constant node and read value\n given: an empty canvas\n when: user adds a constant node, sets value "hello", connects it to a text node\n then:\n - text node receives "hello" on its input port\n - text node renders "hello"\n```\n\n```mdl\ntest T-3: Boolean AND gate\n given: two switch nodes with values true and false connected to an AND node\n when: graph executes\n then:\n - AND node output is false\n - switching both inputs to true produces output true\n```\n\n```mdl\ntest T-4: JSONPath transform\n given: a constant node with value { "a": { "b": 42 } } connected to a json-transform node\n when: expression "$.a.b" is set on the transform node\n then:\n - output port value is [42]\n```\n\n```mdl\ntest T-5: GPT node invocation\n given: a thread node connected to a GPT node with a system prompt\n when: graph executes with AiService available\n then:\n - GPT node output port receives a Message\n - Message content is non-empty\n errors: [ModelUnavailable]\n```\n\n```mdl\ntest T-6: Append to queue\n given: a make-queue node connected to an append node; constant node provides input items\n when: graph executes\n then:\n - queue contains the appended items\n - downstream queue node reads them back\n```\n\n```mdl\ntest T-7: Collaborative edit\n given: two peers have the same CanvasBoard open\n when: peer A moves a node on the canvas\n then:\n - peer B sees the node in the new position within one replication round-trip\n tags: [collaborative]\n```\n\n```mdl\ntest T-8: NotExecuted propagation\n given: an if node whose condition is false, connected to a text node on the true port\n when: graph executes\n then:\n - text node receives a NotExecuted marker\n - text node renders nothing (no error thrown)\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n';
|
|
12
|
+
|
|
13
|
+
// src/ConductorPlugin.tsx
|
|
14
|
+
var ConductorPlugin = Plugin.define(meta).pipe(AppPlugin.addCreateObjectModule({
|
|
15
|
+
activate: CreateObject
|
|
16
|
+
}), AppPlugin.addSchemaModule({
|
|
17
|
+
schema: [
|
|
18
|
+
CanvasBoard.CanvasBoard,
|
|
19
|
+
ComputeGraph
|
|
20
|
+
]
|
|
21
|
+
}), AppPlugin.addSurfaceModule({
|
|
22
|
+
activate: ReactSurface
|
|
23
|
+
}), AppPlugin.addTranslationsModule({
|
|
24
|
+
translations
|
|
25
|
+
}), AppPlugin.addPluginAssetModule({
|
|
26
|
+
asset: {
|
|
27
|
+
pluginId: meta.id,
|
|
28
|
+
path: "PLUGIN.mdl",
|
|
29
|
+
content: PLUGIN_default,
|
|
30
|
+
mimeType: "application/x-mdl"
|
|
31
|
+
}
|
|
32
|
+
}), Plugin.make);
|
|
33
|
+
var ConductorPlugin_default = ConductorPlugin;
|
|
34
|
+
export {
|
|
35
|
+
ConductorPlugin,
|
|
36
|
+
ConductorPlugin_default as default
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=ConductorPlugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/ConductorPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-conductor/PLUGIN.mdl?raw"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { ComputeGraph } from '@dxos/conductor';\nimport { CanvasBoard } from '@dxos/react-ui-canvas-editor';\n\nimport { CreateObject, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const ConductorPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [CanvasBoard.CanvasBoard, ComputeGraph] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default ConductorPlugin;\n", "---\nid: org.dxos.plugin.conductor\nname: ConductorPlugin\nversion: 0.1.0\n---\n\nVisual node-based compute graph plugin for `DXOS` Composer \u2014 wire data sources, AI models, logic, and transformations into reactive pipelines that execute in the local-first runtime.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype ComputeValueType\n literals: string | number | boolean | object\n```\n\n```mdl\ntype NodeType\n literals:\n input | output | constant | template | switch | rng |\n audio | chat | text | json | json-transform | surface |\n beacon | scope | reducer | thread | queue | make-queue | append |\n and | or | not | if | if-else |\n function | gpt | gpt-realtime |\n database | text-to-image\n```\n\n```mdl\ntype ComputeNode\n desc: A node in the compute graph persisted via ECHO.\n extends: [Graph.Node]\n fields:\n inputSchema?: JsonSchema\n outputSchema?: JsonSchema\n subgraph?: Ref<ComputeGraph> # composition: nested graph\n function?: Ref<PersistentOperation> # composition: reusable function node\n valueType?: ComputeValueType # for constant/template nodes\n value?: any # for constant and template nodes\n enabled?: boolean # for switch nodes\n```\n\n```mdl\ntype ComputeEdge\n desc: A directed edge connecting an output port on one node to an input port on another.\n extends: [Graph.Edge]\n fields:\n input: string # target node input property name\n output: string # source node output property name\n```\n\n```mdl\ntype ComputeGraph\n desc: Persistent ECHO object holding the full node-edge graph plus special I/O reference nodes.\n fields:\n graph: Graph.Graph\n input?: ComputeNode\n output?: ComputeNode\n```\n\n```mdl\ntype ValueBag\n desc: A set of named asynchronous value effects passed between nodes.\n fields:\n _tag: \"ValueBag\"\n values: Record<string, ValueEffect<any>>\n```\n\n## Components\n\n```mdl\ncomponent CanvasArticle\n desc: Full-screen canvas editor for a ComputeGraph; renders as an article or a section embed.\n props:\n role: \"article\" | \"section\"\n subject: CanvasBoard\n attendableId?: string\n state:\n graph: CanvasGraphModel<ComputeShape>\n controller?: ComputeGraphController\n registry: ShapeRegistry\n layout?: ComputeShapeLayout\n slots:\n toolbar?: ReactNode # injected by AppSurface frame\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [toolbar \u2014 zoom, tools, minimap] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 \u2502\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 node \u2502\u2500\u2500\u2500\u25B6\u2502 node \u2502\u2500\u2500\u2500\u25B6\u2502 node \u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2502 \u2502\n \u2502 canvas \u2014 pan / zoom / connect nodes \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\nPure operations \u2014 no effects, no service dependencies.\n\n```mdl\nop evalConstant\n desc: Returns the scalar value stored on a constant node.\n input:\n node: ComputeNode\n output: Scalar\n errors:\n MissingValue: node has no value set\n```\n\n```mdl\nop jsonTransform\n desc: Evaluates a JSONPath expression over an input value.\n input:\n input: any\n expression: string\n output: any\n errors:\n InvalidExpression: JSONPath expression could not be parsed\n```\n\n```mdl\nop boolAnd\n desc: Logical AND of two boolean inputs.\n input:\n a: boolean\n b: boolean\n output: boolean\n```\n\n```mdl\nop boolOr\n desc: Logical OR of two boolean inputs.\n input:\n a: boolean\n b: boolean\n output: boolean\n```\n\n```mdl\nop boolNot\n desc: Logical NOT of a boolean input.\n input:\n input: boolean\n output: boolean\n```\n\n```mdl\nop ifRoute\n desc: Routes a value to the true or false output port based on a condition.\n input:\n condition: boolean\n value: any\n output: IfOutput # { true?: any; false?: any }\n```\n\n```mdl\nop ifElseSelect\n desc: Ternary \u2014 returns trueValue or falseValue depending on condition.\n input:\n condition: boolean\n true: any\n false: any\n output: any\n```\n\nEffectful operations \u2014 mutate persistent state or call external services.\n\n```mdl\nop createComputeGraph\n desc: Creates a new CanvasBoard with an empty ComputeGraph and adds it to the target space.\n input:\n target?: Space | Collection\n output: string # DXN of created CanvasBoard\n effects: [echo:write]\n```\n\n```mdl\nop appendToQueue\n desc: Appends items to an ECHO queue or collection identified by DXN.\n input:\n id: string # DXN \u2014 dxn:queue or dxn:echo\n items: any[]\n output: void\n effects: [echo:write, feed:write]\n errors:\n UnsupportedDXN: DXN kind not supported\n SpaceMismatch: ECHO DXN belongs to a different space\n```\n\n```mdl\nop createQueue\n desc: Allocates a new append-only Feed and returns a Ref to it.\n input:\n output: Ref<Feed>\n effects: [feed:write]\n```\n\n```mdl\nop invokeGpt\n desc: Sends the current conversation thread to the configured AI model and streams the reply.\n input:\n thread: Ref<Thread>\n tools?: Tool[]\n systemPrompt?: string\n output: Message\n effects: [http]\n requires: [AiService]\n errors:\n ModelUnavailable: AI service could not be reached\n```\n\n```mdl\nop invokeFunction\n desc: Deserialises a PersistentOperation from ECHO and invokes it with the provided input bag.\n input:\n function: Ref<PersistentOperation>\n input: any\n output: any\n effects: [echo:read]\n requires: [Database.Service, OperationRegistry.Service]\n errors:\n FunctionNotFound: referenced operation does not exist\n InvocationFailed: operation returned an error\n```\n\n## Features\n\n```mdl\nfeat F-1: Canvas Editor\n\n req F-1.1: User can create a new compute graph via the \"Create object\" entry.\n req F-1.2: Canvas renders nodes as draggable, resizable shapes on an infinite panning surface.\n req F-1.3:\n when: user drags from an output port to an input port\n then: a ComputeEdge is created connecting the two ports\n req F-1.4:\n when: a ComputeEdge is deleted\n then: downstream nodes stop receiving values from the disconnected output\n```\n\n```mdl\nfeat F-2: Node Palette\n\n req F-2.1: Toolbar exposes all built-in NodeTypes; user can drag them onto the canvas.\n req F-2.2: Constant nodes display an inline editor for their scalar value and valueType.\n req F-2.3: Template nodes render a text input with {{variable}} interpolation.\n req F-2.4: Function nodes allow selecting a PersistentOperation from the space.\n```\n\n```mdl\nfeat F-3: Reactive Execution\n\n req F-3.1:\n when: any upstream node value changes\n then: ComputeGraphController re-evaluates dependent nodes in topological order\n\n req F-3.2: Node execution is lazy; nodes only run when their outputs are consumed.\n\n req F-3.3:\n when: a node fails with ConductorError\n then: downstream nodes receive a NotExecuted marker and do not throw\n\n req F-3.4:\n when: a node emits a ValueBag\n then: individual output ports can resolve at different times (async bag semantics)\n```\n\n```mdl\nfeat F-4: AI Integration\n\n req F-4.1: GPT node connects to AiService; configuration includes model, system prompt, and tools.\n req F-4.2:\n when: GPT node executes\n then: op:invokeGpt streams the model response back to the output port\n\n req F-4.3: Function node can reference any PersistentOperation registered in the space.\n```\n\n```mdl\nfeat F-5: Data Sources and Sinks\n\n req F-5.1: Queue node reads messages from a Feed referenced by DXN.\n req F-5.2: Append node writes items to a Feed or ECHO collection referenced by DXN.\n req F-5.3: Database node exposes ECHO space contents as a query tool for AI nodes.\n req F-5.4: Thread node surfaces a conversation thread with its message history.\n```\n\n```mdl\nfeat F-6: Logic and Control Flow\n\n req F-6.1: If node routes a value to true or false output port based on a boolean condition.\n req F-6.2: IfElse node selects one of two values using a ternary condition.\n req F-6.3: Reducer node collects an array of values from multiple upstream ports.\n req F-6.4: And / Or / Not nodes implement standard boolean combinators.\n```\n\n```mdl\nfeat F-7: Persistence and Collaboration\n\n req F-7.1: ComputeGraph is stored as an ECHO object; graph topology is replicated to peers.\n req F-7.2:\n when: a peer modifies a node value or edge\n then: all collaborators see the change reflected on the canvas in real time\n\n req F-7.3:\n when: a CanvasBoard is embedded as a section in another document\n then: the graph renders in the section aspect-square container and remains interactive\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Create empty graph\n given: user opens the Create Object menu\n when: user selects \"Compute Graph\"\n then:\n - a new CanvasBoard with an empty ComputeGraph is created in the space\n - the canvas opens with no nodes\n```\n\n```mdl\ntest T-2: Add constant node and read value\n given: an empty canvas\n when: user adds a constant node, sets value \"hello\", connects it to a text node\n then:\n - text node receives \"hello\" on its input port\n - text node renders \"hello\"\n```\n\n```mdl\ntest T-3: Boolean AND gate\n given: two switch nodes with values true and false connected to an AND node\n when: graph executes\n then:\n - AND node output is false\n - switching both inputs to true produces output true\n```\n\n```mdl\ntest T-4: JSONPath transform\n given: a constant node with value { \"a\": { \"b\": 42 } } connected to a json-transform node\n when: expression \"$.a.b\" is set on the transform node\n then:\n - output port value is [42]\n```\n\n```mdl\ntest T-5: GPT node invocation\n given: a thread node connected to a GPT node with a system prompt\n when: graph executes with AiService available\n then:\n - GPT node output port receives a Message\n - Message content is non-empty\n errors: [ModelUnavailable]\n```\n\n```mdl\ntest T-6: Append to queue\n given: a make-queue node connected to an append node; constant node provides input items\n when: graph executes\n then:\n - queue contains the appended items\n - downstream queue node reads them back\n```\n\n```mdl\ntest T-7: Collaborative edit\n given: two peers have the same CanvasBoard open\n when: peer A moves a node on the canvas\n then:\n - peer B sees the node in the new position within one replication round-trip\n tags: [collaborative]\n```\n\n```mdl\ntest T-8: NotExecuted propagation\n given: an if node whose condition is false, connected to a text node on the true port\n when: graph executes\n then:\n - text node receives a NotExecuted marker\n - text node renders nothing (no error thrown)\n```\n\n---\n\n## Appendix: Extension Definitions\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap\n literals?: UnionList\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap\n state?: FieldMap\n slots?: FieldMap\n actions?: ActionMap\n emits?: EventMap\n layout?: CodeBlock\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap\n output?: TypeExpr\n errors?: ErrorMap\n effects?: EffectList\n requires?: ServiceList\n note?: Prose\n```\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,oBAAoB;AAC7B,SAASC,mBAAmB;AAE5B,SAASC,cAAcC,oBAAoB;AAC3C,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACX7B;;;ADgBO,IAAMC,kBAAkBC,OAAOC,OAAOC,IAAAA,EAAMC,KACjDC,UAAUC,sBAAsB;EAAEC,UAAUC;AAAa,CAAA,GACzDH,UAAUI,gBAAgB;EAAEC,QAAQ;IAACC,YAAYA;IAAaC;;AAAc,CAAA,GAC5EP,UAAUQ,iBAAiB;EAAEN,UAAUO;AAAa,CAAA,GACpDT,UAAUU,sBAAsB;EAAEC;AAAa,CAAA,GAC/CX,UAAUY,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUhB,KAAKiB;IAAIC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AACrG,CAAA,GACAvB,OAAOwB,IAAI;AAGb,IAAA,0BAAezB;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "ComputeGraph", "CanvasBoard", "CreateObject", "ReactSurface", "meta", "translations", "ConductorPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCreateObjectModule", "activate", "CreateObject", "addSchemaModule", "schema", "CanvasBoard", "ComputeGraph", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addPluginAssetModule", "asset", "pluginId", "id", "path", "content", "pluginSpec", "mimeType", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// src/capabilities/index.ts
|
|
2
|
+
import { Capability } from "@dxos/app-framework";
|
|
3
|
+
var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-PTHDJAGI.mjs"));
|
|
4
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-JCMKXAUY.mjs"));
|
|
5
|
+
export {
|
|
6
|
+
CreateObject,
|
|
7
|
+
ReactSurface
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,kBAAkB;AAEpB,IAAMC,eAAeD,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMC,eAAeH,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
+
"names": ["Capability", "CreateObject", "lazy", "ReactSurface"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
import { DXN } from "@dxos/keys";
|
|
4
|
+
import { trim } from "@dxos/util";
|
|
5
|
+
var meta = Plugin.makeMeta({
|
|
6
|
+
key: DXN.make("org.dxos.plugin.conductor"),
|
|
7
|
+
name: "Conductor",
|
|
8
|
+
author: "DXOS",
|
|
9
|
+
description: trim`
|
|
10
|
+
Conductor is a visual node-based compute graph plugin for DXOS Composer.
|
|
11
|
+
It lets you compose reactive data pipelines by connecting typed input and output ports on a
|
|
12
|
+
drag-and-drop infinite canvas — no code required for common automation patterns.
|
|
13
|
+
|
|
14
|
+
Each node in the graph is a first-class ECHO object, so the full pipeline topology is
|
|
15
|
+
replicated to every collaborator in real time via the local-first runtime.
|
|
16
|
+
Built-in node types cover constants, templates, boolean logic, control flow, JSON transforms,
|
|
17
|
+
ECHO database access, append-only queues, and conversation threads.
|
|
18
|
+
|
|
19
|
+
AI orchestration is a first-class concern: the GPT node connects to plugin-assistant's AiService
|
|
20
|
+
and supports tool calling, streaming replies, and configurable system prompts.
|
|
21
|
+
Function nodes can invoke any Blueprint operation registered in the space, making it straightforward
|
|
22
|
+
to compose multi-step agent workflows visually and share them across teams.
|
|
23
|
+
`,
|
|
24
|
+
icon: "ph--infinity--regular",
|
|
25
|
+
iconHue: "sky",
|
|
26
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor",
|
|
27
|
+
spec: "PLUGIN.mdl",
|
|
28
|
+
tags: [
|
|
29
|
+
"labs"
|
|
30
|
+
],
|
|
31
|
+
screenshots: [
|
|
32
|
+
"https://dxos.network/plugin-details-canvas-dark.png"
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
meta
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=chunk-WDHL35VB.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 { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.conductor'),\n name: 'Conductor',\n author: 'DXOS',\n description: trim`\n Conductor is a visual node-based compute graph plugin for DXOS Composer.\n It lets you compose reactive data pipelines by connecting typed input and output ports on a\n drag-and-drop infinite canvas — no code required for common automation patterns.\n\n Each node in the graph is a first-class ECHO object, so the full pipeline topology is\n replicated to every collaborator in real time via the local-first runtime.\n Built-in node types cover constants, templates, boolean logic, control flow, JSON transforms,\n ECHO database access, append-only queues, and conversation threads.\n\n AI orchestration is a first-class concern: the GPT node connects to plugin-assistant's AiService\n and supports tool calling, streaming replies, and configurable system prompts.\n Function nodes can invoke any Blueprint operation registered in the space, making it straightforward\n to compose multi-step agent workflows visually and share them across teams.\n `,\n icon: 'ph--infinity--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor',\n spec: 'PLUGIN.mdl',\n tags: ['labs'],\n screenshots: ['https://dxos.network/plugin-details-canvas-dark.png'],\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,2BAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;;;;;;;;;;;;EAebQ,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,MAAM;IAAC;;EACPC,aAAa;IAAC;;AAChB,CAAA;",
|
|
6
|
+
"names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "icon", "iconHue", "source", "spec", "tags", "screenshots"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/containers/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const CanvasArticle: ComponentType<any> = lazy(() => import('./CanvasArticle'));\n"],
|
|
5
|
+
"mappings": ";AAIA,SAA6BA,YAAY;AAElC,IAAMC,gBAAoCD,KAAK,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
+
"names": ["lazy", "CanvasArticle"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/capabilities/create-object.ts
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { Capability } from "@dxos/app-framework";
|
|
4
|
+
import { Operation } from "@dxos/compute";
|
|
5
|
+
import { Type } from "@dxos/echo";
|
|
6
|
+
import { SpaceOperation } from "@dxos/plugin-space";
|
|
7
|
+
import { SpaceCapabilities } from "@dxos/plugin-space";
|
|
8
|
+
import { CanvasBoard } from "@dxos/react-ui-canvas-editor";
|
|
9
|
+
var create_object_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
10
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
11
|
+
id: Type.getTypename(CanvasBoard.CanvasBoard),
|
|
12
|
+
createObject: (props, options) => Effect.gen(function* () {
|
|
13
|
+
const object = CanvasBoard.make(props);
|
|
14
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
15
|
+
object,
|
|
16
|
+
target: options.target,
|
|
17
|
+
hidden: true,
|
|
18
|
+
targetNodeId: options.targetNodeId
|
|
19
|
+
});
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}));
|
|
23
|
+
export {
|
|
24
|
+
create_object_default as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=create-object-PTHDJAGI.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/create-object.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Type } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { CanvasBoard } from '@dxos/react-ui-canvas-editor';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {\n id: Type.getTypename(CanvasBoard.CanvasBoard),\n createObject: (props, options) =>\n Effect.gen(function* () {\n const object = CanvasBoard.make(props);\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\n }),\n });\n }),\n);\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,mBAAmB;AAE5B,IAAA,wBAAeL,WAAWM,WACjBC,kBAAW,aAAA;AAChB,SAAOP,WAAWQ,YAAYJ,kBAAkBK,mBAAmB;IACjEC,IAAIR,KAAKS,YAAYN,YAAYA,WAAW;IAC5CO,cAAc,CAACC,OAAOC,YACbC,WAAI,aAAA;AACT,YAAMC,SAASX,YAAYY,KAAKJ,KAAAA;AAChC,aAAO,OAAOZ,UAAUiB,OAAOf,eAAegB,WAAW;QACvDH;QACAI,QAAQN,QAAQM;QAChBC,QAAQ;QACRC,cAAcR,QAAQQ;MACxB,CAAA;IACF,CAAA;EACJ,CAAA;AACF,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capability", "Operation", "Type", "SpaceOperation", "SpaceCapabilities", "CanvasBoard", "makeModule", "fnUntraced", "contributes", "CreateObjectEntry", "id", "getTypename", "createObject", "props", "options", "gen", "object", "make", "invoke", "AddObject", "target", "hidden", "targetNodeId"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":4450,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":368,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-conductor/PLUGIN.mdl?raw":{"bytes":12888,"imports":[]},"src/ConductorPlugin.tsx":{"bytes":3911,"imports":[{"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":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-conductor/PLUGIN.mdl?raw","kind":"import-statement","original":"../PLUGIN.mdl?raw"}],"format":"esm"},"src/capabilities/create-object.ts":{"bytes":3608,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":3766,"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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1130,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/create-object.ts","kind":"dynamic-import","original":"./create-object"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/components/index.ts":{"bytes":288,"imports":[],"format":"esm"},"src/containers/CanvasArticle/CanvasArticle.tsx":{"bytes":13858,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ai","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/compute","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/echo","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/containers/CanvasArticle/index.ts":{"bytes":512,"imports":[{"path":"src/containers/CanvasArticle/CanvasArticle.tsx","kind":"import-statement","original":"./CanvasArticle"}],"format":"esm"},"src/containers/index.ts":{"bytes":708,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/CanvasArticle/index.ts","kind":"dynamic-import","original":"./CanvasArticle"}],"format":"esm"},"src/plugin.ts":{"bytes":870,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/translations.ts":{"bytes":2949,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/lib/neutral/create-object-PTHDJAGI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1874},"dist/lib/neutral/create-object-PTHDJAGI.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/create-object.ts","inputs":{"src/capabilities/create-object.ts":{"bytesInOutput":859}},"bytes":995},"dist/lib/neutral/react-surface-JCMKXAUY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1931},"dist/lib/neutral/react-surface-JCMKXAUY.mjs":{"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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":925}},"bytes":1062},"dist/lib/neutral/CanvasArticle-KEPXL3ZT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7429},"dist/lib/neutral/CanvasArticle-KEPXL3ZT.mjs":{"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ai","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/compute","kind":"import-statement","external":true},{"path":"@dxos/conductor","kind":"import-statement","external":true},{"path":"@dxos/echo","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/containers/CanvasArticle/index.ts","inputs":{"src/containers/CanvasArticle/CanvasArticle.tsx":{"bytesInOutput":3426},"src/containers/CanvasArticle/index.ts":{"bytesInOutput":0}},"bytes":3567},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-WDHL35VB.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":101},"dist/lib/neutral/ConductorPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16255},"dist/lib/neutral/ConductorPlugin.mjs":{"imports":[{"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":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true}],"exports":["ConductorPlugin","default"],"entryPoint":"src/ConductorPlugin.tsx","inputs":{"src/ConductorPlugin.tsx":{"bytesInOutput":875},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-conductor/PLUGIN.mdl?raw":{"bytesInOutput":14055}},"bytes":15177},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":600},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/create-object-PTHDJAGI.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-JCMKXAUY.mjs","kind":"dynamic-import"}],"exports":["CreateObject","ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":248}},"bytes":355},"dist/lib/neutral/components/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/components/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/components/index.ts","inputs":{"src/components/index.ts":{"bytesInOutput":0}},"bytes":35},"dist/lib/neutral/containers/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":399},"dist/lib/neutral/containers/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/neutral/CanvasArticle-KEPXL3ZT.mjs","kind":"dynamic-import"}],"exports":["CanvasArticle"],"entryPoint":"src/containers/index.ts","inputs":{"src/containers/index.ts":{"bytesInOutput":103}},"bytes":193},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-WDHL35VB.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":100},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":447},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-WDHL35VB.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["ConductorPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":112}},"bytes":243},"dist/lib/neutral/chunk-WDHL35VB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2070},"dist/lib/neutral/chunk-WDHL35VB.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":1493}},"bytes":1572},"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1424},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-canvas-editor","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":756}},"bytes":848}}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-WDHL35VB.mjs";
|
|
4
|
+
|
|
5
|
+
// src/plugin.ts
|
|
6
|
+
import { Plugin } from "@dxos/app-framework";
|
|
7
|
+
var ConductorPlugin = Plugin.lazy(meta, () => import("#plugin"));
|
|
8
|
+
export {
|
|
9
|
+
ConductorPlugin
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=plugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/plugin.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport const ConductorPlugin = Plugin.lazy(meta, () => import('#plugin'));\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,cAAc;AAIhB,IAAMC,kBAAkBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
|
|
6
|
+
"names": ["Plugin", "ConductorPlugin", "Plugin", "lazy", "meta"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/capabilities/react-surface.tsx
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
5
|
+
import { Surface } from "@dxos/app-framework/ui";
|
|
6
|
+
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
7
|
+
import { CanvasBoard } from "@dxos/react-ui-canvas-editor";
|
|
8
|
+
import { CanvasArticle } from "#containers";
|
|
9
|
+
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, Surface.create({
|
|
10
|
+
id: "root",
|
|
11
|
+
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
12
|
+
filter: AppSurface.oneOf(AppSurface.object(AppSurface.Article, CanvasBoard.CanvasBoard), AppSurface.object(AppSurface.Section, CanvasBoard.CanvasBoard)),
|
|
13
|
+
component: ({ data, role }) => /* @__PURE__ */ React.createElement(CanvasArticle, {
|
|
14
|
+
role,
|
|
15
|
+
subject: data.subject,
|
|
16
|
+
attendableId: data.attendableId
|
|
17
|
+
})
|
|
18
|
+
}))));
|
|
19
|
+
export {
|
|
20
|
+
react_surface_default as default
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=react-surface-JCMKXAUY.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.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 { AppSurface } from '@dxos/app-toolkit/ui';\nimport { CanvasBoard } from '@dxos/react-ui-canvas-editor';\n\nimport { CanvasArticle } from '#containers';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(\n Capabilities.ReactSurface,\n Surface.create({\n id: 'root',\n // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.\n filter: AppSurface.oneOf(\n AppSurface.object(AppSurface.Article, CanvasBoard.CanvasBoard),\n AppSurface.object(AppSurface.Section, CanvasBoard.CanvasBoard),\n ),\n component: ({ data, role }) => (\n <CanvasArticle role={role} subject={data.subject} attendableId={data.attendableId} />\n ),\n }),\n ),\n ),\n);\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,mBAAmB;AAE5B,SAASC,qBAAqB;AAE9B,IAAA,wBAAeJ,WAAWK,WAAW,MAC5BC,eACLN,WAAWO,YACTR,aAAaS,cACbP,QAAQQ,OAAO;EACbC,IAAI;;EAEJC,QAAQT,WAAWU,MACjBV,WAAWW,OAAOX,WAAWY,SAASX,YAAYA,WAAW,GAC7DD,WAAWW,OAAOX,WAAWa,SAASZ,YAAYA,WAAW,CAAA;EAE/Da,WAAW,CAAC,EAAEC,MAAMC,KAAI,MACtB,sBAAA,cAACd,eAAAA;IAAcc;IAAYC,SAASF,KAAKE;IAASC,cAAcH,KAAKG;;AAEzE,CAAA,CAAA,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "Capabilities", "Capability", "Surface", "AppSurface", "CanvasBoard", "CanvasArticle", "makeModule", "succeed", "contributes", "ReactSurface", "create", "id", "filter", "oneOf", "object", "Article", "Section", "component", "data", "role", "subject", "attendableId"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/translations.ts
|
|
2
|
+
import { Type } from "@dxos/echo";
|
|
3
|
+
import { CanvasBoard } from "@dxos/react-ui-canvas-editor";
|
|
4
|
+
import { meta } from "#meta";
|
|
5
|
+
var translations = [
|
|
6
|
+
{
|
|
7
|
+
"en-US": {
|
|
8
|
+
[Type.getTypename(CanvasBoard.CanvasBoard)]: {
|
|
9
|
+
"typename.label": "Circuit",
|
|
10
|
+
"typename.label_zero": "Circuits",
|
|
11
|
+
"typename.label_one": "Circuit",
|
|
12
|
+
"typename.label_other": "Circuits",
|
|
13
|
+
"object-name.placeholder": "New circuit",
|
|
14
|
+
"add-object.label": "Add circuit",
|
|
15
|
+
"rename-object.label": "Rename circuit",
|
|
16
|
+
"delete-object.label": "Delete circuit",
|
|
17
|
+
"object-deleted.label": "Circuit deleted"
|
|
18
|
+
},
|
|
19
|
+
[meta.id]: {
|
|
20
|
+
"plugin.name": "Conductor",
|
|
21
|
+
"content.placeholder": "Enter text..."
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
export {
|
|
27
|
+
translations
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Type } from '@dxos/echo';\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 [Type.getTypename(CanvasBoard.CanvasBoard)]: {\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 'add-object.label': 'Add 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,SAASA,YAAY;AAErB,SAASC,mBAAmB;AAE5B,SAASC,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACH,KAAKI,YAAYH,YAAYA,WAAW,CAAA,GAAI;QAC3C,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACC,KAAKG,EAAE,GAAG;QACT,eAAe;QACf,uBAAuB;MACzB;IACF;EACF;;",
|
|
6
|
+
"names": ["Type", "CanvasBoard", "meta", "translations", "getTypename", "id"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const ConductorPlugin: Plugin.PluginFactory<void>;
|
|
3
|
+
export default ConductorPlugin;
|
|
2
4
|
//# sourceMappingURL=ConductorPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConductorPlugin.d.ts","sourceRoot":"","sources":["../../../src/ConductorPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConductorPlugin.d.ts","sourceRoot":"","sources":["../../../src/ConductorPlugin.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAY7C,eAAO,MAAM,eAAe,4BAS3B,CAAC;eAEa,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConductorPlugin.test.d.ts","sourceRoot":"","sources":["../../../src/ConductorPlugin.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
4
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Readonly<{
|
|
5
|
+
id: string;
|
|
6
|
+
createObject: import("@dxos/plugin-space").CreateObject;
|
|
7
|
+
inputSchema?: import("effect/Schema").Schema.AnyNoContext;
|
|
8
|
+
customPanel?: import("react").ComponentType<SpaceCapabilities.CreateObjectCustomPanelProps>;
|
|
9
|
+
}>>>, never, never>;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=create-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-object.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/create-object.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { Capability } from '@dxos/app-framework';
|
|
2
|
+
export declare const CreateObject: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<Readonly<{
|
|
3
|
+
id: string;
|
|
4
|
+
createObject: import("@dxos/plugin-space").CreateObject;
|
|
5
|
+
inputSchema?: import("effect/Schema").Schema.AnyNoContext;
|
|
6
|
+
customPanel?: import("react").ComponentType<import("@dxos/plugin-space").SpaceCapabilities.CreateObjectCustomPanelProps>;
|
|
7
|
+
}>>>, Error>;
|
|
8
|
+
export declare const ReactSurface: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").ReactSurface>>, Error>;
|
|
3
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;YAAmE,CAAC;AAC7F,eAAO,MAAM,YAAY,iJAAmE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ReactSurface>>, never, never>;
|
|
3
4
|
export default _default;
|
|
4
5
|
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
3
|
+
import { type CanvasBoard } from '@dxos/react-ui-canvas-editor';
|
|
4
|
+
export type CanvasArticleProps = AppSurface.ObjectArticleProps<CanvasBoard.CanvasBoard>;
|
|
5
|
+
export declare const CanvasArticle: ({ role, subject, attendableId: _attendableId }: CanvasArticleProps) => React.JSX.Element | undefined;
|
|
6
|
+
//# sourceMappingURL=CanvasArticle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CanvasArticle.d.ts","sourceRoot":"","sources":["../../../../../src/containers/CanvasArticle/CanvasArticle.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAKpE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAevD,OAAO,EACL,KAAK,WAAW,EAMjB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;AAExF,eAAO,MAAM,aAAa,mDAAoD,kBAAkB,kCA4C/F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/CanvasArticle/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/containers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,OAAO,CAAC;AAEjD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,GAAG,CAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const meta:
|
|
1
|
+
import { Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const meta: Plugin.Meta;
|
|
3
3
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,IAAI,aAyBf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,eAAO,MAAM,eAAe,4BAA6C,CAAC"}
|