@valerypopoff/rivet2-core 2.1.6 → 2.1.8
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 +3436 -1831
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/esm/api/createProcessor.js +45 -4
- package/dist/esm/exports.js +2 -0
- package/dist/esm/integrations/KnowledgeStoreFieldPolicy.js +216 -0
- package/dist/esm/integrations/KnowledgeStoreProvider.js +14 -90
- package/dist/esm/integrations/ManagedKnowledgeStore.js +0 -8
- package/dist/esm/model/DataBusPorts.js +26 -0
- package/dist/esm/model/DataBusTopology.js +207 -0
- package/dist/esm/model/DataValue.js +22 -7
- package/dist/esm/model/GraphPreprocessor.js +9 -3
- package/dist/esm/model/GraphProcessor.js +163 -366
- package/dist/esm/model/NodeIO.js +1 -0
- package/dist/esm/model/NodePrefabResolver.js +16 -0
- package/dist/esm/model/Nodes.js +7 -0
- package/dist/esm/model/ToolCallContinuationBranchPlanner.js +165 -0
- package/dist/esm/model/ToolCallContinuationCoordinator.js +201 -0
- package/dist/esm/model/chat-v2/chatV2CallObserver.js +140 -0
- package/dist/esm/model/chat-v2/chatV2Errors.js +23 -6
- package/dist/esm/model/chat-v2/chatV2Pipeline.js +47 -14
- package/dist/esm/model/chat-v2/chatV2ProviderTypes.js +1 -0
- package/dist/esm/model/chat-v2/chatV2RuntimeOptions.js +2 -2
- package/dist/esm/model/chat-v2/index.js +1 -0
- package/dist/esm/model/chat-v2/llmChatV2NodeData.js +52 -0
- package/dist/esm/model/chat-v2/llmChatV2NodeEditors.js +38 -13
- package/dist/esm/model/chat-v2/llmChatV2NodeRuntime.js +42 -34
- package/dist/esm/model/chat-v2/llmProfile.js +191 -0
- package/dist/esm/model/chat-v2/llmProfileNodeRuntime.js +73 -0
- package/dist/esm/model/chat-v2/llmProfileTypes.js +45 -0
- package/dist/esm/model/nodes/DataBusNode.js +81 -0
- package/dist/esm/model/nodes/GetGlobalNode.js +7 -11
- package/dist/esm/model/nodes/GetKnowledgeSourceStatusNode.js +1 -1
- package/dist/esm/model/nodes/LLMChatV2Node.js +44 -10
- package/dist/esm/model/nodes/LLMProfileNode.js +132 -0
- package/dist/esm/model/nodes/PassthroughNode.js +26 -8
- package/dist/esm/model/nodes/SearchKnowledgeNode.js +1 -1
- package/dist/esm/model/nodes/SetGlobalNode.js +6 -6
- package/dist/esm/model/nodes/SyncKnowledgeSourceNode.js +0 -1
- package/dist/esm/model/nodes/toolCallDelegation.js +13 -2
- package/dist/esm/plugins/pinecone/PineconeKnowledgeStore.js +0 -4
- package/dist/esm/plugins/pinecone/plugin.js +1 -1
- package/dist/esm/utils/coerceType.js +84 -41
- package/dist/esm/utils/expectType.js +45 -8
- package/dist/esm/utils/fetchEventSource.js +18 -0
- package/dist/esm/utils/serialization/serialization.js +18 -7
- package/dist/esm/vendor/fnv1a.js +6 -3
- package/dist/types/api/createProcessor.d.ts +2 -0
- package/dist/types/exports.d.ts +2 -0
- package/dist/types/integrations/KnowledgeStore.d.ts +0 -2
- package/dist/types/integrations/KnowledgeStoreFieldPolicy.d.ts +38 -0
- package/dist/types/integrations/KnowledgeStoreProvider.d.ts +6 -3
- package/dist/types/model/DataBusPorts.d.ts +6 -0
- package/dist/types/model/DataBusTopology.d.ts +16 -0
- package/dist/types/model/DataValue.d.ts +15 -5
- package/dist/types/model/GraphPreprocessor.d.ts +2 -1
- package/dist/types/model/GraphProcessor.d.ts +4 -3
- package/dist/types/model/NodeIO.d.ts +5 -0
- package/dist/types/model/NodePrefabResolver.d.ts +9 -0
- package/dist/types/model/Nodes.d.ts +5 -2
- package/dist/types/model/ProcessContext.d.ts +60 -0
- package/dist/types/model/ToolCallContinuationBranchPlanner.d.ts +43 -0
- package/dist/types/model/ToolCallContinuationCoordinator.d.ts +70 -0
- package/dist/types/model/chat-v2/chatV2CallObserver.d.ts +10 -0
- package/dist/types/model/chat-v2/chatV2ProviderTypes.d.ts +1 -0
- package/dist/types/model/chat-v2/chatV2RuntimeOptions.d.ts +8 -0
- package/dist/types/model/chat-v2/chatV2Types.d.ts +3 -3
- package/dist/types/model/chat-v2/index.d.ts +1 -0
- package/dist/types/model/chat-v2/llmChatV2NodeData.d.ts +6 -0
- package/dist/types/model/chat-v2/llmChatV2NodeEditors.d.ts +5 -1
- package/dist/types/model/chat-v2/llmProfile.d.ts +3 -0
- package/dist/types/model/chat-v2/llmProfileNodeRuntime.d.ts +9 -0
- package/dist/types/model/chat-v2/llmProfileTypes.d.ts +18 -0
- package/dist/types/model/nodes/DataBusNode.d.ts +19 -0
- package/dist/types/model/nodes/LLMProfileNode.d.ts +20 -0
- package/dist/types/model/nodes/PassthroughNode.d.ts +3 -2
- package/dist/types/model/nodes/SetGlobalNode.d.ts +2 -2
- package/dist/types/model/nodes/toolCallDelegation.d.ts +9 -0
- package/dist/types/vendor/fnv1a.d.ts +5 -5
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ export * from './nodes/TextNode.js';
|
|
|
4
4
|
export * from './nodes/ChatNode.js';
|
|
5
5
|
export * from './nodes/ChatNodeBase.js';
|
|
6
6
|
export * from './nodes/LLMChatV2Node.js';
|
|
7
|
+
export * from './nodes/LLMProfileNode.js';
|
|
7
8
|
export * from './nodes/PromptNode.js';
|
|
8
9
|
export * from './nodes/ExtractRegexNode.js';
|
|
9
10
|
export * from './nodes/CodeNode.js';
|
|
@@ -32,6 +33,8 @@ export * from './nodes/ContextNode.js';
|
|
|
32
33
|
export * from './nodes/CoalesceNode.js';
|
|
33
34
|
export * from './nodes/DidRunNode.js';
|
|
34
35
|
export * from './nodes/PassthroughNode.js';
|
|
36
|
+
export * from './nodes/DataBusNode.js';
|
|
37
|
+
export * from './DataBusTopology.js';
|
|
35
38
|
export * from './nodes/StartBackgroundBranchNode.js';
|
|
36
39
|
export * from './nodes/PopNode.js';
|
|
37
40
|
export * from './nodes/SetGlobalNode.js';
|
|
@@ -100,12 +103,12 @@ export * from './nodes/MCPToolCallNode.js';
|
|
|
100
103
|
export * from './nodes/MCPGetPromptNode.js';
|
|
101
104
|
export * from './nodes/ReferencedGraphAliasNode.js';
|
|
102
105
|
export * from './nodes/NodePrefabInstanceNode.js';
|
|
103
|
-
export declare const registerBuiltInNodes: (registry: NodeRegistration) => NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "text" | "chat" | "array" | "code" | "context" | "
|
|
106
|
+
export declare const registerBuiltInNodes: (registry: NodeRegistration) => NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "text" | "chat" | "array" | "code" | "context" | "graphInput" | "graphOutput" | "setGlobal" | "raiseEvent" | "reportProgress" | "getGlobal" | "getStoredValue" | "setStoredValue" | "abortGraph" | "userInput" | "prompt" | "llmChatV2" | "llmProfile" | "extractRegex" | "codeNew" | "expression" | "readDirectory" | "readFile" | "ifElse" | "chunk" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "coalesce" | "didRun" | "passthrough" | "dataBus" | "startBackgroundBranch" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "knowledgeSource" | "knowledgeDocument" | "syncKnowledgeSource" | "getKnowledgeSourceStatus" | "searchKnowledge" | "buildKnowledgeContext" | "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" | "nodePrefabInstance", import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./nodes/UserInputNode.js").UserInputNode | import("./nodes/TextNode.js").TextNode | import("./nodes/ChatNode.js").ChatNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | import("./nodes/LLMProfileNode.js").LLMProfileNode | import("./nodes/PromptNode.js").PromptNode | import("./nodes/ExtractRegexNode.js").ExtractRegexNode | import("./nodes/CodeNode.js").CodeNode | import("./nodes/CodeNewNode.js").CodeNewNode | 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/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/ReportProgressNode.js").ReportProgressNode | import("./nodes/ContextNode.js").ContextNode | import("./nodes/CoalesceNode.js").CoalesceNode | import("./nodes/DidRunNode.js").DidRunNode | import("./nodes/PassthroughNode.js").PassthroughNode | import("./nodes/DataBusNode.js").DataBusNode | import("./nodes/StartBackgroundBranchNode.js").StartBackgroundBranchNode | import("./nodes/PopNode.js").PopNode | import("./nodes/SetGlobalNode.js").SetGlobalNode | import("./nodes/GetGlobalNode.js").GetGlobalNode | import("./nodes/SetStoredValueNode.js").SetStoredValueNode | import("./nodes/GetStoredValueNode.js").GetStoredValueNode | 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/KnowledgeSourceNode.js").KnowledgeSourceNode | import("./nodes/KnowledgeDocumentNode.js").KnowledgeDocumentNode | import("./nodes/SyncKnowledgeSourceNode.js").SyncKnowledgeSourceNode | import("./nodes/GetKnowledgeSourceStatusNode.js").GetKnowledgeSourceStatusNode | import("./nodes/SearchKnowledgeNode.js").SearchKnowledgeNode | import("./nodes/BuildKnowledgeContextNode.js").BuildKnowledgeContextNode | 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 & {
|
|
104
107
|
type: "mcpDiscovery";
|
|
105
108
|
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
106
109
|
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
107
110
|
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode | import("./NodePrefabResolver.js").NodePrefabInstanceNode>;
|
|
108
|
-
declare let globalRivetNodeRegistry: NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "text" | "chat" | "array" | "code" | "context" | "
|
|
111
|
+
declare let globalRivetNodeRegistry: NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "text" | "chat" | "array" | "code" | "context" | "graphInput" | "graphOutput" | "setGlobal" | "raiseEvent" | "reportProgress" | "getGlobal" | "getStoredValue" | "setStoredValue" | "abortGraph" | "userInput" | "prompt" | "llmChatV2" | "llmProfile" | "extractRegex" | "codeNew" | "expression" | "readDirectory" | "readFile" | "ifElse" | "chunk" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "coalesce" | "didRun" | "passthrough" | "dataBus" | "startBackgroundBranch" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "knowledgeSource" | "knowledgeDocument" | "syncKnowledgeSource" | "getKnowledgeSourceStatus" | "searchKnowledge" | "buildKnowledgeContext" | "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" | "nodePrefabInstance", import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./nodes/UserInputNode.js").UserInputNode | import("./nodes/TextNode.js").TextNode | import("./nodes/ChatNode.js").ChatNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | import("./nodes/LLMProfileNode.js").LLMProfileNode | import("./nodes/PromptNode.js").PromptNode | import("./nodes/ExtractRegexNode.js").ExtractRegexNode | import("./nodes/CodeNode.js").CodeNode | import("./nodes/CodeNewNode.js").CodeNewNode | 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/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/ReportProgressNode.js").ReportProgressNode | import("./nodes/ContextNode.js").ContextNode | import("./nodes/CoalesceNode.js").CoalesceNode | import("./nodes/DidRunNode.js").DidRunNode | import("./nodes/PassthroughNode.js").PassthroughNode | import("./nodes/DataBusNode.js").DataBusNode | import("./nodes/StartBackgroundBranchNode.js").StartBackgroundBranchNode | import("./nodes/PopNode.js").PopNode | import("./nodes/SetGlobalNode.js").SetGlobalNode | import("./nodes/GetGlobalNode.js").GetGlobalNode | import("./nodes/SetStoredValueNode.js").SetStoredValueNode | import("./nodes/GetStoredValueNode.js").GetStoredValueNode | 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/KnowledgeSourceNode.js").KnowledgeSourceNode | import("./nodes/KnowledgeDocumentNode.js").KnowledgeDocumentNode | import("./nodes/SyncKnowledgeSourceNode.js").SyncKnowledgeSourceNode | import("./nodes/GetKnowledgeSourceStatusNode.js").GetKnowledgeSourceStatusNode | import("./nodes/SearchKnowledgeNode.js").SearchKnowledgeNode | import("./nodes/BuildKnowledgeContextNode.js").BuildKnowledgeContextNode | 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 & {
|
|
109
112
|
type: "mcpDiscovery";
|
|
110
113
|
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
111
114
|
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
@@ -8,6 +8,61 @@ import type { GraphProgress } from './GraphProgress.js';
|
|
|
8
8
|
import type { RivetStoredValue, RivetStoredValueCacheResult, RivetStoredValueReadResult, RivetStoredValueSetResult } from './StoredValueStore.js';
|
|
9
9
|
import type { ToolCallContinuation } from './ToolCallContinuation.js';
|
|
10
10
|
import type { KnowledgeStoreConnectionId, RivetKnowledgeStore } from '../integrations/KnowledgeStore.js';
|
|
11
|
+
import type { ChatV2Provider } from './chat-v2/chatV2ProviderTypes.js';
|
|
12
|
+
export type ChatV2CallId = Opaque<string, 'ChatV2CallId'>;
|
|
13
|
+
export type ChatV2CallOutcome = 'success' | 'provider-failure' | 'aborted';
|
|
14
|
+
/**
|
|
15
|
+
* Usage fields reported by the provider SDK for one physical Chat V2 call.
|
|
16
|
+
* The observer deliberately copies only usage data and never forwards provider
|
|
17
|
+
* metadata, request data, or authentication.
|
|
18
|
+
*/
|
|
19
|
+
export type ChatV2CallRawUsage = {
|
|
20
|
+
inputTokens?: number;
|
|
21
|
+
outputTokens?: number;
|
|
22
|
+
totalTokens?: number;
|
|
23
|
+
inputTokenDetails?: {
|
|
24
|
+
cacheReadTokens?: number;
|
|
25
|
+
cacheWriteTokens?: number;
|
|
26
|
+
noCacheTokens?: number;
|
|
27
|
+
};
|
|
28
|
+
outputTokenDetails?: {
|
|
29
|
+
reasoningTokens?: number;
|
|
30
|
+
textTokens?: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Rivet's provider-neutral names for usage reported by one physical call.
|
|
35
|
+
* Missing provider fields remain absent rather than being represented as zero.
|
|
36
|
+
*/
|
|
37
|
+
export type ChatV2CallNormalizedUsage = {
|
|
38
|
+
promptTokens?: number;
|
|
39
|
+
completionTokens?: number;
|
|
40
|
+
totalTokens?: number;
|
|
41
|
+
cachedTokens?: number;
|
|
42
|
+
reasoningTokens?: number;
|
|
43
|
+
};
|
|
44
|
+
export type ChatV2CallPricing = {
|
|
45
|
+
status: 'known' | 'unknown';
|
|
46
|
+
costUsd?: number;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Privacy-bounded accounting event for a single physical Chat V2 provider call.
|
|
50
|
+
*/
|
|
51
|
+
export type ChatV2CallFinishedEvent = {
|
|
52
|
+
callId: ChatV2CallId;
|
|
53
|
+
/** Zero-based attempt index within this Chat V2 pipeline request. */
|
|
54
|
+
attemptIndex: number;
|
|
55
|
+
nodeId: NodeId;
|
|
56
|
+
processId: ProcessId;
|
|
57
|
+
provider: ChatV2Provider;
|
|
58
|
+
model: string;
|
|
59
|
+
outcome: ChatV2CallOutcome;
|
|
60
|
+
finishReason?: string;
|
|
61
|
+
rawUsage?: ChatV2CallRawUsage;
|
|
62
|
+
normalizedUsage?: ChatV2CallNormalizedUsage;
|
|
63
|
+
pricing: ChatV2CallPricing;
|
|
64
|
+
};
|
|
65
|
+
export type ChatV2CallFinishedObserver = (event: ChatV2CallFinishedEvent) => void;
|
|
11
66
|
export type ProcessContext = {
|
|
12
67
|
settings: RuntimeSettings;
|
|
13
68
|
nativeApi?: NativeApi;
|
|
@@ -30,6 +85,11 @@ export type ProcessContext = {
|
|
|
30
85
|
* Runtime/library callers normally omit this; editor-only nodes/features can opt into it.
|
|
31
86
|
*/
|
|
32
87
|
editorExecutionCache?: Map<string, unknown>;
|
|
88
|
+
/**
|
|
89
|
+
* Host-only accounting hook invoked once after every physical LLM Chat
|
|
90
|
+
* provider attempt. Observer failures are isolated from graph execution.
|
|
91
|
+
*/
|
|
92
|
+
onChatV2CallFinished?: ChatV2CallFinishedObserver;
|
|
33
93
|
/**
|
|
34
94
|
* If implemented, chat nodes will first call this to resolve their configured endpoint to a final endpoint.
|
|
35
95
|
* You can use this for adding auth headers, or to load balance between multiple endpoints.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { NodeOutputs } from './NodeIO.js';
|
|
2
|
+
import type { ChartNode, NodeConnection, NodeId, PortId } from './NodeBase.js';
|
|
3
|
+
import type { NodeGraph } from './NodeGraph.js';
|
|
4
|
+
export type ToolCallContinuationAsyncBranchPlan = {
|
|
5
|
+
graph: NodeGraph;
|
|
6
|
+
nodeIds: ReadonlySet<NodeId>;
|
|
7
|
+
};
|
|
8
|
+
export type ToolCallContinuationBranchPlan = {
|
|
9
|
+
graph: NodeGraph;
|
|
10
|
+
preloadedOutputs: ReadonlyMap<NodeId, NodeOutputs>;
|
|
11
|
+
};
|
|
12
|
+
export type ToolCallContinuationBranchPlannerState = {
|
|
13
|
+
erroredNodeIds: ReadonlySet<NodeId>;
|
|
14
|
+
nodeOutputs: ReadonlyMap<NodeId, NodeOutputs>;
|
|
15
|
+
runToRelevantNodeIds: ReadonlySet<NodeId> | undefined;
|
|
16
|
+
visitedNodeIds: ReadonlySet<NodeId>;
|
|
17
|
+
};
|
|
18
|
+
export type ToolCallContinuationBranchPlanRequest = {
|
|
19
|
+
activeOutputPortIds: ReadonlySet<PortId>;
|
|
20
|
+
availableNodeOutputs: ReadonlyMap<NodeId, NodeOutputs>;
|
|
21
|
+
excludedNodeIds: ReadonlySet<NodeId>;
|
|
22
|
+
failOnUnsafeReadyNode?: boolean;
|
|
23
|
+
sourceNode: ChartNode;
|
|
24
|
+
sourceOutputs: NodeOutputs;
|
|
25
|
+
state: ToolCallContinuationBranchPlannerState;
|
|
26
|
+
};
|
|
27
|
+
export type ToolCallContinuationBranchPlanner = {
|
|
28
|
+
readonly unsafeNodeIds: ReadonlySet<NodeId>;
|
|
29
|
+
plan(request: ToolCallContinuationBranchPlanRequest): ToolCallContinuationBranchPlan | undefined;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Pure continuation-branch topology. Runtime state is supplied for each plan
|
|
33
|
+
* so a final branch can see outputs that completed while an early branch ran.
|
|
34
|
+
*/
|
|
35
|
+
export declare function createToolCallContinuationBranchPlanner(options: {
|
|
36
|
+
asyncBranchPlansByTriggerNodeId: ReadonlyMap<NodeId, ToolCallContinuationAsyncBranchPlan>;
|
|
37
|
+
attachedNodeDataByNodeId: ReadonlyMap<NodeId, Readonly<Record<string, unknown>>>;
|
|
38
|
+
effectiveConnections: readonly NodeConnection[];
|
|
39
|
+
graph: NodeGraph;
|
|
40
|
+
isDefinitionValidConnection(connection: NodeConnection): boolean;
|
|
41
|
+
nodesById: Readonly<Record<NodeId, ChartNode | undefined>>;
|
|
42
|
+
stronglyConnectedComponents: readonly (readonly ChartNode[])[];
|
|
43
|
+
}): ToolCallContinuationBranchPlanner;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { DataValue } from './DataValue.js';
|
|
2
|
+
import type { NodeInputs, NodeOutputs } from './NodeIO.js';
|
|
3
|
+
import type { ChartNode, NodeId, PortId } from './NodeBase.js';
|
|
4
|
+
import type { InternalProcessContext, ProcessId } from './ProcessContext.js';
|
|
5
|
+
import type { StreamedFunctionCall } from './chat/streamChatResponse.js';
|
|
6
|
+
import type { DelegateFunctionCallNode } from './nodes/DelegateFunctionCallNode.js';
|
|
7
|
+
import { delegateToolCall } from './nodes/toolCallDelegation.js';
|
|
8
|
+
import type { ToolCallContinuationResult } from './ToolCallContinuation.js';
|
|
9
|
+
export type ToolCallContinuationBranchRunResult = {
|
|
10
|
+
graphOutputWrites: Record<string, DataValue>;
|
|
11
|
+
nodeOutputs: ReadonlyMap<NodeId, NodeOutputs>;
|
|
12
|
+
};
|
|
13
|
+
export type ToolCallContinuationInvocationResult = {
|
|
14
|
+
finalBranch: ToolCallContinuationBranchRunResult;
|
|
15
|
+
outputs: NodeOutputs;
|
|
16
|
+
preToolBranch: ToolCallContinuationBranchRunResult;
|
|
17
|
+
toolResult: Awaited<ReturnType<typeof delegateToolCall>>;
|
|
18
|
+
};
|
|
19
|
+
export type ToolCallContinuationRoundResult = {
|
|
20
|
+
invocations: readonly ToolCallContinuationInvocationResult[];
|
|
21
|
+
results: readonly ToolCallContinuationResult[];
|
|
22
|
+
};
|
|
23
|
+
export type ToolCallContinuationBranchAdapter = {
|
|
24
|
+
canRunContinuationBranches(llmNode: ChartNode, delegateNode: DelegateFunctionCallNode): boolean;
|
|
25
|
+
runOutputBranch(request: {
|
|
26
|
+
activeOutputPortIds: ReadonlySet<PortId>;
|
|
27
|
+
availableNodeOutputs: ReadonlyMap<NodeId, NodeOutputs>;
|
|
28
|
+
deferGraphOutputCommit: boolean;
|
|
29
|
+
excludedNodeIds: ReadonlySet<NodeId>;
|
|
30
|
+
failOnUnsafeReadyNode: boolean;
|
|
31
|
+
signal: AbortSignal;
|
|
32
|
+
sourceNode: ChartNode;
|
|
33
|
+
sourceOutputs: NodeOutputs;
|
|
34
|
+
}): Promise<ToolCallContinuationBranchRunResult>;
|
|
35
|
+
validatePreToolBranch(request: {
|
|
36
|
+
activeOutputPortIds: ReadonlySet<PortId>;
|
|
37
|
+
excludedNodeIds: ReadonlySet<NodeId>;
|
|
38
|
+
sourceNode: DelegateFunctionCallNode;
|
|
39
|
+
sourceOutputs: NodeOutputs;
|
|
40
|
+
}): void;
|
|
41
|
+
};
|
|
42
|
+
export type ToolCallContinuationCoordinatorAdapter = {
|
|
43
|
+
accumulateCost(outputs: NodeOutputs): void;
|
|
44
|
+
createBranchAdapter(): ToolCallContinuationBranchAdapter;
|
|
45
|
+
createDelegateProcessContext(node: DelegateFunctionCallNode, inputs: NodeInputs, processId: ProcessId, nodeAbortController: AbortController): InternalProcessContext;
|
|
46
|
+
createNodeAbortController(): AbortController;
|
|
47
|
+
emitDelegateError(node: DelegateFunctionCallNode, error: unknown, processId: ProcessId, timingStart: number | undefined): Promise<void>;
|
|
48
|
+
emitDelegateFinish(node: DelegateFunctionCallNode, outputs: NodeOutputs, processId: ProcessId, timingStart: number | undefined): Promise<void>;
|
|
49
|
+
emitDelegatePartialOutput(node: DelegateFunctionCallNode, outputs: NodeOutputs, processId: ProcessId): void;
|
|
50
|
+
emitDelegateStart(node: DelegateFunctionCallNode, inputs: NodeInputs, processId: ProcessId): Promise<void>;
|
|
51
|
+
getActiveOutputPortIds(node: ChartNode): ReadonlySet<PortId>;
|
|
52
|
+
getContinuationBranchBoundaryNodeIds(llmNode: ChartNode): ReadonlySet<NodeId>;
|
|
53
|
+
hasPreloadedOrFrozenDelegateOutput(node: DelegateFunctionCallNode, inputs: NodeInputs, processId: ProcessId): boolean;
|
|
54
|
+
registerNodeAbortController(nodeId: NodeId, controller: AbortController): void;
|
|
55
|
+
rootAbortSignal: AbortSignal;
|
|
56
|
+
unregisterNodeAbortController(nodeId: NodeId, controller: AbortController): void;
|
|
57
|
+
startNodeTiming(): number | undefined;
|
|
58
|
+
waitUntilUnpaused(): Promise<void>;
|
|
59
|
+
};
|
|
60
|
+
export declare class ToolCallContinuationCoordinator {
|
|
61
|
+
#private;
|
|
62
|
+
constructor(adapter: ToolCallContinuationCoordinatorAdapter);
|
|
63
|
+
run(options: {
|
|
64
|
+
assistantMessage: string;
|
|
65
|
+
delegateNode: DelegateFunctionCallNode;
|
|
66
|
+
llmNode: ChartNode;
|
|
67
|
+
llmSignal: AbortSignal;
|
|
68
|
+
toolCalls: readonly StreamedFunctionCall[];
|
|
69
|
+
}): Promise<ToolCallContinuationRoundResult>;
|
|
70
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ChatV2CallFinishedEvent, ChatV2CallId } from '../ProcessContext.js';
|
|
2
|
+
import type { RunChatV2PipelineOptions, StreamChatV2Result } from './chatV2Types.js';
|
|
3
|
+
export declare function createObservedChatV2CallId(options: RunChatV2PipelineOptions): ChatV2CallId | undefined;
|
|
4
|
+
export declare function notifyChatV2CallFinished(options: RunChatV2PipelineOptions, params: {
|
|
5
|
+
callId: ChatV2CallId | undefined;
|
|
6
|
+
attemptIndex: number;
|
|
7
|
+
outcome: ChatV2CallFinishedEvent['outcome'];
|
|
8
|
+
result?: StreamChatV2Result;
|
|
9
|
+
error?: unknown;
|
|
10
|
+
}): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ChatV2Provider = 'openai' | 'anthropic' | 'google' | 'custom';
|
|
@@ -4,9 +4,17 @@ import type { ResolvedChatV2ProviderConfig } from './providerOptions.js';
|
|
|
4
4
|
import type { ChatV2ProviderOptions, ChatV2ToolChoice, ChatV2ToolSet, RunChatV2PipelineOptions } from './chatV2Types.js';
|
|
5
5
|
import type { LLMChatV2NodeData } from './llmChatV2NodeData.js';
|
|
6
6
|
export type LLMChatV2GenerationParameters = Pick<RunChatV2PipelineOptions, 'maxTokens' | 'temperature' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'stopSequences' | 'seed'>;
|
|
7
|
+
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
8
|
+
[key: string]: JsonValue | undefined;
|
|
9
|
+
};
|
|
10
|
+
type JsonObject = {
|
|
11
|
+
[key: string]: JsonValue | undefined;
|
|
12
|
+
};
|
|
7
13
|
export declare function resolveLLMChatV2Headers(data: LLMChatV2NodeData, inputs: Inputs): Record<string, string> | undefined;
|
|
8
14
|
export declare function resolveLLMChatV2ApiKey(data: LLMChatV2NodeData, inputs: Inputs, context: Pick<InternalProcessContext, 'getPluginConfig' | 'settings'>): string | undefined;
|
|
15
|
+
export declare function resolveLLMChatV2ExtraProviderOptions(data: LLMChatV2NodeData, inputs: Inputs): JsonObject | undefined;
|
|
9
16
|
export declare function resolveLLMChatV2RuntimeProviderOptions(data: LLMChatV2NodeData, inputs: Inputs): ChatV2ProviderOptions | undefined;
|
|
10
17
|
export declare function resolveLLMChatV2ToolChoice(data: LLMChatV2NodeData): ChatV2ToolChoice | undefined;
|
|
11
18
|
export declare function resolveLLMChatV2GenerationParameters(data: LLMChatV2NodeData, inputs: Inputs): LLMChatV2GenerationParameters;
|
|
12
19
|
export declare function resolveLLMChatV2BuiltInTools(data: LLMChatV2NodeData, context: Pick<InternalProcessContext, 'getPluginConfig' | 'settings'>, config: ResolvedChatV2ProviderConfig, apiKey: string | undefined): ChatV2ToolSet | undefined;
|
|
20
|
+
export {};
|
|
@@ -3,10 +3,11 @@ import type { ChatMessage, GptFunction } from '../DataValue.js';
|
|
|
3
3
|
import type { Outputs } from '../GraphProcessor.js';
|
|
4
4
|
import type { InternalProcessContext } from '../ProcessContext.js';
|
|
5
5
|
import type { AssistantMessageFunctionCallMode, StreamedFunctionCall } from '../chat/streamChatResponse.js';
|
|
6
|
+
import type { ChatV2Provider } from './chatV2ProviderTypes.js';
|
|
7
|
+
export type { ChatV2Provider };
|
|
6
8
|
type StreamTextArgs = Parameters<typeof streamText>[0];
|
|
7
9
|
type GenerateTextArgs = Parameters<typeof generateText>[0];
|
|
8
10
|
type MaybePromiseLike<T> = T | PromiseLike<T>;
|
|
9
|
-
export type ChatV2Provider = 'openai' | 'anthropic' | 'google' | 'custom';
|
|
10
11
|
export type ChatV2Model = StreamTextArgs['model'];
|
|
11
12
|
export type ChatV2ProviderOptions = StreamTextArgs['providerOptions'];
|
|
12
13
|
export type ChatV2ToolSet = NonNullable<StreamTextArgs['tools']>;
|
|
@@ -119,7 +120,7 @@ export type RunChatV2PipelineOptions = {
|
|
|
119
120
|
retryOnNon200?: boolean | undefined;
|
|
120
121
|
retryOnNon200RepeatTimes?: number | undefined;
|
|
121
122
|
retryOnNon200CooldownMs?: number | undefined;
|
|
122
|
-
context: Pick<InternalProcessContext, 'signal' | 'onPartialOutputs'
|
|
123
|
+
context: Pick<InternalProcessContext, 'signal' | 'onPartialOutputs'> & Partial<Pick<InternalProcessContext, 'node' | 'onChatV2CallFinished' | 'processId'>>;
|
|
123
124
|
executeStream?: ChatV2StreamExecutor | undefined;
|
|
124
125
|
executeGenerate?: ChatV2GenerateExecutor | undefined;
|
|
125
126
|
};
|
|
@@ -136,4 +137,3 @@ export type ChatV2PipelineResult = {
|
|
|
136
137
|
providerMetadata: ChatV2ProviderMetadata | undefined;
|
|
137
138
|
requestStatus: number | undefined;
|
|
138
139
|
};
|
|
139
|
-
export {};
|
|
@@ -6,6 +6,7 @@ export * from './chatV2RequestPlan.js';
|
|
|
6
6
|
export * from './chatV2ResponseFormat.js';
|
|
7
7
|
export * from './chatV2Shared.js';
|
|
8
8
|
export * from './chatV2Types.js';
|
|
9
|
+
export * from './llmProfileTypes.js';
|
|
9
10
|
export * from './messageConverter.js';
|
|
10
11
|
export * from './modelRegistry.js';
|
|
11
12
|
export * from './providerOptions.js';
|
|
@@ -4,7 +4,9 @@ import type { ChatV2Provider } from './chatV2Types.js';
|
|
|
4
4
|
import type { ChartNode, NodeId } from '../NodeBase.js';
|
|
5
5
|
export type LLMChatV2ToolChoiceMode = '' | 'auto' | 'function' | 'required';
|
|
6
6
|
export type LLMChatV2ApiKeySource = 'environment' | 'input';
|
|
7
|
+
export type LLMChatV2ConfigurationMode = 'inline' | 'profile';
|
|
7
8
|
export type LLMChatV2NodeConfigData = ChatV2CommonNodeData & {
|
|
9
|
+
configurationMode?: LLMChatV2ConfigurationMode;
|
|
8
10
|
provider: ChatV2Provider;
|
|
9
11
|
apiKeySource?: LLMChatV2ApiKeySource;
|
|
10
12
|
customProviderApiKeyProgrammaticName?: string;
|
|
@@ -55,6 +57,9 @@ export type LLMChatV2NodeConfigData = ChatV2CommonNodeData & {
|
|
|
55
57
|
};
|
|
56
58
|
export type LLMChatV2NodeData = LLMChatV2NodeConfigData;
|
|
57
59
|
export type LLMChatV2Node = ChartNode<'llmChatV2', LLMChatV2NodeData>;
|
|
60
|
+
export declare const llmChatV2ProfileDataKeys: readonly ["model", "useModelInput", "temperature", "useTemperatureInput", "topP", "useTopPInput", "topK", "useTopKInput", "presencePenalty", "usePresencePenaltyInput", "frequencyPenalty", "useFrequencyPenaltyInput", "stopSequences", "useStopSequencesInput", "seed", "useSeedInput", "maxTokens", "useMaxTokensInput", "provider", "apiKeySource", "customProviderApiKeyProgrammaticName", "customProviderApiKeyEnvVarName", "customProviderBaseURL", "useCustomProviderBaseURLInput", "headers", "useHeadersInput", "extraProviderOptions", "useExtraProviderOptionsInput", "openAIReasoningEffort", "openAIReasoningSummary", "openAIPreviousResponseId", "useOpenAIPreviousResponseIdInput", "enableOpenAIWebSearch", "openAIWebSearchContextSize", "enableOpenAICodeInterpreter", "anthropicThinkingMode", "anthropicThinkingBudget", "useAnthropicThinkingBudgetInput", "anthropicEffort", "anthropicCacheControlTtl", "googleThinkingBudget", "useGoogleThinkingBudgetInput", "googleThinkingLevel", "googleIncludeThoughts", "enableGoogleSearchGrounding", "enableGoogleUrlContext"];
|
|
61
|
+
export type LLMChatV2ProfileDataKey = (typeof llmChatV2ProfileDataKeys)[number];
|
|
62
|
+
export type LLMChatV2ProfileData = Pick<LLMChatV2NodeData, LLMChatV2ProfileDataKey>;
|
|
58
63
|
export type LLMChatV2EditorCacheKeyParts = {
|
|
59
64
|
nodeId: NodeId;
|
|
60
65
|
nodeData: LLMChatV2NodeData;
|
|
@@ -72,3 +77,4 @@ export type LLMChatV2EditorCacheKeyParts = {
|
|
|
72
77
|
};
|
|
73
78
|
export declare function createLLMChatV2NodeData(): LLMChatV2NodeData;
|
|
74
79
|
export declare function hasLLMChatV2BuiltInToolsEnabled(data: LLMChatV2NodeData): boolean;
|
|
80
|
+
export declare function shouldIncludeLLMChatV2ToolCalls(data: LLMChatV2NodeData): boolean;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { EditorDefinition } from '../EditorDefinition.js';
|
|
2
|
+
import type { ChartNode } from '../NodeBase.js';
|
|
2
3
|
import type { RivetUIContext } from '../RivetUIContext.js';
|
|
3
|
-
import type { LLMChatV2Node, LLMChatV2NodeData } from './llmChatV2NodeData.js';
|
|
4
|
+
import type { LLMChatV2Node, LLMChatV2NodeData, LLMChatV2ProfileData } from './llmChatV2NodeData.js';
|
|
5
|
+
type LLMProfileEditorNode = ChartNode<'llmProfile', LLMChatV2ProfileData>;
|
|
4
6
|
export declare function getLLMChatV2Editors(data: LLMChatV2NodeData, context: RivetUIContext): Promise<EditorDefinition<LLMChatV2Node>[]>;
|
|
7
|
+
export declare function getLLMProfileEditors(data: LLMChatV2ProfileData, context: RivetUIContext): Promise<EditorDefinition<LLMProfileEditorNode>[]>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type LLMProfileValue } from './llmProfileTypes.js';
|
|
2
|
+
export { applyLLMProfileToNodeData, createDefaultLLMProfileValue, createLLMProfileNodeData, LLM_PROFILE_VALUE_VERSION, pickLLMChatV2ProfileData, type LLMProfileValue, } from './llmProfileTypes.js';
|
|
3
|
+
export declare function normalizeLLMProfileValue(value: unknown): LLMProfileValue;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Inputs } from '../GraphProcessor.js';
|
|
2
|
+
import type { InternalProcessContext } from '../ProcessContext.js';
|
|
3
|
+
import type { LLMChatV2ProfileData } from './llmChatV2NodeData.js';
|
|
4
|
+
import { type LLMProfileValue } from './llmProfileTypes.js';
|
|
5
|
+
export declare function resolveLLMProfileNodeValue(params: {
|
|
6
|
+
data: LLMChatV2ProfileData;
|
|
7
|
+
inputs: Inputs;
|
|
8
|
+
context: Pick<InternalProcessContext, 'getPluginConfig' | 'settings'>;
|
|
9
|
+
}): LLMProfileValue;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ChatV2CredentialResult } from './chatV2ProviderProfile.js';
|
|
2
|
+
import { type LLMChatV2NodeData, type LLMChatV2ProfileData } from './llmChatV2NodeData.js';
|
|
3
|
+
export declare const LLM_PROFILE_VALUE_VERSION: 1;
|
|
4
|
+
/**
|
|
5
|
+
* Every input port owned by an LLM Profile, including ports that are hidden
|
|
6
|
+
* until their matching provider or input toggle is enabled. This lets editor
|
|
7
|
+
* operations preserve recoverable connections across configuration changes.
|
|
8
|
+
*/
|
|
9
|
+
export declare const llmProfileInputIds: readonly ["model", "apiKey", "customProviderBaseURL", "previousResponseId", "temperature", "maxTokens", "topP", "topK", "presencePenalty", "frequencyPenalty", "stopSequences", "seed", "headers", "extraProviderOptions", "anthropicThinkingBudget", "googleThinkingBudget"];
|
|
10
|
+
export type LLMProfileValue = {
|
|
11
|
+
version: typeof LLM_PROFILE_VALUE_VERSION;
|
|
12
|
+
configuration: LLMChatV2ProfileData;
|
|
13
|
+
credential: ChatV2CredentialResult;
|
|
14
|
+
};
|
|
15
|
+
export declare function createLLMProfileNodeData(): LLMChatV2ProfileData;
|
|
16
|
+
export declare function createDefaultLLMProfileValue(): LLMProfileValue;
|
|
17
|
+
export declare function pickLLMChatV2ProfileData(data: LLMChatV2NodeData): LLMChatV2ProfileData;
|
|
18
|
+
export declare function applyLLMProfileToNodeData(data: LLMChatV2NodeData, profile: LLMProfileValue): LLMChatV2NodeData;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
2
|
+
import { type ChartNode, type NodeConnection, type NodeInputDefinition, type NodeOutputDefinition } from '../NodeBase.js';
|
|
3
|
+
import { type Inputs, type Outputs } from '../GraphProcessor.js';
|
|
4
|
+
/**
|
|
5
|
+
* A Data Bus is an authoring-topology primitive. Its channels are expanded
|
|
6
|
+
* into independent effective connections before graph execution, so this node
|
|
7
|
+
* must never be dispatched by GraphProcessor as an ordinary NodeImpl.
|
|
8
|
+
*/
|
|
9
|
+
export type DataBusNode = ChartNode<'dataBus', Record<string, never>>;
|
|
10
|
+
export { getDataBusInputPortId, getDataBusOutputPortId, MAX_DATA_BUS_CHANNEL_INDEX, parseDataBusChannelIndex, } from '../DataBusPorts.js';
|
|
11
|
+
export declare function isDataBusNode(node: ChartNode | undefined): node is DataBusNode;
|
|
12
|
+
export declare class DataBusNodeImpl extends NodeImpl<DataBusNode> {
|
|
13
|
+
static create: () => DataBusNode;
|
|
14
|
+
getInputDefinitions(connections: NodeConnection[]): NodeInputDefinition[];
|
|
15
|
+
getOutputDefinitions(connections: NodeConnection[]): NodeOutputDefinition[];
|
|
16
|
+
static getUIData(): NodeUIData;
|
|
17
|
+
process(_inputData: Inputs): Promise<Outputs>;
|
|
18
|
+
}
|
|
19
|
+
export declare const dataBusNode: import("../NodeDefinition.js").NodeDefinition<DataBusNode>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EditorDefinition } from '../EditorDefinition.js';
|
|
2
|
+
import type { Inputs, Outputs } from '../GraphProcessor.js';
|
|
3
|
+
import type { ChartNode, NodeInputDefinition, NodeOutputDefinition } from '../NodeBase.js';
|
|
4
|
+
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
5
|
+
import type { InternalProcessContext } from '../ProcessContext.js';
|
|
6
|
+
import type { RivetUIContext } from '../RivetUIContext.js';
|
|
7
|
+
import type { LLMChatV2ProfileData } from '../chat-v2/llmChatV2NodeData.js';
|
|
8
|
+
export type { LLMProfileValue } from '../chat-v2/llmProfileTypes.js';
|
|
9
|
+
export type LLMProfileNodeData = LLMChatV2ProfileData;
|
|
10
|
+
export type LLMProfileNode = ChartNode<'llmProfile', LLMProfileNodeData>;
|
|
11
|
+
export declare class LLMProfileNodeImpl extends NodeImpl<LLMProfileNode> {
|
|
12
|
+
static create(): LLMProfileNode;
|
|
13
|
+
getInputDefinitions(): NodeInputDefinition[];
|
|
14
|
+
getOutputDefinitions(): NodeOutputDefinition[];
|
|
15
|
+
getEditors(context: RivetUIContext): Promise<EditorDefinition<LLMProfileNode>[]>;
|
|
16
|
+
getBody(): string;
|
|
17
|
+
static getUIData(): NodeUIData;
|
|
18
|
+
process(inputs: Inputs, context: InternalProcessContext): Promise<Outputs>;
|
|
19
|
+
}
|
|
20
|
+
export declare const llmProfileNode: import("../NodeDefinition.js").NodeDefinition<LLMProfileNode>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
2
2
|
import { type ChartNode, type NodeConnection, type NodeInputDefinition, type NodeOutputDefinition } from '../NodeBase.js';
|
|
3
3
|
import { type Inputs, type Outputs } from '../GraphProcessor.js';
|
|
4
|
-
export type PassthroughNode = ChartNode<'passthrough',
|
|
5
|
-
|
|
4
|
+
export type PassthroughNode = ChartNode<'passthrough', Record<string, never>>;
|
|
5
|
+
/** @deprecated Use MAX_DATA_BUS_CHANNEL_INDEX for Data Bus channels. */
|
|
6
|
+
export declare const MAX_PASSTHROUGH_PORT_INDEX = 10000;
|
|
6
7
|
export declare class PassthroughNodeImpl extends NodeImpl<PassthroughNode> {
|
|
7
8
|
static create: () => PassthroughNode;
|
|
8
9
|
getInputDefinitions(connections: NodeConnection[]): NodeInputDefinition[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ChartNode, type NodeInputDefinition, type NodeOutputDefinition } from '../NodeBase.js';
|
|
2
2
|
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
3
|
-
import { type
|
|
3
|
+
import { type ScalarOrArrayDataType } from '../DataValue.js';
|
|
4
4
|
import { type Inputs, type Outputs } from '../GraphProcessor.js';
|
|
5
5
|
import { type InternalProcessContext } from '../ProcessContext.js';
|
|
6
6
|
import { type EditorDefinition } from '../EditorDefinition.js';
|
|
@@ -9,7 +9,7 @@ export type SetGlobalNode = ChartNode<'setGlobal', SetGlobalNodeData>;
|
|
|
9
9
|
export type SetGlobalNodeData = {
|
|
10
10
|
id: string;
|
|
11
11
|
useIdInput: boolean;
|
|
12
|
-
dataType:
|
|
12
|
+
dataType: ScalarOrArrayDataType;
|
|
13
13
|
};
|
|
14
14
|
export declare class SetGlobalNodeImpl extends NodeImpl<SetGlobalNode> {
|
|
15
15
|
static create(): SetGlobalNode;
|
|
@@ -27,6 +27,15 @@ export type DelegatedToolCallRecord = {
|
|
|
27
27
|
output: string;
|
|
28
28
|
message: ChatMessage;
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Finds an Auto Delegate handler from an ordered set of graph-like candidates.
|
|
32
|
+
*
|
|
33
|
+
* Candidate identity belongs to the caller. Runtime execution passes graph
|
|
34
|
+
* objects and uses their metadata IDs; editor analysis passes project-map
|
|
35
|
+
* entries and uses their map keys. Keeping that distinction here preserves the
|
|
36
|
+
* existing behavior for malformed projects where those identities disagree.
|
|
37
|
+
*/
|
|
38
|
+
export declare function findAutoDelegateGraphCandidate<T>(candidates: readonly T[], toolName: string, getGraphName: (candidate: T) => string | undefined): T | undefined;
|
|
30
39
|
export declare function isDelegatedToolCallRecord(input: unknown): input is DelegatedToolCallRecord;
|
|
31
40
|
export declare function buildDelegatedToolCallOutputs(records: DelegatedToolCallRecord[], preToolMessage?: string, cost?: number): Outputs;
|
|
32
41
|
export declare function normalizeFunctionCallInput(input: unknown): ParsedAssistantChatMessageFunctionCall;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {string} value
|
|
3
|
-
* @param {{ size?: 32 | 64 | 128 | 256 | 512 | 1024, utf8Buffer?: Uint8Array }} options
|
|
4
|
-
* @returns {
|
|
2
|
+
* @param {string | Uint8Array} value
|
|
3
|
+
* @param {{ size?: 32 | 64 | 128 | 256 | 512 | 1024, utf8Buffer?: Uint8Array }} [options]
|
|
4
|
+
* @returns {bigint}
|
|
5
5
|
*/
|
|
6
|
-
export default function fnv1a(value: string, { size, utf8Buffer }?: {
|
|
6
|
+
export default function fnv1a(value: string | Uint8Array, { size, utf8Buffer }?: {
|
|
7
7
|
size?: 32 | 64 | 128 | 256 | 512 | 1024;
|
|
8
8
|
utf8Buffer?: Uint8Array;
|
|
9
|
-
}):
|
|
9
|
+
}): bigint;
|