@dxos/react-ui-canvas-compute 0.8.3 → 0.8.4-main.f9ba587
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +60 -57
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +60 -57
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/compute.stories.d.ts +1 -1
- package/dist/types/src/compute.stories.d.ts.map +1 -1
- package/dist/types/src/shapes/Table.d.ts.map +1 -1
- package/dist/types/src/shapes/Thread.d.ts.map +1 -1
- package/dist/types/src/shapes/Trigger.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -44
- package/src/compute.stories.tsx +6 -6
- package/src/graph/node-defs.ts +1 -0
- package/src/shapes/Function.tsx +2 -2
- package/src/shapes/Table.tsx +4 -3
- package/src/shapes/Thread.tsx +4 -3
- package/src/shapes/Trigger.tsx +5 -5
- package/dist/lib/node/index.cjs +0 -2896
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-canvas-compute",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.f9ba587",
|
|
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",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"types": "dist/types/src/index.d.ts",
|
|
18
|
+
"typesVersions": {
|
|
19
|
+
"*": {}
|
|
20
|
+
},
|
|
18
21
|
"files": [
|
|
19
22
|
"dist",
|
|
20
23
|
"src"
|
|
@@ -22,64 +25,63 @@
|
|
|
22
25
|
"dependencies": {
|
|
23
26
|
"@antv/graphlib": "^2.0.4",
|
|
24
27
|
"@antv/layout": "^1.2.13",
|
|
25
|
-
"@effect/platform": "0.
|
|
28
|
+
"@effect/platform": "0.88.0",
|
|
26
29
|
"@preact-signals/safe-react": "^0.9.0",
|
|
27
30
|
"chess.js": "^1.0.0",
|
|
28
|
-
"@dxos/ai": "0.8.
|
|
29
|
-
"@dxos/
|
|
30
|
-
"@dxos/assistant": "0.8.
|
|
31
|
-
"@dxos/
|
|
32
|
-
"@dxos/
|
|
33
|
-
"@dxos/conductor": "0.8.
|
|
34
|
-
"@dxos/context": "0.8.
|
|
35
|
-
"@dxos/debug": "0.8.
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/graph": "0.8.
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/log": "0.8.
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/react-
|
|
45
|
-
"@dxos/react-edge-client": "0.8.
|
|
46
|
-
"@dxos/react-ui-
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/react-ui-
|
|
49
|
-
"@dxos/react-ui-editor": "0.8.
|
|
50
|
-
"@dxos/react-ui-form": "0.8.
|
|
51
|
-
"@dxos/react-ui-
|
|
52
|
-
"@dxos/react-ui-
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/util": "0.8.
|
|
31
|
+
"@dxos/ai": "0.8.4-main.f9ba587",
|
|
32
|
+
"@dxos/app-framework": "0.8.4-main.f9ba587",
|
|
33
|
+
"@dxos/assistant": "0.8.4-main.f9ba587",
|
|
34
|
+
"@dxos/artifact": "0.8.4-main.f9ba587",
|
|
35
|
+
"@dxos/async": "0.8.4-main.f9ba587",
|
|
36
|
+
"@dxos/conductor": "0.8.4-main.f9ba587",
|
|
37
|
+
"@dxos/context": "0.8.4-main.f9ba587",
|
|
38
|
+
"@dxos/debug": "0.8.4-main.f9ba587",
|
|
39
|
+
"@dxos/edge-client": "0.8.4-main.f9ba587",
|
|
40
|
+
"@dxos/functions": "0.8.4-main.f9ba587",
|
|
41
|
+
"@dxos/echo-schema": "0.8.4-main.f9ba587",
|
|
42
|
+
"@dxos/graph": "0.8.4-main.f9ba587",
|
|
43
|
+
"@dxos/invariant": "0.8.4-main.f9ba587",
|
|
44
|
+
"@dxos/keys": "0.8.4-main.f9ba587",
|
|
45
|
+
"@dxos/log": "0.8.4-main.f9ba587",
|
|
46
|
+
"@dxos/live-object": "0.8.4-main.f9ba587",
|
|
47
|
+
"@dxos/react-client": "0.8.4-main.f9ba587",
|
|
48
|
+
"@dxos/react-edge-client": "0.8.4-main.f9ba587",
|
|
49
|
+
"@dxos/react-ui-attention": "0.8.4-main.f9ba587",
|
|
50
|
+
"@dxos/react-ui-canvas": "0.8.4-main.f9ba587",
|
|
51
|
+
"@dxos/react-ui-editor": "0.8.4-main.f9ba587",
|
|
52
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.f9ba587",
|
|
53
|
+
"@dxos/react-ui-form": "0.8.4-main.f9ba587",
|
|
54
|
+
"@dxos/react-ui-sfx": "0.8.4-main.f9ba587",
|
|
55
|
+
"@dxos/react-ui-stack": "0.8.4-main.f9ba587",
|
|
56
|
+
"@dxos/schema": "0.8.4-main.f9ba587",
|
|
57
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.f9ba587",
|
|
58
|
+
"@dxos/util": "0.8.4-main.f9ba587"
|
|
56
59
|
},
|
|
57
60
|
"devDependencies": {
|
|
58
|
-
"@effect/ai": "0.
|
|
59
|
-
"@effect/platform": "^0.72.1",
|
|
61
|
+
"@effect/ai": "0.22.0",
|
|
60
62
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
61
63
|
"@types/react": "~18.2.0",
|
|
62
64
|
"@types/react-dom": "~18.2.0",
|
|
63
|
-
"effect": "3.
|
|
65
|
+
"effect": "3.16.13",
|
|
64
66
|
"lodash.defaultsdeep": "^4.6.1",
|
|
65
67
|
"react": "~18.2.0",
|
|
66
68
|
"react-dom": "~18.2.0",
|
|
67
69
|
"vite": "5.4.7",
|
|
68
|
-
"@dxos/app-framework": "0.8.
|
|
69
|
-
"@dxos/artifact-testing": "0.8.
|
|
70
|
-
"@dxos/compute": "0.8.
|
|
71
|
-
"@dxos/echo-signals": "0.8.
|
|
72
|
-
"@dxos/random": "0.8.
|
|
73
|
-
"@dxos/react-ui": "0.8.
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
70
|
+
"@dxos/app-framework": "0.8.4-main.f9ba587",
|
|
71
|
+
"@dxos/artifact-testing": "0.8.4-main.f9ba587",
|
|
72
|
+
"@dxos/compute": "0.8.4-main.f9ba587",
|
|
73
|
+
"@dxos/echo-signals": "0.8.4-main.f9ba587",
|
|
74
|
+
"@dxos/random": "0.8.4-main.f9ba587",
|
|
75
|
+
"@dxos/react-ui": "0.8.4-main.f9ba587",
|
|
76
|
+
"@dxos/react-ui-theme": "0.8.4-main.f9ba587",
|
|
77
|
+
"@dxos/storybook-utils": "0.8.4-main.f9ba587"
|
|
76
78
|
},
|
|
77
79
|
"peerDependencies": {
|
|
78
|
-
"effect": "3.13.3",
|
|
80
|
+
"effect": "^3.13.3",
|
|
79
81
|
"react": "~18.2.0",
|
|
80
82
|
"react-dom": "~18.2.0",
|
|
81
|
-
"@dxos/react-ui": "0.8.
|
|
82
|
-
"@dxos/react-ui-theme": "0.8.
|
|
83
|
+
"@dxos/react-ui": "0.8.4-main.f9ba587",
|
|
84
|
+
"@dxos/react-ui-theme": "0.8.4-main.f9ba587"
|
|
83
85
|
},
|
|
84
86
|
"publishConfig": {
|
|
85
87
|
"access": "public"
|
package/src/compute.stories.tsx
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
7
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React, { type PropsWithChildren, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
|
|
10
10
|
import { EdgeAiServiceClient } from '@dxos/ai';
|
|
11
|
-
import {
|
|
11
|
+
import { createTestAiServiceClient } from '@dxos/ai/testing';
|
|
12
12
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
13
13
|
import { capabilities, localServiceEndpoints } from '@dxos/artifact-testing';
|
|
14
14
|
import { type ComputeGraphModel, type ComputeNode, type GraphDiagnostic } from '@dxos/conductor';
|
|
@@ -182,9 +182,9 @@ const meta: Meta<RenderProps> = {
|
|
|
182
182
|
component: Editor.Root,
|
|
183
183
|
render: DefaultStory,
|
|
184
184
|
decorators: [
|
|
185
|
-
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
186
185
|
withTheme,
|
|
187
186
|
withAttention,
|
|
187
|
+
withClientProvider({ createIdentity: true, createSpace: true }),
|
|
188
188
|
withLayout({ fullscreen: true }),
|
|
189
189
|
withPluginManager({ capabilities }),
|
|
190
190
|
],
|
|
@@ -334,7 +334,7 @@ export const ImageGen: Story = {
|
|
|
334
334
|
...createComputeGraphController(
|
|
335
335
|
createGptCircuit({ image: true, artifact: true }),
|
|
336
336
|
new ServiceContainer().setServices({
|
|
337
|
-
ai: AiService.make(
|
|
337
|
+
ai: AiService.make(createTestAiServiceClient()),
|
|
338
338
|
}),
|
|
339
339
|
),
|
|
340
340
|
},
|
|
@@ -350,7 +350,7 @@ export const Audio: Story = {
|
|
|
350
350
|
...createComputeGraphController(
|
|
351
351
|
createAudioCircuit(),
|
|
352
352
|
new ServiceContainer().setServices({
|
|
353
|
-
ai: AiService.make(
|
|
353
|
+
ai: AiService.make(createTestAiServiceClient()),
|
|
354
354
|
}),
|
|
355
355
|
),
|
|
356
356
|
},
|
|
@@ -365,7 +365,7 @@ export const Voice: Story = {
|
|
|
365
365
|
...createComputeGraphController(
|
|
366
366
|
createGPTRealtimeCircuit(),
|
|
367
367
|
new ServiceContainer().setServices({
|
|
368
|
-
ai: AiService.make(
|
|
368
|
+
ai: AiService.make(createTestAiServiceClient()),
|
|
369
369
|
}),
|
|
370
370
|
),
|
|
371
371
|
},
|
package/src/graph/node-defs.ts
CHANGED
|
@@ -49,6 +49,7 @@ const nodeFactory: Record<NodeType | 'trigger', (shape: ComputeShape) => Compute
|
|
|
49
49
|
createNode('constant', {
|
|
50
50
|
value: (shape as ConstantShape).value,
|
|
51
51
|
}),
|
|
52
|
+
['make-queue' as const]: () => createNode('make-queue'),
|
|
52
53
|
['database' as const]: () => createNode('database'),
|
|
53
54
|
['gpt' as const]: () => createNode('gpt'),
|
|
54
55
|
['gpt-realtime' as const]: () => createNode('gpt-realtime'),
|
package/src/shapes/Function.tsx
CHANGED
|
@@ -9,7 +9,7 @@ import { AnyOutput, FunctionInput } from '@dxos/conductor';
|
|
|
9
9
|
import { getSnapshot, isInstanceOf, Ref } from '@dxos/echo-schema';
|
|
10
10
|
import { FunctionType, ScriptType } from '@dxos/functions';
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
12
|
-
import { Filter,
|
|
12
|
+
import { Filter, parseId } from '@dxos/react-client/echo';
|
|
13
13
|
import {
|
|
14
14
|
TextBox,
|
|
15
15
|
type TextBoxControl,
|
|
@@ -69,7 +69,7 @@ const TextInputComponent = ({ shape, title, ...props }: TextInputComponentProps)
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
node.value = value;
|
|
72
|
-
node.function =
|
|
72
|
+
node.function = Ref.make(fn);
|
|
73
73
|
node.inputSchema = getSnapshot(fn.inputSchema);
|
|
74
74
|
node.outputSchema = getSnapshot(fn.outputSchema);
|
|
75
75
|
},
|
package/src/shapes/Table.tsx
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Message } from '@dxos/ai';
|
|
9
|
+
import { createInputSchema, createOutputSchema } from '@dxos/conductor';
|
|
9
10
|
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
10
11
|
|
|
11
12
|
import { createFunctionAnchors, Box } from './common';
|
|
12
13
|
import { ComputeShape, createShape, type CreateShapeProps } from './defs';
|
|
13
14
|
|
|
14
|
-
const InputSchema = createInputSchema(
|
|
15
|
-
const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(
|
|
15
|
+
const InputSchema = createInputSchema(Message);
|
|
16
|
+
const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(Message)));
|
|
16
17
|
|
|
17
18
|
export const TableShape = Schema.extend(
|
|
18
19
|
ComputeShape,
|
package/src/shapes/Thread.tsx
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
import React, { useEffect, useRef } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Message } from '@dxos/ai';
|
|
9
|
+
import { createInputSchema, createOutputSchema } from '@dxos/conductor';
|
|
9
10
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
10
11
|
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
11
12
|
import { mx } from '@dxos/react-ui-theme';
|
|
@@ -13,8 +14,8 @@ import { mx } from '@dxos/react-ui-theme';
|
|
|
13
14
|
import { createFunctionAnchors, Box } from './common';
|
|
14
15
|
import { ComputeShape, createShape, type CreateShapeProps } from './defs';
|
|
15
16
|
|
|
16
|
-
const InputSchema = createInputSchema(
|
|
17
|
-
const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(
|
|
17
|
+
const InputSchema = createInputSchema(Message);
|
|
18
|
+
const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(Message)));
|
|
18
19
|
|
|
19
20
|
export const ThreadShape = Schema.extend(
|
|
20
21
|
ComputeShape,
|
package/src/shapes/Trigger.tsx
CHANGED
|
@@ -9,21 +9,21 @@ import { VoidInput } from '@dxos/conductor';
|
|
|
9
9
|
import { ObjectId, Ref } from '@dxos/echo-schema';
|
|
10
10
|
import {
|
|
11
11
|
type EmailTrigger,
|
|
12
|
+
EmailTriggerOutput,
|
|
12
13
|
FunctionTrigger,
|
|
13
14
|
type QueueTrigger,
|
|
15
|
+
QueueTriggerOutput,
|
|
14
16
|
type SubscriptionTrigger,
|
|
15
17
|
type TimerTrigger,
|
|
16
18
|
TriggerKind,
|
|
17
19
|
type TriggerType,
|
|
18
|
-
type WebhookTrigger,
|
|
19
|
-
EmailTriggerOutput,
|
|
20
|
-
QueueTriggerOutput,
|
|
21
20
|
SubscriptionTriggerOutput,
|
|
22
21
|
TimerTriggerOutput,
|
|
22
|
+
type WebhookTrigger,
|
|
23
23
|
WebhookTriggerOutput,
|
|
24
24
|
} from '@dxos/functions';
|
|
25
25
|
import { DXN, SpaceId } from '@dxos/keys';
|
|
26
|
-
import { live,
|
|
26
|
+
import { live, useSpace } from '@dxos/react-client/echo';
|
|
27
27
|
import { Select, type SelectRootProps } from '@dxos/react-ui';
|
|
28
28
|
import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
|
|
29
29
|
|
|
@@ -51,7 +51,7 @@ export const createTrigger = (props: CreateTriggerProps): TriggerShape => {
|
|
|
51
51
|
});
|
|
52
52
|
return createShape<TriggerShape>({
|
|
53
53
|
type: 'trigger',
|
|
54
|
-
functionTrigger:
|
|
54
|
+
functionTrigger: Ref.make(functionTrigger),
|
|
55
55
|
size: { width: 192, height: getHeight(EmailTriggerOutput) },
|
|
56
56
|
...props,
|
|
57
57
|
});
|