@valerypopoff/rivet2-core 2.0.1 → 2.0.3
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 +761 -396
- 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/SubprocessorBridge.js +29 -19
- 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 +49 -13
- package/dist/esm/model/chat-v2/chatV2ResponseFormat.js +74 -1
- package/dist/esm/model/chat-v2/llmChatV2NodeRuntime.js +3 -2
- package/dist/esm/model/chat-v2/toolContinuation.js +4 -1
- package/dist/esm/model/nodes/CodeNode.js +8 -8
- package/dist/esm/model/nodes/ContextNode.js +19 -8
- 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/plugins/gentrace/plugin.js +4 -3
- 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 +4 -1
- package/dist/types/model/chat-v2/chatV2Types.d.ts +5 -0
- package/dist/types/model/nodes/DidRunNode.d.ts +15 -0
- package/dist/types/plugins/gentrace/plugin.d.ts +2 -1
- package/package.json +1 -1
|
@@ -109,35 +109,35 @@ export class CodeNodeImpl extends NodeImpl {
|
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
type: 'group',
|
|
112
|
-
label: 'Runtime
|
|
112
|
+
label: 'Runtime permissions',
|
|
113
113
|
defaultOpen: true,
|
|
114
114
|
editors: [
|
|
115
115
|
{
|
|
116
116
|
type: 'toggle',
|
|
117
|
-
label: 'fetch',
|
|
117
|
+
label: 'Allow "fetch"',
|
|
118
118
|
dataKey: 'allowFetch',
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
type: 'toggle',
|
|
122
|
-
label: 'Rivet',
|
|
122
|
+
label: 'Allow "Rivet"',
|
|
123
123
|
dataKey: 'allowRivet',
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
type: 'toggle',
|
|
127
|
-
label: 'console',
|
|
127
|
+
label: 'Allow "console"',
|
|
128
128
|
dataKey: 'allowConsole',
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
type: 'toggle',
|
|
132
|
-
label: 'require',
|
|
132
|
+
label: 'Allow "require"',
|
|
133
133
|
dataKey: 'allowRequire',
|
|
134
|
-
helperMessage: '
|
|
134
|
+
helperMessage: 'Only available with the Node executor',
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
type: 'toggle',
|
|
138
|
-
label: 'process',
|
|
138
|
+
label: 'Allow "process"',
|
|
139
139
|
dataKey: 'allowProcess',
|
|
140
|
-
helperMessage: '
|
|
140
|
+
helperMessage: 'Only available with the Node executor',
|
|
141
141
|
},
|
|
142
142
|
],
|
|
143
143
|
},
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {} from '../NodeBase.js';
|
|
2
2
|
import { nanoid } from 'nanoid/non-secure';
|
|
3
3
|
import { NodeImpl } from '../NodeImpl.js';
|
|
4
|
-
import {} from '../DataValue.js';
|
|
4
|
+
import { getDefaultValue } from '../DataValue.js';
|
|
5
5
|
import {} from '../GraphProcessor.js';
|
|
6
6
|
import {} from '../ProcessContext.js';
|
|
7
7
|
import { dedent } from 'ts-dedent';
|
|
8
8
|
import {} from '../EditorDefinition.js';
|
|
9
9
|
import {} from '../NodeBodySpec.js';
|
|
10
10
|
import { nodeDefinition } from '../NodeDefinition.js';
|
|
11
|
+
import { coerceTypeOptional, inferType } from '../../utils/coerceType.js';
|
|
11
12
|
export class ContextNodeImpl extends NodeImpl {
|
|
12
13
|
static create() {
|
|
13
14
|
const chartNode = {
|
|
@@ -78,21 +79,31 @@ export class ContextNodeImpl extends NodeImpl {
|
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
81
|
async process(inputs, context) {
|
|
81
|
-
const contextValue = context.contextValues[this.data.id]
|
|
82
|
-
|
|
82
|
+
const contextValue = context.contextValues?.[this.data.id] == null
|
|
83
|
+
? undefined
|
|
84
|
+
: coerceTypeOptional(context.contextValues[this.data.id], this.data.dataType);
|
|
85
|
+
if (contextValue != null) {
|
|
83
86
|
return {
|
|
84
|
-
['data']:
|
|
87
|
+
['data']: {
|
|
88
|
+
type: this.data.dataType,
|
|
89
|
+
value: contextValue,
|
|
90
|
+
},
|
|
85
91
|
};
|
|
86
92
|
}
|
|
87
93
|
let defaultValue;
|
|
88
94
|
if (this.data.useDefaultValueInput) {
|
|
89
|
-
|
|
95
|
+
const defaultInputValue = inputs['default'];
|
|
96
|
+
defaultValue = defaultInputValue == null ? undefined : coerceTypeOptional(defaultInputValue, this.data.dataType);
|
|
90
97
|
}
|
|
91
|
-
|
|
92
|
-
defaultValue =
|
|
98
|
+
if (defaultValue == null) {
|
|
99
|
+
defaultValue =
|
|
100
|
+
coerceTypeOptional(inferType(this.data.defaultValue), this.data.dataType) ?? getDefaultValue(this.data.dataType);
|
|
93
101
|
}
|
|
94
102
|
return {
|
|
95
|
-
['data']:
|
|
103
|
+
['data']: {
|
|
104
|
+
type: this.data.dataType,
|
|
105
|
+
value: defaultValue,
|
|
106
|
+
},
|
|
96
107
|
};
|
|
97
108
|
}
|
|
98
109
|
}
|
|
@@ -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',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Pipeline, StepRun, init, runTest, getPipelines } from '@gentrace/core';
|
|
2
2
|
import { globalRivetNodeRegistry } from '../../model/Nodes.js';
|
|
3
|
-
import { mapValues } from 'lodash-es';
|
|
3
|
+
import { cloneDeep, mapValues } from 'lodash-es';
|
|
4
4
|
import { GptTokenizerTokenizer } from '../../integrations/GptTokenizerTokenizer.js';
|
|
5
5
|
import { ExecutionRecorder } from '../../recording/ExecutionRecorder.js';
|
|
6
6
|
import { inferType } from '../../utils/coerceType.js';
|
|
@@ -18,7 +18,7 @@ function initializeGentrace(gentraceApiKey) {
|
|
|
18
18
|
apiKey: gentraceApiKey,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
export const runGentraceTests = async (gentracePipelineSlug, settings, project, graph, nativeApi) => {
|
|
21
|
+
export const runGentraceTests = async (gentracePipelineSlug, settings, project, graph, nativeApi, contextValues = {}) => {
|
|
22
22
|
const gentraceApiKey = settings.pluginSettings?.gentrace?.gentraceApiKey;
|
|
23
23
|
if (!gentraceApiKey) {
|
|
24
24
|
throw new Error('Gentrace API key not set.');
|
|
@@ -45,11 +45,12 @@ export const runGentraceTests = async (gentracePipelineSlug, settings, project,
|
|
|
45
45
|
const processor = new GraphProcessor(tempProject, graphId, globalRivetNodeRegistry);
|
|
46
46
|
processor.executor = 'browser';
|
|
47
47
|
recorder.record(processor);
|
|
48
|
+
const runContextValues = cloneDeep(contextValues);
|
|
48
49
|
await processor.processGraph({
|
|
49
50
|
settings,
|
|
50
51
|
nativeApi,
|
|
51
52
|
tokenizer: new GptTokenizerTokenizer(),
|
|
52
|
-
}, rivetFormattedInputs);
|
|
53
|
+
}, rivetFormattedInputs, runContextValues);
|
|
53
54
|
const fullRecording = recorder.getRecording();
|
|
54
55
|
const stepRuns = convertRecordingToStepRuns(fullRecording, project, graphId);
|
|
55
56
|
for (const stepRun of stepRuns) {
|
|
@@ -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
|
-
import type { ChatV2ResponseOutput } from './chatV2Types.js';
|
|
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,5 +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;
|
|
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;
|
|
@@ -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>;
|
|
@@ -4,7 +4,8 @@ import type { NativeApi } from '../../native/NativeApi.js';
|
|
|
4
4
|
import type { Recording } from '../../recording/RecordedEvents.js';
|
|
5
5
|
import type { RivetPlugin } from '../../model/RivetPlugin.js';
|
|
6
6
|
import type { Settings } from '../../model/Settings.js';
|
|
7
|
-
|
|
7
|
+
import type { DataValue } from '../../model/DataValue.js';
|
|
8
|
+
export declare const runGentraceTests: (gentracePipelineSlug: string, settings: Settings, project: Omit<Project, "data">, graph: NodeGraph, nativeApi: NativeApi, contextValues?: Record<string, DataValue>) => Promise<import("@gentrace/core").TestResultPost200Response>;
|
|
8
9
|
export declare const runRemoteGentraceTests: (gentracePipelineSlug: string, settings: Settings, project: Omit<Project, "data">, graph: NodeGraph, runAndRecord: (testCase: Record<string, any>) => Promise<Recording>) => Promise<import("@gentrace/core").TestResultPost200Response>;
|
|
9
10
|
export declare const getGentracePipelines: (gentraceApiKey: string) => Promise<import("@gentrace/core/dist/models/pipelines-get200-response-pipelines-inner.js").PipelinesGet200ResponsePipelinesInner[]>;
|
|
10
11
|
export declare const gentracePlugin: RivetPlugin;
|