@valerypopoff/rivet2-core 2.15.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bundle.cjs +7906 -3980
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/cjs/interpolationRuntime.cjs +62 -7
- package/dist/cjs/interpolationRuntime.cjs.map +3 -3
- package/dist/cjs/interpolationSyntax.cjs +9 -5
- package/dist/cjs/interpolationSyntax.cjs.map +2 -2
- package/dist/cjs/serialization.cjs +1880 -0
- package/dist/cjs/serialization.cjs.map +7 -0
- package/dist/cjs/webAppRuntime.cjs +168 -6
- package/dist/cjs/webAppRuntime.cjs.map +3 -3
- package/dist/esm/api/createProcessor.js +5 -2
- package/dist/esm/api/processSettings.js +1 -0
- package/dist/esm/exports.js +4 -0
- package/dist/esm/model/AgentResponseTrace.js +99 -34
- package/dist/esm/model/AgentResponseTracePresentation.js +130 -0
- package/dist/esm/model/DataValue.js +11 -2
- package/dist/esm/model/GlobalVariables.js +2 -1
- package/dist/esm/model/GraphBoundaryCache.js +2 -1
- package/dist/esm/model/GraphBoundaryEffects.js +38 -1
- package/dist/esm/model/GraphExecutionState.js +81 -0
- package/dist/esm/model/GraphProcessor.js +825 -884
- package/dist/esm/model/GraphSchedulerBoundaryState.js +64 -0
- package/dist/esm/model/Nodes.js +15 -0
- package/dist/esm/model/ProjectBundle.js +248 -0
- package/dist/esm/model/ProjectBundleRuntime.js +54 -0
- package/dist/esm/model/SchedulerBoundaryPlanner.js +233 -0
- package/dist/esm/model/SplitRunProcessor.js +28 -7
- package/dist/esm/model/StreamingWatchTopology.js +118 -8
- package/dist/esm/model/SubgraphProjectTarget.js +7 -0
- package/dist/esm/model/SubprocessorBridge.js +125 -87
- package/dist/esm/model/ToolCallContinuationCoordinator.js +1 -1
- package/dist/esm/model/chat-v2/aiSdkBridge.js +22 -17
- package/dist/esm/model/chat-v2/chatV2CallObserver.js +2 -4
- package/dist/esm/model/chat-v2/chatV2CredentialNames.js +5 -1
- package/dist/esm/model/chat-v2/chatV2Outputs.js +2 -2
- package/dist/esm/model/chat-v2/chatV2Pipeline.js +24 -9
- package/dist/esm/model/chat-v2/chatV2ProviderProfile.js +3 -2
- package/dist/esm/model/chat-v2/chatV2ProviderRegistry.js +46 -6
- package/dist/esm/model/chat-v2/chatV2RuntimeOptions.js +26 -1
- package/dist/esm/model/chat-v2/chatV2Shared.js +2 -1
- package/dist/esm/model/chat-v2/chatV2UsageAccounting.js +10 -0
- package/dist/esm/model/chat-v2/llmChatV2Body.js +13 -10
- package/dist/esm/model/chat-v2/llmChatV2CacheBoundary.js +5 -2
- package/dist/esm/model/chat-v2/llmChatV2NodeData.js +3 -0
- package/dist/esm/model/chat-v2/llmChatV2NodeEditors.js +33 -9
- package/dist/esm/model/chat-v2/llmChatV2NodeMigration.js +22 -2
- package/dist/esm/model/chat-v2/llmInvocationCoordinator.js +10 -2
- package/dist/esm/model/chat-v2/llmInvocationResultProjector.js +17 -0
- package/dist/esm/model/chat-v2/llmModelCandidate.js +2 -1
- package/dist/esm/model/chat-v2/llmProfile.js +5 -1
- package/dist/esm/model/chat-v2/llmProfileBody.js +11 -2
- package/dist/esm/model/chat-v2/llmProfileFallback.js +7 -4
- package/dist/esm/model/chat-v2/llmProfileFieldRegistry.js +2 -1
- package/dist/esm/model/chat-v2/llmProfileHealthStore.js +16 -3
- package/dist/esm/model/chat-v2/llmProfileNodeRuntime.js +1 -1
- package/dist/esm/model/chat-v2/messageConverter.js +18 -16
- package/dist/esm/model/chat-v2/modelRegistry.js +14 -4
- package/dist/esm/model/chat-v2/openRouterModel.js +73 -0
- package/dist/esm/model/chat-v2/parallelToolCalls.js +2 -0
- package/dist/esm/model/chat-v2/providerOptions.js +30 -25
- package/dist/esm/model/chat-v2/temperature.js +9 -0
- package/dist/esm/model/classifier/credentials.js +42 -6
- package/dist/esm/model/classifier/images.js +176 -0
- package/dist/esm/model/classifier/json.js +57 -0
- package/dist/esm/model/classifier/limits.js +300 -0
- package/dist/esm/model/classifier/openai.js +118 -0
- package/dist/esm/model/classifier/perplexity.js +63 -0
- package/dist/esm/model/classifier/preparation.js +74 -0
- package/dist/esm/model/classifier/profile.js +151 -0
- package/dist/esm/model/classifier/profileExecution.js +294 -0
- package/dist/esm/model/classifier/providers.js +454 -192
- package/dist/esm/model/classifier/questionHelpers.js +29 -45
- package/dist/esm/model/classifier/questions.js +53 -0
- package/dist/esm/model/classifier/response.js +75 -0
- package/dist/esm/model/classifier/state.js +207 -0
- package/dist/esm/model/classifier/types.js +11 -1
- package/dist/esm/model/nodeRunFailure.js +54 -0
- package/dist/esm/model/nodes/CallGraphNode.js +6 -0
- package/dist/esm/model/nodes/CatchStreamingChunksNode.js +42 -0
- package/dist/esm/model/nodes/ClassifierEvaluateNode.js +385 -154
- package/dist/esm/model/nodes/ClassifierProfileNode.js +133 -0
- package/dist/esm/model/nodes/ClassifierQuestionNode.js +59 -15
- package/dist/esm/model/nodes/DelegateFunctionCallNode.js +1 -1
- package/dist/esm/model/nodes/GetGlobalNode.js +2 -2
- package/dist/esm/model/nodes/HttpCallNode.js +44 -75
- package/dist/esm/model/nodes/ImageNode.js +44 -3
- package/dist/esm/model/nodes/LLMChatV2Node.js +26 -4
- package/dist/esm/model/nodes/ObjectNode.js +29 -18
- package/dist/esm/model/nodes/PromptNode.js +2 -1
- package/dist/esm/model/nodes/ReferencedGraphAliasNode.js +4 -1
- package/dist/esm/model/nodes/SetGlobalNode.js +5 -3
- package/dist/esm/model/nodes/StopWatchingStreamingOutputNode.js +8 -8
- package/dist/esm/model/nodes/StreamValueNode.js +38 -0
- package/dist/esm/model/nodes/SubGraphNode.js +199 -35
- package/dist/esm/model/nodes/ToBase64Node.js +106 -0
- package/dist/esm/model/nodes/WatchStreamingOutputNode.js +7 -7
- package/dist/esm/model/nodes/toolCallDelegation.js +5 -1
- package/dist/esm/model/profileSuspensionHints.js +8 -0
- package/dist/esm/recording/ExecutionRecorder.js +26 -0
- package/dist/esm/serialization.js +2 -0
- package/dist/esm/utils/base64.js +18 -15
- package/dist/esm/utils/coerceType.js +11 -1
- package/dist/esm/utils/errors.js +41 -0
- package/dist/esm/utils/interpolation.js +44 -22
- package/dist/esm/utils/interpolationSyntax.js +15 -6
- package/dist/esm/utils/serialization/serialization.js +3 -2
- package/dist/esm/utils/serialization/serializationUtils.js +6 -0
- package/dist/esm/utils/serialization/serialization_v4.js +15 -3
- package/dist/esm/webAppRuntime.js +1 -0
- package/dist/types/api/createProcessor.d.ts +7 -1
- package/dist/types/exports.d.ts +4 -0
- package/dist/types/model/AgentResponseTrace.d.ts +15 -4
- package/dist/types/model/AgentResponseTracePresentation.d.ts +15 -0
- package/dist/types/model/CycleDetector.d.ts +1 -2
- package/dist/types/model/DataValue.d.ts +12 -8
- package/dist/types/model/ExecutorProtocol.d.ts +9 -0
- package/dist/types/model/GraphBoundaryCache.d.ts +2 -0
- package/dist/types/model/GraphBoundaryEffects.d.ts +10 -1
- package/dist/types/model/GraphExecutionState.d.ts +68 -0
- package/dist/types/model/GraphProcessor.d.ts +2 -0
- package/dist/types/model/GraphSchedulerBoundaryState.d.ts +96 -0
- package/dist/types/model/Nodes.d.ts +11 -4
- package/dist/types/model/ProcessContext.d.ts +24 -3
- package/dist/types/model/ProjectBundle.d.ts +59 -0
- package/dist/types/model/ProjectBundleRuntime.d.ts +24 -0
- package/dist/types/model/ProjectReferenceLoader.d.ts +3 -0
- package/dist/types/model/RivetUIContext.d.ts +1 -1
- package/dist/types/model/SchedulerBoundaryPlanner.d.ts +42 -0
- package/dist/types/model/Settings.d.ts +1 -0
- package/dist/types/model/StreamingWatchTopology.d.ts +11 -1
- package/dist/types/model/SubgraphProjectTarget.d.ts +38 -0
- package/dist/types/model/SubprocessorBridge.d.ts +2 -0
- package/dist/types/model/chat-v2/chatV2CredentialNames.d.ts +4 -0
- package/dist/types/model/chat-v2/chatV2Outputs.d.ts +1 -1
- package/dist/types/model/chat-v2/chatV2ProviderRegistry.d.ts +79 -1
- package/dist/types/model/chat-v2/chatV2ProviderTypes.d.ts +1 -1
- package/dist/types/model/chat-v2/chatV2Shared.d.ts +1 -1
- package/dist/types/model/chat-v2/chatV2UsageAccounting.d.ts +2 -0
- package/dist/types/model/chat-v2/llmChatV2NodeData.d.ts +4 -1
- package/dist/types/model/chat-v2/llmChatV2NodeMigration.d.ts +3 -1
- package/dist/types/model/chat-v2/llmInvocationCoordinator.d.ts +2 -0
- package/dist/types/model/chat-v2/llmInvocationResultProjector.d.ts +2 -0
- package/dist/types/model/chat-v2/llmProfileFallback.d.ts +51 -3
- package/dist/types/model/chat-v2/llmProfileFieldRegistry.d.ts +10 -7
- package/dist/types/model/chat-v2/llmProfileHealthStore.d.ts +6 -2
- package/dist/types/model/chat-v2/modelRegistry.d.ts +5 -4
- package/dist/types/model/chat-v2/openRouterModel.d.ts +2 -0
- package/dist/types/model/chat-v2/providerOptions.d.ts +2 -13
- package/dist/types/model/chat-v2/temperature.d.ts +2 -0
- package/dist/types/model/classifier/credentials.d.ts +7 -1
- package/dist/types/model/classifier/images.d.ts +18 -0
- package/dist/types/model/classifier/json.d.ts +19 -0
- package/dist/types/model/classifier/limits.d.ts +45 -0
- package/dist/types/model/classifier/openai.d.ts +5 -0
- package/dist/types/model/classifier/perplexity.d.ts +7 -0
- package/dist/types/model/classifier/preparation.d.ts +16 -0
- package/dist/types/model/classifier/profile.d.ts +46 -0
- package/dist/types/model/classifier/profileExecution.d.ts +32 -0
- package/dist/types/model/classifier/providers.d.ts +98 -9
- package/dist/types/model/classifier/questionHelpers.d.ts +6 -4
- package/dist/types/model/classifier/questions.d.ts +4 -0
- package/dist/types/model/classifier/response.d.ts +4 -0
- package/dist/types/model/classifier/state.d.ts +37 -0
- package/dist/types/model/classifier/types.d.ts +11 -0
- package/dist/types/model/nodeRunFailure.d.ts +13 -0
- package/dist/types/model/nodes/CatchStreamingChunksNode.d.ts +20 -0
- package/dist/types/model/nodes/ClassifierEvaluateNode.d.ts +17 -12
- package/dist/types/model/nodes/ClassifierProfileNode.d.ts +20 -0
- package/dist/types/model/nodes/GetGlobalNode.d.ts +7 -0
- package/dist/types/model/nodes/ImageNode.d.ts +4 -0
- package/dist/types/model/nodes/LLMChatV2Node.d.ts +1 -0
- package/dist/types/model/nodes/ObjectNode.d.ts +2 -1
- package/dist/types/model/nodes/StreamValueNode.d.ts +14 -0
- package/dist/types/model/nodes/SubGraphNode.d.ts +21 -2
- package/dist/types/model/nodes/ToBase64Node.d.ts +12 -0
- package/dist/types/model/nodes/toolCallDelegation.d.ts +3 -1
- package/dist/types/model/profileSuspensionHints.d.ts +8 -0
- package/dist/types/recording/ExecutionRecorder.d.ts +8 -2
- package/dist/types/serialization.d.ts +2 -0
- package/dist/types/utils/base64.d.ts +1 -1
- package/dist/types/utils/errors.d.ts +4 -0
- package/dist/types/utils/interpolation.d.ts +13 -2
- package/dist/types/utils/interpolationSyntax.d.ts +1 -1
- package/dist/types/utils/serialization/serialization.d.ts +3 -1
- package/dist/types/utils/serialization/serializationUtils.d.ts +1 -0
- package/dist/types/webAppRuntime.d.ts +1 -0
- package/package.json +7 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NodeRegistration } from './NodeRegistration.js';
|
|
2
2
|
export * from './nodes/UserInputNode.js';
|
|
3
3
|
export * from './nodes/TextNode.js';
|
|
4
|
+
export { buildNodeBodyPreview } from './nodes/nodeBodyPreview.js';
|
|
4
5
|
export * from './nodes/ChatNode.js';
|
|
5
6
|
export * from './nodes/ChatNodeBase.js';
|
|
6
7
|
export * from './nodes/LLMChatV2Node.js';
|
|
@@ -42,6 +43,8 @@ export * from './DataBusTopology.js';
|
|
|
42
43
|
export * from './nodes/StartBackgroundBranchNode.js';
|
|
43
44
|
export * from './nodes/WatchStreamingOutputNode.js';
|
|
44
45
|
export * from './nodes/StopWatchingStreamingOutputNode.js';
|
|
46
|
+
export * from './nodes/StreamValueNode.js';
|
|
47
|
+
export * from './nodes/CatchStreamingChunksNode.js';
|
|
45
48
|
export * from './nodes/PopNode.js';
|
|
46
49
|
export * from './nodes/SetGlobalNode.js';
|
|
47
50
|
export * from './nodes/GetGlobalNode.js';
|
|
@@ -63,6 +66,7 @@ export * from './nodes/HashNode.js';
|
|
|
63
66
|
export * from './nodes/AbortGraphNode.js';
|
|
64
67
|
export * from './nodes/RaceInputsNode.js';
|
|
65
68
|
export * from './nodes/ToJsonNode.js';
|
|
69
|
+
export * from './nodes/ToBase64Node.js';
|
|
66
70
|
export * from './nodes/JoinNode.js';
|
|
67
71
|
export * from './nodes/FilterNode.js';
|
|
68
72
|
export * from './nodes/JSFilterNode.js';
|
|
@@ -110,17 +114,20 @@ export * from './nodes/MCPGetPromptNode.js';
|
|
|
110
114
|
export * from './nodes/ReferencedGraphAliasNode.js';
|
|
111
115
|
export * from './nodes/NodePrefabInstanceNode.js';
|
|
112
116
|
export * from './nodes/ClassifierQuestionNode.js';
|
|
117
|
+
export * from './nodes/ClassifierProfileNode.js';
|
|
118
|
+
export * from './classifier/profile.js';
|
|
119
|
+
export { classifierFailureKinds, type ClassifierFailureKind, type ClassifierAttemptUsage } from './classifier/types.js';
|
|
113
120
|
export * from './nodes/ClassifierEvaluateNode.js';
|
|
114
|
-
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" | "setGlobal" | "setStoredValue" | "graphOutput" | "delegateFunctionCall" | "graphCallPath" | "raiseEvent" | "reportProgress" | "getGlobal" | "getStoredValue" | "abortGraph" | "prompt" | "llmChatV2" | "
|
|
121
|
+
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" | "userInput" | "graphInput" | "setGlobal" | "setStoredValue" | "graphOutput" | "delegateFunctionCall" | "graphCallPath" | "raiseEvent" | "reportProgress" | "getGlobal" | "getStoredValue" | "abortGraph" | "prompt" | "llmChatV2" | "watchStreamingOutput" | "catchStreamingChunks" | "startBackgroundBranch" | "stopWatchingStreamingOutput" | "chunk" | "llmProfile" | "extractRegex" | "codeNew" | "expression" | "matchCase" | "readDirectory" | "readFile" | "ifElse" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "projectName" | "coalesce" | "coalesceNew" | "didRun" | "passthrough" | "dataBus" | "streamValue" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "knowledgeSource" | "knowledgeDocument" | "syncKnowledgeSource" | "getKnowledgeSourceStatus" | "searchKnowledge" | "buildKnowledgeContext" | "hash" | "raceInputs" | "toJson" | "toBase64" | "jsFilter" | "jsMap" | "compare" | "evaluate" | "randomNumber" | "shuffle" | "comment" | "httpCall" | "delay" | "appendToDataset" | "createDataset" | "loadDataset" | "getAllDatasets" | "datasetNearestNeighbors" | "getDatasetRow" | "extractMarkdownCodeBlocks" | "assembleMessage" | "urlReference" | "destructure" | "replaceDataset" | "listGraphs" | "graphReference" | "callGraph" | "playAudio" | "chatLoop" | "readAllFiles" | "toMarkdownTable" | "cron" | "toTree" | "loopUntil" | "mcpDiscovery" | "mcpToolCall" | "mcpGetPrompt" | "referencedGraphAlias" | "nodePrefabInstance" | "classifierQuestion" | "classifierEvaluate" | "classifierProfile", import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | import("./nodes/CatchStreamingChunksNode.js").CatchStreamingChunksNode | import("./nodes/UserInputNode.js").UserInputNode | import("./nodes/TextNode.js").TextNode | import("./nodes/ChatNode.js").ChatNode | 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/MatchCaseNode.js").MatchCaseNode | 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/GraphCallPathNode.js").GraphCallPathNode | import("./nodes/ProjectNameNode.js").ProjectNameNode | import("./nodes/CoalesceNode.js").CoalesceNode | import("./nodes/CoalesceNewNode.js").CoalesceNewNode | import("./nodes/DidRunNode.js").DidRunNode | import("./nodes/PassthroughNode.js").PassthroughNode | import("./nodes/DataBusNode.js").DataBusNode | import("./nodes/StartBackgroundBranchNode.js").StartBackgroundBranchNode | import("./nodes/WatchStreamingOutputNode.js").WatchStreamingOutputNode | import("./nodes/StopWatchingStreamingOutputNode.js").StopWatchingStreamingOutputNode | import("./nodes/StreamValueNode.js").StreamValueNode | 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/ToBase64Node.js").ToBase64Node | 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 & {
|
|
115
122
|
type: "mcpDiscovery";
|
|
116
123
|
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
117
124
|
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
118
|
-
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode | import("./NodePrefabResolver.js").NodePrefabInstanceNode | import("./nodes/ClassifierQuestionNode.js").ClassifierQuestionNode | import("./nodes/ClassifierEvaluateNode.js").ClassifierEvaluateNode>;
|
|
119
|
-
declare let globalRivetNodeRegistry: NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "text" | "chat" | "array" | "code" | "context" | "graphInput" | "setGlobal" | "setStoredValue" | "graphOutput" | "delegateFunctionCall" | "graphCallPath" | "raiseEvent" | "reportProgress" | "getGlobal" | "getStoredValue" | "abortGraph" | "prompt" | "llmChatV2" | "
|
|
125
|
+
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode | import("./NodePrefabResolver.js").NodePrefabInstanceNode | import("./nodes/ClassifierQuestionNode.js").ClassifierQuestionNode | import("./nodes/ClassifierEvaluateNode.js").ClassifierEvaluateNode | import("./nodes/ClassifierProfileNode.js").ClassifierProfileNode>;
|
|
126
|
+
declare let globalRivetNodeRegistry: NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "text" | "chat" | "array" | "code" | "context" | "userInput" | "graphInput" | "setGlobal" | "setStoredValue" | "graphOutput" | "delegateFunctionCall" | "graphCallPath" | "raiseEvent" | "reportProgress" | "getGlobal" | "getStoredValue" | "abortGraph" | "prompt" | "llmChatV2" | "watchStreamingOutput" | "catchStreamingChunks" | "startBackgroundBranch" | "stopWatchingStreamingOutput" | "chunk" | "llmProfile" | "extractRegex" | "codeNew" | "expression" | "matchCase" | "readDirectory" | "readFile" | "ifElse" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "projectName" | "coalesce" | "coalesceNew" | "didRun" | "passthrough" | "dataBus" | "streamValue" | "waitForEvent" | "gptFunction" | "toYaml" | "getEmbedding" | "vectorStore" | "vectorNearestNeighbors" | "knowledgeSource" | "knowledgeDocument" | "syncKnowledgeSource" | "getKnowledgeSourceStatus" | "searchKnowledge" | "buildKnowledgeContext" | "hash" | "raceInputs" | "toJson" | "toBase64" | "jsFilter" | "jsMap" | "compare" | "evaluate" | "randomNumber" | "shuffle" | "comment" | "httpCall" | "delay" | "appendToDataset" | "createDataset" | "loadDataset" | "getAllDatasets" | "datasetNearestNeighbors" | "getDatasetRow" | "extractMarkdownCodeBlocks" | "assembleMessage" | "urlReference" | "destructure" | "replaceDataset" | "listGraphs" | "graphReference" | "callGraph" | "playAudio" | "chatLoop" | "readAllFiles" | "toMarkdownTable" | "cron" | "toTree" | "loopUntil" | "mcpDiscovery" | "mcpToolCall" | "mcpGetPrompt" | "referencedGraphAlias" | "nodePrefabInstance" | "classifierQuestion" | "classifierEvaluate" | "classifierProfile", import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | import("./nodes/CatchStreamingChunksNode.js").CatchStreamingChunksNode | import("./nodes/UserInputNode.js").UserInputNode | import("./nodes/TextNode.js").TextNode | import("./nodes/ChatNode.js").ChatNode | 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/MatchCaseNode.js").MatchCaseNode | 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/GraphCallPathNode.js").GraphCallPathNode | import("./nodes/ProjectNameNode.js").ProjectNameNode | import("./nodes/CoalesceNode.js").CoalesceNode | import("./nodes/CoalesceNewNode.js").CoalesceNewNode | import("./nodes/DidRunNode.js").DidRunNode | import("./nodes/PassthroughNode.js").PassthroughNode | import("./nodes/DataBusNode.js").DataBusNode | import("./nodes/StartBackgroundBranchNode.js").StartBackgroundBranchNode | import("./nodes/WatchStreamingOutputNode.js").WatchStreamingOutputNode | import("./nodes/StopWatchingStreamingOutputNode.js").StopWatchingStreamingOutputNode | import("./nodes/StreamValueNode.js").StreamValueNode | 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/ToBase64Node.js").ToBase64Node | 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 & {
|
|
120
127
|
type: "mcpDiscovery";
|
|
121
128
|
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
122
129
|
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
123
|
-
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode | import("./NodePrefabResolver.js").NodePrefabInstanceNode | import("./nodes/ClassifierQuestionNode.js").ClassifierQuestionNode | import("./nodes/ClassifierEvaluateNode.js").ClassifierEvaluateNode>;
|
|
130
|
+
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode | import("./NodePrefabResolver.js").NodePrefabInstanceNode | import("./nodes/ClassifierQuestionNode.js").ClassifierQuestionNode | import("./nodes/ClassifierEvaluateNode.js").ClassifierEvaluateNode | import("./nodes/ClassifierProfileNode.js").ClassifierProfileNode>;
|
|
124
131
|
export { globalRivetNodeRegistry };
|
|
125
132
|
export type BuiltInNodes = typeof globalRivetNodeRegistry.NodesType;
|
|
126
133
|
export type BuiltInNodeType = typeof globalRivetNodeRegistry.NodeTypesType;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Opaque } from 'type-fest';
|
|
2
|
+
import type { ClassifierFailureKind, ClassifierAttemptUsage } from './classifier/types.js';
|
|
2
3
|
import { type RuntimeSettings, type NativeApi, type Project, type DataValue, type ExternalFunction, type Outputs, type GraphId, type GraphProcessor, type ScalarOrArrayDataValue, type DatasetProvider, type ChartNode, type NodeId, type PortId, type AttachedNodeData, type AudioProvider, type StringArrayDataValue, type ProjectId, type MCPProvider } from '../index.js';
|
|
3
4
|
import type { Tokenizer } from '../integrations/Tokenizer.js';
|
|
4
5
|
import type { CodeRunner } from '../integrations/CodeRunner.js';
|
|
5
6
|
import type { ProjectReferenceLoader } from './ProjectReferenceLoader.js';
|
|
7
|
+
import type { ResolvedSubgraphProject, SubgraphProjectLoader, SubgraphProjectRun } from './SubgraphProjectTarget.js';
|
|
8
|
+
import type { ExecutionRecorderOptions } from '../recording/ExecutionRecorder.js';
|
|
6
9
|
import type { GraphBoundary } from './GraphBoundaryCache.js';
|
|
7
10
|
import type { GraphInputStream } from './GraphInputStream.js';
|
|
8
11
|
import type { GraphProgress } from './GraphProgress.js';
|
|
@@ -113,15 +116,21 @@ export type ChatV2CallTraceEvent = Omit<ChatV2CallFinishedEvent, 'rawUsage'>;
|
|
|
113
116
|
* skipped by an open circuit and health-store fail-open decisions.
|
|
114
117
|
*/
|
|
115
118
|
export type LLMProfileAttemptTraceEvent = {
|
|
119
|
+
family?: 'llm' | 'classifier';
|
|
120
|
+
failureKind?: ClassifierFailureKind;
|
|
121
|
+
skipReason?: 'unreached';
|
|
122
|
+
classifierUsage?: ClassifierAttemptUsage;
|
|
123
|
+
/** Physical classifier request duration, excluding retry waits. */
|
|
124
|
+
durationMs?: number;
|
|
116
125
|
eventId: string;
|
|
117
126
|
roundIndex: number;
|
|
118
127
|
/** Present when this attempt belongs to a From profile fallback candidate. */
|
|
119
128
|
profileIndex?: number;
|
|
120
|
-
/** User-facing title captured from the source
|
|
129
|
+
/** User-facing title captured from the source profile node. */
|
|
121
130
|
profileName?: string;
|
|
122
131
|
nodeId: NodeId;
|
|
123
132
|
processId: ProcessId;
|
|
124
|
-
provider:
|
|
133
|
+
provider: string;
|
|
125
134
|
model: string;
|
|
126
135
|
customProviderApi?: CustomProviderApi;
|
|
127
136
|
stage: 'configuration' | 'request' | 'response-validation' | 'health-gate' | 'health-update';
|
|
@@ -134,7 +143,7 @@ export type LLMProfileAttemptTraceEvent = {
|
|
|
134
143
|
healthDisposition?: 'allow' | 'deny' | 'fail-open';
|
|
135
144
|
healthOutcome?: RivetLLMProfileHealthOutcome;
|
|
136
145
|
retryAt?: number;
|
|
137
|
-
timeoutKind?: 'first-output' | 'stream-inactivity';
|
|
146
|
+
timeoutKind?: 'first-output' | 'stream-inactivity' | 'response';
|
|
138
147
|
};
|
|
139
148
|
export type LLMProfileAttemptObserver = (event: LLMProfileAttemptTraceEvent) => void;
|
|
140
149
|
export type ToolCallFinishedEvent = {
|
|
@@ -174,6 +183,12 @@ export type ProcessContext = {
|
|
|
174
183
|
codeRunner?: CodeRunner;
|
|
175
184
|
/** The loader for loading project references. */
|
|
176
185
|
projectReferenceLoader?: ProjectReferenceLoader;
|
|
186
|
+
/** Host-only resolver for Studio Server Subgraph nodes targeting another saved project. */
|
|
187
|
+
subgraphProjectLoader?: SubgraphProjectLoader;
|
|
188
|
+
/** Optional host-owned recording sink. Failures must not alter graph results. */
|
|
189
|
+
onSubgraphProjectRun?: (run: SubgraphProjectRun) => void | Promise<void>;
|
|
190
|
+
/** Apply the host's recording privacy settings to called-project replays. */
|
|
191
|
+
subgraphRecordingOptions?: ExecutionRecorderOptions;
|
|
177
192
|
/** The path to the current project. Required if project references are being used. */
|
|
178
193
|
projectPath?: string;
|
|
179
194
|
/**
|
|
@@ -235,11 +250,17 @@ export type GraphExecutionMetadata = {
|
|
|
235
250
|
rootRunId: RootRunId;
|
|
236
251
|
graphRunId: GraphRunId;
|
|
237
252
|
graphId: GraphId;
|
|
253
|
+
/** Actual snapshot owner, including legacy referenced-graph execution. */
|
|
254
|
+
projectId?: ProjectId;
|
|
255
|
+
/** Present for a hosted Subgraph call into another saved project. */
|
|
256
|
+
projectScope?: string;
|
|
238
257
|
parentGraphRunId?: GraphRunId;
|
|
239
258
|
executor?: SubgraphExecutorMetadata;
|
|
240
259
|
evaluation?: EvaluationExecutionMetadata;
|
|
241
260
|
};
|
|
242
261
|
export type InternalProcessContext<T extends ChartNode = ChartNode> = ProcessContext & {
|
|
262
|
+
/** Dataset snapshot belonging to this node's selected external Subgraph target. */
|
|
263
|
+
subgraphTarget?: ResolvedSubgraphProject;
|
|
243
264
|
/** Invocation-scoped live inputs for a named graph caller. Never serialized. */
|
|
244
265
|
graphInputStreams?: Readonly<Record<string, GraphInputStream>>;
|
|
245
266
|
/** The executor that is running the current processor. */
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Project } from './Project.js';
|
|
2
|
+
import { type GraphBoundary } from './GraphBoundaryCache.js';
|
|
3
|
+
import type { PluginLoadSpec } from './PluginLoadSpec.js';
|
|
4
|
+
/** Deliberate, user-facing bundle validation failures; never raw storage errors. */
|
|
5
|
+
export declare class ProjectBundleError extends Error {
|
|
6
|
+
constructor(message: string, options?: ErrorOptions);
|
|
7
|
+
}
|
|
8
|
+
/** Portable, editable project files. Paths are relative to the manifest. */
|
|
9
|
+
export type ProjectBundleFile = {
|
|
10
|
+
path: string;
|
|
11
|
+
/** Legacy export metadata; not enforced when loading. */
|
|
12
|
+
bytes?: number;
|
|
13
|
+
/** Legacy export metadata; not enforced when loading. */
|
|
14
|
+
sha256?: string;
|
|
15
|
+
};
|
|
16
|
+
export type ProjectBundleArtifact = {
|
|
17
|
+
id: string;
|
|
18
|
+
projectId: string;
|
|
19
|
+
title: string;
|
|
20
|
+
version: 'latest' | 'published';
|
|
21
|
+
revision: string;
|
|
22
|
+
project: ProjectBundleFile;
|
|
23
|
+
datasets?: ProjectBundleFile;
|
|
24
|
+
};
|
|
25
|
+
export type ProjectBundleManifest = {
|
|
26
|
+
format: 'rivet-project-bundle';
|
|
27
|
+
schemaVersion: 1;
|
|
28
|
+
requiredLoaderVersion: 1 | 2 | 3;
|
|
29
|
+
/** Explicit export-wide version selection; one artifact per project. */
|
|
30
|
+
versionPolicy?: 'latest' | 'published';
|
|
31
|
+
exportingRuntimeVersion: string;
|
|
32
|
+
rootArtifact: string;
|
|
33
|
+
artifacts: ProjectBundleArtifact[];
|
|
34
|
+
targets: {
|
|
35
|
+
projectId: string;
|
|
36
|
+
version: 'latest' | 'published';
|
|
37
|
+
artifact: string;
|
|
38
|
+
}[];
|
|
39
|
+
references: {
|
|
40
|
+
projectId: string;
|
|
41
|
+
artifact: string;
|
|
42
|
+
}[];
|
|
43
|
+
plugins: PluginLoadSpec[];
|
|
44
|
+
};
|
|
45
|
+
export declare const PROJECT_BUNDLE_MANIFEST = "rivet-bundle.json";
|
|
46
|
+
export declare const PROJECT_BUNDLE_MAX_ARTIFACTS = 256;
|
|
47
|
+
export declare const PROJECT_BUNDLE_MAX_MANIFEST_BYTES: number;
|
|
48
|
+
export declare function projectBundleTargetKey(projectId: string, version: string): string;
|
|
49
|
+
export declare function listProjectBundleCalls(project: Project): {
|
|
50
|
+
projectId: string;
|
|
51
|
+
version: 'latest' | 'published';
|
|
52
|
+
graphId: string;
|
|
53
|
+
boundary?: GraphBoundary;
|
|
54
|
+
}[];
|
|
55
|
+
/** Uses the same saved wire contract as runtime execution, without running any nodes. */
|
|
56
|
+
export declare function validateProjectBundleCall(call: ReturnType<typeof listProjectBundleCalls>[number], target: Project): void;
|
|
57
|
+
/** Reject missing bindings and cross-project dependency cycles before executing any graph. */
|
|
58
|
+
export declare function validateProjectBundleProjects(manifest: ProjectBundleManifest, projects: ReadonlyMap<string, Project>): void;
|
|
59
|
+
export declare function validateProjectBundleManifest(value: unknown): ProjectBundleManifest;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DatasetProvider } from '../integrations/DatasetProvider.js';
|
|
2
|
+
import type { CombinedDataset } from '../utils/index.js';
|
|
3
|
+
import type { Project } from './Project.js';
|
|
4
|
+
import type { ProjectReferenceLoader } from './ProjectReferenceLoader.js';
|
|
5
|
+
import type { SubgraphProjectLoader } from './SubgraphProjectTarget.js';
|
|
6
|
+
import { type ProjectBundleManifest } from './ProjectBundle.js';
|
|
7
|
+
export type ProjectBundleSnapshot = {
|
|
8
|
+
project: Project;
|
|
9
|
+
datasets: CombinedDataset[];
|
|
10
|
+
sourceProjectPath?: string;
|
|
11
|
+
};
|
|
12
|
+
export type ProjectBundleRuntime = {
|
|
13
|
+
project: Project;
|
|
14
|
+
projectPath?: string;
|
|
15
|
+
datasetProvider: DatasetProvider;
|
|
16
|
+
projectReferenceLoader: ProjectReferenceLoader;
|
|
17
|
+
subgraphProjectLoader: SubgraphProjectLoader;
|
|
18
|
+
};
|
|
19
|
+
/** One isolated dependency/data universe per run. The visible entry project may override its disk copy. */
|
|
20
|
+
export declare function createProjectBundleRuntime(manifest: ProjectBundleManifest, snapshots: ReadonlyMap<string, ProjectBundleSnapshot>, options?: {
|
|
21
|
+
artifactId?: string;
|
|
22
|
+
project?: Project;
|
|
23
|
+
datasetProvider?: DatasetProvider;
|
|
24
|
+
}): ProjectBundleRuntime;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { Project, ProjectId, ProjectReference } from './Project.js';
|
|
2
|
+
import type { DatasetProvider } from '../integrations/DatasetProvider.js';
|
|
2
3
|
export type ProjectReferenceLoader = {
|
|
3
4
|
/** Loads a project based on the given reference. */
|
|
4
5
|
loadProject: (currentProjectPath: string | undefined, reference: ProjectReference) => Promise<Project>;
|
|
6
|
+
/** Optional snapshot-owned datasets; older loaders retain the caller's provider. */
|
|
7
|
+
getDatasetProvider?: (project: Project) => DatasetProvider | undefined;
|
|
5
8
|
};
|
|
6
9
|
/** The root information needed to load its complete referenced-project closure. */
|
|
7
10
|
export type ProjectReferenceRoot = {
|
|
@@ -20,7 +20,7 @@ export type RivetUIContext = {
|
|
|
20
20
|
/** Gets a string plugin config value from the settings, falling back to a specified environment variable if set. */
|
|
21
21
|
getPluginConfig(name: string): string | undefined;
|
|
22
22
|
/** Best-effort UI-side model discovery for provider-backed chat nodes. */
|
|
23
|
-
getChatModelOptions?: (provider: 'openai' | 'anthropic' | 'google') => Promise<{
|
|
23
|
+
getChatModelOptions?: (provider: 'openai' | 'anthropic' | 'google' | 'openrouter') => Promise<{
|
|
24
24
|
value: string;
|
|
25
25
|
label: string;
|
|
26
26
|
}[]>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ChartNode, NodeId, NodeConnection, PortId } from './NodeBase.js';
|
|
2
|
+
import type { NodeGraph } from './NodeGraph.js';
|
|
3
|
+
/** Definition-only planners. Iteration order preserves the processor's existing
|
|
4
|
+
* validation/installation order; scheduling and resource ownership stay there. */
|
|
5
|
+
type BoundaryPlanningOptions = {
|
|
6
|
+
graph: NodeGraph;
|
|
7
|
+
executionNodes: readonly ChartNode[];
|
|
8
|
+
nodesById: Readonly<Record<NodeId, ChartNode>>;
|
|
9
|
+
connections: readonly NodeConnection[];
|
|
10
|
+
relevantNodeIds?: ReadonlySet<NodeId>;
|
|
11
|
+
preloadedNodes: {
|
|
12
|
+
has(nodeId: NodeId): boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type StreamingWatchTopologyPlan = {
|
|
16
|
+
kind: 'dormant';
|
|
17
|
+
watchNode: ChartNode;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'watch';
|
|
20
|
+
watchNode: ChartNode;
|
|
21
|
+
sourceNodeId: NodeId;
|
|
22
|
+
sourceOutputId: PortId;
|
|
23
|
+
branchNodeIds: Set<NodeId>;
|
|
24
|
+
graph: NodeGraph;
|
|
25
|
+
includeAllStreamedOutput: boolean;
|
|
26
|
+
stopNodeId?: NodeId;
|
|
27
|
+
};
|
|
28
|
+
export declare function getAsyncBranchWatchViolation(triggerNode: ChartNode, enclosingWatchNode?: ChartNode): Error | undefined;
|
|
29
|
+
export declare function planStreamingWatchTopology(options: BoundaryPlanningOptions & {
|
|
30
|
+
consumedWatchNodeId?: NodeId;
|
|
31
|
+
enclosingWatchNode?: ChartNode;
|
|
32
|
+
}): Generator<StreamingWatchTopologyPlan>;
|
|
33
|
+
export declare function planAsyncBranchTopology(options: BoundaryPlanningOptions & {
|
|
34
|
+
consumedTriggerNodeId?: NodeId;
|
|
35
|
+
inputAnchorNodeIds?: ReadonlySet<NodeId>;
|
|
36
|
+
enclosingWatchNode?: ChartNode;
|
|
37
|
+
}): Generator<{
|
|
38
|
+
triggerNode: ChartNode;
|
|
39
|
+
graph: NodeGraph;
|
|
40
|
+
nodeIds: Set<NodeId>;
|
|
41
|
+
}>;
|
|
42
|
+
export {};
|
|
@@ -18,6 +18,7 @@ export interface Settings<PluginSettings = Record<string, Record<string, unknown
|
|
|
18
18
|
openAiKey?: string;
|
|
19
19
|
anthropicApiKey?: string;
|
|
20
20
|
googleApiKey?: string;
|
|
21
|
+
openRouterApiKey?: string;
|
|
21
22
|
customAiApiKey?: string;
|
|
22
23
|
openAiOrganization?: string;
|
|
23
24
|
openAiEndpoint?: string;
|
|
@@ -15,7 +15,7 @@ export declare function canStreamThroughGraphInput(node: ChartNode): node is Gra
|
|
|
15
15
|
/** A named output may forward only when one direct producer determines its terminal value. */
|
|
16
16
|
export declare function canForwardGraphOutputPartials(graphOutput: ChartNode, sourceNode: ChartNode, graphOutputIsFrozen: boolean): graphOutput is GraphOutputNode;
|
|
17
17
|
/** Trace Watch demand through named boundaries without making ordinary nodes repeatable. */
|
|
18
|
-
export declare function getProjectStreamingOutputWatchConnections({ project, graph, referencedProjects, registry, frozenNodeOutputs, isNodeFrozen, fullGraphCallers, }: {
|
|
18
|
+
export declare function getProjectStreamingOutputWatchConnections({ project, graph, referencedProjects, registry, frozenNodeOutputs, isNodeFrozen, fullGraphCallers, getPreviewGraphOutputStreamingCapability, onlyStreamCapableSources, }: {
|
|
19
19
|
project: Project;
|
|
20
20
|
graph: NodeGraph;
|
|
21
21
|
referencedProjects: Record<ProjectId, Project>;
|
|
@@ -23,4 +23,14 @@ export declare function getProjectStreamingOutputWatchConnections({ project, gra
|
|
|
23
23
|
frozenNodeOutputs?: FrozenNodeOutputsByGraph;
|
|
24
24
|
isNodeFrozen?: (owner: Project, candidate: NodeGraph, node: ChartNode) => boolean;
|
|
25
25
|
fullGraphCallers?: ReadonlySet<NodeId>;
|
|
26
|
+
/** Redacted hosted previews contain boundaries, not executable graph topology. */
|
|
27
|
+
getPreviewGraphOutputStreamingCapability?: (owner: Project, graph: NodeGraph, outputNodeId: NodeId) => boolean | undefined;
|
|
28
|
+
/** Presentation-only filter. Runtime routing must accept ordinary values too. */
|
|
29
|
+
onlyStreamCapableSources?: boolean;
|
|
26
30
|
}): ReadonlySet<NodeConnection>;
|
|
31
|
+
/** Derive safe boundary capability hints for every graph in one topology pass. */
|
|
32
|
+
export declare function getProjectStreamableGraphOutputNodeIdsByGraph({ project, referencedProjects, registry, }: {
|
|
33
|
+
project: Project;
|
|
34
|
+
referencedProjects: Record<ProjectId, Project>;
|
|
35
|
+
registry: NodeRegistration<any, any>;
|
|
36
|
+
}): Record<string, NodeId[]>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { DatasetProvider } from '../integrations/DatasetProvider.js';
|
|
2
|
+
import type { Project, ProjectId } from './Project.js';
|
|
3
|
+
import type { GraphId } from './NodeGraph.js';
|
|
4
|
+
import type { ExecutionRecorder } from '../recording/ExecutionRecorder.js';
|
|
5
|
+
/** Hosts resolve targets from saved storage; portable bundles resolve their captured snapshots. Never an editor tab. */
|
|
6
|
+
export type SubgraphProjectVersion = 'latest' | 'published';
|
|
7
|
+
export type SubgraphProjectTarget = {
|
|
8
|
+
projectId: ProjectId;
|
|
9
|
+
version: SubgraphProjectVersion;
|
|
10
|
+
};
|
|
11
|
+
export type ResolvedSubgraphProject = {
|
|
12
|
+
project: Project;
|
|
13
|
+
/** The selected project's dataset snapshot, when it differs from the caller's. */
|
|
14
|
+
datasetProvider?: DatasetProvider;
|
|
15
|
+
revisionKey?: string;
|
|
16
|
+
/** Exact saved artifact used for execution, including embedded attachments. */
|
|
17
|
+
projectContents?: string;
|
|
18
|
+
datasetsContents?: string;
|
|
19
|
+
/** Current source location for recording ownership; not used to execute. */
|
|
20
|
+
sourceProjectPath?: string;
|
|
21
|
+
};
|
|
22
|
+
export type SubgraphProjectRun = {
|
|
23
|
+
target: SubgraphProjectTarget;
|
|
24
|
+
resolved: ResolvedSubgraphProject;
|
|
25
|
+
graphId: GraphId;
|
|
26
|
+
recorder: ExecutionRecorder;
|
|
27
|
+
status: 'succeeded' | 'failed';
|
|
28
|
+
durationMs: number;
|
|
29
|
+
errorMessage?: string;
|
|
30
|
+
/** The caller's run correlation key, shared with its own recording when available. */
|
|
31
|
+
correlationId?: string;
|
|
32
|
+
};
|
|
33
|
+
export type SubgraphProjectLoader = {
|
|
34
|
+
loadTarget(target: SubgraphProjectTarget): Promise<ResolvedSubgraphProject>;
|
|
35
|
+
};
|
|
36
|
+
/** Internal definition key; not a project metadata ID or a persisted reference. */
|
|
37
|
+
export declare function getSubgraphProjectKey(target: SubgraphProjectTarget): ProjectId;
|
|
38
|
+
export declare function isSubgraphProjectKey(key: string): boolean;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type Emittery from 'emittery';
|
|
2
2
|
import type { GraphProcessor, ProcessEvents } from './GraphProcessor.js';
|
|
3
|
+
/** Cleanup must not replace an execution/setup failure already being propagated. */
|
|
4
|
+
export declare function cleanupSubprocessorBindings(lifecycle: (() => void) | undefined, events: (() => void) | undefined, executionFailed: boolean): void;
|
|
3
5
|
export declare function wireSubprocessorEvents(processor: GraphProcessor, parentEmitter: Emittery<ProcessEvents>, parentState: {
|
|
4
6
|
autoCleanup?: boolean;
|
|
5
7
|
isPaused: () => boolean;
|
|
@@ -18,6 +18,10 @@ export declare const CHAT_V2_DEFAULT_CREDENTIAL_NAMES: {
|
|
|
18
18
|
readonly programmaticName: "googleApiKey";
|
|
19
19
|
readonly environmentVariableName: "GOOGLE_GENERATIVE_AI_API_KEY";
|
|
20
20
|
};
|
|
21
|
+
readonly openrouter: {
|
|
22
|
+
readonly programmaticName: "openRouterApiKey";
|
|
23
|
+
readonly environmentVariableName: "OPENROUTER_API_KEY";
|
|
24
|
+
};
|
|
21
25
|
};
|
|
22
26
|
export declare function isChatV2BuiltInProvider(provider: ChatV2Provider): provider is ChatV2BuiltInProvider;
|
|
23
27
|
export declare function isValidChatV2ProgrammaticCredentialName(name: string): boolean;
|
|
@@ -14,7 +14,7 @@ type CreateChatV2CommonOutputsOptions = ChatV2CommonOutputOptions & {
|
|
|
14
14
|
requestBodies?: unknown[] | undefined;
|
|
15
15
|
responseBodies?: unknown[] | undefined;
|
|
16
16
|
};
|
|
17
|
-
export declare function normalizeChatV2Usage(usage: LanguageModelUsage | undefined, options: Pick<RunChatV2PipelineOptions, 'provider' | 'modelId'
|
|
17
|
+
export declare function normalizeChatV2Usage(usage: LanguageModelUsage | undefined, options: Pick<RunChatV2PipelineOptions, 'provider' | 'modelId'>, providerMetadata?: Record<string, Record<string, unknown>>): ChatV2NormalizedUsage | undefined;
|
|
18
18
|
export declare function createChatV2ResponseOutput(response: string, structuredOutput: unknown | undefined, responseFormat: RunChatV2PipelineOptions['responseFormat']): DataValue;
|
|
19
19
|
export declare function createChatV2CapturedBodyOutputs(options: Pick<RunChatV2PipelineOptions, 'requestBodies' | 'responseBodies' | 'outputRequestBody' | 'outputResponseBody'>): Outputs;
|
|
20
20
|
export declare function createChatV2CommonOutputs({ requestMessages, response, structuredOutput, functionCalls, usage, reasoning, requestBodies, responseBodies, outputUsage, outputReasoning, outputRequestBody, outputResponseBody, includeFunctionCalls, functionCallMode, responseFormat, }: CreateChatV2CommonOutputsOptions): Outputs;
|
|
@@ -1,8 +1,86 @@
|
|
|
1
|
-
import type { ChatV2Provider } from './
|
|
1
|
+
import type { ChatV2Provider } from './chatV2ProviderTypes.js';
|
|
2
2
|
/** Closed, provider-neutral capability table for the providers Rivet ships. */
|
|
3
3
|
export type ChatV2ProviderCapabilities = {
|
|
4
4
|
builtInTools: boolean;
|
|
5
5
|
parallelToolCalls: boolean;
|
|
6
6
|
structuredOutput: boolean;
|
|
7
7
|
};
|
|
8
|
+
/** Adapter metadata, not a promise about every model served by that adapter.
|
|
9
|
+
* SDKs, credential resolution and provider-native options have separate owners. */
|
|
10
|
+
export declare const chatV2ProviderDescriptors: {
|
|
11
|
+
readonly openai: {
|
|
12
|
+
readonly label: "OpenAI";
|
|
13
|
+
readonly defaultModel: "gpt-5";
|
|
14
|
+
readonly catalog: "registry";
|
|
15
|
+
readonly credentialNames: {
|
|
16
|
+
readonly programmaticName: "openAiApiKey";
|
|
17
|
+
readonly environmentVariableName: "OPENAI_API_KEY";
|
|
18
|
+
};
|
|
19
|
+
readonly capabilities: {
|
|
20
|
+
readonly builtInTools: true;
|
|
21
|
+
readonly parallelToolCalls: true;
|
|
22
|
+
readonly structuredOutput: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly anthropic: {
|
|
26
|
+
readonly label: "Anthropic";
|
|
27
|
+
readonly defaultModel: "claude-sonnet-4-20250514";
|
|
28
|
+
readonly catalog: "registry";
|
|
29
|
+
readonly credentialNames: {
|
|
30
|
+
readonly programmaticName: "anthropicApiKey";
|
|
31
|
+
readonly environmentVariableName: "ANTHROPIC_API_KEY";
|
|
32
|
+
};
|
|
33
|
+
readonly capabilities: {
|
|
34
|
+
readonly builtInTools: false;
|
|
35
|
+
readonly parallelToolCalls: true;
|
|
36
|
+
readonly structuredOutput: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly google: {
|
|
40
|
+
readonly label: "Google";
|
|
41
|
+
readonly defaultModel: "gemini-2.5-flash";
|
|
42
|
+
readonly catalog: "registry";
|
|
43
|
+
readonly credentialNames: {
|
|
44
|
+
readonly programmaticName: "googleApiKey";
|
|
45
|
+
readonly environmentVariableName: "GOOGLE_GENERATIVE_AI_API_KEY";
|
|
46
|
+
};
|
|
47
|
+
readonly capabilities: {
|
|
48
|
+
readonly builtInTools: true;
|
|
49
|
+
readonly parallelToolCalls: false;
|
|
50
|
+
readonly structuredOutput: true;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly openrouter: {
|
|
54
|
+
readonly label: "OpenRouter";
|
|
55
|
+
readonly defaultModel: "openrouter/auto";
|
|
56
|
+
readonly catalog: readonly [{
|
|
57
|
+
readonly value: "openrouter/auto";
|
|
58
|
+
readonly label: "OpenRouter Auto";
|
|
59
|
+
}];
|
|
60
|
+
readonly credentialNames: {
|
|
61
|
+
readonly programmaticName: "openRouterApiKey";
|
|
62
|
+
readonly environmentVariableName: "OPENROUTER_API_KEY";
|
|
63
|
+
};
|
|
64
|
+
readonly capabilities: {
|
|
65
|
+
readonly builtInTools: false;
|
|
66
|
+
readonly parallelToolCalls: true;
|
|
67
|
+
readonly structuredOutput: true;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly custom: {
|
|
71
|
+
readonly label: "Custom provider";
|
|
72
|
+
readonly defaultModel: "model-id";
|
|
73
|
+
readonly catalog: "registry";
|
|
74
|
+
readonly capabilities: {
|
|
75
|
+
readonly builtInTools: false;
|
|
76
|
+
readonly parallelToolCalls: true;
|
|
77
|
+
readonly structuredOutput: true;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export declare const chatV2ProviderOptions: {
|
|
82
|
+
value: ChatV2Provider;
|
|
83
|
+
label: "OpenAI" | "Google" | "Anthropic" | "OpenRouter" | "Custom provider";
|
|
84
|
+
}[];
|
|
85
|
+
export declare function isChatV2Provider(value: string): value is ChatV2Provider;
|
|
8
86
|
export declare function getChatV2ProviderCapabilities(provider: ChatV2Provider): ChatV2ProviderCapabilities;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ChatV2Provider = 'openai' | 'anthropic' | 'google' | 'custom';
|
|
1
|
+
export type ChatV2Provider = 'openai' | 'anthropic' | 'google' | 'openrouter' | 'custom';
|
|
@@ -3,7 +3,7 @@ import type { ChartNode, NodeInputDefinition, NodeOutputDefinition, PortId } fro
|
|
|
3
3
|
export type ChatV2CommonNodeData = {
|
|
4
4
|
model: string;
|
|
5
5
|
useModelInput: boolean;
|
|
6
|
-
temperature
|
|
6
|
+
temperature?: number;
|
|
7
7
|
useTemperatureInput: boolean;
|
|
8
8
|
topP?: number;
|
|
9
9
|
useTopPInput: boolean;
|
|
@@ -6,6 +6,8 @@ import type { ChatV2NormalizedUsage } from './chatV2Types.js';
|
|
|
6
6
|
* infinite token counts as real usage.
|
|
7
7
|
*/
|
|
8
8
|
export declare function isChatV2FiniteNonNegativeNumber(value: unknown): value is number;
|
|
9
|
+
/** Known USD subtotal, independent of whether Usage details are displayed. */
|
|
10
|
+
export declare function sumChatV2PhysicalCallCost(events: readonly ChatV2CallFinishedEvent[]): number | undefined;
|
|
9
11
|
/**
|
|
10
12
|
* Aggregates one node invocation's physical provider calls into its portable
|
|
11
13
|
* Usage output. The call id is a stable transport identity, so a redelivered
|
|
@@ -29,6 +29,7 @@ export type LLMChatV2NodeConfigData = ChatV2CommonNodeData & {
|
|
|
29
29
|
extraProviderOptions: string;
|
|
30
30
|
useExtraProviderOptionsInput: boolean;
|
|
31
31
|
openAIReasoningEffort: string;
|
|
32
|
+
openRouterReasoningEffort?: string;
|
|
32
33
|
openAIReasoningSummary: string;
|
|
33
34
|
openAIPreviousResponseId: string;
|
|
34
35
|
useOpenAIPreviousResponseIdInput: boolean;
|
|
@@ -63,6 +64,8 @@ export type LLMChatV2NodeConfigData = ChatV2CommonNodeData & {
|
|
|
63
64
|
autoContinueToolCalls?: boolean;
|
|
64
65
|
maxToolRounds?: number;
|
|
65
66
|
retryOnNon200?: boolean;
|
|
67
|
+
errorOnNon200?: boolean;
|
|
68
|
+
catchRequestFailed?: boolean;
|
|
66
69
|
retryOnNon200RepeatTimes?: number;
|
|
67
70
|
retryOnNon200CooldownMs?: number;
|
|
68
71
|
outputLLMAttempts?: boolean;
|
|
@@ -72,7 +75,7 @@ export type LLMChatV2NodeConfigData = ChatV2CommonNodeData & {
|
|
|
72
75
|
export type LLMChatV2NodeData = LLMChatV2NodeConfigData;
|
|
73
76
|
export type LLMChatV2Node = ChartNode<'llmChatV2', LLMChatV2NodeData>;
|
|
74
77
|
/** @deprecated Use llmProfileDataKeys from llmProfileFieldRegistry instead. */
|
|
75
|
-
export declare const llmChatV2ProfileDataKeys: ("provider" | "model" | "
|
|
78
|
+
export declare const llmChatV2ProfileDataKeys: ("provider" | "model" | "useModelInput" | "temperature" | "useTemperatureInput" | "topP" | "useTopPInput" | "topK" | "useTopKInput" | "presencePenalty" | "usePresencePenaltyInput" | "frequencyPenalty" | "useFrequencyPenaltyInput" | "stopSequences" | "useStopSequencesInput" | "seed" | "useSeedInput" | "maxTokens" | "useMaxTokensInput" | "apiKeySource" | "providerApiKeyNames" | "customProviderApiKeyProgrammaticName" | "customProviderApiKeyEnvVarName" | "customProviderBaseURL" | "useCustomProviderBaseURLInput" | "customProviderApi" | "headers" | "useHeadersInput" | "extraProviderOptions" | "useExtraProviderOptionsInput" | "openAIReasoningEffort" | "openRouterReasoningEffort" | "openAIReasoningSummary" | "openAIPreviousResponseId" | "useOpenAIPreviousResponseIdInput" | "enableOpenAIWebSearch" | "openAIWebSearchContextSize" | "enableOpenAICodeInterpreter" | "anthropicThinkingMode" | "anthropicThinkingBudget" | "useAnthropicThinkingBudgetInput" | "anthropicEffort" | "anthropicCacheControlTtl" | "googleThinkingBudget" | "useGoogleThinkingBudgetInput" | "googleThinkingLevel" | "googleIncludeThoughts" | "enableGoogleSearchGrounding" | "enableGoogleUrlContext" | "enableCircuitBreaker" | "firstOutputTimeoutMs" | "streamInactivityTimeoutMs" | "circuitBreakerFailureThreshold" | "circuitBreakerFailureWindowMs" | "circuitBreakerOpenDurationMs")[];
|
|
76
79
|
export type LLMChatV2ProfileDataKey = (typeof llmChatV2ProfileDataKeys)[number];
|
|
77
80
|
export type LLMChatV2ProfileData = Pick<LLMChatV2NodeData, LLMChatV2ProfileDataKey>;
|
|
78
81
|
export type LLMChatV2EditorCacheKeyParts = {
|