@valerypopoff/rivet2-core 2.0.10 → 2.1.0
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/cjs/bundle.cjs +1762 -274
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/esm/api/createProcessor.js +1 -0
- package/dist/esm/exports.js +4 -0
- package/dist/esm/model/GraphBoundaryCache.js +36 -4
- package/dist/esm/model/GraphBoundaryEffects.js +32 -0
- package/dist/esm/model/GraphPreprocessor.js +6 -4
- package/dist/esm/model/GraphProcessor.js +344 -118
- package/dist/esm/model/NodeGraph.js +1 -1
- package/dist/esm/model/NodePrefabResolver.js +57 -0
- package/dist/esm/model/Nodes.js +4 -1
- package/dist/esm/model/ProcessContextBuilder.js +3 -1
- package/dist/esm/model/UiGraph.js +113 -0
- package/dist/esm/model/UiGraphRendererStyles.js +208 -0
- package/dist/esm/model/chat/openAIChatRuntime.js +0 -1
- package/dist/esm/model/chat-v2/aiSdkBridge.js +100 -2
- package/dist/esm/model/chat-v2/chatV2Pipeline.js +35 -31
- package/dist/esm/model/chat-v2/chatV2Shared.js +1 -1
- package/dist/esm/model/chat-v2/providerOptions.js +5 -1
- package/dist/esm/model/nodes/CoalesceNode.js +1 -1
- package/dist/esm/model/nodes/CompareNode.js +15 -14
- package/dist/esm/model/nodes/GraphOutputNode.js +1 -0
- package/dist/esm/model/nodes/LLMChatV2Node.js +62 -17
- package/dist/esm/model/nodes/NodePrefabInstanceNode.js +39 -0
- package/dist/esm/model/nodes/PromptNode.js +2 -1
- package/dist/esm/model/nodes/ReferencedGraphAliasNode.js +49 -7
- package/dist/esm/model/nodes/SubGraphNode.js +42 -5
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/utils/jsonValueToDataValue.js +48 -0
- package/dist/esm/utils/projectComparison/connections.js +57 -0
- package/dist/esm/utils/projectComparison/graphs.js +60 -0
- package/dist/esm/utils/projectComparison/nodes.js +53 -0
- package/dist/esm/utils/projectComparison/summaries.js +60 -0
- package/dist/esm/utils/projectComparison/values.js +40 -0
- package/dist/esm/utils/projectComparison.js +73 -0
- package/dist/esm/utils/serialization/serializationHelpers.js +24 -3
- package/dist/esm/utils/serialization/serialization_v4.js +30 -0
- package/dist/types/api/createProcessor.d.ts +2 -1
- package/dist/types/exports.d.ts +5 -0
- package/dist/types/model/EditorDefinition.d.ts +1 -0
- package/dist/types/model/ExecutorProtocol.d.ts +13 -3
- package/dist/types/model/GraphBoundaryCache.d.ts +9 -3
- package/dist/types/model/GraphBoundaryEffects.d.ts +9 -0
- package/dist/types/model/GraphProcessor.d.ts +20 -0
- package/dist/types/model/NodeBase.d.ts +5 -0
- package/dist/types/model/NodeBodySpec.d.ts +1 -0
- package/dist/types/model/NodePrefabResolver.d.ts +13 -0
- package/dist/types/model/Nodes.d.ts +5 -4
- package/dist/types/model/ProcessContext.d.ts +5 -1
- package/dist/types/model/ProcessContextBuilder.d.ts +4 -2
- package/dist/types/model/Project.d.ts +9 -0
- package/dist/types/model/UiGraph.d.ts +84 -0
- package/dist/types/model/UiGraphRendererStyles.d.ts +2 -0
- package/dist/types/model/chat-v2/aiSdkBridge.d.ts +1 -0
- package/dist/types/model/chat-v2/chatV2Types.d.ts +23 -1
- package/dist/types/model/nodes/CompareNode.d.ts +4 -0
- package/dist/types/model/nodes/LLMChatV2Node.d.ts +2 -1
- package/dist/types/model/nodes/NodePrefabInstanceNode.d.ts +13 -0
- package/dist/types/model/nodes/SubGraphNode.d.ts +2 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/jsonValueToDataValue.d.ts +2 -0
- package/dist/types/utils/projectComparison/connections.d.ts +5 -0
- package/dist/types/utils/projectComparison/graphs.d.ts +3 -0
- package/dist/types/utils/projectComparison/nodes.d.ts +5 -0
- package/dist/types/utils/projectComparison/summaries.d.ts +4 -0
- package/dist/types/utils/projectComparison/values.d.ts +5 -0
- package/dist/types/utils/projectComparison.d.ts +77 -0
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import stableStringify from 'safe-stable-stringify';
|
|
2
|
+
import { unionKeys } from './values.js';
|
|
3
|
+
export function getProjectConnectionComparisonKey(connection) {
|
|
4
|
+
return stableStringify([
|
|
5
|
+
connection.outputNodeId,
|
|
6
|
+
connection.outputId,
|
|
7
|
+
connection.inputNodeId,
|
|
8
|
+
connection.inputId,
|
|
9
|
+
]);
|
|
10
|
+
}
|
|
11
|
+
export function getComparableGraphConnections(connections, nodes) {
|
|
12
|
+
const commentNodeIds = new Set(nodes.filter((node) => node.type === 'comment').map((node) => node.id));
|
|
13
|
+
return connections.filter((connection) => !commentNodeIds.has(connection.outputNodeId) && !commentNodeIds.has(connection.inputNodeId));
|
|
14
|
+
}
|
|
15
|
+
export function compareConnections(beforeConnections, afterConnections) {
|
|
16
|
+
const beforeByKey = new Map(beforeConnections.map((connection) => [getProjectConnectionComparisonKey(connection), connection]));
|
|
17
|
+
const afterByKey = new Map(afterConnections.map((connection) => [getProjectConnectionComparisonKey(connection), connection]));
|
|
18
|
+
const removedKeys = beforeConnections.map(getProjectConnectionComparisonKey).filter((key) => !afterByKey.has(key));
|
|
19
|
+
const addedKeys = afterConnections.map(getProjectConnectionComparisonKey).filter((key) => !beforeByKey.has(key));
|
|
20
|
+
const changedRemovedKeys = new Set();
|
|
21
|
+
const changedAddedKeys = new Set();
|
|
22
|
+
for (const addedKey of addedKeys) {
|
|
23
|
+
const addedConnection = afterByKey.get(addedKey);
|
|
24
|
+
const matchingRemovedKey = removedKeys.find((removedKey) => {
|
|
25
|
+
if (changedRemovedKeys.has(removedKey)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
const removedConnection = beforeByKey.get(removedKey);
|
|
29
|
+
return (removedConnection.outputNodeId === addedConnection.outputNodeId &&
|
|
30
|
+
removedConnection.inputNodeId === addedConnection.inputNodeId);
|
|
31
|
+
});
|
|
32
|
+
if (matchingRemovedKey) {
|
|
33
|
+
changedRemovedKeys.add(matchingRemovedKey);
|
|
34
|
+
changedAddedKeys.add(addedKey);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return Object.fromEntries(unionKeys(Object.fromEntries(beforeByKey), Object.fromEntries(afterByKey)).map((key) => {
|
|
38
|
+
const before = beforeByKey.get(key);
|
|
39
|
+
const after = afterByKey.get(key);
|
|
40
|
+
const kind = changedAddedKeys.has(key) || changedRemovedKeys.has(key)
|
|
41
|
+
? 'changed'
|
|
42
|
+
: !before && after
|
|
43
|
+
? 'added'
|
|
44
|
+
: before && !after
|
|
45
|
+
? 'removed'
|
|
46
|
+
: 'unchanged';
|
|
47
|
+
return [
|
|
48
|
+
key,
|
|
49
|
+
{
|
|
50
|
+
key,
|
|
51
|
+
kind,
|
|
52
|
+
before,
|
|
53
|
+
after,
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { compareConnections, getComparableGraphConnections, getProjectConnectionComparisonKey } from './connections.js';
|
|
2
|
+
import { compareNodes, getComparableGraphNodes } from './nodes.js';
|
|
3
|
+
import { summarizeGraphComparison } from './summaries.js';
|
|
4
|
+
import { areComparisonValuesEqual } from './values.js';
|
|
5
|
+
export function compareGraphs(id, before, after) {
|
|
6
|
+
if (!before && after) {
|
|
7
|
+
return createOneSidedGraphComparison(id, after, 'added');
|
|
8
|
+
}
|
|
9
|
+
if (before && !after) {
|
|
10
|
+
return createOneSidedGraphComparison(id, before, 'removed');
|
|
11
|
+
}
|
|
12
|
+
if (!before || !after) {
|
|
13
|
+
throw new Error(`Cannot compare missing graph ${id}`);
|
|
14
|
+
}
|
|
15
|
+
const nodes = compareNodes(getComparableGraphNodes(before.nodes), getComparableGraphNodes(after.nodes));
|
|
16
|
+
const connections = compareConnections(getComparableGraphConnections(before.connections, before.nodes), getComparableGraphConnections(after.connections, after.nodes));
|
|
17
|
+
const summary = summarizeGraphComparison(nodes, connections);
|
|
18
|
+
const metadataChanged = !areComparisonValuesEqual(before.metadata, after.metadata);
|
|
19
|
+
return {
|
|
20
|
+
id,
|
|
21
|
+
kind: metadataChanged || Object.values(summary).some((count) => count > 0) ? 'changed' : 'unchanged',
|
|
22
|
+
before,
|
|
23
|
+
after,
|
|
24
|
+
metadataChanged,
|
|
25
|
+
nodes,
|
|
26
|
+
connections,
|
|
27
|
+
summary,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function createOneSidedGraphComparison(id, graph, kind) {
|
|
31
|
+
const graphNodes = getComparableGraphNodes(graph.nodes);
|
|
32
|
+
const graphConnections = getComparableGraphConnections(graph.connections, graph.nodes);
|
|
33
|
+
const nodes = Object.fromEntries(graphNodes.map((node) => [
|
|
34
|
+
node.id,
|
|
35
|
+
kind === 'added'
|
|
36
|
+
? { id: node.id, kind, after: node }
|
|
37
|
+
: { id: node.id, kind, before: node },
|
|
38
|
+
]));
|
|
39
|
+
const connections = createOneSidedConnectionComparisons(graphConnections, kind);
|
|
40
|
+
return {
|
|
41
|
+
id,
|
|
42
|
+
kind,
|
|
43
|
+
...(kind === 'added' ? { after: graph } : { before: graph }),
|
|
44
|
+
metadataChanged: true,
|
|
45
|
+
nodes,
|
|
46
|
+
connections,
|
|
47
|
+
summary: summarizeGraphComparison(nodes, connections),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function createOneSidedConnectionComparisons(connections, kind) {
|
|
51
|
+
return Object.fromEntries(connections.map((connection) => {
|
|
52
|
+
const key = getProjectConnectionComparisonKey(connection);
|
|
53
|
+
return [
|
|
54
|
+
key,
|
|
55
|
+
kind === 'added'
|
|
56
|
+
? { key, kind, after: connection }
|
|
57
|
+
: { key, kind, before: connection },
|
|
58
|
+
];
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { areComparisonValuesEqual, getChangedValueComparisons, isComparisonRecord, unionKeys } from './values.js';
|
|
2
|
+
export function getProjectNodeFieldComparisons(comparison) {
|
|
3
|
+
const before = comparison.before;
|
|
4
|
+
const after = comparison.after;
|
|
5
|
+
if (!before || !after) {
|
|
6
|
+
return [];
|
|
7
|
+
}
|
|
8
|
+
return getChangedValueComparisons([], getComparableNodeRecord(before), getComparableNodeRecord(after));
|
|
9
|
+
}
|
|
10
|
+
export function getComparableGraphNodes(nodes) {
|
|
11
|
+
return nodes.filter((node) => node.type !== 'comment');
|
|
12
|
+
}
|
|
13
|
+
export function compareNodes(beforeNodes, afterNodes) {
|
|
14
|
+
const beforeById = new Map(beforeNodes.map((node) => [node.id, node]));
|
|
15
|
+
const afterById = new Map(afterNodes.map((node) => [node.id, node]));
|
|
16
|
+
const nodeIds = unionKeys(Object.fromEntries(beforeById), Object.fromEntries(afterById));
|
|
17
|
+
return Object.fromEntries(nodeIds.map((nodeId) => {
|
|
18
|
+
const before = beforeById.get(nodeId);
|
|
19
|
+
const after = afterById.get(nodeId);
|
|
20
|
+
if (!before && after) {
|
|
21
|
+
return [nodeId, { id: nodeId, kind: 'added', after }];
|
|
22
|
+
}
|
|
23
|
+
if (before && !after) {
|
|
24
|
+
return [nodeId, { id: nodeId, kind: 'removed', before }];
|
|
25
|
+
}
|
|
26
|
+
return [
|
|
27
|
+
nodeId,
|
|
28
|
+
{
|
|
29
|
+
id: nodeId,
|
|
30
|
+
kind: areComparisonNodesEqual(before, after) ? 'unchanged' : 'changed',
|
|
31
|
+
before,
|
|
32
|
+
after,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
function areComparisonNodesEqual(left, right) {
|
|
38
|
+
return areComparisonValuesEqual(left ? getComparableNodeRecord(left) : left, right ? getComparableNodeRecord(right) : right);
|
|
39
|
+
}
|
|
40
|
+
function getComparableNodeRecord(node) {
|
|
41
|
+
const { data, visualData: _visualData, ...rest } = node;
|
|
42
|
+
return {
|
|
43
|
+
...rest,
|
|
44
|
+
data: getComparableNodeData(node, data),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function getComparableNodeData(node, data) {
|
|
48
|
+
if (node.type !== 'subGraph' || !isComparisonRecord(data)) {
|
|
49
|
+
return data;
|
|
50
|
+
}
|
|
51
|
+
const { inputPortOrder: _inputPortOrder, outputPortOrder: _outputPortOrder, ...semanticData } = data;
|
|
52
|
+
return semanticData;
|
|
53
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export function summarizeProjectComparison(graphs, nodePrefabs = {}, uiGraphs = {}) {
|
|
2
|
+
const summary = Object.values(graphs).reduce((acc, graph) => {
|
|
3
|
+
if (graph.kind === 'added')
|
|
4
|
+
acc.addedGraphs += 1;
|
|
5
|
+
if (graph.kind === 'removed')
|
|
6
|
+
acc.removedGraphs += 1;
|
|
7
|
+
if (graph.kind === 'changed')
|
|
8
|
+
acc.changedGraphs += 1;
|
|
9
|
+
acc.addedNodes += graph.summary.addedNodes;
|
|
10
|
+
acc.removedNodes += graph.summary.removedNodes;
|
|
11
|
+
acc.changedNodes += graph.summary.changedNodes;
|
|
12
|
+
acc.addedConnections += graph.summary.addedConnections;
|
|
13
|
+
acc.removedConnections += graph.summary.removedConnections;
|
|
14
|
+
acc.changedConnections += graph.summary.changedConnections;
|
|
15
|
+
return acc;
|
|
16
|
+
}, createEmptyProjectSummary());
|
|
17
|
+
for (const prefab of Object.values(nodePrefabs)) {
|
|
18
|
+
if (prefab.kind === 'added')
|
|
19
|
+
summary.addedNodePrefabs = (summary.addedNodePrefabs ?? 0) + 1;
|
|
20
|
+
if (prefab.kind === 'removed')
|
|
21
|
+
summary.removedNodePrefabs = (summary.removedNodePrefabs ?? 0) + 1;
|
|
22
|
+
if (prefab.kind === 'changed')
|
|
23
|
+
summary.changedNodePrefabs = (summary.changedNodePrefabs ?? 0) + 1;
|
|
24
|
+
}
|
|
25
|
+
for (const uiGraph of Object.values(uiGraphs)) {
|
|
26
|
+
if (uiGraph.kind === 'added')
|
|
27
|
+
summary.addedUiGraphs = (summary.addedUiGraphs ?? 0) + 1;
|
|
28
|
+
if (uiGraph.kind === 'removed')
|
|
29
|
+
summary.removedUiGraphs = (summary.removedUiGraphs ?? 0) + 1;
|
|
30
|
+
if (uiGraph.kind === 'changed')
|
|
31
|
+
summary.changedUiGraphs = (summary.changedUiGraphs ?? 0) + 1;
|
|
32
|
+
}
|
|
33
|
+
return summary;
|
|
34
|
+
}
|
|
35
|
+
export function summarizeGraphComparison(nodes, connections) {
|
|
36
|
+
const nodeComparisons = Object.values(nodes);
|
|
37
|
+
const connectionComparisons = Object.values(connections);
|
|
38
|
+
return {
|
|
39
|
+
addedNodes: nodeComparisons.filter((node) => node.kind === 'added').length,
|
|
40
|
+
removedNodes: nodeComparisons.filter((node) => node.kind === 'removed').length,
|
|
41
|
+
changedNodes: nodeComparisons.filter((node) => node.kind === 'changed').length,
|
|
42
|
+
addedConnections: connectionComparisons.filter((connection) => connection.kind === 'added').length,
|
|
43
|
+
removedConnections: connectionComparisons.filter((connection) => connection.kind === 'removed').length,
|
|
44
|
+
changedConnections: connectionComparisons.filter((connection) => connection.kind === 'changed' && connection.after)
|
|
45
|
+
.length,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function createEmptyProjectSummary() {
|
|
49
|
+
return {
|
|
50
|
+
addedGraphs: 0,
|
|
51
|
+
removedGraphs: 0,
|
|
52
|
+
changedGraphs: 0,
|
|
53
|
+
addedNodes: 0,
|
|
54
|
+
removedNodes: 0,
|
|
55
|
+
changedNodes: 0,
|
|
56
|
+
addedConnections: 0,
|
|
57
|
+
removedConnections: 0,
|
|
58
|
+
changedConnections: 0,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import stableStringify from 'safe-stable-stringify';
|
|
2
|
+
export function areComparisonValuesEqual(left, right) {
|
|
3
|
+
return stableStringify(left) === stableStringify(right);
|
|
4
|
+
}
|
|
5
|
+
export function getChangedValueComparisons(path, before, after) {
|
|
6
|
+
if (areComparisonValuesEqual(before, after)) {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
if (Array.isArray(before) && Array.isArray(after)) {
|
|
10
|
+
return Array.from({ length: Math.max(before.length, after.length) }).flatMap((_value, index) => getChangedValueComparisons([...path, String(index)], before[index], after[index]));
|
|
11
|
+
}
|
|
12
|
+
if (isComparisonRecord(before) && isComparisonRecord(after)) {
|
|
13
|
+
return unionKeys(before, after).flatMap((key) => getChangedValueComparisons([...path, key], before[key], after[key]));
|
|
14
|
+
}
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
after,
|
|
18
|
+
before,
|
|
19
|
+
field: formatComparisonPath(path),
|
|
20
|
+
path,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
export function isComparisonRecord(value) {
|
|
25
|
+
return typeof value === 'object' && value != null && !Array.isArray(value);
|
|
26
|
+
}
|
|
27
|
+
export function unionKeys(left, right) {
|
|
28
|
+
return [...new Set([...Object.keys(left), ...Object.keys(right)])].sort();
|
|
29
|
+
}
|
|
30
|
+
function formatComparisonPath(path) {
|
|
31
|
+
return path.reduce((formatted, segment) => {
|
|
32
|
+
if (/^\d+$/.test(segment)) {
|
|
33
|
+
return `${formatted}[${segment}]`;
|
|
34
|
+
}
|
|
35
|
+
if (formatted.length === 0) {
|
|
36
|
+
return segment;
|
|
37
|
+
}
|
|
38
|
+
return /^[A-Za-z_$][\w$]*$/.test(segment) ? `${formatted}.${segment}` : `${formatted}[${JSON.stringify(segment)}]`;
|
|
39
|
+
}, '');
|
|
40
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { compareGraphs } from './projectComparison/graphs.js';
|
|
2
|
+
import { summarizeProjectComparison } from './projectComparison/summaries.js';
|
|
3
|
+
import { compareNodes } from './projectComparison/nodes.js';
|
|
4
|
+
import { areComparisonValuesEqual, unionKeys } from './projectComparison/values.js';
|
|
5
|
+
export { getProjectConnectionComparisonKey } from './projectComparison/connections.js';
|
|
6
|
+
export { getProjectNodeFieldComparisons } from './projectComparison/nodes.js';
|
|
7
|
+
export function compareProjects(before, after) {
|
|
8
|
+
const graphIds = unionKeys(before.graphs, after.graphs);
|
|
9
|
+
const graphs = Object.fromEntries(graphIds.map((graphId) => [graphId, compareGraphs(graphId, before.graphs[graphId], after.graphs[graphId])]));
|
|
10
|
+
const nodePrefabs = compareNodePrefabs(before.nodePrefabs ?? {}, after.nodePrefabs ?? {});
|
|
11
|
+
const uiGraphs = compareUiGraphs(before.uiGraphs ?? {}, after.uiGraphs ?? {});
|
|
12
|
+
return {
|
|
13
|
+
beforeProjectId: before.metadata.id,
|
|
14
|
+
afterProjectId: after.metadata.id,
|
|
15
|
+
metadataChanged: !areComparisonValuesEqual(before.metadata, after.metadata),
|
|
16
|
+
graphs,
|
|
17
|
+
nodePrefabs,
|
|
18
|
+
uiGraphs,
|
|
19
|
+
summary: summarizeProjectComparison(graphs, nodePrefabs, uiGraphs),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function compareNodePrefabs(before, after) {
|
|
23
|
+
const prefabIds = unionKeys(before, after);
|
|
24
|
+
return Object.fromEntries(prefabIds.map((prefabId) => {
|
|
25
|
+
const beforePrefab = before[prefabId];
|
|
26
|
+
const afterPrefab = after[prefabId];
|
|
27
|
+
if (!beforePrefab && afterPrefab) {
|
|
28
|
+
return [prefabId, { id: prefabId, kind: 'added', after: afterPrefab }];
|
|
29
|
+
}
|
|
30
|
+
if (beforePrefab && !afterPrefab) {
|
|
31
|
+
return [prefabId, { id: prefabId, kind: 'removed', before: beforePrefab }];
|
|
32
|
+
}
|
|
33
|
+
if (!beforePrefab || !afterPrefab) {
|
|
34
|
+
throw new Error(`Cannot compare missing library node ${prefabId}`);
|
|
35
|
+
}
|
|
36
|
+
const sourceNodeComparison = Object.values(compareNodes([beforePrefab.sourceNode], [afterPrefab.sourceNode]))[0];
|
|
37
|
+
return [
|
|
38
|
+
prefabId,
|
|
39
|
+
{
|
|
40
|
+
id: prefabId,
|
|
41
|
+
kind: sourceNodeComparison.kind === 'unchanged' ? 'unchanged' : 'changed',
|
|
42
|
+
before: beforePrefab,
|
|
43
|
+
after: afterPrefab,
|
|
44
|
+
sourceNode: sourceNodeComparison,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
function compareUiGraphs(before, after) {
|
|
50
|
+
const uiGraphIds = unionKeys(before, after);
|
|
51
|
+
return Object.fromEntries(uiGraphIds.map((uiGraphId) => {
|
|
52
|
+
const beforeUiGraph = before[uiGraphId];
|
|
53
|
+
const afterUiGraph = after[uiGraphId];
|
|
54
|
+
if (!beforeUiGraph && afterUiGraph) {
|
|
55
|
+
return [uiGraphId, { id: uiGraphId, kind: 'added', after: afterUiGraph }];
|
|
56
|
+
}
|
|
57
|
+
if (beforeUiGraph && !afterUiGraph) {
|
|
58
|
+
return [uiGraphId, { id: uiGraphId, kind: 'removed', before: beforeUiGraph }];
|
|
59
|
+
}
|
|
60
|
+
if (!beforeUiGraph || !afterUiGraph) {
|
|
61
|
+
throw new Error(`Cannot compare missing UI graph ${uiGraphId}`);
|
|
62
|
+
}
|
|
63
|
+
return [
|
|
64
|
+
uiGraphId,
|
|
65
|
+
{
|
|
66
|
+
id: uiGraphId,
|
|
67
|
+
kind: areComparisonValuesEqual(beforeUiGraph, afterUiGraph) ? 'unchanged' : 'changed',
|
|
68
|
+
before: beforeUiGraph,
|
|
69
|
+
after: afterUiGraph,
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
@@ -5,23 +5,44 @@
|
|
|
5
5
|
import stableStringify from 'safe-stable-stringify';
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
import * as yaml from 'yaml';
|
|
8
|
+
const CONNECTION_BEND_MARKER = ' __rivet_bend:';
|
|
9
|
+
const CONNECTION_BEND_MARKER_TITLE_FALLBACK = ' __rivet bend:';
|
|
10
|
+
const FINITE_NUMBER_PATTERN = String.raw `[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?`;
|
|
11
|
+
const CONNECTION_BEND_PATTERN = new RegExp(`${CONNECTION_BEND_MARKER.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}(${FINITE_NUMBER_PATTERN}),(${FINITE_NUMBER_PATTERN})$`);
|
|
8
12
|
export function serializeConnection(connection, allNodes) {
|
|
9
|
-
const targetTitle = allNodes.find((node) => node.id === connection.inputNodeId)?.title ?? '';
|
|
10
|
-
|
|
13
|
+
const targetTitle = serializeConnectionTargetTitle(allNodes.find((node) => node.id === connection.inputNodeId)?.title ?? '');
|
|
14
|
+
const bendPoint = connection.bendPoint && Number.isFinite(connection.bendPoint.x) && Number.isFinite(connection.bendPoint.y)
|
|
15
|
+
? `${CONNECTION_BEND_MARKER}${connection.bendPoint.x},${connection.bendPoint.y}`
|
|
16
|
+
: '';
|
|
17
|
+
return `${connection.outputId}->"${targetTitle}${bendPoint}" ${connection.inputNodeId}/${connection.inputId}`;
|
|
11
18
|
}
|
|
12
19
|
export function deserializeConnection(connection, sourceNodeId) {
|
|
13
20
|
const match = connection.match(/(.+)->"(.*)"\s+(.+)\/(.+)/);
|
|
14
21
|
if (!match) {
|
|
15
22
|
throw new Error(`Invalid connection: ${connection}`);
|
|
16
23
|
}
|
|
17
|
-
const [, outputId, , inputNodeId, inputId] = match;
|
|
24
|
+
const [, outputId, targetTitle, inputNodeId, inputId] = match;
|
|
25
|
+
const bendPoint = deserializeConnectionBendPoint(targetTitle);
|
|
18
26
|
return {
|
|
19
27
|
outputId: outputId,
|
|
20
28
|
outputNodeId: sourceNodeId,
|
|
21
29
|
inputId: inputId,
|
|
22
30
|
inputNodeId: inputNodeId,
|
|
31
|
+
...(bendPoint ? { bendPoint } : {}),
|
|
23
32
|
};
|
|
24
33
|
}
|
|
34
|
+
function serializeConnectionTargetTitle(targetTitle) {
|
|
35
|
+
return targetTitle.replaceAll(CONNECTION_BEND_MARKER, CONNECTION_BEND_MARKER_TITLE_FALLBACK);
|
|
36
|
+
}
|
|
37
|
+
function deserializeConnectionBendPoint(targetTitle) {
|
|
38
|
+
const match = targetTitle?.match(CONNECTION_BEND_PATTERN);
|
|
39
|
+
if (!match) {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
const x = Number.parseFloat(match[1]);
|
|
43
|
+
const y = Number.parseFloat(match[2]);
|
|
44
|
+
return Number.isFinite(x) && Number.isFinite(y) ? { x, y } : undefined;
|
|
45
|
+
}
|
|
25
46
|
function parseOptionalFloat(val) {
|
|
26
47
|
return val === 'null' || val === undefined || val === '' ? undefined : parseFloat(val);
|
|
27
48
|
}
|
|
@@ -27,25 +27,55 @@ export function graphV4Serializer(graph) {
|
|
|
27
27
|
return wrapInYamlEnvelope(4, toSerializedGraph(graph));
|
|
28
28
|
}
|
|
29
29
|
function toSerializedProject(project, attachedData) {
|
|
30
|
+
const nodePrefabs = mapValues(project.nodePrefabs ?? {}, (prefab) => ({
|
|
31
|
+
id: prefab.id,
|
|
32
|
+
sourceNode: toSerializedIsolatedNode(prefab.sourceNode),
|
|
33
|
+
}));
|
|
30
34
|
return {
|
|
31
35
|
metadata: project.metadata,
|
|
32
36
|
graphs: mapValues(project.graphs, (graph) => toSerializedGraph(graph)),
|
|
37
|
+
nodePrefabs: Object.keys(nodePrefabs).length > 0 ? nodePrefabs : undefined,
|
|
38
|
+
uiGraphs: project.uiGraphs && Object.keys(project.uiGraphs).length > 0 ? project.uiGraphs : undefined,
|
|
33
39
|
attachedData,
|
|
34
40
|
plugins: project.plugins ?? [],
|
|
35
41
|
references: project.references ?? [],
|
|
36
42
|
};
|
|
37
43
|
}
|
|
38
44
|
function fromSerializedProject(serializedProject) {
|
|
45
|
+
const nodePrefabs = mapValues(serializedProject.nodePrefabs ?? {}, (prefab) => ({
|
|
46
|
+
id: prefab.id,
|
|
47
|
+
sourceNode: fromSerializedIsolatedNode(prefab.sourceNode),
|
|
48
|
+
}));
|
|
39
49
|
return [
|
|
40
50
|
{
|
|
41
51
|
metadata: serializedProject.metadata,
|
|
42
52
|
graphs: mapValues(serializedProject.graphs, (graph) => fromSerializedGraph(graph)),
|
|
53
|
+
nodePrefabs: Object.keys(nodePrefabs).length > 0 ? nodePrefabs : undefined,
|
|
54
|
+
uiGraphs: serializedProject.uiGraphs && Object.keys(serializedProject.uiGraphs).length > 0
|
|
55
|
+
? serializedProject.uiGraphs
|
|
56
|
+
: undefined,
|
|
43
57
|
plugins: serializedProject.plugins ?? [],
|
|
44
58
|
references: serializedProject.references ?? [],
|
|
45
59
|
},
|
|
46
60
|
serializedProject.attachedData ?? {},
|
|
47
61
|
];
|
|
48
62
|
}
|
|
63
|
+
function toSerializedIsolatedNode(node) {
|
|
64
|
+
const { outgoingConnections: _outgoingConnections, ...serializedNode } = toSerializedNode(node, [node], []);
|
|
65
|
+
return {
|
|
66
|
+
...serializedNode,
|
|
67
|
+
id: node.id,
|
|
68
|
+
type: node.type,
|
|
69
|
+
title: node.title,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function fromSerializedIsolatedNode(serializedNode) {
|
|
73
|
+
const [node] = fromSerializedNode({
|
|
74
|
+
...serializedNode,
|
|
75
|
+
outgoingConnections: undefined,
|
|
76
|
+
}, `[${serializedNode.id}]:${serializedNode.type} "${serializedNode.title}"`);
|
|
77
|
+
return node;
|
|
78
|
+
}
|
|
49
79
|
function toSerializedGraph(graph) {
|
|
50
80
|
const graphMetadata = {
|
|
51
81
|
id: graph.metadata.id,
|
|
@@ -3,7 +3,7 @@ import type { AttachedData } from '../utils/serialization/serializationUtils.js'
|
|
|
3
3
|
import type { AudioProvider } from '../integrations/AudioProvider.js';
|
|
4
4
|
import type { DataValue } from '../model/DataValue.js';
|
|
5
5
|
import type { DatasetProvider } from '../integrations/DatasetProvider.js';
|
|
6
|
-
import type { ExternalFunction, GraphProcessorConcurrency, GraphProcessorExecutionPlanCacheMode, GraphProcessorRuntimeCache, GraphProcessorScheduler, ProcessEvents } from '../model/GraphProcessor.js';
|
|
6
|
+
import type { ExternalFunction, GraphProcessorConcurrency, GraphProcessorExecutionPlanCacheMode, GraphProcessorRuntimeCache, GraphProcessorRuntimeProfiler, GraphProcessorScheduler, ProcessEvents } from '../model/GraphProcessor.js';
|
|
7
7
|
import type { Project } from '../model/Project.js';
|
|
8
8
|
import type { MCPProvider } from '../integrations/mcp/MCPProvider.js';
|
|
9
9
|
import type { NativeApi } from '../native/NativeApi.js';
|
|
@@ -47,6 +47,7 @@ export type CoreCreateProcessorInternalOptions = {
|
|
|
47
47
|
cacheLoadedProjects?: boolean;
|
|
48
48
|
executionPlanCacheMode?: GraphProcessorExecutionPlanCacheMode;
|
|
49
49
|
runtimeCache?: GraphProcessorRuntimeCache;
|
|
50
|
+
runtimeProfiler?: GraphProcessorRuntimeProfiler;
|
|
50
51
|
scheduler?: GraphProcessorScheduler;
|
|
51
52
|
};
|
|
52
53
|
export declare function coreCreateProcessor(project: Project, options: RunGraphOptions, internalOptions?: CoreCreateProcessorInternalOptions): {
|
package/dist/types/exports.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ export * from './model/GraphProcessor.js';
|
|
|
3
3
|
export * from './model/DataValue.js';
|
|
4
4
|
export * from './model/NodeBase.js';
|
|
5
5
|
export * from './model/NodeGraph.js';
|
|
6
|
+
export * from './model/NodePrefabResolver.js';
|
|
7
|
+
export { getGraphBoundary } from './model/GraphBoundaryCache.js';
|
|
8
|
+
export type { GraphBoundary } from './model/GraphBoundaryCache.js';
|
|
9
|
+
export * from './model/UiGraph.js';
|
|
10
|
+
export * from './model/UiGraphRendererStyles.js';
|
|
6
11
|
export * from './model/NodeImpl.js';
|
|
7
12
|
export * from './model/NodeDefinition.js';
|
|
8
13
|
export * from './model/Nodes.js';
|
|
@@ -25,6 +25,7 @@ export type StringEditorDefinition<T extends ChartNode> = SharedEditorDefinition
|
|
|
25
25
|
useInputToggleDataKey?: DataOfType<T, boolean>;
|
|
26
26
|
placeholder?: string;
|
|
27
27
|
maxLength?: number;
|
|
28
|
+
commitDebounceMs?: number;
|
|
28
29
|
};
|
|
29
30
|
export type ToggleEditorDefinition<T extends ChartNode> = SharedEditorDefinitionProps<T> & {
|
|
30
31
|
type: 'toggle';
|
|
@@ -5,6 +5,7 @@ import type { GraphId, NodeGraph } from './NodeGraph.js';
|
|
|
5
5
|
import type { GraphExecutionMetadata, ProcessId } from './ProcessContext.js';
|
|
6
6
|
import type { Project, ProjectId } from './Project.js';
|
|
7
7
|
import type { Settings } from './Settings.js';
|
|
8
|
+
import type { FrozenNodeOutputsByGraph } from './GraphProcessor.js';
|
|
8
9
|
export type GraphInputs = Record<string, DataValue>;
|
|
9
10
|
export type GraphOutputs = Record<string, DataValue>;
|
|
10
11
|
export type Inputs = Record<PortId, DataValue | undefined>;
|
|
@@ -185,6 +186,7 @@ export type OutgoingMessageMap = {
|
|
|
185
186
|
'user-input': {
|
|
186
187
|
nodeId: NodeId;
|
|
187
188
|
answers: StringArrayDataValue;
|
|
189
|
+
requestId?: RemoteRunRequestId;
|
|
188
190
|
};
|
|
189
191
|
'set-dynamic-data': {
|
|
190
192
|
project: Project;
|
|
@@ -195,17 +197,25 @@ export type OutgoingMessageMap = {
|
|
|
195
197
|
graphId: GraphId;
|
|
196
198
|
runToNodeIds?: NodeId[];
|
|
197
199
|
preloadData?: Record<NodeId, Outputs>;
|
|
200
|
+
frozenNodeOutputs?: FrozenNodeOutputsByGraph;
|
|
198
201
|
contextValues: Record<string, DataValue>;
|
|
199
202
|
inputs?: GraphInputs;
|
|
200
203
|
projectPath?: string | null;
|
|
201
204
|
useEditorCache?: boolean;
|
|
202
205
|
captureNodeTimings?: boolean;
|
|
203
206
|
};
|
|
204
|
-
abort:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
abort: {
|
|
208
|
+
requestId?: RemoteRunRequestId;
|
|
209
|
+
} | undefined;
|
|
210
|
+
pause: {
|
|
211
|
+
requestId?: RemoteRunRequestId;
|
|
212
|
+
} | undefined;
|
|
213
|
+
resume: {
|
|
214
|
+
requestId?: RemoteRunRequestId;
|
|
215
|
+
} | undefined;
|
|
207
216
|
preload: {
|
|
208
217
|
nodeData: Record<NodeId, Outputs>;
|
|
218
|
+
requestId?: RemoteRunRequestId;
|
|
209
219
|
};
|
|
210
220
|
'datasets:response': {
|
|
211
221
|
requestId: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { DataType, DataValue } from './DataValue.js';
|
|
2
2
|
import type { Inputs, Outputs } from './GraphProcessor.js';
|
|
3
|
-
import type { NodeInputDefinition, NodeOutputDefinition, PortId } from './NodeBase.js';
|
|
3
|
+
import type { NodeId, NodeInputDefinition, NodeOutputDefinition, PortId } from './NodeBase.js';
|
|
4
4
|
import type { GraphId, NodeGraph } from './NodeGraph.js';
|
|
5
5
|
import type { Project } from './Project.js';
|
|
6
6
|
import type { DynamicEditorEditor } from './EditorDefinition.js';
|
|
7
|
+
export declare const GRAPH_BOUNDARY_OUTPUT_DEMAND_OPTIMIZATION_ENABLED = false;
|
|
7
8
|
export type GraphBoundaryInput = {
|
|
8
9
|
dataType: DataType;
|
|
9
10
|
editor?: DynamicEditorEditor;
|
|
@@ -13,6 +14,7 @@ export type GraphBoundaryInput = {
|
|
|
13
14
|
export type GraphBoundaryOutput = {
|
|
14
15
|
dataType: DataType;
|
|
15
16
|
id: string;
|
|
17
|
+
nodeId: NodeId;
|
|
16
18
|
portId: PortId;
|
|
17
19
|
};
|
|
18
20
|
export type GraphBoundary = {
|
|
@@ -21,7 +23,11 @@ export type GraphBoundary = {
|
|
|
21
23
|
};
|
|
22
24
|
export type GraphBoundaryCache = WeakMap<NodeGraph, GraphBoundary>;
|
|
23
25
|
export declare function getGraphBoundary(project: Project, graphId: GraphId | undefined, cache?: GraphBoundaryCache): GraphBoundary | undefined;
|
|
24
|
-
export declare function
|
|
25
|
-
|
|
26
|
+
export declare function applyGraphBoundaryPortOrder<T extends {
|
|
27
|
+
id: string;
|
|
28
|
+
}>(boundaryItems: readonly T[], portOrder: readonly string[] | undefined): T[];
|
|
29
|
+
export declare function getGraphBoundaryInputDefinitions(boundary: GraphBoundary, inputPortOrder?: readonly string[]): NodeInputDefinition[];
|
|
30
|
+
export declare function getGraphBoundaryOutputDefinitions(boundary: GraphBoundary, outputPortOrder?: readonly string[]): NodeOutputDefinition[];
|
|
26
31
|
export declare function buildGraphBoundaryInputData(boundary: GraphBoundary, inputs: Inputs, defaults: Record<string, DataValue> | undefined): Inputs;
|
|
27
32
|
export declare function buildExcludedGraphBoundaryOutputs(boundary: GraphBoundary): Outputs;
|
|
33
|
+
export declare function getRequestedGraphOutputNodeIds(boundary: GraphBoundary, requestedOutputPortIds: ReadonlySet<PortId>): NodeId[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ScalarOrArrayDataValue } from './DataValue.js';
|
|
2
|
+
import type { GraphOutputs, Outputs } from './GraphProcessor.js';
|
|
3
|
+
import type { ChartNode } from './NodeBase.js';
|
|
4
|
+
export type FrozenSetGlobalEffect = {
|
|
5
|
+
variableId: string;
|
|
6
|
+
value: ScalarOrArrayDataValue;
|
|
7
|
+
};
|
|
8
|
+
export declare function ensureGraphCostOutput(graphOutputs: GraphOutputs, totalCost: number): void;
|
|
9
|
+
export declare function applyFrozenGraphBoundaryEffects(graphOutputs: GraphOutputs, node: ChartNode, outputValues: Outputs): FrozenSetGlobalEffect | undefined;
|
|
@@ -138,6 +138,19 @@ export type GraphInputs = Record<string, DataValue>;
|
|
|
138
138
|
export type NodeResults = Map<NodeId, Outputs>;
|
|
139
139
|
export type Inputs = Record<PortId, DataValue | undefined>;
|
|
140
140
|
export type Outputs = Record<PortId, DataValue | undefined>;
|
|
141
|
+
export type FrozenNodeOutputsByGraph = Record<GraphId, Record<NodeId, Outputs[] | undefined> | undefined>;
|
|
142
|
+
export type FrozenNodeOutputResolverRequest = {
|
|
143
|
+
execution: GraphExecutionMetadata;
|
|
144
|
+
graphId: GraphId;
|
|
145
|
+
inputs: Inputs;
|
|
146
|
+
node: ChartNode;
|
|
147
|
+
processId: ProcessId;
|
|
148
|
+
};
|
|
149
|
+
export type FrozenNodeOutputResolver = (request: FrozenNodeOutputResolverRequest) => Outputs | undefined;
|
|
150
|
+
export declare function cloneFrozenNodeOutputs(outputs: Outputs): Outputs;
|
|
151
|
+
export declare function cloneFrozenNodeOutputsByGraph(outputsByGraph: FrozenNodeOutputsByGraph): FrozenNodeOutputsByGraph;
|
|
152
|
+
export declare function hasFrozenNodeOutputs(outputsByGraph: FrozenNodeOutputsByGraph | undefined): boolean;
|
|
153
|
+
export declare function createFrozenNodeOutputResolver(outputsByGraph: FrozenNodeOutputsByGraph | undefined): FrozenNodeOutputResolver | undefined;
|
|
141
154
|
export type ExternalFunctionProcessContext = Omit<InternalProcessContext, 'setGlobal'>;
|
|
142
155
|
export type ExternalFunction = (context: ExternalFunctionProcessContext, ...args: unknown[]) => Promise<DataValue & {
|
|
143
156
|
cost?: number;
|
|
@@ -147,12 +160,17 @@ export type GraphProcessorConcurrency = {
|
|
|
147
160
|
splitRunConcurrency?: number;
|
|
148
161
|
};
|
|
149
162
|
export type GraphProcessorRuntimeCache = {
|
|
163
|
+
executionPlanNodePrefabs?: WeakMap<NodeGraph, Project['nodePrefabs']>;
|
|
150
164
|
executionPlans?: WeakMap<NodeGraph, GraphExecutionPlan>;
|
|
151
165
|
graphBoundaries?: GraphBoundaryCache;
|
|
152
166
|
loadedProjects?: Record<ProjectId, Project>;
|
|
153
167
|
};
|
|
154
168
|
export type GraphProcessorExecutionPlanCacheMode = 'all' | 'subprocessors';
|
|
155
169
|
export type GraphProcessorScheduler = 'compatible' | 'fast-acyclic';
|
|
170
|
+
export type GraphProcessorRuntimeProfileBucket = 'initializeGraphRun' | 'loadProjectReferences' | 'prepareNodeProcessContextBase' | 'preprocessGraph' | 'emitGraphStart' | 'emitPreloadedNodeResults' | 'waitUntilUnpaused' | 'processFastAcyclicGraph' | 'processCompatibleGraph' | 'throwIfGraphErrored' | 'finalizeGraphRun' | 'emitFinish' | 'fetchNodeDataAndProcessNode' | 'getInputNodesTo' | 'getInputValuesForNode' | 'nodeDispatch' | 'nodeImplementation' | 'createNodeProcessContext' | 'getOutputNodesFrom' | 'queueOutputNodes' | 'createSubProcessor' | 'wireSubProcessorEvents' | 'wireSubProcessorLifecycle';
|
|
171
|
+
export type GraphProcessorRuntimeProfiler = {
|
|
172
|
+
addDuration: (bucket: GraphProcessorRuntimeProfileBucket, durationMs: number) => void;
|
|
173
|
+
};
|
|
156
174
|
export declare const DEFAULT_SPLIT_RUN_CONCURRENCY = 4;
|
|
157
175
|
export type RaceId = Tagged<string, 'RaceId'>;
|
|
158
176
|
export type LoopInfo = AttachedNodeDataItem & {
|
|
@@ -194,6 +212,7 @@ export declare class GraphProcessor {
|
|
|
194
212
|
executionPlanCacheMode?: GraphProcessorExecutionPlanCacheMode;
|
|
195
213
|
initialExecutionPlan?: GraphExecutionPlan;
|
|
196
214
|
runtimeCache?: GraphProcessorRuntimeCache;
|
|
215
|
+
runtimeProfiler?: GraphProcessorRuntimeProfiler;
|
|
197
216
|
scheduler?: GraphProcessorScheduler;
|
|
198
217
|
});
|
|
199
218
|
on: Emittery<ProcessEvents>["on"];
|
|
@@ -211,6 +230,7 @@ export declare class GraphProcessor {
|
|
|
211
230
|
setSlowMode(slowMode: boolean): void;
|
|
212
231
|
events(): AsyncGenerator<ProcessEvent>;
|
|
213
232
|
preloadNodeData(nodeId: NodeId, data: Outputs): void;
|
|
233
|
+
setFrozenNodeOutputResolver(resolver: FrozenNodeOutputResolver | undefined): void;
|
|
214
234
|
/** Gets all node IDs that a given node ID depends on being complete before the given node ID can start. */
|
|
215
235
|
getDependencyNodesDeep(nodeId: NodeId): NodeId[];
|
|
216
236
|
replayRecording(recorder: ExecutionRecorder): Promise<GraphOutputs>;
|
|
@@ -111,6 +111,11 @@ export type NodeConnection = {
|
|
|
111
111
|
outputId: PortId;
|
|
112
112
|
/** The unique identifier of the input. */
|
|
113
113
|
inputId: PortId;
|
|
114
|
+
/** Optional visual-only bend point for manually routing the connection on the canvas. */
|
|
115
|
+
bendPoint?: {
|
|
116
|
+
x: number;
|
|
117
|
+
y: number;
|
|
118
|
+
};
|
|
114
119
|
};
|
|
115
120
|
export declare const IF_PORT: NodeInputDefinition;
|
|
116
121
|
export declare function isBuiltInInputDefinition(input: NodeInputDefinition): boolean;
|