@alpic80/rivet-core 1.24.0-aidon.5 → 1.24.2-aidon.10
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 +9 -6
- package/dist/cjs/bundle.cjs +1534 -278
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/esm/api/createProcessor.js +2 -0
- package/dist/esm/api/streaming.js +48 -2
- package/dist/esm/exports.js +1 -0
- package/dist/esm/integrations/CodeRunner.js +10 -2
- package/dist/esm/integrations/mcp/MCPBase.js +100 -0
- package/dist/esm/integrations/mcp/MCPProvider.js +23 -0
- package/dist/esm/integrations/mcp/MCPUtils.js +33 -0
- package/dist/esm/model/GraphProcessor.js +7 -1
- package/dist/esm/model/NodeRegistration.js +0 -1
- package/dist/esm/model/Nodes.js +9 -0
- package/dist/esm/model/nodes/ChatNodeBase.js +1 -1
- package/dist/esm/model/nodes/CodeNode.js +1 -1
- package/dist/esm/model/nodes/GetAllDatasetsNode.js +1 -1
- package/dist/esm/model/nodes/GraphInputNode.js +2 -0
- package/dist/esm/model/nodes/HttpCallNode.js +2 -2
- package/dist/esm/model/nodes/MCPDiscoveryNode.js +239 -0
- package/dist/esm/model/nodes/MCPGetPromptNode.js +262 -0
- package/dist/esm/model/nodes/MCPToolCallNode.js +290 -0
- package/dist/esm/model/nodes/ObjectNode.js +42 -21
- package/dist/esm/model/nodes/PromptNode.js +1 -1
- package/dist/esm/model/nodes/SubGraphNode.js +1 -0
- package/dist/esm/model/nodes/TextNode.js +13 -2
- package/dist/esm/plugins/aidon/nodes/ChatAidonNode.js +7 -5
- package/dist/esm/plugins/aidon/plugin.js +15 -0
- package/dist/esm/plugins/anthropic/anthropic.js +22 -3
- package/dist/esm/plugins/anthropic/nodes/ChatAnthropicNode.js +33 -3
- package/dist/esm/plugins/google/google.js +29 -14
- package/dist/esm/plugins/google/nodes/ChatGoogleNode.js +70 -5
- package/dist/esm/plugins/huggingface/nodes/ChatHuggingFace.js +4 -2
- package/dist/esm/plugins/huggingface/nodes/TextToImageHuggingFace.js +5 -3
- package/dist/esm/utils/interpolation.js +155 -17
- package/dist/esm/utils/openai.js +24 -0
- package/dist/types/api/createProcessor.d.ts +3 -2
- package/dist/types/api/streaming.d.ts +7 -1
- package/dist/types/exports.d.ts +1 -0
- package/dist/types/integrations/CodeRunner.d.ts +4 -3
- package/dist/types/integrations/mcp/MCPBase.d.ts +20 -0
- package/dist/types/integrations/mcp/MCPProvider.d.ts +153 -0
- package/dist/types/integrations/mcp/MCPUtils.d.ts +9 -0
- package/dist/types/model/GraphProcessor.d.ts +5 -1
- package/dist/types/model/Nodes.d.ts +13 -2
- package/dist/types/model/ProcessContext.d.ts +5 -1
- package/dist/types/model/Project.d.ts +2 -0
- package/dist/types/model/nodes/GetAllDatasetsNode.d.ts +2 -2
- package/dist/types/model/nodes/MCPDiscoveryNode.d.ts +9 -0
- package/dist/types/model/nodes/MCPGetPromptNode.d.ts +23 -0
- package/dist/types/model/nodes/MCPToolCallNode.d.ts +26 -0
- package/dist/types/model/nodes/ObjectNode.d.ts +3 -2
- package/dist/types/model/nodes/TextNode.d.ts +2 -1
- package/dist/types/plugins/anthropic/anthropic.d.ts +21 -3
- package/dist/types/plugins/anthropic/nodes/ChatAnthropicNode.d.ts +5 -0
- package/dist/types/plugins/google/google.d.ts +12 -2
- package/dist/types/plugins/google/nodes/ChatGoogleNode.d.ts +7 -0
- package/dist/types/utils/interpolation.d.ts +6 -1
- package/dist/types/utils/openai.d.ts +24 -0
- package/package.json +7 -7
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derived from types here - https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/types.ts
|
|
3
|
+
*/
|
|
4
|
+
export declare namespace MCP {
|
|
5
|
+
export type TransportType = 'stdio' | 'http';
|
|
6
|
+
export interface ServerConfig {
|
|
7
|
+
command: string;
|
|
8
|
+
args?: string[];
|
|
9
|
+
env?: Record<string, string>;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
alwaysAllow?: string[];
|
|
12
|
+
}
|
|
13
|
+
export type ServerConfigWithId = {
|
|
14
|
+
config: ServerConfig;
|
|
15
|
+
serverId: string;
|
|
16
|
+
};
|
|
17
|
+
export interface Config {
|
|
18
|
+
mcpServers: Record<string, ServerConfig>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Tools
|
|
22
|
+
*/
|
|
23
|
+
interface ToolAnnotations {
|
|
24
|
+
title?: string;
|
|
25
|
+
readOnlyHint?: boolean;
|
|
26
|
+
destructiveHint?: boolean;
|
|
27
|
+
idempotentHint?: boolean;
|
|
28
|
+
openWorldHint?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface Tool {
|
|
31
|
+
name: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
inputSchema: {
|
|
34
|
+
[x: string]: unknown;
|
|
35
|
+
};
|
|
36
|
+
annotations?: ToolAnnotations;
|
|
37
|
+
}
|
|
38
|
+
export interface ToolCallRequest {
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
name: string;
|
|
41
|
+
arguments?: {
|
|
42
|
+
[x: string]: unknown;
|
|
43
|
+
};
|
|
44
|
+
id?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ToolCallResponse {
|
|
47
|
+
content: ResponseContent[];
|
|
48
|
+
isError?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Prompts
|
|
52
|
+
*/
|
|
53
|
+
interface PromptArgument {
|
|
54
|
+
name: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
required?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface Prompt {
|
|
59
|
+
name: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
arugments?: PromptArgument[];
|
|
62
|
+
}
|
|
63
|
+
export interface GetPromptRequest {
|
|
64
|
+
[x: string]: unknown;
|
|
65
|
+
name: string;
|
|
66
|
+
arguments?: {
|
|
67
|
+
[x: string]: string;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export interface PromptMessage {
|
|
71
|
+
role: 'user' | 'assistant';
|
|
72
|
+
content: ResponseContent;
|
|
73
|
+
}
|
|
74
|
+
export interface GetPromptResponse {
|
|
75
|
+
messages: PromptMessage[];
|
|
76
|
+
description?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Content
|
|
80
|
+
*/
|
|
81
|
+
interface BaseContent {
|
|
82
|
+
type: 'text' | 'image' | 'audio';
|
|
83
|
+
}
|
|
84
|
+
interface TextContent extends BaseContent {
|
|
85
|
+
type: 'text';
|
|
86
|
+
text: string;
|
|
87
|
+
}
|
|
88
|
+
interface ImageContent extends BaseContent {
|
|
89
|
+
type: 'image';
|
|
90
|
+
data: string;
|
|
91
|
+
mimeType: string;
|
|
92
|
+
}
|
|
93
|
+
interface AudioContent extends BaseContent {
|
|
94
|
+
type: 'audio';
|
|
95
|
+
data: string;
|
|
96
|
+
mimeType: string;
|
|
97
|
+
}
|
|
98
|
+
type ResponseContent = TextContent | ImageContent | AudioContent | {
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
};
|
|
101
|
+
export {};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Errors
|
|
105
|
+
*/
|
|
106
|
+
export declare enum MCPErrorType {
|
|
107
|
+
CONFIG_NOT_FOUND = "CONFIG_NOT_FOUND",
|
|
108
|
+
SERVER_NOT_FOUND = "SERVER_NOT_FOUND",
|
|
109
|
+
SERVER_COMMUNICATION_FAILED = "SERVER_COMMUNICATION_FAILED",
|
|
110
|
+
INVALID_SCHEMA = "INVALID_SCHEMA"
|
|
111
|
+
}
|
|
112
|
+
export declare class MCPError extends Error {
|
|
113
|
+
type: MCPErrorType;
|
|
114
|
+
details?: unknown | undefined;
|
|
115
|
+
constructor(type: MCPErrorType, message: string, details?: unknown | undefined);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* MCP Provider for Node Implementation
|
|
119
|
+
*/
|
|
120
|
+
export interface MCPProvider {
|
|
121
|
+
getHTTPTools(clientConfig: {
|
|
122
|
+
name: string;
|
|
123
|
+
version: string;
|
|
124
|
+
}, serverUrl: string, headers: Record<string, string> | undefined): Promise<MCP.Tool[]>;
|
|
125
|
+
getStdioTools(clientConfig: {
|
|
126
|
+
name: string;
|
|
127
|
+
version: string;
|
|
128
|
+
}, serverConfig: MCP.ServerConfigWithId): Promise<MCP.Tool[]>;
|
|
129
|
+
getHTTPrompts(clientConfig: {
|
|
130
|
+
name: string;
|
|
131
|
+
version: string;
|
|
132
|
+
}, serverUrl: string, headers: Record<string, string> | undefined): Promise<MCP.Prompt[]>;
|
|
133
|
+
getStdioPrompts(clientConfig: {
|
|
134
|
+
name: string;
|
|
135
|
+
version: string;
|
|
136
|
+
}, serverConfig: MCP.ServerConfigWithId): Promise<MCP.Prompt[]>;
|
|
137
|
+
httpToolCall(clientConfig: {
|
|
138
|
+
name: string;
|
|
139
|
+
version: string;
|
|
140
|
+
}, serverUrl: string, headers: Record<string, string> | undefined, toolCall: MCP.ToolCallRequest): Promise<MCP.ToolCallResponse>;
|
|
141
|
+
stdioToolCall(clientConfig: {
|
|
142
|
+
name: string;
|
|
143
|
+
version: string;
|
|
144
|
+
}, serverConfig: MCP.ServerConfigWithId, toolCall: MCP.ToolCallRequest): Promise<MCP.ToolCallResponse>;
|
|
145
|
+
getHTTPrompt(clientConfig: {
|
|
146
|
+
name: string;
|
|
147
|
+
version: string;
|
|
148
|
+
}, serverUrl: string, headers: Record<string, string> | undefined, getPromptRequest: MCP.GetPromptRequest): Promise<MCP.GetPromptResponse>;
|
|
149
|
+
getStdioPrompt(clientConfig: {
|
|
150
|
+
name: string;
|
|
151
|
+
version: string;
|
|
152
|
+
}, serverConfig: MCP.ServerConfigWithId, getPromptRequest: MCP.GetPromptRequest): Promise<MCP.GetPromptResponse>;
|
|
153
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InternalProcessContext } from '../../model/ProcessContext.js';
|
|
2
|
+
import type { RivetUIContext } from '../../model/RivetUIContext.js';
|
|
3
|
+
import { type MCP } from './MCPProvider.js';
|
|
4
|
+
export declare const loadMCPConfiguration: (context: InternalProcessContext | RivetUIContext) => Promise<MCP.Config>;
|
|
5
|
+
export declare const getServerOptions: (context: RivetUIContext) => Promise<{
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[]>;
|
|
9
|
+
export declare const getServerHelperMessage: (context: RivetUIContext, optionsLength: number) => string;
|
|
@@ -126,6 +126,10 @@ export type ProcessEvent = {
|
|
|
126
126
|
}[keyof ProcessEvents];
|
|
127
127
|
export type GraphOutputs = Record<string, DataValue>;
|
|
128
128
|
export type GraphInputs = Record<string, DataValue>;
|
|
129
|
+
export type GraphEvents = {
|
|
130
|
+
name: string;
|
|
131
|
+
message: string;
|
|
132
|
+
};
|
|
129
133
|
export type NodeResults = Map<NodeId, Outputs>;
|
|
130
134
|
export type Inputs = Record<PortId, DataValue | undefined>;
|
|
131
135
|
export type Outputs = Record<PortId, DataValue | undefined>;
|
|
@@ -166,7 +170,7 @@ export declare class GraphProcessor {
|
|
|
166
170
|
recordingPlaybackChatLatency: number;
|
|
167
171
|
warnOnInvalidGraph: boolean;
|
|
168
172
|
get isRunning(): boolean;
|
|
169
|
-
constructor(project: Project, graphId?: GraphId, registry?: NodeRegistration, includeTrace?: boolean);
|
|
173
|
+
constructor(project: Project, graphId?: GraphId, registry?: NodeRegistration<any, any>, includeTrace?: boolean);
|
|
170
174
|
on: Emittery<ProcessEvents>["on"];
|
|
171
175
|
off: Emittery<ProcessEvents>["off"];
|
|
172
176
|
once: Emittery<ProcessEvents>["once"];
|
|
@@ -81,9 +81,20 @@ export * from './nodes/ToMarkdownTableNode.js';
|
|
|
81
81
|
export * from './nodes/CronNode.js';
|
|
82
82
|
export * from './nodes/ToTreeNode.js';
|
|
83
83
|
export * from './nodes/LoopUntilNode.js';
|
|
84
|
+
export * from './nodes/MCPDiscoveryNode.js';
|
|
85
|
+
export * from './nodes/MCPToolCallNode.js';
|
|
86
|
+
export * from './nodes/MCPGetPromptNode.js';
|
|
84
87
|
export * from './nodes/ReferencedGraphAliasNode.js';
|
|
85
|
-
export declare const registerBuiltInNodes: (registry: NodeRegistration) => NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "code" | "
|
|
86
|
-
|
|
88
|
+
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" | "chat" | "extractRegex" | "readDirectory" | "readFile" | "writeFile" | "ifElse" | "chunk" | "graphInput" | "graphOutput" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "setGlobal" | "raiseEvent" | "getGlobal" | "abortGraph" | "extractObjectPath" | "coalesce" | "passthrough" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "hash" | "raceInputs" | "toJson" | "compare" | "evaluate" | "randomNumber" | "shuffle" | "comment" | "imagetoMD" | "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("./nodes/PromptNode.js").PromptNode | import("./nodes/ExtractRegexNode.js").ExtractRegexNode | import("./nodes/CodeNode.js").CodeNode | import("./nodes/MatchNode.js").MatchNode | import("./nodes/IfNode.js").IfNode | import("./nodes/ReadDirectoryNode.js").ReadDirectoryNode | import("./nodes/ReadFileNode.js").ReadFileNode | import("./nodes/WriteFileNode.js").WriteFileNode | 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/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/ImageToMDNode.js").ImageToMDNode | 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 & {
|
|
89
|
+
type: "mcpDiscovery";
|
|
90
|
+
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
91
|
+
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
92
|
+
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode>;
|
|
93
|
+
declare let globalRivetNodeRegistry: NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "code" | "text" | "context" | "array" | "userInput" | "prompt" | "chat" | "extractRegex" | "readDirectory" | "readFile" | "writeFile" | "ifElse" | "chunk" | "graphInput" | "graphOutput" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "setGlobal" | "raiseEvent" | "getGlobal" | "abortGraph" | "extractObjectPath" | "coalesce" | "passthrough" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "hash" | "raceInputs" | "toJson" | "compare" | "evaluate" | "randomNumber" | "shuffle" | "comment" | "imagetoMD" | "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("./nodes/PromptNode.js").PromptNode | import("./nodes/ExtractRegexNode.js").ExtractRegexNode | import("./nodes/CodeNode.js").CodeNode | import("./nodes/MatchNode.js").MatchNode | import("./nodes/IfNode.js").IfNode | import("./nodes/ReadDirectoryNode.js").ReadDirectoryNode | import("./nodes/ReadFileNode.js").ReadFileNode | import("./nodes/WriteFileNode.js").WriteFileNode | 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/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/ImageToMDNode.js").ImageToMDNode | 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 & {
|
|
94
|
+
type: "mcpDiscovery";
|
|
95
|
+
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
96
|
+
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
97
|
+
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode>;
|
|
87
98
|
export { globalRivetNodeRegistry };
|
|
88
99
|
export type BuiltInNodes = typeof globalRivetNodeRegistry.NodesType;
|
|
89
100
|
export type BuiltInNodeType = typeof globalRivetNodeRegistry.NodeTypesType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Opaque } from 'type-fest';
|
|
2
|
-
import { type Settings, type NativeApi, type Project, type DataValue, type ExternalFunction, type Outputs, type GraphId, type GraphProcessor, type ScalarOrArrayDataValue, type DatasetProvider, type ChartNode, type AttachedNodeData, type AudioProvider, type StringArrayDataValue, type ProjectId } from '../index.js';
|
|
2
|
+
import { type Settings, type NativeApi, type Project, type DataValue, type ExternalFunction, type Outputs, type GraphId, type GraphProcessor, type ScalarOrArrayDataValue, type DatasetProvider, type ChartNode, type AttachedNodeData, type AudioProvider, type StringArrayDataValue, type ProjectId, type MCPProvider } from '../index.js';
|
|
3
3
|
import type { Tokenizer } from '../integrations/Tokenizer.js';
|
|
4
4
|
import type { CodeRunner } from '../integrations/CodeRunner.js';
|
|
5
5
|
import type { ProjectReferenceLoader } from './ProjectReferenceLoader.js';
|
|
@@ -8,6 +8,8 @@ export type ProcessContext = {
|
|
|
8
8
|
nativeApi?: NativeApi;
|
|
9
9
|
/** Sets the dataset provider to be used for all dataset node calls. */
|
|
10
10
|
datasetProvider?: DatasetProvider;
|
|
11
|
+
/** Provider for all MCP node functionality */
|
|
12
|
+
mcpProvider?: MCPProvider;
|
|
11
13
|
/** The provider responsible for being able to play audio. Undefined if unsupported in this context. */
|
|
12
14
|
audioProvider?: AudioProvider;
|
|
13
15
|
/** Sets the tokenizer that will be used for all nodes. If unset, the default GptTokenizerTokenizer will be used. */
|
|
@@ -46,6 +48,8 @@ export type InternalProcessContext<T extends ChartNode = ChartNode> = ProcessCon
|
|
|
46
48
|
graphInputs: Record<string, DataValue>;
|
|
47
49
|
/** Outputs from the graph. A GraphOutputNode will set these. */
|
|
48
50
|
graphOutputs: Record<string, DataValue>;
|
|
51
|
+
/** Stores the resolved output values of GraphInput nodes during execution, keyed by the node's data.id. */
|
|
52
|
+
graphInputNodeValues: Record<string, DataValue>;
|
|
49
53
|
/** The tokenizer to use to tokenize all strings.s */
|
|
50
54
|
tokenizer: Tokenizer;
|
|
51
55
|
/** The current node being executed. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Opaque } from 'type-fest';
|
|
2
2
|
import { type GraphId, type NodeGraph } from './NodeGraph.js';
|
|
3
3
|
import { type PluginLoadSpec } from './PluginLoadSpec.js';
|
|
4
|
+
import type { MCP } from '../integrations/mcp/MCPProvider.js';
|
|
4
5
|
export type ProjectId = Opaque<string, 'ProjectId'>;
|
|
5
6
|
export type DataId = Opaque<string, 'DataId'>;
|
|
6
7
|
export type Project = {
|
|
@@ -17,6 +18,7 @@ export type ProjectMetadata = {
|
|
|
17
18
|
description: string;
|
|
18
19
|
mainGraphId?: GraphId;
|
|
19
20
|
path?: string;
|
|
21
|
+
mcpServer?: MCP.Config;
|
|
20
22
|
};
|
|
21
23
|
/** A reference to another project file. Project references cannot be cyclic. */
|
|
22
24
|
export type ProjectReference = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartNode, EditorDefinition, InternalProcessContext, NodeInputDefinition, NodeOutputDefinition, NodeUIData, Outputs } from '../../index.js';
|
|
1
|
+
import type { ChartNode, EditorDefinition, InternalProcessContext, NodeInputDefinition, NodeOutputDefinition, NodeUIData, Outputs, Inputs } from '../../index.js';
|
|
2
2
|
import { NodeImpl } from '../NodeImpl.js';
|
|
3
3
|
export type GetAllDatasetsNode = ChartNode<'getAllDatasets', GetAllDatasetsNodeData>;
|
|
4
4
|
type GetAllDatasetsNodeData = {};
|
|
@@ -8,7 +8,7 @@ export declare class GetAllDatasetsNodeImpl extends NodeImpl<GetAllDatasetsNode>
|
|
|
8
8
|
getOutputDefinitions(): NodeOutputDefinition[];
|
|
9
9
|
static getUIData(): NodeUIData;
|
|
10
10
|
getEditors(): EditorDefinition<GetAllDatasetsNode>[] | Promise<EditorDefinition<GetAllDatasetsNode>[]>;
|
|
11
|
-
process(context: InternalProcessContext): Promise<Outputs>;
|
|
11
|
+
process(_inputs: Inputs, context: InternalProcessContext): Promise<Outputs>;
|
|
12
12
|
}
|
|
13
13
|
export declare const getAllDatasetsNode: import("../NodeDefinition.js").NodeDefinition<GetAllDatasetsNode>;
|
|
14
14
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChartNode } from '../NodeBase.js';
|
|
2
|
+
import { type MCPBaseNodeData } from '../../integrations/mcp/MCPBase.js';
|
|
3
|
+
type MCPDiscoveryNode = ChartNode<'mcpDiscovery', MCPDiscoveryNodeData>;
|
|
4
|
+
export type MCPDiscoveryNodeData = MCPBaseNodeData & {
|
|
5
|
+
useToolsOutput?: boolean;
|
|
6
|
+
usePromptsOutput?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const mcpDiscoveryNode: import("../NodeDefinition.js").NodeDefinition<MCPDiscoveryNode>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ChartNode, 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
|
+
import { type EditorDefinition, type InternalProcessContext } from '../../index.js';
|
|
5
|
+
import { type MCPBaseNodeData } from '../../integrations/mcp/MCPBase.js';
|
|
6
|
+
import type { RivetUIContext } from '../RivetUIContext.js';
|
|
7
|
+
export type MCPGetPromptNode = ChartNode<'mcpGetPrompt', MCPGetPromptNodeData>;
|
|
8
|
+
export type MCPGetPromptNodeData = MCPBaseNodeData & {
|
|
9
|
+
promptName: string;
|
|
10
|
+
promptArguments?: string;
|
|
11
|
+
usePromptNameInput?: boolean;
|
|
12
|
+
usePromptArgumentsInput?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare class MCPGetPromptNodeImpl extends NodeImpl<MCPGetPromptNode> {
|
|
15
|
+
static create(): MCPGetPromptNode;
|
|
16
|
+
getInputDefinitions(): NodeInputDefinition[];
|
|
17
|
+
getOutputDefinitions(): NodeOutputDefinition[];
|
|
18
|
+
getEditors(context: RivetUIContext): Promise<EditorDefinition<MCPGetPromptNode>[]>;
|
|
19
|
+
getBody(context: RivetUIContext): string;
|
|
20
|
+
static getUIData(): NodeUIData;
|
|
21
|
+
process(inputs: Inputs, context: InternalProcessContext): Promise<Outputs>;
|
|
22
|
+
}
|
|
23
|
+
export declare const mcpGetPromptNode: import("../NodeDefinition.js").NodeDefinition<MCPGetPromptNode>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ChartNode, 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
|
+
import { type InternalProcessContext } from '../../index.js';
|
|
5
|
+
import { type MCPBaseNodeData } from '../../integrations/mcp/MCPBase.js';
|
|
6
|
+
import type { RivetUIContext } from '../RivetUIContext.js';
|
|
7
|
+
import { type EditorDefinition } from '../EditorDefinition.js';
|
|
8
|
+
export type MCPToolCallNode = ChartNode<'mcpToolCall', MCPToolCallNodeData>;
|
|
9
|
+
export type MCPToolCallNodeData = MCPBaseNodeData & {
|
|
10
|
+
toolName: string;
|
|
11
|
+
toolArguments?: string;
|
|
12
|
+
toolCallId?: string;
|
|
13
|
+
useToolNameInput?: boolean;
|
|
14
|
+
useToolArgumentsInput?: boolean;
|
|
15
|
+
useToolCallIdInput?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare class MCPToolCallNodeImpl extends NodeImpl<MCPToolCallNode> {
|
|
18
|
+
static create(): MCPToolCallNode;
|
|
19
|
+
getInputDefinitions(): NodeInputDefinition[];
|
|
20
|
+
getOutputDefinitions(): NodeOutputDefinition[];
|
|
21
|
+
getEditors(context: RivetUIContext): Promise<EditorDefinition<MCPToolCallNode>[]>;
|
|
22
|
+
getBody(context: RivetUIContext): string;
|
|
23
|
+
static getUIData(): NodeUIData;
|
|
24
|
+
process(inputs: Inputs, context: InternalProcessContext): Promise<Outputs>;
|
|
25
|
+
}
|
|
26
|
+
export declare const mcpToolCallNode: import("../NodeDefinition.js").NodeDefinition<MCPToolCallNode>;
|
|
@@ -2,6 +2,7 @@ import { type ChartNode, type NodeInputDefinition, type NodeOutputDefinition } f
|
|
|
2
2
|
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
3
3
|
import { type DataValue } from '../DataValue.js';
|
|
4
4
|
import { type EditorDefinition } from '../EditorDefinition.js';
|
|
5
|
+
import type { InternalProcessContext } from '../ProcessContext.js';
|
|
5
6
|
export type ObjectNode = ChartNode<'object', ObjectNodeData>;
|
|
6
7
|
export type ObjectNodeData = {
|
|
7
8
|
jsonTemplate: string;
|
|
@@ -12,7 +13,7 @@ export declare class ObjectNodeImpl extends NodeImpl<ObjectNode> {
|
|
|
12
13
|
getOutputDefinitions(): NodeOutputDefinition[];
|
|
13
14
|
getEditors(): EditorDefinition<ObjectNode>[];
|
|
14
15
|
static getUIData(): NodeUIData;
|
|
15
|
-
interpolate(baseString: string, values: Record<string, any>): string;
|
|
16
|
-
process(inputs: Record<string, DataValue
|
|
16
|
+
interpolate(baseString: string, values: Record<string, any>, graphInputNodeValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>): string;
|
|
17
|
+
process(inputs: Record<string, DataValue>, context: InternalProcessContext): Promise<Record<string, DataValue>>;
|
|
17
18
|
}
|
|
18
19
|
export declare const objectNode: import("../NodeDefinition.js").NodeDefinition<ObjectNode>;
|
|
@@ -5,6 +5,7 @@ import { type EditorDefinition, type NodeBodySpec } from '../../index.js';
|
|
|
5
5
|
export type TextNode = ChartNode<'text', TextNodeData>;
|
|
6
6
|
export type TextNodeData = {
|
|
7
7
|
text: string;
|
|
8
|
+
normalizeLineEndings?: boolean;
|
|
8
9
|
};
|
|
9
10
|
export declare class TextNodeImpl extends NodeImpl<TextNode> {
|
|
10
11
|
static create(): TextNode;
|
|
@@ -12,7 +13,7 @@ export declare class TextNodeImpl extends NodeImpl<TextNode> {
|
|
|
12
13
|
getOutputDefinitions(): NodeOutputDefinition[];
|
|
13
14
|
getEditors(): EditorDefinition<TextNode>[];
|
|
14
15
|
getBody(): string | NodeBodySpec | undefined;
|
|
15
|
-
process(inputs: Record<string, DataValue
|
|
16
|
+
process(inputs: Record<string, DataValue>, context: any): Promise<Record<string, DataValue>>;
|
|
16
17
|
static getUIData(): NodeUIData;
|
|
17
18
|
}
|
|
18
19
|
export declare const textNode: import("../NodeDefinition.js").NodeDefinition<TextNode>;
|
|
@@ -87,6 +87,22 @@ export declare const anthropicModels: {
|
|
|
87
87
|
};
|
|
88
88
|
displayName: string;
|
|
89
89
|
};
|
|
90
|
+
'claude-sonnet-4-20250514': {
|
|
91
|
+
maxTokens: number;
|
|
92
|
+
cost: {
|
|
93
|
+
prompt: number;
|
|
94
|
+
completion: number;
|
|
95
|
+
};
|
|
96
|
+
displayName: string;
|
|
97
|
+
};
|
|
98
|
+
'claude-opus-4-20250514': {
|
|
99
|
+
maxTokens: number;
|
|
100
|
+
cost: {
|
|
101
|
+
prompt: number;
|
|
102
|
+
completion: number;
|
|
103
|
+
};
|
|
104
|
+
displayName: string;
|
|
105
|
+
};
|
|
90
106
|
};
|
|
91
107
|
export type AnthropicModels = keyof typeof anthropicModels;
|
|
92
108
|
export declare const anthropicModelOptions: {
|
|
@@ -161,6 +177,7 @@ export type ChatMessageOptions = {
|
|
|
161
177
|
input_schema: object;
|
|
162
178
|
}[];
|
|
163
179
|
beta?: string;
|
|
180
|
+
additionalHeaders?: Record<string, string>;
|
|
164
181
|
};
|
|
165
182
|
export type ChatCompletionOptions = {
|
|
166
183
|
apiEndpoint: string;
|
|
@@ -174,6 +191,7 @@ export type ChatCompletionOptions = {
|
|
|
174
191
|
top_k?: number;
|
|
175
192
|
signal?: AbortSignal;
|
|
176
193
|
stream?: boolean;
|
|
194
|
+
additionalHeaders?: Record<string, string>;
|
|
177
195
|
};
|
|
178
196
|
export type ChatCompletionChunk = {
|
|
179
197
|
completion: string;
|
|
@@ -287,9 +305,9 @@ export type ChatMessageCitation = {
|
|
|
287
305
|
page_number: number;
|
|
288
306
|
end_page_number: number;
|
|
289
307
|
};
|
|
290
|
-
export declare function streamChatCompletions({ apiEndpoint, apiKey, signal, ...rest }: ChatCompletionOptions): AsyncGenerator<ChatCompletionChunk>;
|
|
291
|
-
export declare function callMessageApi({ apiEndpoint, apiKey, signal, tools, beta, ...rest }: ChatMessageOptions): Promise<ChatMessageResponse>;
|
|
292
|
-
export declare function streamMessageApi({ apiEndpoint, apiKey, signal, beta, ...rest }: ChatMessageOptions): AsyncGenerator<ChatMessageChunk>;
|
|
308
|
+
export declare function streamChatCompletions({ apiEndpoint, apiKey, signal, additionalHeaders, ...rest }: ChatCompletionOptions): AsyncGenerator<ChatCompletionChunk>;
|
|
309
|
+
export declare function callMessageApi({ apiEndpoint, apiKey, signal, tools, beta, additionalHeaders, ...rest }: ChatMessageOptions): Promise<ChatMessageResponse>;
|
|
310
|
+
export declare function streamMessageApi({ apiEndpoint, apiKey, signal, beta, additionalHeaders, ...rest }: ChatMessageOptions): AsyncGenerator<ChatMessageChunk>;
|
|
293
311
|
export declare class AnthropicError extends Error {
|
|
294
312
|
readonly response: Response;
|
|
295
313
|
readonly responseJson: unknown;
|
|
@@ -13,6 +13,10 @@ export type ChatAnthropicNodeConfigData = {
|
|
|
13
13
|
endpoint?: string;
|
|
14
14
|
overrideModel?: string;
|
|
15
15
|
enableCitations?: boolean;
|
|
16
|
+
headers?: {
|
|
17
|
+
key: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
16
20
|
};
|
|
17
21
|
export type ChatAnthropicNodeData = ChatAnthropicNodeConfigData & {
|
|
18
22
|
useModelInput: boolean;
|
|
@@ -25,6 +29,7 @@ export type ChatAnthropicNodeData = ChatAnthropicNodeConfigData & {
|
|
|
25
29
|
useStopInput: boolean;
|
|
26
30
|
useEndpointInput: boolean;
|
|
27
31
|
useOverrideModelInput: boolean;
|
|
32
|
+
useHeadersInput?: boolean;
|
|
28
33
|
/** Given the same set of inputs, return the same output without hitting GPT */
|
|
29
34
|
cache: boolean;
|
|
30
35
|
useAsGraphPartialOutput?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Content, type FunctionCall, type Tool } from '@google/
|
|
1
|
+
import { type Content, type FunctionCall, type Tool } from '@google/genai';
|
|
2
2
|
export type GoogleModelDeprecated = {
|
|
3
3
|
maxTokens: number;
|
|
4
4
|
cost: {
|
|
@@ -27,6 +27,14 @@ export declare const googleModelsDeprecated: {
|
|
|
27
27
|
};
|
|
28
28
|
export type GoogleModelsDeprecated = keyof typeof googleModelsDeprecated;
|
|
29
29
|
export declare const generativeAiGoogleModels: {
|
|
30
|
+
'gemini-2.5-flash-preview-04-17': {
|
|
31
|
+
maxTokens: number;
|
|
32
|
+
cost: {
|
|
33
|
+
prompt: number;
|
|
34
|
+
completion: number;
|
|
35
|
+
};
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
30
38
|
'gemini-2.0-flash-001': {
|
|
31
39
|
maxTokens: number;
|
|
32
40
|
cost: {
|
|
@@ -138,6 +146,8 @@ export type StreamGenerativeAiOptions = {
|
|
|
138
146
|
topK: number | undefined;
|
|
139
147
|
signal?: AbortSignal;
|
|
140
148
|
tools: Tool[] | undefined;
|
|
149
|
+
thinkingBudget?: number;
|
|
150
|
+
additionalHeaders?: Record<string, string>;
|
|
141
151
|
};
|
|
142
|
-
export declare function streamGenerativeAi({ apiKey, model, systemPrompt, prompt, maxOutputTokens, temperature, topP, topK, signal, tools, }: StreamGenerativeAiOptions): AsyncGenerator<ChatCompletionChunk>;
|
|
152
|
+
export declare function streamGenerativeAi({ apiKey, model, systemPrompt, prompt, maxOutputTokens, temperature, topP, topK, signal, tools, thinkingBudget, additionalHeaders, }: StreamGenerativeAiOptions): AsyncGenerator<ChatCompletionChunk>;
|
|
143
153
|
export declare function streamChatCompletions({ project, location, applicationCredentials, model, signal, max_output_tokens, temperature, top_p, top_k, prompt, }: ChatCompletionOptions): AsyncGenerator<ChatCompletionChunk>;
|
|
@@ -8,6 +8,11 @@ export type ChatGoogleNodeConfigData = {
|
|
|
8
8
|
top_p?: number;
|
|
9
9
|
top_k?: number;
|
|
10
10
|
maxTokens: number;
|
|
11
|
+
thinkingBudget: number | undefined;
|
|
12
|
+
headers?: {
|
|
13
|
+
key: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
11
16
|
};
|
|
12
17
|
export type ChatGoogleNodeData = ChatGoogleNodeConfigData & {
|
|
13
18
|
useModelInput: boolean;
|
|
@@ -17,6 +22,8 @@ export type ChatGoogleNodeData = ChatGoogleNodeConfigData & {
|
|
|
17
22
|
useUseTopPInput: boolean;
|
|
18
23
|
useMaxTokensInput: boolean;
|
|
19
24
|
useToolCalling: boolean;
|
|
25
|
+
useThinkingBudgetInput: boolean;
|
|
26
|
+
useHeadersInput?: boolean;
|
|
20
27
|
/** Given the same set of inputs, return the same output without hitting GPT */
|
|
21
28
|
cache: boolean;
|
|
22
29
|
useAsGraphPartialOutput?: boolean;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import type { DataValue } from '../model/DataValue.js';
|
|
1
2
|
export declare const TOKEN_MATCH_REGEX: RegExp;
|
|
2
3
|
export declare const ESCAPED_TOKEN_REGEX: RegExp;
|
|
3
|
-
export declare
|
|
4
|
+
export declare const ESCAPED_ESCAPED_TOKEN_REGEX: RegExp;
|
|
5
|
+
export declare function unwrapPotentialDataValue(value: any): any;
|
|
6
|
+
export declare function resolveExpressionRawValue(source: Record<string, any> | undefined, expression: string, sourceType: 'graphInputs' | 'context'): any | undefined;
|
|
7
|
+
export declare function resolveExpressionToString(source: Record<string, any> | undefined, expression: string, sourceType: 'graphInputs' | 'context'): string | undefined;
|
|
8
|
+
export declare function interpolate(template: string, variables: Record<string, DataValue | string | undefined>, graphInputValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>): string;
|
|
4
9
|
export declare function extractInterpolationVariables(template: string): string[];
|
|
@@ -196,6 +196,30 @@ export declare const openaiModels: {
|
|
|
196
196
|
};
|
|
197
197
|
displayName: string;
|
|
198
198
|
};
|
|
199
|
+
'gpt-4.1': {
|
|
200
|
+
maxTokens: number;
|
|
201
|
+
cost: {
|
|
202
|
+
prompt: number;
|
|
203
|
+
completion: number;
|
|
204
|
+
};
|
|
205
|
+
displayName: string;
|
|
206
|
+
};
|
|
207
|
+
o3: {
|
|
208
|
+
maxTokens: number;
|
|
209
|
+
cost: {
|
|
210
|
+
prompt: number;
|
|
211
|
+
completion: number;
|
|
212
|
+
};
|
|
213
|
+
displayName: string;
|
|
214
|
+
};
|
|
215
|
+
'o4-mini': {
|
|
216
|
+
maxTokens: number;
|
|
217
|
+
cost: {
|
|
218
|
+
prompt: number;
|
|
219
|
+
completion: number;
|
|
220
|
+
};
|
|
221
|
+
displayName: string;
|
|
222
|
+
};
|
|
199
223
|
'local-model': {
|
|
200
224
|
maxTokens: number;
|
|
201
225
|
cost: {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@alpic80/rivet-core",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"repository": "https://github.com/castortech/rivet",
|
|
5
|
-
"version": "1.24.
|
|
5
|
+
"version": "1.24.2-aidon.10",
|
|
6
6
|
"packageManager": "yarn@3.5.0",
|
|
7
7
|
"main": "dist/cjs/bundle.cjs",
|
|
8
8
|
"module": "dist/esm/index.js",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@gentrace/core": "^2.2.5",
|
|
48
48
|
"@google-cloud/vertexai": "^0.1.3",
|
|
49
|
-
"@google/
|
|
50
|
-
"@huggingface/inference": "^
|
|
51
|
-
"@ironclad/rivet-core": "npm:@alpic80/rivet-core@1.24.
|
|
49
|
+
"@google/genai": "^0.12.0",
|
|
50
|
+
"@huggingface/inference": "^4.13.0",
|
|
51
|
+
"@ironclad/rivet-core": "npm:@alpic80/rivet-core@1.24.2-aidon.10",
|
|
52
52
|
"assemblyai": "^4.6.0",
|
|
53
53
|
"autoevals": "^0.0.26",
|
|
54
54
|
"cron-parser": "^4.9.0",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"emittery": "^1.0.1",
|
|
57
57
|
"emittery-0-13": "npm:emittery@^0.13.1",
|
|
58
58
|
"gpt-tokenizer": "^2.1.2",
|
|
59
|
-
"jsonpath-plus": "^10.
|
|
59
|
+
"jsonpath-plus": "^10.3.0",
|
|
60
60
|
"lodash-es": "^4.17.21",
|
|
61
61
|
"mdast-util-gfm-table": "^2.0.0",
|
|
62
62
|
"mdast-util-to-markdown": "^2.1.2",
|
|
63
63
|
"minimatch": "^9.0.3",
|
|
64
|
-
"nanoid": "^3.3.
|
|
64
|
+
"nanoid": "^3.3.8",
|
|
65
65
|
"openai": "^4.28.4",
|
|
66
66
|
"p-queue": "^7.4.1",
|
|
67
67
|
"p-queue-6": "npm:p-queue@^6.0.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@types/yaml": "^1.9.7",
|
|
84
84
|
"@typescript-eslint/eslint-plugin": "^8.24.0",
|
|
85
85
|
"@typescript-eslint/parser": "^8.24.0",
|
|
86
|
-
"esbuild": "^0.
|
|
86
|
+
"esbuild": "^0.25.12",
|
|
87
87
|
"eslint": "^9.20.1",
|
|
88
88
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
89
89
|
"eslint-plugin-import": "^2.31.0",
|