@dxos/plugin-conductor 0.8.4-main.fffef41 → 0.8.4-staging.60fe92afc8

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.
Files changed (110) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +461 -0
  3. package/README.md +7 -3
  4. package/dist/lib/neutral/CanvasArticle-KEPXL3ZT.mjs +98 -0
  5. package/dist/lib/neutral/CanvasArticle-KEPXL3ZT.mjs.map +7 -0
  6. package/dist/lib/neutral/ConductorPlugin.mjs +38 -0
  7. package/dist/lib/neutral/ConductorPlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/capabilities/index.mjs +9 -0
  9. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  10. package/dist/lib/neutral/chunk-WDHL35VB.mjs +39 -0
  11. package/dist/lib/neutral/chunk-WDHL35VB.mjs.map +7 -0
  12. package/dist/lib/neutral/components/index.mjs +1 -0
  13. package/dist/lib/neutral/containers/index.mjs +7 -0
  14. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  15. package/dist/lib/neutral/create-object-PTHDJAGI.mjs +26 -0
  16. package/dist/lib/neutral/create-object-PTHDJAGI.mjs.map +7 -0
  17. package/dist/lib/neutral/index.mjs +7 -0
  18. package/dist/lib/neutral/meta.json +1 -0
  19. package/dist/lib/neutral/meta.mjs +7 -0
  20. package/dist/lib/neutral/meta.mjs.map +7 -0
  21. package/dist/lib/neutral/plugin.mjs +11 -0
  22. package/dist/lib/neutral/plugin.mjs.map +7 -0
  23. package/dist/lib/neutral/react-surface-JCMKXAUY.mjs +22 -0
  24. package/dist/lib/neutral/react-surface-JCMKXAUY.mjs.map +7 -0
  25. package/dist/lib/neutral/translations.mjs +29 -0
  26. package/dist/lib/neutral/translations.mjs.map +7 -0
  27. package/dist/types/src/ConductorPlugin.d.ts +3 -1
  28. package/dist/types/src/ConductorPlugin.d.ts.map +1 -1
  29. package/dist/types/src/ConductorPlugin.test.d.ts +2 -0
  30. package/dist/types/src/ConductorPlugin.test.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  32. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  33. package/dist/types/src/capabilities/index.d.ts +8 -2
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  36. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  37. package/dist/types/src/components/index.d.ts +0 -4
  38. package/dist/types/src/components/index.d.ts.map +1 -1
  39. package/dist/types/src/containers/CanvasArticle/CanvasArticle.d.ts +6 -0
  40. package/dist/types/src/containers/CanvasArticle/CanvasArticle.d.ts.map +1 -0
  41. package/dist/types/src/containers/CanvasArticle/index.d.ts +2 -0
  42. package/dist/types/src/containers/CanvasArticle/index.d.ts.map +1 -0
  43. package/dist/types/src/containers/index.d.ts +3 -0
  44. package/dist/types/src/containers/index.d.ts.map +1 -0
  45. package/dist/types/src/index.d.ts +0 -1
  46. package/dist/types/src/index.d.ts.map +1 -1
  47. package/dist/types/src/meta.d.ts +2 -2
  48. package/dist/types/src/meta.d.ts.map +1 -1
  49. package/dist/types/src/plugin.d.ts +3 -0
  50. package/dist/types/src/plugin.d.ts.map +1 -0
  51. package/dist/types/src/translations.d.ts +24 -14
  52. package/dist/types/src/translations.d.ts.map +1 -1
  53. package/dist/types/src/types/index.d.ts +0 -1
  54. package/dist/types/src/types/index.d.ts.map +1 -1
  55. package/dist/types/tsconfig.tsbuildinfo +1 -1
  56. package/package.json +83 -50
  57. package/src/ConductorPlugin.test.ts +27 -0
  58. package/src/ConductorPlugin.tsx +20 -55
  59. package/src/capabilities/create-object.ts +30 -0
  60. package/src/capabilities/index.ts +3 -3
  61. package/src/capabilities/react-surface.tsx +24 -15
  62. package/src/components/index.ts +1 -5
  63. package/src/containers/CanvasArticle/CanvasArticle.tsx +127 -0
  64. package/src/containers/CanvasArticle/index.ts +5 -0
  65. package/src/containers/index.ts +7 -0
  66. package/src/index.ts +0 -1
  67. package/src/meta.ts +20 -6
  68. package/src/plugin.ts +9 -0
  69. package/src/translations.ts +15 -12
  70. package/src/types/index.ts +0 -2
  71. package/src/vite-env.d.ts +10 -0
  72. package/dist/lib/browser/CanvasContainer-RJPQZ63D.mjs +0 -96
  73. package/dist/lib/browser/CanvasContainer-RJPQZ63D.mjs.map +0 -7
  74. package/dist/lib/browser/chunk-POMULF74.mjs +0 -25
  75. package/dist/lib/browser/chunk-POMULF74.mjs.map +0 -7
  76. package/dist/lib/browser/chunk-PYKBZYTF.mjs +0 -24
  77. package/dist/lib/browser/chunk-PYKBZYTF.mjs.map +0 -7
  78. package/dist/lib/browser/index.mjs +0 -93
  79. package/dist/lib/browser/index.mjs.map +0 -7
  80. package/dist/lib/browser/intent-resolver-GJHGNHRE.mjs +0 -34
  81. package/dist/lib/browser/intent-resolver-GJHGNHRE.mjs.map +0 -7
  82. package/dist/lib/browser/meta.json +0 -1
  83. package/dist/lib/browser/react-surface-3XDCWHZE.mjs +0 -31
  84. package/dist/lib/browser/react-surface-3XDCWHZE.mjs.map +0 -7
  85. package/dist/lib/browser/types/index.mjs +0 -8
  86. package/dist/lib/node-esm/CanvasContainer-T73T6ENQ.mjs +0 -98
  87. package/dist/lib/node-esm/CanvasContainer-T73T6ENQ.mjs.map +0 -7
  88. package/dist/lib/node-esm/chunk-LNIMDWHI.mjs +0 -26
  89. package/dist/lib/node-esm/chunk-LNIMDWHI.mjs.map +0 -7
  90. package/dist/lib/node-esm/chunk-OKCDSUHC.mjs +0 -26
  91. package/dist/lib/node-esm/chunk-OKCDSUHC.mjs.map +0 -7
  92. package/dist/lib/node-esm/index.mjs +0 -94
  93. package/dist/lib/node-esm/index.mjs.map +0 -7
  94. package/dist/lib/node-esm/intent-resolver-KRUQLZD7.mjs +0 -35
  95. package/dist/lib/node-esm/intent-resolver-KRUQLZD7.mjs.map +0 -7
  96. package/dist/lib/node-esm/meta.json +0 -1
  97. package/dist/lib/node-esm/react-surface-ZORMVPKH.mjs +0 -32
  98. package/dist/lib/node-esm/react-surface-ZORMVPKH.mjs.map +0 -7
  99. package/dist/lib/node-esm/types/index.mjs +0 -9
  100. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  101. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  102. package/dist/types/src/components/CanvasContainer.d.ts +0 -8
  103. package/dist/types/src/components/CanvasContainer.d.ts.map +0 -1
  104. package/dist/types/src/types/schema.d.ts +0 -18
  105. package/dist/types/src/types/schema.d.ts.map +0 -1
  106. package/src/capabilities/intent-resolver.ts +0 -27
  107. package/src/components/CanvasContainer.tsx +0 -106
  108. package/src/types/schema.ts +0 -20
  109. /package/dist/lib/{browser/types → neutral/components}/index.mjs.map +0 -0
  110. /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
package/package.json CHANGED
@@ -1,77 +1,110 @@
1
1
  {
2
2
  "name": "@dxos/plugin-conductor",
3
- "version": "0.8.4-main.fffef41",
3
+ "version": "0.8.4-staging.60fe92afc8",
4
4
  "description": "Composer plugin for conductor.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
- "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
11
+ "license": "FSL-1.1-Apache-2.0",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
10
14
  "type": "module",
15
+ "imports": {
16
+ "#capabilities": {
17
+ "source": "./src/capabilities/index.ts",
18
+ "types": "./dist/types/src/capabilities/index.d.ts",
19
+ "default": "./dist/lib/neutral/capabilities/index.mjs"
20
+ },
21
+ "#components": {
22
+ "source": "./src/components/index.ts",
23
+ "types": "./dist/types/src/components/index.d.ts",
24
+ "default": "./dist/lib/neutral/components/index.mjs"
25
+ },
26
+ "#containers": {
27
+ "source": "./src/containers/index.ts",
28
+ "types": "./dist/types/src/containers/index.d.ts",
29
+ "default": "./dist/lib/neutral/containers/index.mjs"
30
+ },
31
+ "#meta": {
32
+ "source": "./src/meta.ts",
33
+ "types": "./dist/types/src/meta.d.ts",
34
+ "default": "./dist/lib/neutral/meta.mjs"
35
+ },
36
+ "#plugin": {
37
+ "source": "./src/ConductorPlugin.tsx",
38
+ "types": "./dist/types/src/ConductorPlugin.d.ts",
39
+ "default": "./dist/lib/neutral/ConductorPlugin.mjs"
40
+ },
41
+ "#translations": {
42
+ "source": "./src/translations.ts",
43
+ "types": "./dist/types/src/translations.d.ts",
44
+ "default": "./dist/lib/neutral/translations.mjs"
45
+ }
46
+ },
11
47
  "exports": {
12
48
  ".": {
13
49
  "source": "./src/index.ts",
14
50
  "types": "./dist/types/src/index.d.ts",
15
- "browser": "./dist/lib/browser/index.mjs",
16
- "node": "./dist/lib/node-esm/index.mjs"
51
+ "default": "./dist/lib/neutral/index.mjs"
52
+ },
53
+ "./assets/PLUGIN.mdl": "./PLUGIN.mdl",
54
+ "./plugin": {
55
+ "source": "./src/plugin.ts",
56
+ "types": "./dist/types/src/plugin.d.ts",
57
+ "default": "./dist/lib/neutral/plugin.mjs"
17
58
  },
18
- "./types": {
19
- "source": "./src/types/index.ts",
20
- "types": "./dist/types/src/types/index.d.ts",
21
- "browser": "./dist/lib/browser/types/index.mjs",
22
- "node": "./dist/lib/node-esm/types/index.mjs"
59
+ "./translations": {
60
+ "source": "./src/translations.ts",
61
+ "types": "./dist/types/src/translations.d.ts",
62
+ "default": "./dist/lib/neutral/translations.mjs"
23
63
  }
24
64
  },
25
65
  "types": "dist/types/src/index.d.ts",
26
- "typesVersions": {
27
- "*": {
28
- "types": [
29
- "dist/types/src/types/index.d.ts"
30
- ]
31
- }
32
- },
33
66
  "files": [
34
67
  "dist",
35
- "src"
68
+ "src",
69
+ "PLUGIN.mdl"
36
70
  ],
37
71
  "dependencies": {
38
- "@preact-signals/safe-react": "^0.9.0",
39
- "effect": "3.18.3",
40
- "@dxos/ai": "0.8.4-main.fffef41",
41
- "@dxos/app-framework": "0.8.4-main.fffef41",
42
- "@dxos/conductor": "0.8.4-main.fffef41",
43
- "@dxos/edge-client": "0.8.4-main.fffef41",
44
- "@dxos/echo": "0.8.4-main.fffef41",
45
- "@dxos/assistant": "0.8.4-main.fffef41",
46
- "@dxos/functions": "0.8.4-main.fffef41",
47
- "@dxos/debug": "0.8.4-main.fffef41",
48
- "@dxos/functions-runtime": "0.8.4-main.fffef41",
49
- "@dxos/plugin-client": "0.8.4-main.fffef41",
50
- "@dxos/plugin-space": "0.8.4-main.fffef41",
51
- "@dxos/react-client": "0.8.4-main.fffef41",
52
- "@dxos/log": "0.8.4-main.fffef41",
53
- "@dxos/react-ui-canvas-editor": "0.8.4-main.fffef41",
54
- "@dxos/react-ui-stack": "0.8.4-main.fffef41",
55
- "@dxos/react-ui-canvas-compute": "0.8.4-main.fffef41",
56
- "@dxos/util": "0.8.4-main.fffef41",
57
- "@dxos/live-object": "0.8.4-main.fffef41"
72
+ "effect": "3.21.3",
73
+ "@dxos/app-framework": "0.8.4-staging.60fe92afc8",
74
+ "@dxos/ai": "0.8.4-staging.60fe92afc8",
75
+ "@dxos/app-toolkit": "0.8.4-staging.60fe92afc8",
76
+ "@dxos/compute": "0.8.4-staging.60fe92afc8",
77
+ "@dxos/conductor": "0.8.4-staging.60fe92afc8",
78
+ "@dxos/edge-client": "0.8.4-staging.60fe92afc8",
79
+ "@dxos/functions": "0.8.4-staging.60fe92afc8",
80
+ "@dxos/echo": "0.8.4-staging.60fe92afc8",
81
+ "@dxos/keys": "0.8.4-staging.60fe92afc8",
82
+ "@dxos/log": "0.8.4-staging.60fe92afc8",
83
+ "@dxos/plugin-automation": "0.8.4-staging.60fe92afc8",
84
+ "@dxos/plugin-space": "0.8.4-staging.60fe92afc8",
85
+ "@dxos/plugin-client": "0.8.4-staging.60fe92afc8",
86
+ "@dxos/react-ui-canvas-compute": "0.8.4-staging.60fe92afc8",
87
+ "@dxos/react-ui-canvas-editor": "0.8.4-staging.60fe92afc8",
88
+ "@dxos/util": "0.8.4-staging.60fe92afc8",
89
+ "@dxos/react-client": "0.8.4-staging.60fe92afc8"
58
90
  },
59
91
  "devDependencies": {
60
- "@types/react": "~19.2.2",
61
- "@types/react-dom": "~19.2.2",
62
- "react": "~19.2.0",
63
- "react-dom": "~19.2.0",
64
- "vite": "7.1.9",
65
- "@dxos/react-ui": "0.8.4-main.fffef41",
66
- "@dxos/storybook-utils": "0.8.4-main.fffef41",
67
- "@dxos/react-ui-theme": "0.8.4-main.fffef41"
92
+ "@types/react": "~19.2.7",
93
+ "@types/react-dom": "~19.2.3",
94
+ "react": "~19.2.3",
95
+ "react-dom": "~19.2.3",
96
+ "vite": "^8.0.16",
97
+ "@dxos/plugin-testing": "0.8.4-staging.60fe92afc8",
98
+ "@dxos/react-ui": "0.8.4-staging.60fe92afc8",
99
+ "@dxos/ui-theme": "0.8.4-staging.60fe92afc8",
100
+ "@dxos/storybook-utils": "0.8.4-staging.60fe92afc8"
68
101
  },
69
102
  "peerDependencies": {
70
- "effect": "^3.13.3",
71
- "react": "^19.0.0",
72
- "react-dom": "^19.0.0",
73
- "@dxos/react-ui": "0.8.4-main.fffef41",
74
- "@dxos/react-ui-theme": "0.8.4-main.fffef41"
103
+ "effect": "3.21.3",
104
+ "react": "~19.2.3",
105
+ "react-dom": "~19.2.3",
106
+ "@dxos/react-ui": "0.8.4-staging.60fe92afc8",
107
+ "@dxos/ui-theme": "0.8.4-staging.60fe92afc8"
75
108
  },
76
109
  "publishConfig": {
77
110
  "access": "public"
@@ -0,0 +1,27 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { ClientPlugin } from '@dxos/plugin-client/plugin';
8
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
9
+
10
+ import { ConductorPlugin } from '#plugin';
11
+
12
+ import { meta } from './meta';
13
+
14
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
15
+
16
+ describe('ConductorPlugin', () => {
17
+ test('modules activate on the expected events', async ({ expect }) => {
18
+ await using harness = await createComposerTestApp({
19
+ plugins: [ClientPlugin({}), ConductorPlugin()],
20
+ });
21
+
22
+ // Modules expected to be active after a normal startup.
23
+ expect(harness.manager.getActive()).toEqual(
24
+ expect.arrayContaining([moduleId('CreateObject'), moduleId('schema'), moduleId('ReactSurface')]),
25
+ );
26
+ });
27
+ });
@@ -2,62 +2,27 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
6
7
  import { ComputeGraph } from '@dxos/conductor';
7
- import { Trigger } from '@dxos/functions';
8
- import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
9
- import { SpaceCapabilities } from '@dxos/plugin-space';
10
- import { defineObjectForm } from '@dxos/plugin-space/types';
11
- import { CanvasBoardType } from '@dxos/react-ui-canvas-editor';
8
+ import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
12
9
 
13
- import { IntentResolver, ReactSurface } from './capabilities';
14
- import { meta } from './meta';
15
- import { translations } from './translations';
16
- import { ConductorAction } from './types';
10
+ import { CreateObject, ReactSurface } from '#capabilities';
11
+ import { meta } from '#meta';
12
+ import { translations } from '#translations';
17
13
 
18
- export const ConductorPlugin = definePlugin(meta, () => [
19
- defineModule({
20
- id: `${meta.id}/module/translations`,
21
- activatesOn: Events.SetupTranslations,
22
- activate: () => contributes(Capabilities.Translations, translations),
23
- }),
24
- defineModule({
25
- id: `${meta.id}/module/metadata`,
26
- activatesOn: Events.SetupMetadata,
27
- activate: () =>
28
- contributes(Capabilities.Metadata, {
29
- id: CanvasBoardType.typename,
30
- metadata: {
31
- icon: 'ph--infinity--regular',
32
- iconHue: 'sky',
33
- },
34
- }),
35
- }),
36
- defineModule({
37
- id: `${meta.id}/module/object-form`,
38
- activatesOn: ClientEvents.SetupSchema,
39
- activate: () =>
40
- contributes(
41
- SpaceCapabilities.ObjectForm,
42
- defineObjectForm({
43
- objectSchema: CanvasBoardType,
44
- getIntent: () => createIntent(ConductorAction.Create),
45
- }),
46
- ),
47
- }),
48
- defineModule({
49
- id: `${meta.id}/module/schema`,
50
- activatesOn: ClientEvents.SetupSchema,
51
- activate: () => contributes(ClientCapabilities.Schema, [ComputeGraph, Trigger.Trigger]),
52
- }),
53
- defineModule({
54
- id: `${meta.id}/module/react-surface`,
55
- activatesOn: Events.SetupReactSurface,
56
- activate: ReactSurface,
57
- }),
58
- defineModule({
59
- id: `${meta.id}/module/intent-resolver`,
60
- activatesOn: Events.SetupIntentResolver,
61
- activate: IntentResolver,
14
+ // eslint-disable-next-line import/no-relative-packages
15
+ import pluginSpec from '../PLUGIN.mdl?raw';
16
+
17
+ export const ConductorPlugin = Plugin.define(meta).pipe(
18
+ AppPlugin.addCreateObjectModule({ activate: CreateObject }),
19
+ AppPlugin.addSchemaModule({ schema: [CanvasBoard.CanvasBoard, ComputeGraph] }),
20
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
21
+ AppPlugin.addTranslationsModule({ translations }),
22
+ AppPlugin.addPluginAssetModule({
23
+ asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
62
24
  }),
63
- ]);
25
+ Plugin.make,
26
+ );
27
+
28
+ export default ConductorPlugin;
@@ -0,0 +1,30 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/compute';
9
+ import { Type } from '@dxos/echo';
10
+ import { SpaceOperation } from '@dxos/plugin-space';
11
+ import { SpaceCapabilities } from '@dxos/plugin-space';
12
+ import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
13
+
14
+ export default Capability.makeModule(
15
+ Effect.fnUntraced(function* () {
16
+ return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
17
+ id: Type.getTypename(CanvasBoard.CanvasBoard),
18
+ createObject: (props, options) =>
19
+ Effect.gen(function* () {
20
+ const object = CanvasBoard.make(props);
21
+ return yield* Operation.invoke(SpaceOperation.AddObject, {
22
+ object,
23
+ target: options.target,
24
+ hidden: true,
25
+ targetNodeId: options.targetNodeId,
26
+ });
27
+ }),
28
+ });
29
+ }),
30
+ );
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
5
+ import { Capability } from '@dxos/app-framework';
6
6
 
7
- export const IntentResolver = lazy(() => import('./intent-resolver'));
8
- export const ReactSurface = lazy(() => import('./react-surface'));
7
+ export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
8
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -2,22 +2,31 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import * as Effect from 'effect/Effect';
5
6
  import React from 'react';
6
7
 
7
- import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
- import { Obj } from '@dxos/echo';
9
- import { CanvasBoardType } from '@dxos/react-ui-canvas-editor';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
11
+ import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
10
12
 
11
- import { CanvasContainer } from '../components';
12
- import { meta } from '../meta';
13
+ import { CanvasArticle } from '#containers';
13
14
 
14
- export default () =>
15
- contributes(
16
- Capabilities.ReactSurface,
17
- createSurface({
18
- id: meta.id,
19
- role: ['article', 'section'],
20
- filter: (data): data is { subject: CanvasBoardType } => Obj.instanceOf(CanvasBoardType, data.subject),
21
- component: ({ data, role }) => <CanvasContainer canvas={data.subject} role={role} />,
22
- }),
23
- );
15
+ export default Capability.makeModule(() =>
16
+ Effect.succeed(
17
+ Capability.contributes(
18
+ Capabilities.ReactSurface,
19
+ Surface.create({
20
+ id: 'root',
21
+ // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
22
+ filter: AppSurface.oneOf(
23
+ AppSurface.object(AppSurface.Article, CanvasBoard.CanvasBoard),
24
+ AppSurface.object(AppSurface.Section, CanvasBoard.CanvasBoard),
25
+ ),
26
+ component: ({ data, role }) => (
27
+ <CanvasArticle role={role} subject={data.subject} attendableId={data.attendableId} />
28
+ ),
29
+ }),
30
+ ),
31
+ ),
32
+ );
@@ -1,7 +1,3 @@
1
1
  //
2
- // Copyright 2023 DXOS.org
2
+ // Copyright 2025 DXOS.org
3
3
  //
4
-
5
- import { lazy } from 'react';
6
-
7
- export const CanvasContainer = lazy(() => import('./CanvasContainer'));
@@ -0,0 +1,127 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+ import type * as Exit from 'effect/Exit';
7
+ import React, { Fragment, useEffect, useMemo, useRef } from 'react';
8
+
9
+ import { AiService } from '@dxos/ai';
10
+ import { Capabilities } from '@dxos/app-framework';
11
+ import { useCapability } from '@dxos/app-framework/ui';
12
+ import { type AppSurface } from '@dxos/app-toolkit/ui';
13
+ import { Credential, Operation, OperationRegistry, ServiceResolver } from '@dxos/compute';
14
+ import { ComputeGraphModel } from '@dxos/conductor';
15
+ import { Database, Feed, Obj } from '@dxos/echo';
16
+ import { useObject } from '@dxos/react-client/echo';
17
+ import { Flex, type FlexProps } from '@dxos/react-ui';
18
+ import {
19
+ ComputeContext,
20
+ ComputeGraphController,
21
+ type ComputeShape,
22
+ ComputeShapeLayout,
23
+ computeShapes,
24
+ useComputeGraphController,
25
+ useGraphMonitor,
26
+ } from '@dxos/react-ui-canvas-compute';
27
+ import {
28
+ type CanvasBoard,
29
+ CanvasGraphModel,
30
+ Editor,
31
+ type EditorController,
32
+ KeyboardContainer,
33
+ ShapeRegistry,
34
+ } from '@dxos/react-ui-canvas-editor';
35
+
36
+ export type CanvasArticleProps = AppSurface.ObjectArticleProps<CanvasBoard.CanvasBoard>;
37
+
38
+ export const CanvasArticle = ({ role, subject, attendableId: _attendableId }: CanvasArticleProps) => {
39
+ const [canvas] = useObject(subject);
40
+ const id = Obj.getURI(canvas);
41
+ const graph = useMemo(
42
+ () => CanvasGraphModel.create<ComputeShape>(canvas.layout, (fn) => Obj.update(subject, fn)),
43
+ [subject, canvas.layout],
44
+ );
45
+ const controller = useGraphController(subject);
46
+ const graphMonitor = useGraphMonitor(controller?.graph);
47
+ const registry = useMemo(() => new ShapeRegistry(computeShapes), []);
48
+ const editorRef = useRef<EditorController>(null);
49
+ useComputeGraphController({ controller, graph, editorRef });
50
+
51
+ // Layout.
52
+ const layout = useMemo(
53
+ () => (controller && registry ? new ComputeShapeLayout(controller, registry) : undefined),
54
+ [controller, registry],
55
+ );
56
+
57
+ if (!controller) {
58
+ return;
59
+ }
60
+
61
+ const Root = role === 'section' ? Container : Fragment;
62
+
63
+ return (
64
+ <ComputeContext.Provider value={{ controller }}>
65
+ <Root>
66
+ <KeyboardContainer id={id}>
67
+ <Editor.Root
68
+ id={id}
69
+ ref={editorRef}
70
+ graph={graph}
71
+ graphMonitor={graphMonitor as any}
72
+ registry={registry}
73
+ layout={layout}
74
+ >
75
+ <Editor.Canvas />
76
+ <Editor.UI showTools />
77
+ </Editor.Root>
78
+ </KeyboardContainer>
79
+ </Root>
80
+ </ComputeContext.Provider>
81
+ );
82
+ };
83
+
84
+ const Container = (props: FlexProps) => <Flex {...props} classNames='aspect-square' />;
85
+
86
+ const useGraphController = (canvas: CanvasBoard.CanvasBoard) => {
87
+ const db = Obj.getDatabase(canvas);
88
+ const processManagerRuntime = useCapability(Capabilities.ProcessManagerRuntime);
89
+ const [computeGraph] = useObject(canvas.computeGraph);
90
+ const controller = useMemo(() => {
91
+ if (!canvas.computeGraph?.target || !db) {
92
+ return null;
93
+ }
94
+ const spaceId = db.spaceId;
95
+ const model = new ComputeGraphModel(canvas.computeGraph?.target);
96
+ const spaceLayer = ServiceResolver.provide(
97
+ { space: spaceId },
98
+ AiService.AiService,
99
+ Database.Service,
100
+ Feed.FeedService,
101
+ Credential.CredentialsService,
102
+ Operation.Service,
103
+ OperationRegistry.Service,
104
+ );
105
+ const computeGraphRuntime = {
106
+ runPromiseExit: <A, E>(effect: Effect.Effect<A, E, any>): Promise<Exit.Exit<A, E>> =>
107
+ processManagerRuntime.runPromiseExit(effect.pipe(Effect.provide(spaceLayer)) as any) as Promise<
108
+ Exit.Exit<A, E>
109
+ >,
110
+ };
111
+ const controller = new ComputeGraphController(computeGraphRuntime, model);
112
+ return controller;
113
+ }, [computeGraph, db, processManagerRuntime]);
114
+
115
+ useEffect(() => {
116
+ if (!controller) {
117
+ return;
118
+ }
119
+
120
+ void controller.open();
121
+ return () => {
122
+ void controller.close();
123
+ };
124
+ }, [controller]);
125
+
126
+ return controller;
127
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export { CanvasArticle as default } from './CanvasArticle';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { type ComponentType, lazy } from 'react';
6
+
7
+ export const CanvasArticle: ComponentType<any> = lazy(() => import('./CanvasArticle'));
package/src/index.ts CHANGED
@@ -2,5 +2,4 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export * from './ConductorPlugin';
6
5
  export * from './meta';
package/src/meta.ts CHANGED
@@ -2,19 +2,33 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
5
+ import { Plugin } from '@dxos/app-framework';
6
+ import { DXN } from '@dxos/keys';
6
7
  import { trim } from '@dxos/util';
7
8
 
8
- export const meta: PluginMeta = {
9
- id: 'dxos.org/plugin/conductor',
9
+ export const meta = Plugin.makeMeta({
10
+ key: DXN.make('org.dxos.plugin.conductor'),
10
11
  name: 'Conductor',
12
+ author: 'DXOS',
11
13
  description: trim`
12
- Visual workflow builder using node-based compute graphs to orchestrate complex AI agent pipelines.
13
- Connect data sources, transformations, and AI models in a drag-and-drop interface for advanced automation.
14
+ Conductor is a visual node-based compute graph plugin for DXOS Composer.
15
+ It lets you compose reactive data pipelines by connecting typed input and output ports on a
16
+ drag-and-drop infinite canvas — no code required for common automation patterns.
17
+
18
+ Each node in the graph is a first-class ECHO object, so the full pipeline topology is
19
+ replicated to every collaborator in real time via the local-first runtime.
20
+ Built-in node types cover constants, templates, boolean logic, control flow, JSON transforms,
21
+ ECHO database access, append-only queues, and conversation threads.
22
+
23
+ AI orchestration is a first-class concern: the GPT node connects to plugin-assistant's AiService
24
+ and supports tool calling, streaming replies, and configurable system prompts.
25
+ Function nodes can invoke any Blueprint operation registered in the space, making it straightforward
26
+ to compose multi-step agent workflows visually and share them across teams.
14
27
  `,
15
28
  icon: 'ph--infinity--regular',
16
29
  iconHue: 'sky',
17
30
  source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-conductor',
31
+ spec: 'PLUGIN.mdl',
18
32
  tags: ['labs'],
19
33
  screenshots: ['https://dxos.network/plugin-details-canvas-dark.png'],
20
- };
34
+ });
package/src/plugin.ts ADDED
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from './meta';
8
+
9
+ export const ConductorPlugin = Plugin.lazy(meta, () => import('#plugin'));
@@ -2,26 +2,29 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
+ import { Type } from '@dxos/echo';
5
6
  import { type Resource } from '@dxos/react-ui';
6
- import { CanvasBoardType } from '@dxos/react-ui-canvas-editor';
7
+ import { CanvasBoard } from '@dxos/react-ui-canvas-editor';
7
8
 
8
- import { meta } from './meta';
9
+ import { meta } from '#meta';
9
10
 
10
11
  export const translations = [
11
12
  {
12
13
  'en-US': {
13
- [CanvasBoardType.typename]: {
14
- 'typename label': 'Circuit',
15
- 'typename label_zero': 'Circuits',
16
- 'typename label_one': 'Circuit',
17
- 'typename label_other': 'Circuits',
18
- 'object name placeholder': 'New circuit',
19
- 'rename object label': 'Rename circuit',
20
- 'delete object label': 'Delete circuit',
14
+ [Type.getTypename(CanvasBoard.CanvasBoard)]: {
15
+ 'typename.label': 'Circuit',
16
+ 'typename.label_zero': 'Circuits',
17
+ 'typename.label_one': 'Circuit',
18
+ 'typename.label_other': 'Circuits',
19
+ 'object-name.placeholder': 'New circuit',
20
+ 'add-object.label': 'Add circuit',
21
+ 'rename-object.label': 'Rename circuit',
22
+ 'delete-object.label': 'Delete circuit',
23
+ 'object-deleted.label': 'Circuit deleted',
21
24
  },
22
25
  [meta.id]: {
23
- 'plugin name': 'Conductor',
24
- 'content placeholder': 'Enter text...',
26
+ 'plugin.name': 'Conductor',
27
+ 'content.placeholder': 'Enter text...',
25
28
  },
26
29
  },
27
30
  },
@@ -1,5 +1,3 @@
1
1
  //
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
-
5
- export * from './schema';
@@ -0,0 +1,10 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ //
4
+ // Copyright 2026 DXOS.org
5
+ //
6
+
7
+ declare module '*.mdl?raw' {
8
+ const content: string;
9
+ export default content;
10
+ }