@valerypopoff/rivet2-core 2.0.2 → 2.0.4
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/README.md +1 -1
- package/dist/cjs/bundle.cjs +693 -361
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/esm/model/GraphProcessor.js +50 -22
- package/dist/esm/model/NodeExecutionPlanner.js +3 -3
- package/dist/esm/model/Nodes.js +3 -0
- package/dist/esm/model/chat/aiSdkStreaming.js +23 -2
- package/dist/esm/model/chat-v2/aiSdkBridge.js +49 -2
- package/dist/esm/model/chat-v2/chatV2FeatureCompatibility.js +2 -1
- package/dist/esm/model/chat-v2/chatV2Pipeline.js +24 -4
- package/dist/esm/model/chat-v2/chatV2ResponseFormat.js +3 -0
- package/dist/esm/model/chat-v2/llmChatV2NodeRuntime.js +1 -0
- package/dist/esm/model/nodes/CoalesceNode.js +73 -20
- package/dist/esm/model/nodes/CodeNode.js +9 -9
- package/dist/esm/model/nodes/DidRunNode.js +85 -0
- package/dist/esm/model/nodes/ExtractJsonNode.js +44 -26
- package/dist/esm/model/nodes/LLMChatV2Node.js +16 -0
- package/dist/esm/model/nodes/ObjectNode.js +50 -18
- package/dist/types/model/ExecutorProtocol.d.ts +1 -1
- package/dist/types/model/NodeExecutionPlanner.d.ts +1 -1
- package/dist/types/model/Nodes.d.ts +3 -2
- package/dist/types/model/chat/aiSdkStreaming.d.ts +4 -1
- package/dist/types/model/chat-v2/chatV2FeatureCompatibility.d.ts +2 -2
- package/dist/types/model/chat-v2/chatV2ResponseFormat.d.ts +2 -0
- package/dist/types/model/chat-v2/chatV2Types.d.ts +5 -0
- package/dist/types/model/nodes/CoalesceNode.d.ts +7 -1
- package/dist/types/model/nodes/DidRunNode.d.ts +15 -0
- package/package.json +1 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { nanoid } from 'nanoid/non-secure';
|
|
2
|
+
import { dedent } from 'ts-dedent';
|
|
3
|
+
import {} from '../NodeBase.js';
|
|
4
|
+
import { NodeImpl } from '../NodeImpl.js';
|
|
5
|
+
import { nodeDefinition } from '../NodeDefinition.js';
|
|
6
|
+
import {} from '../GraphProcessor.js';
|
|
7
|
+
export class DidRunNodeImpl extends NodeImpl {
|
|
8
|
+
static create() {
|
|
9
|
+
return {
|
|
10
|
+
type: 'didRun',
|
|
11
|
+
title: 'Did Run',
|
|
12
|
+
id: nanoid(),
|
|
13
|
+
data: {},
|
|
14
|
+
visualData: {
|
|
15
|
+
x: 0,
|
|
16
|
+
y: 0,
|
|
17
|
+
width: 250,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
getInputDefinitions(connections) {
|
|
22
|
+
const inputCount = this.#getInputPortCount(connections);
|
|
23
|
+
const inputs = [];
|
|
24
|
+
for (let i = 1; i <= inputCount; i++) {
|
|
25
|
+
inputs.push({
|
|
26
|
+
dataType: 'any',
|
|
27
|
+
id: `input${i}`,
|
|
28
|
+
title: `Input ${i}`,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return inputs;
|
|
32
|
+
}
|
|
33
|
+
getOutputDefinitions() {
|
|
34
|
+
return [
|
|
35
|
+
{
|
|
36
|
+
dataType: 'boolean',
|
|
37
|
+
id: 'ran',
|
|
38
|
+
title: 'Ran',
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
static getUIData() {
|
|
43
|
+
return {
|
|
44
|
+
infoBoxBody: dedent `
|
|
45
|
+
Outputs true when all connected inputs have run. Falsy or empty values still count as having run, so this is useful for adapting "did this branch run at all?" into a boolean If port.
|
|
46
|
+
`,
|
|
47
|
+
infoBoxTitle: 'Did Run Node',
|
|
48
|
+
contextMenuTitle: 'Did Run',
|
|
49
|
+
group: ['Logic'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
getBody() {
|
|
53
|
+
return 'Outputs true when all connected inputs have run. Falsy or empty values still count';
|
|
54
|
+
}
|
|
55
|
+
#getInputPortCount(connections) {
|
|
56
|
+
const inputNodeId = this.chartNode.id;
|
|
57
|
+
const inputConnections = connections.filter((connection) => connection.inputNodeId === inputNodeId && connection.inputId.startsWith('input'));
|
|
58
|
+
let maxInputNumber = 0;
|
|
59
|
+
for (const connection of inputConnections) {
|
|
60
|
+
const inputNumber = parseInt(connection.inputId.replace('input', ''), 10);
|
|
61
|
+
if (inputNumber > maxInputNumber) {
|
|
62
|
+
maxInputNumber = inputNumber;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return maxInputNumber + 1;
|
|
66
|
+
}
|
|
67
|
+
async process(inputData) {
|
|
68
|
+
const hasDynamicInput = Object.keys(inputData).some((key) => key.startsWith('input'));
|
|
69
|
+
if (!hasDynamicInput) {
|
|
70
|
+
return {
|
|
71
|
+
['ran']: {
|
|
72
|
+
type: 'control-flow-excluded',
|
|
73
|
+
value: undefined,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
['ran']: {
|
|
79
|
+
type: 'boolean',
|
|
80
|
+
value: true,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export const didRunNode = nodeDefinition(DidRunNodeImpl, 'Did Run');
|
|
@@ -3,7 +3,6 @@ import { nanoid } from 'nanoid/non-secure';
|
|
|
3
3
|
import { NodeImpl } from '../NodeImpl.js';
|
|
4
4
|
import { nodeDefinition } from '../NodeDefinition.js';
|
|
5
5
|
import {} from '../DataValue.js';
|
|
6
|
-
import { expectType } from '../../utils/index.js';
|
|
7
6
|
import { dedent } from 'ts-dedent';
|
|
8
7
|
export class ExtractJsonNodeImpl extends NodeImpl {
|
|
9
8
|
static create() {
|
|
@@ -25,7 +24,7 @@ export class ExtractJsonNodeImpl extends NodeImpl {
|
|
|
25
24
|
{
|
|
26
25
|
id: 'input',
|
|
27
26
|
title: 'Input',
|
|
28
|
-
dataType: '
|
|
27
|
+
dataType: 'any',
|
|
29
28
|
required: true,
|
|
30
29
|
coerced: false,
|
|
31
30
|
},
|
|
@@ -48,9 +47,9 @@ export class ExtractJsonNodeImpl extends NodeImpl {
|
|
|
48
47
|
static getUIData() {
|
|
49
48
|
return {
|
|
50
49
|
infoBoxBody: dedent `
|
|
51
|
-
Finds and parses the first JSON object in
|
|
50
|
+
Finds and parses the first JSON object in input text, or passes through an already-structured input object.
|
|
52
51
|
|
|
53
|
-
Outputs the parsed object.
|
|
52
|
+
Outputs the parsed or passed-through object.
|
|
54
53
|
`,
|
|
55
54
|
infoBoxTitle: 'Extract JSON Node',
|
|
56
55
|
contextMenuTitle: 'Extract JSON',
|
|
@@ -58,19 +57,29 @@ export class ExtractJsonNodeImpl extends NodeImpl {
|
|
|
58
57
|
};
|
|
59
58
|
}
|
|
60
59
|
async process(inputs) {
|
|
61
|
-
const
|
|
60
|
+
const input = inputs['input'];
|
|
61
|
+
if (isStructuredJsonInput(input)) {
|
|
62
|
+
return createMatchedOutput(input.value);
|
|
63
|
+
}
|
|
64
|
+
let inputString;
|
|
65
|
+
if (input?.type === 'any') {
|
|
66
|
+
if (isJsonOutputValue(input.value)) {
|
|
67
|
+
return createMatchedOutput(input.value);
|
|
68
|
+
}
|
|
69
|
+
if (typeof input.value !== 'string') {
|
|
70
|
+
throw new Error(`Expected value of type string or object but got any`);
|
|
71
|
+
}
|
|
72
|
+
inputString = input.value;
|
|
73
|
+
}
|
|
74
|
+
else if (input?.type === 'string') {
|
|
75
|
+
inputString = input.value;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
throw new Error(`Expected value of type string or object but got ${input?.type}`);
|
|
79
|
+
}
|
|
62
80
|
try {
|
|
63
81
|
const parsed = JSON.parse(inputString);
|
|
64
|
-
return
|
|
65
|
-
['output']: {
|
|
66
|
-
type: 'object',
|
|
67
|
-
value: parsed,
|
|
68
|
-
},
|
|
69
|
-
['noMatch']: {
|
|
70
|
-
type: 'control-flow-excluded',
|
|
71
|
-
value: undefined,
|
|
72
|
-
},
|
|
73
|
-
};
|
|
82
|
+
return createMatchedOutput(parsed);
|
|
74
83
|
}
|
|
75
84
|
catch (_err) {
|
|
76
85
|
// Fall back to more manual parsing
|
|
@@ -91,7 +100,7 @@ export class ExtractJsonNodeImpl extends NodeImpl {
|
|
|
91
100
|
? lastBracket
|
|
92
101
|
: lastSquareBracket;
|
|
93
102
|
const substring = inputString.substring(firstIndex, lastIndex + 1);
|
|
94
|
-
let jsonObject
|
|
103
|
+
let jsonObject;
|
|
95
104
|
try {
|
|
96
105
|
jsonObject = JSON.parse(substring);
|
|
97
106
|
}
|
|
@@ -107,16 +116,25 @@ export class ExtractJsonNodeImpl extends NodeImpl {
|
|
|
107
116
|
},
|
|
108
117
|
};
|
|
109
118
|
}
|
|
110
|
-
return
|
|
111
|
-
['output']: {
|
|
112
|
-
type: 'object',
|
|
113
|
-
value: jsonObject,
|
|
114
|
-
},
|
|
115
|
-
['noMatch']: {
|
|
116
|
-
type: 'control-flow-excluded',
|
|
117
|
-
value: undefined,
|
|
118
|
-
},
|
|
119
|
-
};
|
|
119
|
+
return createMatchedOutput(jsonObject);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
export const extractJsonNode = nodeDefinition(ExtractJsonNodeImpl, 'Extract JSON');
|
|
123
|
+
function isStructuredJsonInput(value) {
|
|
124
|
+
return value?.type === 'object' || value?.type === 'object[]' || value?.type === 'any[]';
|
|
125
|
+
}
|
|
126
|
+
function isJsonOutputValue(value) {
|
|
127
|
+
return value != null && typeof value === 'object';
|
|
128
|
+
}
|
|
129
|
+
function createMatchedOutput(value) {
|
|
130
|
+
return {
|
|
131
|
+
['output']: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
value: value,
|
|
134
|
+
},
|
|
135
|
+
['noMatch']: {
|
|
136
|
+
type: 'control-flow-excluded',
|
|
137
|
+
value: undefined,
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
}
|
|
@@ -5,6 +5,7 @@ import { NodeImpl } from '../NodeImpl.js';
|
|
|
5
5
|
import { getCommonChatV2Inputs, getCommonChatV2Outputs } from '../chat-v2/chatV2Shared.js';
|
|
6
6
|
import { getLLMChatV2Editors } from '../chat-v2/llmChatV2NodeEditors.js';
|
|
7
7
|
import { createLLMChatV2NodeData, hasLLMChatV2BuiltInToolsEnabled, } from '../chat-v2/llmChatV2NodeData.js';
|
|
8
|
+
import { isLLMChatV2StructuredResponseFormat } from '../chat-v2/chatV2FeatureCompatibility.js';
|
|
8
9
|
import { getChatV2ModelInfo } from '../chat-v2/modelRegistry.js';
|
|
9
10
|
import { buildLLMChatV2EditorCacheKey, cloneLLMChatV2EditorCacheOutputs, resolveLLMChatV2RuntimeConfig, resolveLLMChatV2RuntimeProviderOptions, } from '../chat-v2/llmChatV2NodeRuntime.js';
|
|
10
11
|
import { anthropicEffortOptions, getChatV2ProviderLabel, googleThinkingLevelOptions, openAIReasoningEffortOptions, } from '../chat-v2/providerOptions.js';
|
|
@@ -150,6 +151,21 @@ export class LLMChatV2NodeImpl extends NodeImpl {
|
|
|
150
151
|
includeUsage: this.data.outputUsage,
|
|
151
152
|
includeReasoning: this.data.outputReasoning,
|
|
152
153
|
});
|
|
154
|
+
const responseOutput = outputs.find((output) => output.id === 'response');
|
|
155
|
+
if (responseOutput != null && isLLMChatV2StructuredResponseFormat(this.data.responseFormat)) {
|
|
156
|
+
responseOutput.dataType = [
|
|
157
|
+
'object',
|
|
158
|
+
'object[]',
|
|
159
|
+
'any',
|
|
160
|
+
'any[]',
|
|
161
|
+
'string',
|
|
162
|
+
'string[]',
|
|
163
|
+
'number',
|
|
164
|
+
'number[]',
|
|
165
|
+
'boolean',
|
|
166
|
+
'boolean[]',
|
|
167
|
+
];
|
|
168
|
+
}
|
|
153
169
|
if (this.data.outputRequestStatus) {
|
|
154
170
|
outputs.push({
|
|
155
171
|
id: 'requestStatus',
|
|
@@ -10,6 +10,44 @@ import { createInterpolationInputDefinition } from '../interpolationInputDefinit
|
|
|
10
10
|
const DEFAULT_JSON_TEMPLATE = `{
|
|
11
11
|
"key": "{{input}}"
|
|
12
12
|
}`;
|
|
13
|
+
function isEscapedCharacter(value, index) {
|
|
14
|
+
let backslashCount = 0;
|
|
15
|
+
for (let i = index - 1; i >= 0 && value[i] === '\\'; i--) {
|
|
16
|
+
backslashCount++;
|
|
17
|
+
}
|
|
18
|
+
return backslashCount % 2 === 1;
|
|
19
|
+
}
|
|
20
|
+
function isUnescapedQuoteAt(value, index) {
|
|
21
|
+
return index >= 0 && index < value.length && value[index] === '"' && !isEscapedCharacter(value, index);
|
|
22
|
+
}
|
|
23
|
+
function isInsideJsonString(value, index) {
|
|
24
|
+
let insideString = false;
|
|
25
|
+
for (let i = 0; i < index; i++) {
|
|
26
|
+
if (isUnescapedQuoteAt(value, i)) {
|
|
27
|
+
insideString = !insideString;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return insideString;
|
|
31
|
+
}
|
|
32
|
+
function stringifyJsonValue(value) {
|
|
33
|
+
if (value == null) {
|
|
34
|
+
return 'null';
|
|
35
|
+
}
|
|
36
|
+
return JSON.stringify(value);
|
|
37
|
+
}
|
|
38
|
+
function stringifyWholeQuotedJsonValue(value) {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return 'null';
|
|
41
|
+
}
|
|
42
|
+
if (typeof value === 'string') {
|
|
43
|
+
return JSON.stringify(value);
|
|
44
|
+
}
|
|
45
|
+
return JSON.stringify(JSON.stringify(value));
|
|
46
|
+
}
|
|
47
|
+
function stringifyEmbeddedJsonStringFragment(value) {
|
|
48
|
+
const fragment = value == null ? 'null' : typeof value === 'string' ? value : JSON.stringify(value) ?? 'null';
|
|
49
|
+
return JSON.stringify(fragment).slice(1, -1);
|
|
50
|
+
}
|
|
13
51
|
export class ObjectNodeImpl extends NodeImpl {
|
|
14
52
|
static create() {
|
|
15
53
|
const chartNode = {
|
|
@@ -86,12 +124,13 @@ export class ObjectNodeImpl extends NodeImpl {
|
|
|
86
124
|
let result = '';
|
|
87
125
|
let cursor = 0;
|
|
88
126
|
for (const tokenSpan of tokenSpans) {
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
127
|
+
const isInsideString = isInsideJsonString(protectedBaseString, tokenSpan.start);
|
|
128
|
+
const isWholeQuotedToken = isInsideString &&
|
|
129
|
+
isUnescapedQuoteAt(protectedBaseString, tokenSpan.start - 1) &&
|
|
130
|
+
isUnescapedQuoteAt(protectedBaseString, tokenSpan.end);
|
|
131
|
+
const replacementStart = isWholeQuotedToken ? tokenSpan.start - 1 : tokenSpan.start;
|
|
132
|
+
const replacementEnd = isWholeQuotedToken ? tokenSpan.end + 1 : tokenSpan.end;
|
|
93
133
|
const trimmedKey = getInterpolationTokenName(tokenSpan.rawInner) ?? tokenSpan.rawInner.trim();
|
|
94
|
-
const isQuoted = hasLeadingQuote;
|
|
95
134
|
let value;
|
|
96
135
|
const graphInputPrefix = '@graphInputs.';
|
|
97
136
|
const contextPrefix = '@context.';
|
|
@@ -105,20 +144,14 @@ export class ObjectNodeImpl extends NodeImpl {
|
|
|
105
144
|
value = values[trimmedKey]; // Original logic for non-@ variables
|
|
106
145
|
}
|
|
107
146
|
result += protectedBaseString.slice(cursor, replacementStart);
|
|
108
|
-
if (
|
|
109
|
-
result +=
|
|
110
|
-
}
|
|
111
|
-
else if (isQuoted && typeof value === 'string') {
|
|
112
|
-
// Adds double-quotes back.
|
|
113
|
-
result += JSON.stringify(value);
|
|
147
|
+
if (isInsideString && !isWholeQuotedToken) {
|
|
148
|
+
result += stringifyEmbeddedJsonStringFragment(value);
|
|
114
149
|
}
|
|
115
|
-
else if (
|
|
116
|
-
|
|
117
|
-
result += JSON.stringify(JSON.stringify(value));
|
|
150
|
+
else if (isWholeQuotedToken) {
|
|
151
|
+
result += stringifyWholeQuotedJsonValue(value);
|
|
118
152
|
}
|
|
119
153
|
else {
|
|
120
|
-
|
|
121
|
-
result += JSON.stringify(value);
|
|
154
|
+
result += stringifyJsonValue(value);
|
|
122
155
|
}
|
|
123
156
|
cursor = replacementEnd;
|
|
124
157
|
}
|
|
@@ -131,8 +164,7 @@ export class ObjectNodeImpl extends NodeImpl {
|
|
|
131
164
|
return acc;
|
|
132
165
|
}, {});
|
|
133
166
|
const interpolatedString = this.interpolate(this.chartNode.data.jsonTemplate, inputMap, context.graphInputNodeValues, // Pass graph inputs
|
|
134
|
-
context.contextValues
|
|
135
|
-
);
|
|
167
|
+
context.contextValues);
|
|
136
168
|
let outputValue;
|
|
137
169
|
try {
|
|
138
170
|
outputValue = JSON.parse(interpolatedString);
|
|
@@ -190,8 +190,8 @@ export type OutgoingMessageMap = {
|
|
|
190
190
|
requestId: RemoteRunRequestId;
|
|
191
191
|
graphId: GraphId;
|
|
192
192
|
runToNodeIds?: NodeId[];
|
|
193
|
+
preloadData?: Record<NodeId, Outputs>;
|
|
193
194
|
contextValues: Record<string, DataValue>;
|
|
194
|
-
runFromNodeId?: NodeId;
|
|
195
195
|
inputs?: GraphInputs;
|
|
196
196
|
projectPath?: string | null;
|
|
197
197
|
useEditorCache?: boolean;
|
|
@@ -24,5 +24,5 @@ export declare function getStartNodes(state: ExecutionState, graphNodes: ChartNo
|
|
|
24
24
|
export declare function getInputNodesTo(state: ExecutionState, node: ChartNode): ChartNode[];
|
|
25
25
|
export declare function getOutputNodesFrom(state: ExecutionState, node: ChartNode): OutputNodeResult;
|
|
26
26
|
export declare function hasErroredInputNode(state: ExecutionState, node: ChartNode, inputNodes: ChartNode[], onTrace?: (message: string) => void): boolean;
|
|
27
|
-
export declare function
|
|
27
|
+
export declare function getMissingRequiredInputs(state: ExecutionState, node: ChartNode): NodeInputDefinition[];
|
|
28
28
|
export declare function getWaitingForInputNode(state: ExecutionState, node: ChartNode, inputNodes: ChartNode[], inputValues: Inputs): false | string;
|
|
@@ -28,6 +28,7 @@ export * from './nodes/ExtractObjectPathNode.js';
|
|
|
28
28
|
export * from './nodes/RaiseEventNode.js';
|
|
29
29
|
export * from './nodes/ContextNode.js';
|
|
30
30
|
export * from './nodes/CoalesceNode.js';
|
|
31
|
+
export * from './nodes/DidRunNode.js';
|
|
31
32
|
export * from './nodes/PassthroughNode.js';
|
|
32
33
|
export * from './nodes/PopNode.js';
|
|
33
34
|
export * from './nodes/SetGlobalNode.js';
|
|
@@ -87,12 +88,12 @@ export * from './nodes/MCPDiscoveryNode.js';
|
|
|
87
88
|
export * from './nodes/MCPToolCallNode.js';
|
|
88
89
|
export * from './nodes/MCPGetPromptNode.js';
|
|
89
90
|
export * from './nodes/ReferencedGraphAliasNode.js';
|
|
90
|
-
export declare const registerBuiltInNodes: (registry: NodeRegistration) => NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "code" | "text" | "context" | "array" | "userInput" | "prompt" | "raiseEvent" | "getGlobal" | "setGlobal" | "abortGraph" | "chat" | "llmChatV2" | "extractRegex" | "expression" | "readDirectory" | "readFile" | "ifElse" | "chunk" | "graphInput" | "graphOutput" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "coalesce" | "passthrough" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "hash" | "raceInputs" | "toJson" | "jsFilter" | "jsMap" | "compare" | "evaluate" | "randomNumber" | "shuffle" | "comment" | "httpCall" | "delay" | "appendToDataset" | "createDataset" | "loadDataset" | "getAllDatasets" | "datasetNearestNeighbors" | "getDatasetRow" | "extractMarkdownCodeBlocks" | "assembleMessage" | "urlReference" | "destructure" | "replaceDataset" | "listGraphs" | "graphReference" | "callGraph" | "delegateFunctionCall" | "playAudio" | "chatLoop" | "readAllFiles" | "toMarkdownTable" | "cron" | "toTree" | "loopUntil" | "mcpDiscovery" | "mcpToolCall" | "mcpGetPrompt" | "referencedGraphAlias", import("./nodes/UserInputNode.js").UserInputNode | import("./nodes/TextNode.js").TextNode | import("./nodes/ChatNode.js").ChatNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | import("./nodes/PromptNode.js").PromptNode | import("./nodes/ExtractRegexNode.js").ExtractRegexNode | import("./nodes/CodeNode.js").CodeNode | import("./nodes/ExpressionNode.js").ExpressionNode | import("./nodes/MatchNode.js").MatchNode | import("./nodes/IfNode.js").IfNode | import("./nodes/ReadDirectoryNode.js").ReadDirectoryNode | import("./nodes/ReadFileNode.js").ReadFileNode | import("./nodes/IfElseNode.js").IfElseNode | import("./nodes/ChunkNode.js").ChunkNode | import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./nodes/SubGraphNode.js").SubGraphNode | import("./nodes/ArrayNode.js").ArrayNode | import("./nodes/ExtractJsonNode.js").ExtractJsonNode | import("./nodes/AssemblePromptNode.js").AssemblePromptNode | import("./nodes/ExtractYamlNode.js").ExtractYamlNode | import("./nodes/LoopControllerNode.js").LoopControllerNode | import("./nodes/TrimChatMessagesNode.js").TrimChatMessagesNode | import("./nodes/ExternalCallNode.js").ExternalCallNode | import("./nodes/ExtractObjectPathNode.js").ExtractObjectPathNode | import("./nodes/RaiseEventNode.js").RaiseEventNode | import("./nodes/ContextNode.js").ContextNode | import("./nodes/CoalesceNode.js").CoalesceNode | import("./nodes/PassthroughNode.js").PassthroughNode | import("./nodes/PopNode.js").PopNode | import("./nodes/SetGlobalNode.js").SetGlobalNode | import("./nodes/GetGlobalNode.js").GetGlobalNode | import("./nodes/WaitForEventNode.js").WaitForEventNode | import("./nodes/ToolNode.js").GptFunctionNode | import("./nodes/ToYamlNode.js").ToYamlNode | import("./nodes/GetEmbeddingNode.js").GetEmbeddingNode | import("./nodes/VectorStoreNode.js").VectorStoreNode | import("./nodes/VectorNearestNeighborsNode.js").VectorNearestNeighborsNode | import("./nodes/HashNode.js").HashNode | import("./nodes/AbortGraphNode.js").AbortGraphNode | import("./nodes/RaceInputsNode.js").RaceInputsNode | import("./nodes/ToJsonNode.js").ToJsonNode | import("./nodes/JoinNode.js").JoinNode | import("./nodes/FilterNode.js").FilterNode | import("./nodes/JSFilterNode.js").JSFilterNode | import("./nodes/JSMapNode.js").JSMapNode | import("./nodes/ObjectNode.js").ObjectNode | import("./nodes/BooleanNode.js").BooleanNode | import("./nodes/CompareNode.js").CompareNode | import("./nodes/EvaluateNode.js").EvaluateNode | import("./nodes/NumberNode.js").NumberNode | import("./nodes/RandomNumberNode.js").RandomNumberNode | import("./nodes/ShuffleNode.js").ShuffleNode | import("./nodes/CommentNode.js").CommentNode | import("./nodes/ImageNode.js").ImageNode | import("./nodes/AudioNode.js").AudioNode | import("./nodes/HttpCallNode.js").HttpCallNode | import("./nodes/DelayNode.js").DelayNode | import("./nodes/AppendToDatasetNode.js").AppendToDatasetNode | import("./nodes/CreateDatasetNode.js").CreateDatasetNode | import("./nodes/LoadDatasetNode.js").LoadDatasetNode | import("./nodes/GetAllDatasetsNode.js").GetAllDatasetsNode | import("./nodes/SplitNode.js").SplitNode | import("./nodes/DatasetNearestNeigborsNode.js").DatasetNearestNeighborsNode | import("./nodes/GetDatasetRowNode.js").GetDatasetRowNode | import("./nodes/SliceNode.js").SliceNode | import("./nodes/ExtractMarkdownCodeBlocksNode.js").ExtractMarkdownCodeBlocksNode | import("./nodes/AssembleMessageNode.js").AssembleMessageNode | import("./nodes/URLReferenceNode.js").UrlReferenceNode | import("./nodes/DestructureNode.js").DestructureNode | import("./nodes/ReplaceDatasetNode.js").ReplaceDatasetNode | import("./nodes/ListGraphsNode.js").ListGraphsNode | import("./nodes/GraphReferenceNode.js").GraphReferenceNode | import("./nodes/CallGraphNode.js").CallGraphNode | import("./nodes/DelegateFunctionCallNode.js").DelegateFunctionCallNode | import("./nodes/PlayAudioNode.js").PlayAudioNode | import("./nodes/DocumentNode.js").DocumentNode | import("./nodes/ChatLoopNode.js").ChatLoopNode | import("./nodes/ReadAllFilesNode.js").ReadAllFilesNode | import("./nodes/ToMarkdownTableNode.js").ToMarkdownTableNode | import("./nodes/CronNode.js").CronNode | import("./nodes/ToTreeNode.js").ToTreeNode | import("./nodes/LoopUntilNode.js").LoopUntilNode | (import("./NodeBase.js").NodeBase & {
|
|
91
|
+
export declare const registerBuiltInNodes: (registry: NodeRegistration) => NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "code" | "text" | "context" | "array" | "userInput" | "prompt" | "raiseEvent" | "getGlobal" | "setGlobal" | "abortGraph" | "chat" | "llmChatV2" | "extractRegex" | "expression" | "readDirectory" | "readFile" | "ifElse" | "chunk" | "graphInput" | "graphOutput" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "coalesce" | "didRun" | "passthrough" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "hash" | "raceInputs" | "toJson" | "jsFilter" | "jsMap" | "compare" | "evaluate" | "randomNumber" | "shuffle" | "comment" | "httpCall" | "delay" | "appendToDataset" | "createDataset" | "loadDataset" | "getAllDatasets" | "datasetNearestNeighbors" | "getDatasetRow" | "extractMarkdownCodeBlocks" | "assembleMessage" | "urlReference" | "destructure" | "replaceDataset" | "listGraphs" | "graphReference" | "callGraph" | "delegateFunctionCall" | "playAudio" | "chatLoop" | "readAllFiles" | "toMarkdownTable" | "cron" | "toTree" | "loopUntil" | "mcpDiscovery" | "mcpToolCall" | "mcpGetPrompt" | "referencedGraphAlias", import("./nodes/UserInputNode.js").UserInputNode | import("./nodes/TextNode.js").TextNode | import("./nodes/ChatNode.js").ChatNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | import("./nodes/PromptNode.js").PromptNode | import("./nodes/ExtractRegexNode.js").ExtractRegexNode | import("./nodes/CodeNode.js").CodeNode | import("./nodes/ExpressionNode.js").ExpressionNode | import("./nodes/MatchNode.js").MatchNode | import("./nodes/IfNode.js").IfNode | import("./nodes/ReadDirectoryNode.js").ReadDirectoryNode | import("./nodes/ReadFileNode.js").ReadFileNode | import("./nodes/IfElseNode.js").IfElseNode | import("./nodes/ChunkNode.js").ChunkNode | import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./nodes/SubGraphNode.js").SubGraphNode | import("./nodes/ArrayNode.js").ArrayNode | import("./nodes/ExtractJsonNode.js").ExtractJsonNode | import("./nodes/AssemblePromptNode.js").AssemblePromptNode | import("./nodes/ExtractYamlNode.js").ExtractYamlNode | import("./nodes/LoopControllerNode.js").LoopControllerNode | import("./nodes/TrimChatMessagesNode.js").TrimChatMessagesNode | import("./nodes/ExternalCallNode.js").ExternalCallNode | import("./nodes/ExtractObjectPathNode.js").ExtractObjectPathNode | import("./nodes/RaiseEventNode.js").RaiseEventNode | import("./nodes/ContextNode.js").ContextNode | import("./nodes/CoalesceNode.js").CoalesceNode | import("./nodes/DidRunNode.js").DidRunNode | import("./nodes/PassthroughNode.js").PassthroughNode | import("./nodes/PopNode.js").PopNode | import("./nodes/SetGlobalNode.js").SetGlobalNode | import("./nodes/GetGlobalNode.js").GetGlobalNode | import("./nodes/WaitForEventNode.js").WaitForEventNode | import("./nodes/ToolNode.js").GptFunctionNode | import("./nodes/ToYamlNode.js").ToYamlNode | import("./nodes/GetEmbeddingNode.js").GetEmbeddingNode | import("./nodes/VectorStoreNode.js").VectorStoreNode | import("./nodes/VectorNearestNeighborsNode.js").VectorNearestNeighborsNode | import("./nodes/HashNode.js").HashNode | import("./nodes/AbortGraphNode.js").AbortGraphNode | import("./nodes/RaceInputsNode.js").RaceInputsNode | import("./nodes/ToJsonNode.js").ToJsonNode | import("./nodes/JoinNode.js").JoinNode | import("./nodes/FilterNode.js").FilterNode | import("./nodes/JSFilterNode.js").JSFilterNode | import("./nodes/JSMapNode.js").JSMapNode | import("./nodes/ObjectNode.js").ObjectNode | import("./nodes/BooleanNode.js").BooleanNode | import("./nodes/CompareNode.js").CompareNode | import("./nodes/EvaluateNode.js").EvaluateNode | import("./nodes/NumberNode.js").NumberNode | import("./nodes/RandomNumberNode.js").RandomNumberNode | import("./nodes/ShuffleNode.js").ShuffleNode | import("./nodes/CommentNode.js").CommentNode | import("./nodes/ImageNode.js").ImageNode | import("./nodes/AudioNode.js").AudioNode | import("./nodes/HttpCallNode.js").HttpCallNode | import("./nodes/DelayNode.js").DelayNode | import("./nodes/AppendToDatasetNode.js").AppendToDatasetNode | import("./nodes/CreateDatasetNode.js").CreateDatasetNode | import("./nodes/LoadDatasetNode.js").LoadDatasetNode | import("./nodes/GetAllDatasetsNode.js").GetAllDatasetsNode | import("./nodes/SplitNode.js").SplitNode | import("./nodes/DatasetNearestNeigborsNode.js").DatasetNearestNeighborsNode | import("./nodes/GetDatasetRowNode.js").GetDatasetRowNode | import("./nodes/SliceNode.js").SliceNode | import("./nodes/ExtractMarkdownCodeBlocksNode.js").ExtractMarkdownCodeBlocksNode | import("./nodes/AssembleMessageNode.js").AssembleMessageNode | import("./nodes/URLReferenceNode.js").UrlReferenceNode | import("./nodes/DestructureNode.js").DestructureNode | import("./nodes/ReplaceDatasetNode.js").ReplaceDatasetNode | import("./nodes/ListGraphsNode.js").ListGraphsNode | import("./nodes/GraphReferenceNode.js").GraphReferenceNode | import("./nodes/CallGraphNode.js").CallGraphNode | import("./nodes/DelegateFunctionCallNode.js").DelegateFunctionCallNode | import("./nodes/PlayAudioNode.js").PlayAudioNode | import("./nodes/DocumentNode.js").DocumentNode | import("./nodes/ChatLoopNode.js").ChatLoopNode | import("./nodes/ReadAllFilesNode.js").ReadAllFilesNode | import("./nodes/ToMarkdownTableNode.js").ToMarkdownTableNode | import("./nodes/CronNode.js").CronNode | import("./nodes/ToTreeNode.js").ToTreeNode | import("./nodes/LoopUntilNode.js").LoopUntilNode | (import("./NodeBase.js").NodeBase & {
|
|
91
92
|
type: "mcpDiscovery";
|
|
92
93
|
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
93
94
|
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
94
95
|
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode>;
|
|
95
|
-
declare let globalRivetNodeRegistry: NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "code" | "text" | "context" | "array" | "userInput" | "prompt" | "raiseEvent" | "getGlobal" | "setGlobal" | "abortGraph" | "chat" | "llmChatV2" | "extractRegex" | "expression" | "readDirectory" | "readFile" | "ifElse" | "chunk" | "graphInput" | "graphOutput" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "coalesce" | "passthrough" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "hash" | "raceInputs" | "toJson" | "jsFilter" | "jsMap" | "compare" | "evaluate" | "randomNumber" | "shuffle" | "comment" | "httpCall" | "delay" | "appendToDataset" | "createDataset" | "loadDataset" | "getAllDatasets" | "datasetNearestNeighbors" | "getDatasetRow" | "extractMarkdownCodeBlocks" | "assembleMessage" | "urlReference" | "destructure" | "replaceDataset" | "listGraphs" | "graphReference" | "callGraph" | "delegateFunctionCall" | "playAudio" | "chatLoop" | "readAllFiles" | "toMarkdownTable" | "cron" | "toTree" | "loopUntil" | "mcpDiscovery" | "mcpToolCall" | "mcpGetPrompt" | "referencedGraphAlias", import("./nodes/UserInputNode.js").UserInputNode | import("./nodes/TextNode.js").TextNode | import("./nodes/ChatNode.js").ChatNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | import("./nodes/PromptNode.js").PromptNode | import("./nodes/ExtractRegexNode.js").ExtractRegexNode | import("./nodes/CodeNode.js").CodeNode | import("./nodes/ExpressionNode.js").ExpressionNode | import("./nodes/MatchNode.js").MatchNode | import("./nodes/IfNode.js").IfNode | import("./nodes/ReadDirectoryNode.js").ReadDirectoryNode | import("./nodes/ReadFileNode.js").ReadFileNode | import("./nodes/IfElseNode.js").IfElseNode | import("./nodes/ChunkNode.js").ChunkNode | import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./nodes/SubGraphNode.js").SubGraphNode | import("./nodes/ArrayNode.js").ArrayNode | import("./nodes/ExtractJsonNode.js").ExtractJsonNode | import("./nodes/AssemblePromptNode.js").AssemblePromptNode | import("./nodes/ExtractYamlNode.js").ExtractYamlNode | import("./nodes/LoopControllerNode.js").LoopControllerNode | import("./nodes/TrimChatMessagesNode.js").TrimChatMessagesNode | import("./nodes/ExternalCallNode.js").ExternalCallNode | import("./nodes/ExtractObjectPathNode.js").ExtractObjectPathNode | import("./nodes/RaiseEventNode.js").RaiseEventNode | import("./nodes/ContextNode.js").ContextNode | import("./nodes/CoalesceNode.js").CoalesceNode | import("./nodes/PassthroughNode.js").PassthroughNode | import("./nodes/PopNode.js").PopNode | import("./nodes/SetGlobalNode.js").SetGlobalNode | import("./nodes/GetGlobalNode.js").GetGlobalNode | import("./nodes/WaitForEventNode.js").WaitForEventNode | import("./nodes/ToolNode.js").GptFunctionNode | import("./nodes/ToYamlNode.js").ToYamlNode | import("./nodes/GetEmbeddingNode.js").GetEmbeddingNode | import("./nodes/VectorStoreNode.js").VectorStoreNode | import("./nodes/VectorNearestNeighborsNode.js").VectorNearestNeighborsNode | import("./nodes/HashNode.js").HashNode | import("./nodes/AbortGraphNode.js").AbortGraphNode | import("./nodes/RaceInputsNode.js").RaceInputsNode | import("./nodes/ToJsonNode.js").ToJsonNode | import("./nodes/JoinNode.js").JoinNode | import("./nodes/FilterNode.js").FilterNode | import("./nodes/JSFilterNode.js").JSFilterNode | import("./nodes/JSMapNode.js").JSMapNode | import("./nodes/ObjectNode.js").ObjectNode | import("./nodes/BooleanNode.js").BooleanNode | import("./nodes/CompareNode.js").CompareNode | import("./nodes/EvaluateNode.js").EvaluateNode | import("./nodes/NumberNode.js").NumberNode | import("./nodes/RandomNumberNode.js").RandomNumberNode | import("./nodes/ShuffleNode.js").ShuffleNode | import("./nodes/CommentNode.js").CommentNode | import("./nodes/ImageNode.js").ImageNode | import("./nodes/AudioNode.js").AudioNode | import("./nodes/HttpCallNode.js").HttpCallNode | import("./nodes/DelayNode.js").DelayNode | import("./nodes/AppendToDatasetNode.js").AppendToDatasetNode | import("./nodes/CreateDatasetNode.js").CreateDatasetNode | import("./nodes/LoadDatasetNode.js").LoadDatasetNode | import("./nodes/GetAllDatasetsNode.js").GetAllDatasetsNode | import("./nodes/SplitNode.js").SplitNode | import("./nodes/DatasetNearestNeigborsNode.js").DatasetNearestNeighborsNode | import("./nodes/GetDatasetRowNode.js").GetDatasetRowNode | import("./nodes/SliceNode.js").SliceNode | import("./nodes/ExtractMarkdownCodeBlocksNode.js").ExtractMarkdownCodeBlocksNode | import("./nodes/AssembleMessageNode.js").AssembleMessageNode | import("./nodes/URLReferenceNode.js").UrlReferenceNode | import("./nodes/DestructureNode.js").DestructureNode | import("./nodes/ReplaceDatasetNode.js").ReplaceDatasetNode | import("./nodes/ListGraphsNode.js").ListGraphsNode | import("./nodes/GraphReferenceNode.js").GraphReferenceNode | import("./nodes/CallGraphNode.js").CallGraphNode | import("./nodes/DelegateFunctionCallNode.js").DelegateFunctionCallNode | import("./nodes/PlayAudioNode.js").PlayAudioNode | import("./nodes/DocumentNode.js").DocumentNode | import("./nodes/ChatLoopNode.js").ChatLoopNode | import("./nodes/ReadAllFilesNode.js").ReadAllFilesNode | import("./nodes/ToMarkdownTableNode.js").ToMarkdownTableNode | import("./nodes/CronNode.js").CronNode | import("./nodes/ToTreeNode.js").ToTreeNode | import("./nodes/LoopUntilNode.js").LoopUntilNode | (import("./NodeBase.js").NodeBase & {
|
|
96
|
+
declare let globalRivetNodeRegistry: NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "code" | "text" | "context" | "array" | "userInput" | "prompt" | "raiseEvent" | "getGlobal" | "setGlobal" | "abortGraph" | "chat" | "llmChatV2" | "extractRegex" | "expression" | "readDirectory" | "readFile" | "ifElse" | "chunk" | "graphInput" | "graphOutput" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "coalesce" | "didRun" | "passthrough" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "hash" | "raceInputs" | "toJson" | "jsFilter" | "jsMap" | "compare" | "evaluate" | "randomNumber" | "shuffle" | "comment" | "httpCall" | "delay" | "appendToDataset" | "createDataset" | "loadDataset" | "getAllDatasets" | "datasetNearestNeighbors" | "getDatasetRow" | "extractMarkdownCodeBlocks" | "assembleMessage" | "urlReference" | "destructure" | "replaceDataset" | "listGraphs" | "graphReference" | "callGraph" | "delegateFunctionCall" | "playAudio" | "chatLoop" | "readAllFiles" | "toMarkdownTable" | "cron" | "toTree" | "loopUntil" | "mcpDiscovery" | "mcpToolCall" | "mcpGetPrompt" | "referencedGraphAlias", import("./nodes/UserInputNode.js").UserInputNode | import("./nodes/TextNode.js").TextNode | import("./nodes/ChatNode.js").ChatNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | import("./nodes/PromptNode.js").PromptNode | import("./nodes/ExtractRegexNode.js").ExtractRegexNode | import("./nodes/CodeNode.js").CodeNode | import("./nodes/ExpressionNode.js").ExpressionNode | import("./nodes/MatchNode.js").MatchNode | import("./nodes/IfNode.js").IfNode | import("./nodes/ReadDirectoryNode.js").ReadDirectoryNode | import("./nodes/ReadFileNode.js").ReadFileNode | import("./nodes/IfElseNode.js").IfElseNode | import("./nodes/ChunkNode.js").ChunkNode | import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./nodes/SubGraphNode.js").SubGraphNode | import("./nodes/ArrayNode.js").ArrayNode | import("./nodes/ExtractJsonNode.js").ExtractJsonNode | import("./nodes/AssemblePromptNode.js").AssemblePromptNode | import("./nodes/ExtractYamlNode.js").ExtractYamlNode | import("./nodes/LoopControllerNode.js").LoopControllerNode | import("./nodes/TrimChatMessagesNode.js").TrimChatMessagesNode | import("./nodes/ExternalCallNode.js").ExternalCallNode | import("./nodes/ExtractObjectPathNode.js").ExtractObjectPathNode | import("./nodes/RaiseEventNode.js").RaiseEventNode | import("./nodes/ContextNode.js").ContextNode | import("./nodes/CoalesceNode.js").CoalesceNode | import("./nodes/DidRunNode.js").DidRunNode | import("./nodes/PassthroughNode.js").PassthroughNode | import("./nodes/PopNode.js").PopNode | import("./nodes/SetGlobalNode.js").SetGlobalNode | import("./nodes/GetGlobalNode.js").GetGlobalNode | import("./nodes/WaitForEventNode.js").WaitForEventNode | import("./nodes/ToolNode.js").GptFunctionNode | import("./nodes/ToYamlNode.js").ToYamlNode | import("./nodes/GetEmbeddingNode.js").GetEmbeddingNode | import("./nodes/VectorStoreNode.js").VectorStoreNode | import("./nodes/VectorNearestNeighborsNode.js").VectorNearestNeighborsNode | import("./nodes/HashNode.js").HashNode | import("./nodes/AbortGraphNode.js").AbortGraphNode | import("./nodes/RaceInputsNode.js").RaceInputsNode | import("./nodes/ToJsonNode.js").ToJsonNode | import("./nodes/JoinNode.js").JoinNode | import("./nodes/FilterNode.js").FilterNode | import("./nodes/JSFilterNode.js").JSFilterNode | import("./nodes/JSMapNode.js").JSMapNode | import("./nodes/ObjectNode.js").ObjectNode | import("./nodes/BooleanNode.js").BooleanNode | import("./nodes/CompareNode.js").CompareNode | import("./nodes/EvaluateNode.js").EvaluateNode | import("./nodes/NumberNode.js").NumberNode | import("./nodes/RandomNumberNode.js").RandomNumberNode | import("./nodes/ShuffleNode.js").ShuffleNode | import("./nodes/CommentNode.js").CommentNode | import("./nodes/ImageNode.js").ImageNode | import("./nodes/AudioNode.js").AudioNode | import("./nodes/HttpCallNode.js").HttpCallNode | import("./nodes/DelayNode.js").DelayNode | import("./nodes/AppendToDatasetNode.js").AppendToDatasetNode | import("./nodes/CreateDatasetNode.js").CreateDatasetNode | import("./nodes/LoadDatasetNode.js").LoadDatasetNode | import("./nodes/GetAllDatasetsNode.js").GetAllDatasetsNode | import("./nodes/SplitNode.js").SplitNode | import("./nodes/DatasetNearestNeigborsNode.js").DatasetNearestNeighborsNode | import("./nodes/GetDatasetRowNode.js").GetDatasetRowNode | import("./nodes/SliceNode.js").SliceNode | import("./nodes/ExtractMarkdownCodeBlocksNode.js").ExtractMarkdownCodeBlocksNode | import("./nodes/AssembleMessageNode.js").AssembleMessageNode | import("./nodes/URLReferenceNode.js").UrlReferenceNode | import("./nodes/DestructureNode.js").DestructureNode | import("./nodes/ReplaceDatasetNode.js").ReplaceDatasetNode | import("./nodes/ListGraphsNode.js").ListGraphsNode | import("./nodes/GraphReferenceNode.js").GraphReferenceNode | import("./nodes/CallGraphNode.js").CallGraphNode | import("./nodes/DelegateFunctionCallNode.js").DelegateFunctionCallNode | import("./nodes/PlayAudioNode.js").PlayAudioNode | import("./nodes/DocumentNode.js").DocumentNode | import("./nodes/ChatLoopNode.js").ChatLoopNode | import("./nodes/ReadAllFilesNode.js").ReadAllFilesNode | import("./nodes/ToMarkdownTableNode.js").ToMarkdownTableNode | import("./nodes/CronNode.js").CronNode | import("./nodes/ToTreeNode.js").ToTreeNode | import("./nodes/LoopUntilNode.js").LoopUntilNode | (import("./NodeBase.js").NodeBase & {
|
|
96
97
|
type: "mcpDiscovery";
|
|
97
98
|
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
98
99
|
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
@@ -6,4 +6,7 @@ export type AiSdkStreamResult = {
|
|
|
6
6
|
usage: LanguageModelUsage | undefined;
|
|
7
7
|
reasoning: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type ConsumeAiSdkStreamOptions = {
|
|
10
|
+
dedupeDuplicateTextBlocks?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function consumeAiSdkStream(fullStream: AsyncIterable<TextStreamPart<ToolSet>>, onPartialOutputs: (text: string, functionCalls: StreamedFunctionCall[]) => void, options?: ConsumeAiSdkStreamOptions): Promise<AiSdkStreamResult>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ChatV2StructuredResponseFormat } from './chatV2ResponseFormat.js';
|
|
2
2
|
import type { LLMChatV2NodeData } from './llmChatV2NodeData.js';
|
|
3
|
-
export type LLMChatV2StructuredResponseFormat =
|
|
3
|
+
export type LLMChatV2StructuredResponseFormat = ChatV2StructuredResponseFormat;
|
|
4
4
|
export declare const LLM_CHAT_V2_TOOL_RESPONSE_FORMAT_CONFLICT_COPY: {
|
|
5
5
|
readonly title: "\"Tool use\" conflicts with \"Structured outputs\"";
|
|
6
6
|
readonly paragraphs: readonly ["\"Tool use\" and \"Structured outputs\" cannot be used at the same time.", "Use \"Tool use\" with Default/Text response format, or turn \"Tool use\" off before choosing JSON/JSON schema."];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Inputs } from '../GraphProcessor.js';
|
|
2
2
|
import type { ChatV2Provider, ChatV2ProviderOptions, ChatV2ResponseOutput } from './chatV2Types.js';
|
|
3
3
|
export type ChatV2ResponseFormat = '' | 'text' | 'json' | 'json_schema';
|
|
4
|
+
export type ChatV2StructuredResponseFormat = Extract<ChatV2ResponseFormat, 'json' | 'json_schema'>;
|
|
4
5
|
export type ChatV2ResponseFormatData = {
|
|
5
6
|
responseFormat?: ChatV2ResponseFormat;
|
|
6
7
|
responseSchemaName?: string;
|
|
@@ -20,6 +21,7 @@ export type ChatV2ResponseFormatParameters = undefined | {
|
|
|
20
21
|
schemaName: string;
|
|
21
22
|
schemaDescription?: string;
|
|
22
23
|
};
|
|
24
|
+
export declare function isChatV2StructuredResponseFormat(responseFormat: unknown): responseFormat is ChatV2StructuredResponseFormat;
|
|
23
25
|
export declare function resolveChatV2ResponseFormatParameters(data: ChatV2ResponseFormatData, inputs: Inputs): ChatV2ResponseFormatParameters;
|
|
24
26
|
export declare function createChatV2ResponseOutput(parameters: ChatV2ResponseFormatParameters): ChatV2ResponseOutput | undefined;
|
|
25
27
|
export declare function mergeCustomProviderResponseFormatOptions(provider: ChatV2Provider, providerOptions: ChatV2ProviderOptions | undefined, parameters: ChatV2ResponseFormatParameters): ChatV2ProviderOptions | undefined;
|
|
@@ -13,6 +13,7 @@ export type ChatV2ToolChoice = StreamTextArgs['toolChoice'];
|
|
|
13
13
|
export type ChatV2ResponseOutput = StreamTextArgs['output'];
|
|
14
14
|
export type ChatV2MessageList = ModelMessage[];
|
|
15
15
|
export type ChatV2StreamPart = TextStreamPart<ToolSet>;
|
|
16
|
+
export type ChatV2ResponseFormatMode = 'text' | 'json' | 'json_schema';
|
|
16
17
|
export type ChatV2ProviderMetadata = Record<string, Record<string, unknown>>;
|
|
17
18
|
export type ChatV2ReasoningOutput = string | string[];
|
|
18
19
|
export type ChatV2NormalizedUsage = {
|
|
@@ -26,6 +27,7 @@ export type ChatV2NormalizedUsage = {
|
|
|
26
27
|
export type ChatV2StreamHandle = {
|
|
27
28
|
fullStream: AsyncIterable<ChatV2StreamPart>;
|
|
28
29
|
finishReason?: MaybePromiseLike<string | undefined> | undefined;
|
|
30
|
+
output?: MaybePromiseLike<unknown> | undefined;
|
|
29
31
|
providerMetadata?: MaybePromiseLike<ChatV2ProviderMetadata | undefined> | undefined;
|
|
30
32
|
requestStatus?: MaybePromiseLike<number | undefined> | undefined;
|
|
31
33
|
usage?: MaybePromiseLike<LanguageModelUsage | undefined> | undefined;
|
|
@@ -44,6 +46,7 @@ export type StreamChatV2Options = {
|
|
|
44
46
|
stopSequences?: string[] | undefined;
|
|
45
47
|
seed?: number | undefined;
|
|
46
48
|
responseOutput?: ChatV2ResponseOutput | undefined;
|
|
49
|
+
responseFormat?: ChatV2ResponseFormatMode | undefined;
|
|
47
50
|
providerOptions?: ChatV2ProviderOptions | undefined;
|
|
48
51
|
toolChoice?: ChatV2ToolChoice | undefined;
|
|
49
52
|
abortSignal?: AbortSignal | undefined;
|
|
@@ -55,6 +58,7 @@ export type StreamChatV2Options = {
|
|
|
55
58
|
};
|
|
56
59
|
export type StreamChatV2Result = {
|
|
57
60
|
responseText: string;
|
|
61
|
+
structuredOutput: unknown | undefined;
|
|
58
62
|
functionCalls: StreamedFunctionCall[];
|
|
59
63
|
usage: LanguageModelUsage | undefined;
|
|
60
64
|
reasoning: string;
|
|
@@ -79,6 +83,7 @@ export type RunChatV2PipelineOptions = {
|
|
|
79
83
|
stopSequences?: string[] | undefined;
|
|
80
84
|
seed?: number | undefined;
|
|
81
85
|
responseOutput?: ChatV2ResponseOutput | undefined;
|
|
86
|
+
responseFormat?: ChatV2ResponseFormatMode | undefined;
|
|
82
87
|
providerOptions?: ChatV2ProviderOptions | undefined;
|
|
83
88
|
toolChoice?: ChatV2ToolChoice | undefined;
|
|
84
89
|
anthropicCacheControlTtl?: '5m' | '1h' | undefined;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
2
2
|
import { type ChartNode, type NodeConnection, type NodeInputDefinition, type NodeOutputDefinition } from '../NodeBase.js';
|
|
3
3
|
import { type Inputs, type Outputs } from '../GraphProcessor.js';
|
|
4
|
+
import { type EditorDefinition } from '../EditorDefinition.js';
|
|
4
5
|
export type CoalesceNode = ChartNode<'coalesce', CoalesceNodeData>;
|
|
5
|
-
export type CoalesceNodeData = {
|
|
6
|
+
export type CoalesceNodeData = {
|
|
7
|
+
ignoreNull?: boolean;
|
|
8
|
+
ignoreUndefined?: boolean;
|
|
9
|
+
};
|
|
6
10
|
export declare class CoalesceNodeImpl extends NodeImpl<CoalesceNode> {
|
|
7
11
|
#private;
|
|
8
12
|
static create: () => CoalesceNode;
|
|
9
13
|
getInputDefinitions(connections: NodeConnection[]): NodeInputDefinition[];
|
|
10
14
|
getOutputDefinitions(): NodeOutputDefinition[];
|
|
15
|
+
getEditors(): EditorDefinition<CoalesceNode>[];
|
|
16
|
+
getBody(): string | undefined;
|
|
11
17
|
static getUIData(): NodeUIData;
|
|
12
18
|
process(inputData: Inputs): Promise<Outputs>;
|
|
13
19
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ChartNode, type NodeConnection, type NodeInputDefinition, type NodeOutputDefinition } from '../NodeBase.js';
|
|
2
|
+
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
3
|
+
import { type Inputs, type Outputs } from '../GraphProcessor.js';
|
|
4
|
+
export type DidRunNode = ChartNode<'didRun', DidRunNodeData>;
|
|
5
|
+
export type DidRunNodeData = {};
|
|
6
|
+
export declare class DidRunNodeImpl extends NodeImpl<DidRunNode> {
|
|
7
|
+
#private;
|
|
8
|
+
static create(): DidRunNode;
|
|
9
|
+
getInputDefinitions(connections: NodeConnection[]): NodeInputDefinition[];
|
|
10
|
+
getOutputDefinitions(): NodeOutputDefinition[];
|
|
11
|
+
static getUIData(): NodeUIData;
|
|
12
|
+
getBody(): string;
|
|
13
|
+
process(inputData: Inputs): Promise<Outputs>;
|
|
14
|
+
}
|
|
15
|
+
export declare const didRunNode: import("../NodeDefinition.js").NodeDefinition<DidRunNode>;
|