@dxos/react-ui-canvas-compute 0.8.2-staging.7ac8446 → 0.8.2

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 (106) hide show
  1. package/dist/lib/browser/index.mjs +1022 -836
  2. package/dist/lib/browser/index.mjs.map +3 -3
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node/index.cjs +1040 -854
  5. package/dist/lib/node/index.cjs.map +3 -3
  6. package/dist/lib/node/meta.json +1 -1
  7. package/dist/lib/node-esm/index.mjs +1022 -836
  8. package/dist/lib/node-esm/index.mjs.map +3 -3
  9. package/dist/lib/node-esm/meta.json +1 -1
  10. package/dist/types/src/components/DiagnosticOverlay.d.ts.map +1 -1
  11. package/dist/types/src/graph/controller.d.ts +2 -18
  12. package/dist/types/src/graph/controller.d.ts.map +1 -1
  13. package/dist/types/src/graph/node-defs.d.ts.map +1 -1
  14. package/dist/types/src/hooks/useComputeGraphController.d.ts.map +1 -1
  15. package/dist/types/src/hooks/useComputeNodeState.d.ts.map +1 -1
  16. package/dist/types/src/hooks/useGraphMonitor.d.ts.map +1 -1
  17. package/dist/types/src/json.test.d.ts +18 -18
  18. package/dist/types/src/json.test.d.ts.map +1 -1
  19. package/dist/types/src/shapes/Append.d.ts +19 -19
  20. package/dist/types/src/shapes/Append.d.ts.map +1 -1
  21. package/dist/types/src/shapes/Array.d.ts +19 -19
  22. package/dist/types/src/shapes/Array.d.ts.map +1 -1
  23. package/dist/types/src/shapes/Audio.d.ts +19 -19
  24. package/dist/types/src/shapes/Audio.d.ts.map +1 -1
  25. package/dist/types/src/shapes/Beacon.d.ts +19 -19
  26. package/dist/types/src/shapes/Beacon.d.ts.map +1 -1
  27. package/dist/types/src/shapes/Boolean.d.ts +70 -70
  28. package/dist/types/src/shapes/Boolean.d.ts.map +1 -1
  29. package/dist/types/src/shapes/Chat.d.ts +19 -19
  30. package/dist/types/src/shapes/Chat.d.ts.map +1 -1
  31. package/dist/types/src/shapes/Constant.d.ts +20 -20
  32. package/dist/types/src/shapes/Constant.d.ts.map +1 -1
  33. package/dist/types/src/shapes/Database.d.ts +19 -19
  34. package/dist/types/src/shapes/Database.d.ts.map +1 -1
  35. package/dist/types/src/shapes/Function.d.ts +19 -19
  36. package/dist/types/src/shapes/Function.d.ts.map +1 -1
  37. package/dist/types/src/shapes/Gpt.d.ts +19 -19
  38. package/dist/types/src/shapes/Gpt.d.ts.map +1 -1
  39. package/dist/types/src/shapes/GptRealtime.d.ts +19 -19
  40. package/dist/types/src/shapes/GptRealtime.d.ts.map +1 -1
  41. package/dist/types/src/shapes/Json.d.ts +37 -37
  42. package/dist/types/src/shapes/Json.d.ts.map +1 -1
  43. package/dist/types/src/shapes/Logic.d.ts +37 -37
  44. package/dist/types/src/shapes/Logic.d.ts.map +1 -1
  45. package/dist/types/src/shapes/Queue.d.ts +19 -19
  46. package/dist/types/src/shapes/Queue.d.ts.map +1 -1
  47. package/dist/types/src/shapes/RNG.d.ts +21 -21
  48. package/dist/types/src/shapes/RNG.d.ts.map +1 -1
  49. package/dist/types/src/shapes/Scope.d.ts +19 -19
  50. package/dist/types/src/shapes/Scope.d.ts.map +1 -1
  51. package/dist/types/src/shapes/Surface.d.ts +19 -19
  52. package/dist/types/src/shapes/Surface.d.ts.map +1 -1
  53. package/dist/types/src/shapes/Switch.d.ts +19 -19
  54. package/dist/types/src/shapes/Switch.d.ts.map +1 -1
  55. package/dist/types/src/shapes/Table.d.ts +19 -19
  56. package/dist/types/src/shapes/Table.d.ts.map +1 -1
  57. package/dist/types/src/shapes/Template.d.ts +20 -20
  58. package/dist/types/src/shapes/Template.d.ts.map +1 -1
  59. package/dist/types/src/shapes/Text.d.ts +19 -19
  60. package/dist/types/src/shapes/Text.d.ts.map +1 -1
  61. package/dist/types/src/shapes/TextToImage.d.ts +19 -19
  62. package/dist/types/src/shapes/TextToImage.d.ts.map +1 -1
  63. package/dist/types/src/shapes/Thread.d.ts +19 -19
  64. package/dist/types/src/shapes/Thread.d.ts.map +1 -1
  65. package/dist/types/src/shapes/Trigger.d.ts +47 -45
  66. package/dist/types/src/shapes/Trigger.d.ts.map +1 -1
  67. package/dist/types/src/shapes/common/FunctionBody.d.ts +5 -5
  68. package/dist/types/src/shapes/common/FunctionBody.d.ts.map +1 -1
  69. package/dist/types/src/shapes/common/TypeSelect.d.ts.map +1 -1
  70. package/dist/types/src/shapes/defs.d.ts +18 -19
  71. package/dist/types/src/shapes/defs.d.ts.map +1 -1
  72. package/dist/types/src/testing/circuits.d.ts.map +1 -1
  73. package/dist/types/tsconfig.tsbuildinfo +1 -1
  74. package/package.json +42 -40
  75. package/src/compute.stories.tsx +3 -3
  76. package/src/graph/controller.ts +12 -12
  77. package/src/hooks/useComputeNodeState.ts +3 -3
  78. package/src/hooks/useGraphMonitor.ts +3 -5
  79. package/src/json.test.ts +10 -10
  80. package/src/schema.test.ts +7 -7
  81. package/src/shapes/Append.tsx +5 -5
  82. package/src/shapes/Array.tsx +5 -5
  83. package/src/shapes/Audio.tsx +5 -5
  84. package/src/shapes/Beacon.tsx +5 -5
  85. package/src/shapes/Boolean.tsx +5 -5
  86. package/src/shapes/Chat.tsx +5 -5
  87. package/src/shapes/Constant.tsx +6 -6
  88. package/src/shapes/Database.tsx +5 -5
  89. package/src/shapes/Function.tsx +8 -7
  90. package/src/shapes/Gpt.tsx +6 -6
  91. package/src/shapes/GptRealtime.tsx +8 -8
  92. package/src/shapes/Json.tsx +9 -9
  93. package/src/shapes/Logic.tsx +9 -9
  94. package/src/shapes/Queue.tsx +5 -5
  95. package/src/shapes/RNG.tsx +7 -7
  96. package/src/shapes/Scope.tsx +5 -5
  97. package/src/shapes/Surface.tsx +5 -5
  98. package/src/shapes/Switch.tsx +5 -5
  99. package/src/shapes/Table.tsx +6 -6
  100. package/src/shapes/Template.tsx +8 -7
  101. package/src/shapes/Text.tsx +5 -5
  102. package/src/shapes/TextToImage.tsx +5 -5
  103. package/src/shapes/Thread.tsx +6 -6
  104. package/src/shapes/Trigger.tsx +32 -33
  105. package/src/shapes/common/FunctionBody.tsx +11 -9
  106. package/src/shapes/defs.ts +9 -9
@@ -1,38 +1,37 @@
1
- import { SchemaAST as AST } from 'effect';
2
- import { S } from '@dxos/echo-schema';
1
+ import { Schema, SchemaAST } from 'effect';
3
2
  import { Polygon } from '@dxos/react-ui-canvas-editor';
4
3
  import { type MakeOptional } from '@dxos/util';
5
4
  export type PropertyKind = 'input' | 'output';
6
- export declare const getProperties: (ast: AST.AST) => {
5
+ export declare const getProperties: (ast: SchemaAST.AST) => {
7
6
  name: string;
8
7
  }[];
9
8
  export declare const createAnchorId: (kind: PropertyKind, property?: string) => string;
10
9
  export declare const parseAnchorId: (id: string) => [PropertyKind | undefined, string];
11
10
  export type CreateShapeProps<S extends Polygon> = Omit<MakeOptional<S, 'id' | 'size'>, 'type' | 'node'>;
12
- export declare const ComputeShape: S.extend<S.mutable<S.extend<S.extend<S.SchemaClass<{
11
+ export declare const ComputeShape: Schema.extend<Schema.mutable<Schema.extend<Schema.extend<Schema.SchemaClass<{
13
12
  readonly id: string;
14
13
  readonly data?: any;
15
14
  }, {
16
15
  readonly id: string;
17
16
  readonly data?: any;
18
- }, never>, S.Struct<{
19
- type: typeof S.String;
20
- text: S.optional<typeof S.String>;
21
- guide: S.optional<typeof S.Boolean>;
22
- classNames: S.optional<typeof S.String>;
23
- }>>, S.Struct<{
24
- center: S.Struct<{
25
- x: typeof S.Number;
26
- y: typeof S.Number;
17
+ }, never>, Schema.Struct<{
18
+ type: typeof Schema.String;
19
+ text: Schema.optional<typeof Schema.String>;
20
+ guide: Schema.optional<typeof Schema.Boolean>;
21
+ classNames: Schema.optional<typeof Schema.String>;
22
+ }>>, Schema.Struct<{
23
+ center: Schema.Struct<{
24
+ x: typeof Schema.Number;
25
+ y: typeof Schema.Number;
27
26
  }>;
28
- size: S.mutable<S.Struct<{
29
- width: typeof S.Number;
30
- height: typeof S.Number;
27
+ size: Schema.mutable<Schema.Struct<{
28
+ width: typeof Schema.Number;
29
+ height: typeof Schema.Number;
31
30
  }>>;
32
- }>>>, S.mutable<S.Struct<{
33
- node: S.optional<S.SchemaClass<string, string, never>>;
31
+ }>>>, Schema.mutable<Schema.Struct<{
32
+ node: Schema.optional<Schema.SchemaClass<string, string, never>>;
34
33
  }>>>;
35
- export type ComputeShape = S.Schema.Type<typeof ComputeShape>;
34
+ export type ComputeShape = Schema.Schema.Type<typeof ComputeShape>;
36
35
  export declare const createShape: <S extends ComputeShape>({ id, ...rest }: CreateShapeProps<S> & {
37
36
  type: string;
38
37
  }) => S;
@@ -1 +1 @@
1
- {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../src/shapes/defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAAY,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE9C,eAAO,MAAM,aAAa,QAAS,GAAG,CAAC,GAAG;;GACqC,CAAC;AAEhF,eAAO,MAAM,cAAc,SAAU,YAAY,8BACrB,CAAC;AAE7B,eAAO,MAAM,aAAa,OAAQ,MAAM,KAAG,CAAC,YAAY,GAAG,SAAS,EAAE,MAAM,CAG3E,CAAC;AAMF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAExG,eAAO,MAAM,YAAY;;;;;;;iBAUkE,EAAG,MAAM;UAAY,EAAG,QAC9G,QACD,EAAA,MAAM;WAAa,EAAG,QACzB,QAAO,EAAG,OACN;gBAEK,EAAG,QAAQ,QAA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AAkB;;;;;;;;;;;;;;;;;EAS9B,CAAC"}
1
+ {"version":3,"file":"circuits.d.ts","sourceRoot":"","sources":["../../../../src/testing/circuits.ts"],"names":[],"mappings":"AAQA,OAAO,EAAyD,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEvH,OAAO,EAAE,sBAAsB,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AA6BjE,eAAO,MAAM,4BAA4B,GACvC;;;;;;;;;;;;;;;;;EAA+C,EAC/C,WAAW,OAAO,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;CAM7B,CAAC;AAMF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;EAa9B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;EAiBlC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;EAmB9B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;EA2BhC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;EAiEjC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;EAqBjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,SAAS;IACxC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;;;;;;;;;;;;;;;;;EA6DA,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;EAIpC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;EAS9B,CAAC"}
@@ -1 +1 @@
1
- {"version":"5.7.3"}
1
+ {"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-canvas-compute",
3
- "version": "0.8.2-staging.7ac8446",
3
+ "version": "0.8.2",
4
4
  "description": "A compute graph extension for the canvas editor component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -22,35 +22,37 @@
22
22
  "dependencies": {
23
23
  "@antv/graphlib": "^2.0.4",
24
24
  "@antv/layout": "^1.2.13",
25
- "@effect/platform": "0.75.1",
25
+ "@effect/platform": "0.80.12",
26
+ "@preact-signals/safe-react": "^0.9.0",
26
27
  "chess.js": "^1.0.0",
27
- "@dxos/app-framework": "0.8.2-staging.7ac8446",
28
- "@dxos/conductor": "0.8.2-staging.7ac8446",
29
- "@dxos/assistant": "0.8.2-staging.7ac8446",
30
- "@dxos/async": "0.8.2-staging.7ac8446",
31
- "@dxos/context": "0.8.2-staging.7ac8446",
32
- "@dxos/debug": "0.8.2-staging.7ac8446",
33
- "@dxos/artifact": "0.8.2-staging.7ac8446",
34
- "@dxos/edge-client": "0.8.2-staging.7ac8446",
35
- "@dxos/functions": "0.8.2-staging.7ac8446",
36
- "@dxos/graph": "0.8.2-staging.7ac8446",
37
- "@dxos/echo-schema": "0.8.2-staging.7ac8446",
38
- "@dxos/invariant": "0.8.2-staging.7ac8446",
39
- "@dxos/keys": "0.8.2-staging.7ac8446",
40
- "@dxos/live-object": "0.8.2-staging.7ac8446",
41
- "@dxos/log": "0.8.2-staging.7ac8446",
42
- "@dxos/react-client": "0.8.2-staging.7ac8446",
43
- "@dxos/react-edge-client": "0.8.2-staging.7ac8446",
44
- "@dxos/react-ui-attention": "0.8.2-staging.7ac8446",
45
- "@dxos/react-ui-canvas": "0.8.2-staging.7ac8446",
46
- "@dxos/react-ui-editor": "0.8.2-staging.7ac8446",
47
- "@dxos/react-ui-canvas-editor": "0.8.2-staging.7ac8446",
48
- "@dxos/react-ui-form": "0.8.2-staging.7ac8446",
49
- "@dxos/react-ui-stack": "0.8.2-staging.7ac8446",
50
- "@dxos/react-ui-sfx": "0.8.2-staging.7ac8446",
51
- "@dxos/react-ui-syntax-highlighter": "0.8.2-staging.7ac8446",
52
- "@dxos/schema": "0.8.2-staging.7ac8446",
53
- "@dxos/util": "0.8.2-staging.7ac8446"
28
+ "@dxos/ai": "0.8.2",
29
+ "@dxos/app-framework": "0.8.2",
30
+ "@dxos/artifact": "0.8.2",
31
+ "@dxos/assistant": "0.8.2",
32
+ "@dxos/conductor": "0.8.2",
33
+ "@dxos/async": "0.8.2",
34
+ "@dxos/context": "0.8.2",
35
+ "@dxos/edge-client": "0.8.2",
36
+ "@dxos/debug": "0.8.2",
37
+ "@dxos/echo-schema": "0.8.2",
38
+ "@dxos/graph": "0.8.2",
39
+ "@dxos/functions": "0.8.2",
40
+ "@dxos/keys": "0.8.2",
41
+ "@dxos/live-object": "0.8.2",
42
+ "@dxos/invariant": "0.8.2",
43
+ "@dxos/react-client": "0.8.2",
44
+ "@dxos/log": "0.8.2",
45
+ "@dxos/react-edge-client": "0.8.2",
46
+ "@dxos/react-ui-attention": "0.8.2",
47
+ "@dxos/react-ui-canvas": "0.8.2",
48
+ "@dxos/react-ui-canvas-editor": "0.8.2",
49
+ "@dxos/react-ui-editor": "0.8.2",
50
+ "@dxos/react-ui-form": "0.8.2",
51
+ "@dxos/react-ui-stack": "0.8.2",
52
+ "@dxos/react-ui-sfx": "0.8.2",
53
+ "@dxos/react-ui-syntax-highlighter": "0.8.2",
54
+ "@dxos/schema": "0.8.2",
55
+ "@dxos/util": "0.8.2"
54
56
  },
55
57
  "devDependencies": {
56
58
  "@effect/ai": "0.8.0",
@@ -58,26 +60,26 @@
58
60
  "@types/lodash.defaultsdeep": "^4.6.6",
59
61
  "@types/react": "~18.2.0",
60
62
  "@types/react-dom": "~18.2.0",
61
- "effect": "3.13.3",
63
+ "effect": "3.14.21",
62
64
  "lodash.defaultsdeep": "^4.6.1",
63
65
  "react": "~18.2.0",
64
66
  "react-dom": "~18.2.0",
65
67
  "vite": "5.4.7",
66
- "@dxos/app-framework": "0.8.2-staging.7ac8446",
67
- "@dxos/artifact-testing": "0.8.2-staging.7ac8446",
68
- "@dxos/echo-signals": "0.8.2-staging.7ac8446",
69
- "@dxos/random": "0.8.2-staging.7ac8446",
70
- "@dxos/compute": "0.8.2-staging.7ac8446",
71
- "@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
72
- "@dxos/react-ui": "0.8.2-staging.7ac8446",
73
- "@dxos/storybook-utils": "0.8.2-staging.7ac8446"
68
+ "@dxos/artifact-testing": "0.8.2",
69
+ "@dxos/app-framework": "0.8.2",
70
+ "@dxos/compute": "0.8.2",
71
+ "@dxos/random": "0.8.2",
72
+ "@dxos/echo-signals": "0.8.2",
73
+ "@dxos/react-ui": "0.8.2",
74
+ "@dxos/react-ui-theme": "0.8.2",
75
+ "@dxos/storybook-utils": "0.8.2"
74
76
  },
75
77
  "peerDependencies": {
76
78
  "effect": "3.13.3",
77
79
  "react": "~18.2.0",
78
80
  "react-dom": "~18.2.0",
79
- "@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
80
- "@dxos/react-ui": "0.8.2-staging.7ac8446"
81
+ "@dxos/react-ui-theme": "0.8.2",
82
+ "@dxos/react-ui": "0.8.2"
81
83
  },
82
84
  "publishConfig": {
83
85
  "access": "public"
@@ -7,9 +7,9 @@ import '@dxos-theme';
7
7
  import type { Meta, StoryObj } from '@storybook/react';
8
8
  import React, { type PropsWithChildren, useEffect, useMemo, useRef, useState } from 'react';
9
9
 
10
+ import { createTestOllamaClient } from '@dxos/ai/testing';
10
11
  import { withPluginManager } from '@dxos/app-framework/testing';
11
12
  import { capabilities, createEdgeServices } from '@dxos/artifact-testing';
12
- import { createTestOllamaClient } from '@dxos/assistant/testing';
13
13
  import { EdgeGpt, type ComputeGraphModel, type ComputeNode, type GraphDiagnostic } from '@dxos/conductor';
14
14
  import { withClientProvider } from '@dxos/react-client/testing';
15
15
  import { Select, Toolbar } from '@dxos/react-ui';
@@ -38,7 +38,7 @@ import {
38
38
  createArtifactCircuit,
39
39
  } from './testing';
40
40
 
41
- // const FormSchema = S.omit<any, any, ['subgraph']>('subgraph')(ComputeNode);
41
+ // const FormSchema = Schema.omit<any, any, ['subgraph']>('subgraph')(ComputeNode);
42
42
 
43
43
  const sidebarTypes: NonNullable<RenderProps['sidebar']>[] = ['canvas', 'compute', 'controller', 'selected'] as const;
44
44
 
@@ -177,7 +177,7 @@ const meta: Meta<RenderProps> = {
177
177
  withClientProvider({ createIdentity: true, createSpace: true }),
178
178
  withTheme,
179
179
  withAttention,
180
- withLayout({ fullscreen: true, tooltips: true }),
180
+ withLayout({ fullscreen: true }),
181
181
  withPluginManager({ capabilities }),
182
182
  ],
183
183
  };
@@ -5,7 +5,7 @@
5
5
  import { FetchHttpClient } from '@effect/platform';
6
6
  import { type Context, Effect, Either, Exit, Layer, Scope } from 'effect';
7
7
 
8
- import { type ImageContentBlock } from '@dxos/artifact';
8
+ import { type ImageContentBlock } from '@dxos/ai';
9
9
  import { Event, synchronized } from '@dxos/async';
10
10
  import {
11
11
  isNotExecuted,
@@ -145,7 +145,7 @@ export class ComputeGraphController extends Resource {
145
145
  };
146
146
  }
147
147
 
148
- setServices(services: Partial<Services>) {
148
+ setServices(services: Partial<Services>): void {
149
149
  log.info('setServices', { services });
150
150
  Object.assign(this._services, services);
151
151
  }
@@ -187,11 +187,11 @@ export class ComputeGraphController extends Resource {
187
187
  );
188
188
  }
189
189
 
190
- addNode(node: ComputeNode) {
190
+ addNode(node: ComputeNode): void {
191
191
  this._graph.addNode(node);
192
192
  }
193
193
 
194
- addEdge(edge: ComputeEdge) {
194
+ addEdge(edge: ComputeEdge): void {
195
195
  this._graph.addEdge(edge);
196
196
  }
197
197
 
@@ -199,15 +199,15 @@ export class ComputeGraphController extends Resource {
199
199
  return this._graph.getNode(nodeId);
200
200
  }
201
201
 
202
- getInputs(nodeId: string) {
202
+ getInputs(nodeId: string): Record<string, RuntimeValue> {
203
203
  return this._runtimeStateInputs[nodeId] ?? {};
204
204
  }
205
205
 
206
- getOutputs(nodeId: string) {
206
+ getOutputs(nodeId: string): Record<string, RuntimeValue> {
207
207
  return this._runtimeStateOutputs[nodeId] ?? {};
208
208
  }
209
209
 
210
- setOutput(nodeId: string, property: string, value: any) {
210
+ setOutput(nodeId: string, property: string, value: any): void {
211
211
  this._forcedOutputs[nodeId] ??= {};
212
212
  this._forcedOutputs[nodeId][property] = value;
213
213
 
@@ -232,7 +232,7 @@ export class ComputeGraphController extends Resource {
232
232
  this._diagnostics = executor.getDiagnostics();
233
233
  }
234
234
 
235
- async evalNode(nodeId: string) {
235
+ async evalNode(nodeId: string): Promise<void> {
236
236
  const executor = this._executor.clone();
237
237
  await executor.load(this._graph);
238
238
 
@@ -281,7 +281,7 @@ export class ComputeGraphController extends Resource {
281
281
  * @param startFromNode - Node to start from, otherwise all {@link AUTO_TRIGGER_NODES} are executed.
282
282
  */
283
283
  @synchronized
284
- async exec(startFromNode?: string) {
284
+ async exec(startFromNode?: string): Promise<void> {
285
285
  this._runtimeStateInputs = {};
286
286
  this._runtimeStateOutputs = {};
287
287
  const executor = this._executor.clone();
@@ -372,7 +372,7 @@ export class ComputeGraphController extends Resource {
372
372
  };
373
373
  }
374
374
 
375
- private _handleEvent(event: ComputeEvent) {
375
+ private _handleEvent(event: ComputeEvent): void {
376
376
  log('handleEvent', { event });
377
377
  switch (event.type) {
378
378
  case 'compute-input': {
@@ -388,12 +388,12 @@ export class ComputeGraphController extends Resource {
388
388
  this.events.emit(event);
389
389
  }
390
390
 
391
- private _onInputComputed(nodeId: string, property: string, value: RuntimeValue) {
391
+ private _onInputComputed(nodeId: string, property: string, value: RuntimeValue): void {
392
392
  this._runtimeStateInputs[nodeId] ??= {};
393
393
  this._runtimeStateInputs[nodeId][property] = value;
394
394
  }
395
395
 
396
- private _onOutputComputed(nodeId: string, property: string, value: RuntimeValue) {
396
+ private _onOutputComputed(nodeId: string, property: string, value: RuntimeValue): void {
397
397
  this._runtimeStateOutputs[nodeId] ??= {};
398
398
  this._runtimeStateOutputs[nodeId][property] = value;
399
399
 
@@ -2,10 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import { useCallback, useEffect, useState } from 'react';
6
7
 
7
8
  import type { ComputeNode, ComputeMeta, ComputeEvent } from '@dxos/conductor';
8
- import { S } from '@dxos/echo-schema';
9
9
  import { invariant } from '@dxos/invariant';
10
10
 
11
11
  import { useComputeContext } from './compute-context';
@@ -67,8 +67,8 @@ export const useComputeNodeState = (shape: ComputeShape): ComputeNodeState => {
67
67
  return {
68
68
  node: controller.getComputeNode(shape.node!),
69
69
  meta: meta ?? {
70
- input: S.Struct({}),
71
- output: S.Struct({}),
70
+ input: Schema.Struct({}),
71
+ output: Schema.Struct({}),
72
72
  },
73
73
  runtime: {
74
74
  inputs: controller.getInputs(shape.node!),
@@ -5,9 +5,8 @@
5
5
  import { useMemo } from 'react';
6
6
 
7
7
  import { type ComputeEdge, ComputeGraphModel, type ComputeNode, DEFAULT_INPUT, DEFAULT_OUTPUT } from '@dxos/conductor';
8
- import { ObjectId } from '@dxos/echo-schema';
8
+ import { ObjectId, Ref } from '@dxos/echo-schema';
9
9
  import { invariant } from '@dxos/invariant';
10
- import { DXN } from '@dxos/keys';
11
10
  import { getSpace } from '@dxos/react-client/echo';
12
11
  import { type GraphMonitor, type CanvasGraphModel, type Connection } from '@dxos/react-ui-canvas-editor';
13
12
  import { isNonNullable } from '@dxos/util';
@@ -114,9 +113,8 @@ export const createComputeGraph = (graph?: CanvasGraphModel<ComputeShape>) => {
114
113
  const linkTriggerToCompute = (graph: ComputeGraphModel, computeNode: ComputeNode, triggerData: TriggerShape) => {
115
114
  const functionTrigger = triggerData.functionTrigger?.target;
116
115
  invariant(functionTrigger);
117
- functionTrigger.function = DXN.fromLocalObjectId(graph.root.id).toString();
118
- functionTrigger.meta ??= {};
119
- functionTrigger.meta.computeNodeId = computeNode.id;
116
+ functionTrigger.function = Ref.make(graph.root);
117
+ functionTrigger.inputNodeId = computeNode.id;
120
118
  };
121
119
 
122
120
  const deleteTriggerObjects = (computeGraph: ComputeGraphModel, deleted: CanvasGraphModel) => {
package/src/json.test.ts CHANGED
@@ -2,27 +2,27 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import { describe, test } from 'vitest';
6
7
 
7
- import { S } from '@dxos/echo-schema';
8
8
  import { BaseGraphEdge, BaseGraphNode } from '@dxos/graph';
9
9
 
10
10
  import { createGptCircuit } from './testing';
11
11
 
12
- export const Shape = S.extend(
12
+ export const Shape = Schema.extend(
13
13
  BaseGraphNode,
14
- S.Struct({
15
- text: S.optional(S.String),
16
- guide: S.optional(S.Boolean),
17
- classNames: S.optional(S.String),
14
+ Schema.Struct({
15
+ text: Schema.optional(Schema.String),
16
+ guide: Schema.optional(Schema.Boolean),
17
+ classNames: Schema.optional(Schema.String),
18
18
  }),
19
19
  );
20
20
 
21
- export const Connection = S.extend(
21
+ export const Connection = Schema.extend(
22
22
  BaseGraphEdge,
23
- S.Struct({
24
- input: S.optional(S.String),
25
- output: S.optional(S.String),
23
+ Schema.Struct({
24
+ input: Schema.optional(Schema.String),
25
+ output: Schema.optional(Schema.String),
26
26
  }),
27
27
  );
28
28
 
@@ -2,10 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import { describe, test } from 'vitest';
6
7
 
7
- import { create } from '@dxos/client/echo';
8
- import { S } from '@dxos/echo-schema';
8
+ import { live } from '@dxos/client/echo';
9
9
  import { BaseGraphNode, Graph } from '@dxos/graph';
10
10
  import {
11
11
  Polygon,
@@ -24,12 +24,12 @@ describe('compute', () => {
24
24
  // const model = CanvasGraphModel.create<ComputeShape>();
25
25
  const node = createSwitch({ id: 'x', center: { x: 0, y: 0 }, size: { width: 80, height: 80 } });
26
26
  console.log(JSON.stringify(node, null, 2));
27
- expect(S.is(ComputeShape)(node)).toBe(true);
28
- expect(S.is(Polygon)(node)).toBe(true);
29
- expect(S.is(Shape)(node)).toBe(true);
30
- expect(S.is(BaseGraphNode)(node)).toBe(true);
27
+ expect(Schema.is(ComputeShape)(node)).toBe(true);
28
+ expect(Schema.is(Polygon)(node)).toBe(true);
29
+ expect(Schema.is(Shape)(node)).toBe(true);
30
+ expect(Schema.is(BaseGraphNode)(node)).toBe(true);
31
31
 
32
- const graph = create(Graph, { nodes: [], edges: [] });
32
+ const graph = live(Graph, { nodes: [], edges: [] });
33
33
  graph.nodes.push(node); // Throws.
34
34
 
35
35
  // model.createNode(node);
@@ -2,23 +2,23 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import React from 'react';
6
7
 
7
8
  import { AppendInput } from '@dxos/conductor';
8
- import { S } from '@dxos/echo-schema';
9
9
  import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
10
10
 
11
11
  import { createFunctionAnchors, FunctionBody, getHeight } from './common';
12
12
  import { ComputeShape, createShape, type CreateShapeProps } from './defs';
13
13
 
14
- export const AppendShape = S.extend(
14
+ export const AppendShape = Schema.extend(
15
15
  ComputeShape,
16
- S.Struct({
17
- type: S.Literal('append'),
16
+ Schema.Struct({
17
+ type: Schema.Literal('append'),
18
18
  }),
19
19
  );
20
20
 
21
- export type AppendShape = S.Schema.Type<typeof AppendShape>;
21
+ export type AppendShape = Schema.Schema.Type<typeof AppendShape>;
22
22
 
23
23
  export type CreateAppendProps = CreateShapeProps<AppendShape>;
24
24
 
@@ -2,10 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import React from 'react';
6
7
 
7
8
  import { ReducerInput, ReducerOutput } from '@dxos/conductor';
8
- import { S } from '@dxos/echo-schema';
9
9
  import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
10
10
 
11
11
  import { createFunctionAnchors, FunctionBody, getHeight } from './common';
@@ -15,14 +15,14 @@ import { ComputeShape, createShape, type CreateShapeProps } from './defs';
15
15
  // Data
16
16
  //
17
17
 
18
- export const ReducerShape = S.extend(
18
+ export const ReducerShape = Schema.extend(
19
19
  ComputeShape,
20
- S.Struct({
21
- type: S.Literal('reducer'),
20
+ Schema.Struct({
21
+ type: Schema.Literal('reducer'),
22
22
  }),
23
23
  );
24
24
 
25
- export type ReducerShape = S.Schema.Type<typeof ReducerShape>;
25
+ export type ReducerShape = Schema.Schema.Type<typeof ReducerShape>;
26
26
 
27
27
  //
28
28
  // Components
@@ -2,23 +2,23 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import React, { useEffect, useState } from 'react';
6
7
 
7
- import { S } from '@dxos/echo-schema';
8
8
  import { Icon } from '@dxos/react-ui';
9
9
  import { createAnchorMap, type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
10
10
 
11
11
  import { ComputeShape, createAnchorId, createShape, type CreateShapeProps } from './defs';
12
12
  import { useComputeNodeState } from '../hooks';
13
13
 
14
- export const AudioShape = S.extend(
14
+ export const AudioShape = Schema.extend(
15
15
  ComputeShape,
16
- S.Struct({
17
- type: S.Literal('audio'),
16
+ Schema.Struct({
17
+ type: Schema.Literal('audio'),
18
18
  }),
19
19
  );
20
20
 
21
- export type AudioShape = S.Schema.Type<typeof AudioShape>;
21
+ export type AudioShape = Schema.Schema.Type<typeof AudioShape>;
22
22
 
23
23
  export type CreateAudioProps = CreateShapeProps<AudioShape>;
24
24
 
@@ -2,10 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import React from 'react';
6
7
 
7
8
  import { DEFAULT_INPUT, isTruthy } from '@dxos/conductor';
8
- import { S } from '@dxos/echo-schema';
9
9
  import { Icon } from '@dxos/react-ui';
10
10
  import { createAnchorMap, type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
11
11
  import { mx } from '@dxos/react-ui-theme';
@@ -13,14 +13,14 @@ import { mx } from '@dxos/react-ui-theme';
13
13
  import { ComputeShape, createAnchorId, createShape, type CreateShapeProps } from './defs';
14
14
  import { useComputeNodeState } from '../hooks';
15
15
 
16
- export const BeaconShape = S.extend(
16
+ export const BeaconShape = Schema.extend(
17
17
  ComputeShape,
18
- S.Struct({
19
- type: S.Literal('beacon'),
18
+ Schema.Struct({
19
+ type: Schema.Literal('beacon'),
20
20
  }),
21
21
  );
22
22
 
23
- export type BeaconShape = S.Schema.Type<typeof BeaconShape>;
23
+ export type BeaconShape = Schema.Schema.Type<typeof BeaconShape>;
24
24
 
25
25
  export type CreateBeaconProps = CreateShapeProps<BeaconShape>;
26
26
 
@@ -2,9 +2,9 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import React, { type FC } from 'react';
6
7
 
7
- import { S } from '@dxos/echo-schema';
8
8
  import { type ShapeDef } from '@dxos/react-ui-canvas-editor';
9
9
  import { createAnchors, getAnchorPoints } from '@dxos/react-ui-canvas-editor';
10
10
 
@@ -17,14 +17,14 @@ import { ComputeShape, createAnchorId, createShape, type CreateShapeProps } from
17
17
 
18
18
  type GateType = 'and' | 'or' | 'not';
19
19
 
20
- const GateShape = S.extend(
20
+ const GateShape = Schema.extend(
21
21
  ComputeShape,
22
- S.Struct({
23
- type: S.String,
22
+ Schema.Struct({
23
+ type: Schema.String,
24
24
  }),
25
25
  );
26
26
 
27
- type GateShape = S.Schema.Type<typeof GateShape>;
27
+ type GateShape = Schema.Schema.Type<typeof GateShape>;
28
28
 
29
29
  type CreateGateProps = CreateShapeProps<GateShape> & { type: GateType };
30
30
 
@@ -2,10 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import React, { useRef } from 'react';
6
7
 
7
8
  import { DEFAULT_OUTPUT } from '@dxos/conductor';
8
- import { S } from '@dxos/echo-schema';
9
9
  import {
10
10
  type ShapeComponentProps,
11
11
  type ShapeDef,
@@ -23,14 +23,14 @@ import { useComputeNodeState } from '../hooks';
23
23
  // Data
24
24
  //
25
25
 
26
- export const ChatShape = S.extend(
26
+ export const ChatShape = Schema.extend(
27
27
  ComputeShape,
28
- S.Struct({
29
- type: S.Literal('chat'),
28
+ Schema.Struct({
29
+ type: Schema.Literal('chat'),
30
30
  }),
31
31
  );
32
32
 
33
- export type ChatShape = S.Schema.Type<typeof ChatShape>;
33
+ export type ChatShape = Schema.Schema.Type<typeof ChatShape>;
34
34
 
35
35
  //
36
36
  // Component
@@ -2,10 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
5
6
  import React, { useCallback, useRef, useState } from 'react';
6
7
 
7
8
  import { ComputeValueType } from '@dxos/conductor';
8
- import { S } from '@dxos/echo-schema';
9
9
  import { Input } from '@dxos/react-ui';
10
10
  import {
11
11
  type ShapeComponentProps,
@@ -25,15 +25,15 @@ import { useComputeNodeState } from '../hooks';
25
25
  // Data
26
26
  //
27
27
 
28
- export const ConstantShape = S.extend(
28
+ export const ConstantShape = Schema.extend(
29
29
  ComputeShape,
30
- S.Struct({
31
- type: S.Literal('constant'),
32
- value: S.optional(S.Any),
30
+ Schema.Struct({
31
+ type: Schema.Literal('constant'),
32
+ value: Schema.optional(Schema.Any),
33
33
  }),
34
34
  );
35
35
 
36
- export type ConstantShape = S.Schema.Type<typeof ConstantShape>;
36
+ export type ConstantShape = Schema.Schema.Type<typeof ConstantShape>;
37
37
 
38
38
  //
39
39
  // Component