@valerypopoff/rivet2-core 2.6.0 → 2.7.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 +2735 -767
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/cjs/interpolationRuntime.cjs +7 -3
- package/dist/cjs/interpolationRuntime.cjs.map +2 -2
- package/dist/esm/api/createProcessor.js +3 -0
- package/dist/esm/exports.js +2 -1
- package/dist/esm/integrations/CodeRunner.js +6 -2
- package/dist/esm/integrations/mcp/MCPBase.js +2 -1
- package/dist/esm/model/ExecutionOutputClone.js +46 -0
- package/dist/esm/model/GlobalVariables.js +452 -0
- package/dist/esm/model/GraphBoundaryEffects.js +12 -4
- package/dist/esm/model/GraphProcessor.js +825 -41
- package/dist/esm/model/Nodes.js +6 -0
- package/dist/esm/model/ProcessContextBuilder.js +3 -1
- package/dist/esm/model/ProjectReferenceLoader.js +36 -1
- package/dist/esm/model/RecordingPlayer.js +21 -4
- package/dist/esm/model/StreamingOutputWatch.js +262 -0
- package/dist/esm/model/StreamingOutputWatchHistory.js +161 -0
- package/dist/esm/model/SubprocessorBridge.js +29 -19
- package/dist/esm/model/chat-v2/llmChatV2OutputClone.js +3 -42
- package/dist/esm/model/nodes/CodeNewNode.js +4 -1
- package/dist/esm/model/nodes/ExpressionNode.js +4 -1
- package/dist/esm/model/nodes/ExtractObjectPathNode.js +4 -4
- package/dist/esm/model/nodes/GraphOutputNode.js +13 -8
- package/dist/esm/model/nodes/MCPGetPromptNode.js +2 -1
- package/dist/esm/model/nodes/MCPToolCallNode.js +2 -1
- package/dist/esm/model/nodes/ObjectNode.js +5 -3
- package/dist/esm/model/nodes/PromptNode.js +5 -2
- package/dist/esm/model/nodes/ReferencedGraphAliasNode.js +9 -1
- package/dist/esm/model/nodes/StopWatchingStreamingOutputNode.js +48 -0
- package/dist/esm/model/nodes/SubGraphNode.js +11 -1
- package/dist/esm/model/nodes/TextNode.js +5 -2
- package/dist/esm/model/nodes/ToTreeNode.js +10 -3
- package/dist/esm/model/nodes/ToolNode.js +5 -2
- package/dist/esm/model/nodes/WatchStreamingOutputNode.js +126 -0
- package/dist/esm/model/nodes/jsListCallbackHelpers.js +7 -1
- package/dist/esm/model/nodes/jsValueInterpolation.js +21 -4
- package/dist/esm/plugins/openai/nodes/ThreadMessageNode.js +2 -1
- package/dist/esm/recording/ExecutionRecorder.js +16 -7
- package/dist/esm/utils/interpolation.js +35 -2
- package/dist/esm/utils/serialization/serializationUtils.js +9 -0
- package/dist/esm/utils/serialization/serialization_v4.js +7 -0
- package/dist/types/exports.d.ts +2 -1
- package/dist/types/integrations/CodeRunner.d.ts +3 -3
- package/dist/types/integrations/CodeRunnerOptions.d.ts +5 -0
- package/dist/types/integrations/mcp/MCPBase.d.ts +1 -1
- package/dist/types/model/ExecutionOutputClone.d.ts +11 -0
- package/dist/types/model/ExecutorProtocol.d.ts +8 -2
- package/dist/types/model/GlobalVariables.d.ts +29 -0
- package/dist/types/model/GraphBoundaryEffects.d.ts +7 -1
- package/dist/types/model/GraphProcessor.d.ts +47 -3
- package/dist/types/model/Nodes.d.ts +4 -2
- package/dist/types/model/ProcessContext.d.ts +14 -0
- package/dist/types/model/ProcessContextBuilder.d.ts +3 -1
- package/dist/types/model/Project.d.ts +7 -1
- package/dist/types/model/ProjectReferenceLoader.d.ts +15 -1
- package/dist/types/model/StreamingOutputWatch.d.ts +74 -0
- package/dist/types/model/StreamingOutputWatchHistory.d.ts +58 -0
- package/dist/types/model/SubprocessorBridge.d.ts +2 -0
- package/dist/types/model/chat-v2/llmChatV2OutputClone.d.ts +3 -3
- package/dist/types/model/nodes/ExtractObjectPathNode.d.ts +1 -1
- package/dist/types/model/nodes/GraphOutputNode.d.ts +8 -1
- package/dist/types/model/nodes/ObjectNode.d.ts +1 -1
- package/dist/types/model/nodes/StopWatchingStreamingOutputNode.d.ts +14 -0
- package/dist/types/model/nodes/ToTreeNode.d.ts +5 -1
- package/dist/types/model/nodes/WatchStreamingOutputNode.d.ts +17 -0
- package/dist/types/model/nodes/jsValueInterpolation.d.ts +10 -1
- package/dist/types/recording/RecordedEvents.d.ts +7 -0
- package/dist/types/utils/interpolation.d.ts +14 -5
- package/package.json +1 -1
|
@@ -36,6 +36,8 @@ export * from './nodes/PassthroughNode.js';
|
|
|
36
36
|
export * from './nodes/DataBusNode.js';
|
|
37
37
|
export * from './DataBusTopology.js';
|
|
38
38
|
export * from './nodes/StartBackgroundBranchNode.js';
|
|
39
|
+
export * from './nodes/WatchStreamingOutputNode.js';
|
|
40
|
+
export * from './nodes/StopWatchingStreamingOutputNode.js';
|
|
39
41
|
export * from './nodes/PopNode.js';
|
|
40
42
|
export * from './nodes/SetGlobalNode.js';
|
|
41
43
|
export * from './nodes/GetGlobalNode.js';
|
|
@@ -103,12 +105,12 @@ export * from './nodes/MCPToolCallNode.js';
|
|
|
103
105
|
export * from './nodes/MCPGetPromptNode.js';
|
|
104
106
|
export * from './nodes/ReferencedGraphAliasNode.js';
|
|
105
107
|
export * from './nodes/NodePrefabInstanceNode.js';
|
|
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" | "
|
|
108
|
+
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" | "raiseEvent" | "reportProgress" | "getGlobal" | "getStoredValue" | "abortGraph" | "prompt" | "llmChatV2" | "userInput" | "llmProfile" | "extractRegex" | "codeNew" | "expression" | "readDirectory" | "readFile" | "ifElse" | "chunk" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "coalesce" | "didRun" | "passthrough" | "dataBus" | "startBackgroundBranch" | "watchStreamingOutput" | "stopWatchingStreamingOutput" | "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" | "playAudio" | "chatLoop" | "readAllFiles" | "toMarkdownTable" | "cron" | "toTree" | "loopUntil" | "mcpDiscovery" | "mcpToolCall" | "mcpGetPrompt" | "referencedGraphAlias" | "nodePrefabInstance", import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | 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/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/WatchStreamingOutputNode.js").WatchStreamingOutputNode | import("./nodes/StopWatchingStreamingOutputNode.js").StopWatchingStreamingOutputNode | 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 & {
|
|
107
109
|
type: "mcpDiscovery";
|
|
108
110
|
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
109
111
|
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
110
112
|
}) | import("./nodes/MCPToolCallNode.js").MCPToolCallNode | import("./nodes/MCPGetPromptNode.js").MCPGetPromptNode | import("./nodes/ReferencedGraphAliasNode.js").ReferencedGraphAliasNode | import("./NodePrefabResolver.js").NodePrefabInstanceNode>;
|
|
111
|
-
declare let globalRivetNodeRegistry: NodeRegistration<"number" | "boolean" | "object" | "pop" | "join" | "slice" | "filter" | "match" | "split" | "image" | "audio" | "document" | "if" | "text" | "chat" | "array" | "code" | "context" | "graphInput" | "
|
|
113
|
+
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" | "raiseEvent" | "reportProgress" | "getGlobal" | "getStoredValue" | "abortGraph" | "prompt" | "llmChatV2" | "userInput" | "llmProfile" | "extractRegex" | "codeNew" | "expression" | "readDirectory" | "readFile" | "ifElse" | "chunk" | "subGraph" | "extractJson" | "assemblePrompt" | "extractYaml" | "loopController" | "trimChatMessages" | "externalCall" | "extractObjectPath" | "coalesce" | "didRun" | "passthrough" | "dataBus" | "startBackgroundBranch" | "watchStreamingOutput" | "stopWatchingStreamingOutput" | "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" | "playAudio" | "chatLoop" | "readAllFiles" | "toMarkdownTable" | "cron" | "toTree" | "loopUntil" | "mcpDiscovery" | "mcpToolCall" | "mcpGetPrompt" | "referencedGraphAlias" | "nodePrefabInstance", import("./nodes/GraphInputNode.js").GraphInputNode | import("./nodes/GraphOutputNode.js").GraphOutputNode | import("./chat-v2/llmChatV2NodeData.js").LLMChatV2Node | 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/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/WatchStreamingOutputNode.js").WatchStreamingOutputNode | import("./nodes/StopWatchingStreamingOutputNode.js").StopWatchingStreamingOutputNode | 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 & {
|
|
112
114
|
type: "mcpDiscovery";
|
|
113
115
|
data: import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData;
|
|
114
116
|
variants?: import("./NodeBase.js").ChartNodeVariant<import("./nodes/MCPDiscoveryNode.js").MCPDiscoveryNodeData>[] | undefined;
|
|
@@ -301,6 +301,20 @@ export type InternalProcessContext<T extends ChartNode = ChartNode> = ProcessCon
|
|
|
301
301
|
getGraphBoundary?: (project: Project, graphId: GraphId | undefined) => GraphBoundary | undefined;
|
|
302
302
|
/** Call when the node has partial data but has not finished execution yet. */
|
|
303
303
|
onPartialOutputs?: (outputs: Outputs) => void;
|
|
304
|
+
/**
|
|
305
|
+
* Internal named graph-boundary channel for Graph Output partials. Unlike
|
|
306
|
+
* onPartialOutputs, this does not create a node-history/recording event;
|
|
307
|
+
* GraphProcessor uses it only to deliver a child boundary value to a parent
|
|
308
|
+
* Watch or another enclosing named Graph Output.
|
|
309
|
+
*/
|
|
310
|
+
onGraphOutputPartial?: (outputs: Outputs) => void;
|
|
311
|
+
/**
|
|
312
|
+
* Internal boundary used only by Stop Watching Streaming Output. The owning
|
|
313
|
+
* GraphProcessor uses this only to verify the live Stop node was reached.
|
|
314
|
+
* It publishes the completed Stop output after its finish event, so split
|
|
315
|
+
* aggregation and ordinary downstream execution use the exact same value.
|
|
316
|
+
*/
|
|
317
|
+
acceptStreamingWatchStop?: () => void;
|
|
304
318
|
/**
|
|
305
319
|
* Preserves display-only outputs for this invocation if it subsequently
|
|
306
320
|
* fails. These values are reported with nodeError, never used as graph
|
|
@@ -4,9 +4,10 @@ import type { ChartNode, PortId } from './NodeBase.js';
|
|
|
4
4
|
import type { GraphId } from './NodeGraph.js';
|
|
5
5
|
import type { Project } from './Project.js';
|
|
6
6
|
import type { AttachedNodeData, ExternalFunction, Outputs } from './GraphProcessor.js';
|
|
7
|
-
export type NodeProcessContextBase = Omit<InternalProcessContext, 'attachedData' | 'activeOutputPortIds' | 'createSubProcessor' | 'execution' | 'externalFunctions' | 'getPluginConfig' | 'node' | 'onPartialOutputs' | 'setFailureOutputs' | 'processId' | 'requestUserInput' | 'reportProgress' | 'isDirectRunTarget' | 'markResultAsEditorCacheHit' | 'setGlobal' | 'signal' | 'splitIndex' | 'toolCallContinuation' | 'toolCallTraceSource' | 'waitEvent'>;
|
|
7
|
+
export type NodeProcessContextBase = Omit<InternalProcessContext, 'attachedData' | 'activeOutputPortIds' | 'acceptStreamingWatchStop' | 'createSubProcessor' | 'execution' | 'externalFunctions' | 'getPluginConfig' | 'node' | 'onGraphOutputPartial' | 'onPartialOutputs' | 'setFailureOutputs' | 'processId' | 'requestUserInput' | 'reportProgress' | 'isDirectRunTarget' | 'markResultAsEditorCacheHit' | 'setGlobal' | 'signal' | 'splitIndex' | 'toolCallContinuation' | 'toolCallTraceSource' | 'waitEvent'>;
|
|
8
8
|
export declare function buildNodeProcessContext(options: {
|
|
9
9
|
activeOutputPortIds: ReadonlySet<PortId>;
|
|
10
|
+
acceptStreamingWatchStop?: InternalProcessContext['acceptStreamingWatchStop'];
|
|
10
11
|
base: NodeProcessContextBase;
|
|
11
12
|
attachedData: AttachedNodeData;
|
|
12
13
|
createSubProcessor: (subGraphId: GraphId | undefined, options?: {
|
|
@@ -20,6 +21,7 @@ export declare function buildNodeProcessContext(options: {
|
|
|
20
21
|
markResultAsEditorCacheHit?: InternalProcessContext['markResultAsEditorCacheHit'];
|
|
21
22
|
node: ChartNode;
|
|
22
23
|
nodeAbortController: AbortController;
|
|
24
|
+
onGraphOutputPartial?: (partialOutputs: Outputs) => void;
|
|
23
25
|
onPartialOutputs: (partialOutputs: Outputs) => void;
|
|
24
26
|
setFailureOutputs?: InternalProcessContext['setFailureOutputs'];
|
|
25
27
|
processId: ProcessId;
|
|
@@ -5,6 +5,7 @@ import { type PluginLoadSpec } from './PluginLoadSpec.js';
|
|
|
5
5
|
import type { MCP } from '../integrations/mcp/MCPProvider.js';
|
|
6
6
|
import type { UiGraph, UiGraphId } from './UiGraph.js';
|
|
7
7
|
import type { KnowledgeMetadata, KnowledgeStoreConnectionId } from '../integrations/KnowledgeStore.js';
|
|
8
|
+
import type { ProjectGlobalVariables } from './GlobalVariables.js';
|
|
8
9
|
export type ProjectId = Opaque<string, 'ProjectId'>;
|
|
9
10
|
export type DataId = Opaque<string, 'DataId'>;
|
|
10
11
|
export type NodePrefabId = Opaque<string, 'NodePrefabId'>;
|
|
@@ -28,6 +29,8 @@ export type ProjectMetadata = {
|
|
|
28
29
|
description: string;
|
|
29
30
|
mainGraphId?: GraphId;
|
|
30
31
|
path?: string;
|
|
32
|
+
/** Portable global variables assigned at the beginning of every root project run. */
|
|
33
|
+
globalVariables?: ProjectGlobalVariables;
|
|
31
34
|
mcpServer?: MCP.Config;
|
|
32
35
|
/** Named, non-secret knowledge-store connections available to graphs in this project. */
|
|
33
36
|
knowledgeStores?: Record<KnowledgeStoreConnectionId, KnowledgeStoreConnectionDefinition>;
|
|
@@ -40,7 +43,10 @@ export type KnowledgeStoreConnectionDefinition = {
|
|
|
40
43
|
/** Provider-specific, portable, non-secret configuration. */
|
|
41
44
|
config: KnowledgeMetadata;
|
|
42
45
|
};
|
|
43
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* A reference to another project file. New authored references should remain
|
|
48
|
+
* acyclic, while loaders tolerate legacy back-edges by keeping the first visit.
|
|
49
|
+
*/
|
|
44
50
|
export type ProjectReference = {
|
|
45
51
|
/** The ID of the project being referenced. */
|
|
46
52
|
id: ProjectId;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import type { Project, ProjectReference } from './Project.js';
|
|
1
|
+
import type { Project, ProjectId, ProjectReference } from './Project.js';
|
|
2
2
|
export type ProjectReferenceLoader = {
|
|
3
3
|
/** Loads a project based on the given reference. */
|
|
4
4
|
loadProject: (currentProjectPath: string | undefined, reference: ProjectReference) => Promise<Project>;
|
|
5
5
|
};
|
|
6
|
+
/** The root information needed to load its complete referenced-project closure. */
|
|
7
|
+
export type ProjectReferenceRoot = {
|
|
8
|
+
metadata: Pick<Project['metadata'], 'id'>;
|
|
9
|
+
references?: ProjectReference[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Loads referenced projects depth-first in declared order.
|
|
13
|
+
*
|
|
14
|
+
* The active root is already in memory, so it is visited before traversing
|
|
15
|
+
* references. This keeps legacy cycles compatible without asking a loader to
|
|
16
|
+
* resolve the active project again. The returned record intentionally omits
|
|
17
|
+
* that root; callers already own the authoritative root snapshot.
|
|
18
|
+
*/
|
|
19
|
+
export declare function loadProjectReferenceTree(rootProject: ProjectReferenceRoot, rootProjectPath: string | undefined, loader: ProjectReferenceLoader): Promise<Record<ProjectId, Project>>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Outputs } from './GraphProcessor.js';
|
|
2
|
+
export type StreamingOutputWatchSnapshot = {
|
|
3
|
+
outputs: Outputs;
|
|
4
|
+
/**
|
|
5
|
+
* Immutable increment storage shared by snapshots. The owning GraphProcessor
|
|
6
|
+
* materializes this cumulative output only for a branch that actually starts.
|
|
7
|
+
*/
|
|
8
|
+
streamedOutput?: readonly unknown[];
|
|
9
|
+
streamedOutputLength?: number;
|
|
10
|
+
updateIndex: number;
|
|
11
|
+
isFinal: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type StreamingOutputWatchRuntimeSummary = {
|
|
14
|
+
receivedUpdates: number;
|
|
15
|
+
coalescedUpdates: number;
|
|
16
|
+
droppedUpdates: number;
|
|
17
|
+
maximumQueuedUpdates: number;
|
|
18
|
+
/** A coordinator failure that is not necessarily a failed child iteration. */
|
|
19
|
+
failureKind?: StreamingOutputWatchFailureKind;
|
|
20
|
+
};
|
|
21
|
+
export type StreamingOutputWatchFailureKind = 'branch-failure' | 'missing-stop' | 'queue-overflow';
|
|
22
|
+
export type StreamingOutputWatchOptions = {
|
|
23
|
+
triggerMode: 'every-update' | 'interval';
|
|
24
|
+
intervalMs: number;
|
|
25
|
+
executionMode: 'sequential' | 'parallel';
|
|
26
|
+
maxParallelRuns: number;
|
|
27
|
+
maxQueuedUpdates: number;
|
|
28
|
+
queueOverflowBehavior: 'drop' | 'fail';
|
|
29
|
+
};
|
|
30
|
+
/** Defaults shared by the persisted node definition and the runtime boundary. */
|
|
31
|
+
export declare const streamingOutputWatchDefaults: {
|
|
32
|
+
readonly intervalMs: 1000;
|
|
33
|
+
readonly maxParallelRuns: 4;
|
|
34
|
+
readonly maxQueuedUpdates: 32;
|
|
35
|
+
readonly queueOverflowBehavior: "fail";
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Hard safety bounds for persisted settings. The node editor exposes the same
|
|
39
|
+
* limits, but the runtime must also defend against manually edited project data.
|
|
40
|
+
*/
|
|
41
|
+
export declare const streamingOutputWatchLimits: {
|
|
42
|
+
readonly intervalMs: 3600000;
|
|
43
|
+
readonly maxParallelRuns: 32;
|
|
44
|
+
readonly maxQueuedUpdates: 1024;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Owns bounded, cancellable delivery of a streaming node's immutable output
|
|
48
|
+
* snapshots. It deliberately knows nothing about graph topology: the owning
|
|
49
|
+
* GraphProcessor decides how a snapshot runs and whether accepting Stop is
|
|
50
|
+
* required to complete the watch.
|
|
51
|
+
*/
|
|
52
|
+
export declare class StreamingOutputWatch {
|
|
53
|
+
#private;
|
|
54
|
+
constructor(options: Partial<StreamingOutputWatchOptions>, run: (snapshot: StreamingOutputWatchSnapshot, registerCancel: (cancel: () => void) => void) => Promise<void>, onFailure: (error: Error) => void, { requiresAcceptedStop }?: {
|
|
55
|
+
requiresAcceptedStop?: boolean;
|
|
56
|
+
});
|
|
57
|
+
get hasPending(): boolean;
|
|
58
|
+
get isAwaitingProducer(): boolean;
|
|
59
|
+
get stopped(): boolean;
|
|
60
|
+
/** True only after this Watch can no longer receive or run a snapshot. */
|
|
61
|
+
get isSettled(): boolean;
|
|
62
|
+
get runtimeSummary(): StreamingOutputWatchRuntimeSummary;
|
|
63
|
+
/**
|
|
64
|
+
* A Stop boundary can enqueue ordinary parent-graph work when its node
|
|
65
|
+
* completes. Until it settles, its result is not safe to expose
|
|
66
|
+
* through the foreground-output boundary.
|
|
67
|
+
*/
|
|
68
|
+
get canAffectForegroundOutputs(): boolean;
|
|
69
|
+
publish(snapshot: StreamingOutputWatchSnapshot): void;
|
|
70
|
+
finish(finalSnapshot: StreamingOutputWatchSnapshot): void;
|
|
71
|
+
/** Preserve the winning invocation's siblings; later owner cancellation cancels all. */
|
|
72
|
+
stop(acceptedUpdateIndex?: number): void;
|
|
73
|
+
drain(): Promise<void>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ProcessEvents } from './GraphProcessor.js';
|
|
2
|
+
import type { GraphRunId } from './ProcessContext.js';
|
|
3
|
+
import type { StreamingOutputWatchRuntimeSummary } from './StreamingOutputWatch.js';
|
|
4
|
+
/** The number of early Watch iterations retained as representative evidence. */
|
|
5
|
+
export declare const streamingOutputWatchRetainedInitialIterations = 3;
|
|
6
|
+
export type StreamingOutputWatchHistorySummary = StreamingOutputWatchRuntimeSummary & {
|
|
7
|
+
completedIterations: number;
|
|
8
|
+
failedIterations: number;
|
|
9
|
+
cancelledIterations: number;
|
|
10
|
+
omittedIterations: number;
|
|
11
|
+
retainedIterationUpdateIndexes: number[];
|
|
12
|
+
selectedIteration?: {
|
|
13
|
+
updateIndex: number;
|
|
14
|
+
reason: 'failure' | 'stop' | 'latest';
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type ForwardedEvent = {
|
|
18
|
+
[K in keyof ProcessEvents]: {
|
|
19
|
+
event: K;
|
|
20
|
+
data: ProcessEvents[K];
|
|
21
|
+
occurredAt: number;
|
|
22
|
+
};
|
|
23
|
+
}[keyof ProcessEvents];
|
|
24
|
+
type Iteration = {
|
|
25
|
+
graphRunId: GraphRunId;
|
|
26
|
+
ordinal: number;
|
|
27
|
+
updateIndex: number;
|
|
28
|
+
events: ForwardedEvent[];
|
|
29
|
+
completed: boolean;
|
|
30
|
+
failed: boolean;
|
|
31
|
+
cancelled: boolean;
|
|
32
|
+
retainedImmediately: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type StreamingOutputWatchHistoryIteration = Readonly<Pick<Iteration, 'graphRunId' | 'ordinal' | 'updateIndex'>>;
|
|
35
|
+
export type StreamingOutputWatchHistoryOptions = {
|
|
36
|
+
/** Internal clock injection keeps deferred-event timestamp tests deterministic. */
|
|
37
|
+
now?: () => number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Retains only useful Watch branch evidence before it reaches the outer event
|
|
41
|
+
* emitter. The first three started iterations are delivered live. Later
|
|
42
|
+
* iterations are held only while they can still become the first failure, a
|
|
43
|
+
* Stop winner, or the final/latest iteration. This bounds editor history and
|
|
44
|
+
* recordings without changing the branch's actual execution.
|
|
45
|
+
*/
|
|
46
|
+
export declare class StreamingOutputWatchHistory {
|
|
47
|
+
#private;
|
|
48
|
+
constructor({ now }?: StreamingOutputWatchHistoryOptions);
|
|
49
|
+
start(graphRunId: GraphRunId, updateIndex: number): StreamingOutputWatchHistoryIteration;
|
|
50
|
+
forward<K extends keyof ProcessEvents>(iteration: StreamingOutputWatchHistoryIteration, event: K, data: ProcessEvents[K], forward: (event: K, data: ProcessEvents[K]) => Promise<void>): Promise<void> | undefined;
|
|
51
|
+
complete(iteration: StreamingOutputWatchHistoryIteration): void;
|
|
52
|
+
fail(iteration: StreamingOutputWatchHistoryIteration): void;
|
|
53
|
+
cancel(iteration: StreamingOutputWatchHistoryIteration): void;
|
|
54
|
+
acceptStop(iteration: StreamingOutputWatchHistoryIteration): void;
|
|
55
|
+
get hasAcceptedStop(): boolean;
|
|
56
|
+
finalize(runtime: StreamingOutputWatchRuntimeSummary, forward: <K extends keyof ProcessEvents>(event: K, data: ProcessEvents[K]) => Promise<void>): Promise<StreamingOutputWatchHistorySummary>;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -5,6 +5,8 @@ export declare function wireSubprocessorEvents(processor: GraphProcessor, parent
|
|
|
5
5
|
isPaused: () => boolean;
|
|
6
6
|
pause: () => void;
|
|
7
7
|
resume: () => void;
|
|
8
|
+
/** Intercepts forwarded child evidence before it reaches outer observers. */
|
|
9
|
+
forwardEvent?: <K extends keyof ProcessEvents>(event: K, data: ProcessEvents[K]) => Promise<void> | undefined;
|
|
8
10
|
}): () => void;
|
|
9
11
|
export declare function wireSubprocessorLifecycle(processor: GraphProcessor, options: {
|
|
10
12
|
autoCleanup?: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
export
|
|
1
|
+
export { cloneExecutionOutputs } from '../ExecutionOutputClone.js';
|
|
2
|
+
/** @deprecated Prefer cloneExecutionOutputs for new non-Chat call sites. */
|
|
3
|
+
export { cloneExecutionOutputs as cloneLLMChatV2Outputs } from '../ExecutionOutputClone.js';
|
|
@@ -8,7 +8,7 @@ export type ExtractObjectPathNodeData = {
|
|
|
8
8
|
usePathInput: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare function getExtractObjectPathInterpolationInputNames(path: string): string[];
|
|
11
|
-
export declare function interpolateExtractObjectPathSource(path: string, inputs: Record<PortId, DataValue>, graphInputValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>): string;
|
|
11
|
+
export declare function interpolateExtractObjectPathSource(path: string, inputs: Record<PortId, DataValue>, graphInputValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>, globalValues?: Record<string, unknown>): string;
|
|
12
12
|
export declare class ExtractObjectPathNodeImpl extends NodeImpl<ExtractObjectPathNode> {
|
|
13
13
|
static create(): ExtractObjectPathNode;
|
|
14
14
|
private getInterpolationInputNames;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ChartNode, type NodeOutputDefinition, type NodeInputDefinition } from '../NodeBase.js';
|
|
2
2
|
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
3
|
-
import { type DataType } from '../DataValue.js';
|
|
3
|
+
import { type DataType, type DataValue } 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';
|
|
@@ -10,6 +10,13 @@ export type GraphOutputNodeData = {
|
|
|
10
10
|
id: string;
|
|
11
11
|
dataType: DataType;
|
|
12
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Graph Output applies the same boundary coercion to both its terminal value
|
|
15
|
+
* and a partial value forwarded across a Subgraph boundary. Keeping this
|
|
16
|
+
* conversion here prevents a streamed named output from disagreeing with the
|
|
17
|
+
* value that the Graph Output will eventually publish.
|
|
18
|
+
*/
|
|
19
|
+
export declare function coerceGraphOutputValue(value: DataValue, dataType: DataType): DataValue;
|
|
13
20
|
export declare class GraphOutputNodeImpl extends NodeImpl<GraphOutputNode> {
|
|
14
21
|
static create(): GraphOutputNode;
|
|
15
22
|
getInputDefinitions(): NodeInputDefinition[];
|
|
@@ -13,7 +13,7 @@ export declare class ObjectNodeImpl extends NodeImpl<ObjectNode> {
|
|
|
13
13
|
getOutputDefinitions(): NodeOutputDefinition[];
|
|
14
14
|
getEditors(): EditorDefinition<ObjectNode>[];
|
|
15
15
|
static getUIData(): NodeUIData;
|
|
16
|
-
interpolate(baseString: string, values: Record<string, unknown>, graphInputNodeValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>): string;
|
|
16
|
+
interpolate(baseString: string, values: Record<string, unknown>, graphInputNodeValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>, globalValues?: Record<string, unknown>): string;
|
|
17
17
|
process(inputs: Record<string, DataValue>, context: InternalProcessContext): Promise<Record<string, DataValue>>;
|
|
18
18
|
}
|
|
19
19
|
export declare const objectNode: import("../NodeDefinition.js").NodeDefinition<ObjectNode>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Inputs, Outputs } from '../GraphProcessor.js';
|
|
2
|
+
import type { ChartNode, NodeInputDefinition, NodeOutputDefinition } from '../NodeBase.js';
|
|
3
|
+
import { NodeImpl, type NodeUIData } from '../NodeImpl.js';
|
|
4
|
+
import type { InternalProcessContext } from '../ProcessContext.js';
|
|
5
|
+
export type StopWatchingStreamingOutputNode = ChartNode<'stopWatchingStreamingOutput', Record<string, never>>;
|
|
6
|
+
export declare class StopWatchingStreamingOutputNodeImpl extends NodeImpl<StopWatchingStreamingOutputNode> {
|
|
7
|
+
static create(): StopWatchingStreamingOutputNode;
|
|
8
|
+
getInputDefinitions(): NodeInputDefinition[];
|
|
9
|
+
getOutputDefinitions(): NodeOutputDefinition[];
|
|
10
|
+
static getUIData(): NodeUIData;
|
|
11
|
+
getBody(): string;
|
|
12
|
+
process(inputs: Inputs, context: InternalProcessContext): Promise<Outputs>;
|
|
13
|
+
}
|
|
14
|
+
export declare const stopWatchingStreamingOutputNode: import("../NodeDefinition.js").NodeDefinition<StopWatchingStreamingOutputNode>;
|
|
@@ -9,7 +9,11 @@ export type ToTreeNodeData = {
|
|
|
9
9
|
childrenProperty: string;
|
|
10
10
|
useSortAlphabetically: boolean;
|
|
11
11
|
};
|
|
12
|
-
type ToTreeInterpolationContext =
|
|
12
|
+
type ToTreeInterpolationContext = {
|
|
13
|
+
graphInputNodeValues?: Record<string, DataValue>;
|
|
14
|
+
contextValues?: Record<string, DataValue>;
|
|
15
|
+
globalValues?: Record<string, unknown>;
|
|
16
|
+
};
|
|
13
17
|
export declare class ToTreeNodeImpl extends NodeImpl<ToTreeNode> {
|
|
14
18
|
static create(): ToTreeNode;
|
|
15
19
|
getInputDefinitions(): NodeInputDefinition[];
|
|
@@ -0,0 +1,17 @@
|
|
|
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 StreamingOutputWatchOptions } from '../StreamingOutputWatch.js';
|
|
6
|
+
export type WatchStreamingOutputNodeData = StreamingOutputWatchOptions;
|
|
7
|
+
export type WatchStreamingOutputNode = ChartNode<'watchStreamingOutput', WatchStreamingOutputNodeData>;
|
|
8
|
+
export declare class WatchStreamingOutputNodeImpl extends NodeImpl<WatchStreamingOutputNode> {
|
|
9
|
+
static create(): WatchStreamingOutputNode;
|
|
10
|
+
getInputDefinitions(): NodeInputDefinition[];
|
|
11
|
+
getOutputDefinitions(): NodeOutputDefinition[];
|
|
12
|
+
static getUIData(): NodeUIData;
|
|
13
|
+
getEditors(): EditorDefinition<WatchStreamingOutputNode>[];
|
|
14
|
+
getBody(): string;
|
|
15
|
+
process(inputs: Inputs): Promise<Outputs>;
|
|
16
|
+
}
|
|
17
|
+
export declare const watchStreamingOutputNode: import("../NodeDefinition.js").NodeDefinition<WatchStreamingOutputNode>;
|
|
@@ -12,8 +12,14 @@ export type JsValueInterpolationRuntimeContext = {
|
|
|
12
12
|
cloneCacheIdentifier: string;
|
|
13
13
|
graphInputsIdentifier: string;
|
|
14
14
|
contextIdentifier: string;
|
|
15
|
+
/** Collision-safe runner argument containing the selected global snapshot. */
|
|
16
|
+
globalValuesIdentifier: string;
|
|
17
|
+
/** Collision-safe local clone of the selected global snapshot. */
|
|
18
|
+
globalValuesCloneIdentifier: string;
|
|
15
19
|
/** True when generated source needs a runner-provided path/special resolver. */
|
|
16
20
|
requiresInterpolationHelper: boolean;
|
|
21
|
+
/** True when the resolver also needs the selected global-value snapshot. */
|
|
22
|
+
requiresGlobalValues: boolean;
|
|
17
23
|
};
|
|
18
24
|
export declare function getSafeJsValueInterpolationIdentifier(source: string, baseIdentifier: string): string;
|
|
19
25
|
export declare function buildJsValuePreview(source: string, maxLines: number): string;
|
|
@@ -24,10 +30,13 @@ export declare function buildJsValueInterpolatedSource(template: string, interpo
|
|
|
24
30
|
export declare function interpolateJsValuePreviewSource(template: string, inputs: Inputs, options?: JsValueInterpolationOptions): string;
|
|
25
31
|
export declare function buildCloneJsInputValueFunction(): string;
|
|
26
32
|
export declare function buildClonedInputValueAssignments(inputNames: string[], targetIdentifier: string, cacheIdentifier: string): string;
|
|
27
|
-
export declare function buildJsValueInputClonePreamble({ cacheIdentifier, contextIdentifier, graphInputsIdentifier, inputsIdentifier, }: {
|
|
33
|
+
export declare function buildJsValueInputClonePreamble({ cacheIdentifier, contextIdentifier, graphInputsIdentifier, globalValuesCloneIdentifier, globalValuesIdentifier, usesGlobalValues, inputsIdentifier, }: {
|
|
28
34
|
cacheIdentifier: string;
|
|
29
35
|
contextIdentifier: string;
|
|
30
36
|
graphInputsIdentifier: string;
|
|
37
|
+
globalValuesCloneIdentifier: string;
|
|
38
|
+
globalValuesIdentifier: string;
|
|
39
|
+
usesGlobalValues: boolean;
|
|
31
40
|
inputsIdentifier: string;
|
|
32
41
|
}): string;
|
|
33
42
|
export declare function buildJsValueInputsInitializer({ interpolationContext, }: {
|
|
@@ -113,6 +113,11 @@ export type RecordedEventsMap = OverrideProperties<ProcessEvents, {
|
|
|
113
113
|
nodeId: NodeId;
|
|
114
114
|
processId?: ProcessId;
|
|
115
115
|
}>;
|
|
116
|
+
/** Compact accounting for a completed Watch Streaming Output boundary. */
|
|
117
|
+
streamingOutputWatchSummary: WithOptionalExecution<{
|
|
118
|
+
watchNodeId: NodeId;
|
|
119
|
+
summary: ProcessEvents['streamingOutputWatchSummary']['summary'];
|
|
120
|
+
}>;
|
|
116
121
|
/** Called when the root graph has errored. The root graph will also throw. */
|
|
117
122
|
error: {
|
|
118
123
|
error: string;
|
|
@@ -128,6 +133,8 @@ export type RecordedEvent<T extends RecordedEventKey> = {
|
|
|
128
133
|
type: T;
|
|
129
134
|
data: RecordedEventsMap[T];
|
|
130
135
|
ts: number;
|
|
136
|
+
/** Original event occurrence time when delivery was deferred by a Watch branch. */
|
|
137
|
+
occurredAt?: number;
|
|
131
138
|
};
|
|
132
139
|
export type RecordedEvents = {
|
|
133
140
|
[K in RecordedEventKey]: RecordedEvent<K>;
|
|
@@ -3,7 +3,7 @@ import { type InterpolationTokenSpan } from './interpolationSyntax.js';
|
|
|
3
3
|
export declare const ESCAPED_TOKEN_REGEX: RegExp;
|
|
4
4
|
export declare const ESCAPED_ESCAPED_TOKEN_REGEX: RegExp;
|
|
5
5
|
export type { InterpolationTokenSpan } from './interpolationSyntax.js';
|
|
6
|
-
export type InterpolationReferenceSource = 'variable' | 'graphInputs' | 'context';
|
|
6
|
+
export type InterpolationReferenceSource = 'variable' | 'graphInputs' | 'context' | 'globals';
|
|
7
7
|
/** A base value and, optionally, a JSONPath evaluated against that value. */
|
|
8
8
|
export type ParsedInterpolationExpression = {
|
|
9
9
|
source: InterpolationReferenceSource;
|
|
@@ -39,6 +39,8 @@ export type ReplaceInterpolationTokensOptions = {
|
|
|
39
39
|
trim?: boolean;
|
|
40
40
|
};
|
|
41
41
|
export type InterpolateOptions = {
|
|
42
|
+
/** A snapshot of the globals referenced by this template. */
|
|
43
|
+
globalValues?: Record<string, unknown>;
|
|
42
44
|
/** Set false when ordinary interpolation variables are raw JSON. */
|
|
43
45
|
unwrapVariableDataValues?: boolean;
|
|
44
46
|
/**
|
|
@@ -51,6 +53,7 @@ export type InterpolationValueSources = {
|
|
|
51
53
|
variables?: Record<string, unknown>;
|
|
52
54
|
graphInputValues?: Record<string, unknown>;
|
|
53
55
|
contextValues?: Record<string, unknown>;
|
|
56
|
+
globalValues?: Record<string, unknown>;
|
|
54
57
|
/** Set false when `variables` are already raw JSON rather than DataValues. */
|
|
55
58
|
unwrapVariableDataValues?: boolean;
|
|
56
59
|
};
|
|
@@ -86,9 +89,15 @@ export declare function getInterpolationTokenReference(rawInner: string): Parsed
|
|
|
86
89
|
export declare function replaceInterpolationTokens(template: string, getReplacement: (token: InterpolationTokenReplacementInfo) => string, options?: ReplaceInterpolationTokensOptions): string;
|
|
87
90
|
/**
|
|
88
91
|
* Discovers connectable interpolation bases in first-occurrence order. Special
|
|
89
|
-
* graph/context references are intentionally omitted because they do not make ports.
|
|
92
|
+
* graph/context/global references are intentionally omitted because they do not make ports.
|
|
90
93
|
*/
|
|
91
94
|
export declare function extractInterpolationVariableReferences(template: string): InterpolationVariableReference[];
|
|
95
|
+
/**
|
|
96
|
+
* Captures only globals referenced by a template into a safe record. Globals
|
|
97
|
+
* are intentionally snapshotted at node execution: interpolation neither
|
|
98
|
+
* waits for a writer nor creates an execution dependency.
|
|
99
|
+
*/
|
|
100
|
+
export declare function getInterpolationGlobalValues<T>(template: string, getGlobal: ((id: string) => T | undefined) | undefined): Record<string, T>;
|
|
92
101
|
/** Extracts base port names only. Prefer `extractInterpolationVariableReferences` when type selection matters. */
|
|
93
102
|
export declare function extractInterpolationVariables(template: string): string[];
|
|
94
103
|
/**
|
|
@@ -99,8 +108,8 @@ export declare function extractInterpolationVariables(template: string): string[
|
|
|
99
108
|
export declare function resolveInterpolationExpressionRawValue(expression: string | ParsedInterpolationExpression, sources: InterpolationValueSources): unknown | undefined;
|
|
100
109
|
export declare function resolveInterpolationTokenRawValue(rawInner: string, sources: InterpolationValueSources): unknown | undefined;
|
|
101
110
|
/** Backward-compatible special-reference resolver used by existing nodes. */
|
|
102
|
-
export declare function resolveExpressionRawValue(source: Record<string, unknown> | undefined, expression: string, sourceType: 'graphInputs' | 'context'): unknown | undefined;
|
|
103
|
-
export declare function resolveExpressionToString(source: Record<string, unknown> | undefined, expression: string, sourceType: 'graphInputs' | 'context'): string | undefined;
|
|
111
|
+
export declare function resolveExpressionRawValue(source: Record<string, unknown> | undefined, expression: string, sourceType: 'graphInputs' | 'context' | 'globals'): unknown | undefined;
|
|
112
|
+
export declare function resolveExpressionToString(source: Record<string, unknown> | undefined, expression: string, sourceType: 'graphInputs' | 'context' | 'globals'): string | undefined;
|
|
104
113
|
/**
|
|
105
114
|
* Resolves text interpolation. Bare ordinary variables keep the historical
|
|
106
115
|
* string coercion; path-bearing references select raw data first and serialize
|
|
@@ -108,4 +117,4 @@ export declare function resolveExpressionToString(source: Record<string, unknown
|
|
|
108
117
|
*/
|
|
109
118
|
export declare function interpolate(template: string, variables: Record<string, unknown>, graphInputValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>, options?: InterpolateOptions): string;
|
|
110
119
|
/** Runtime helper injected into JavaScript runners without exposing the whole Rivet API. */
|
|
111
|
-
export declare function resolveCodeInterpolationExpression(inputs: Record<string, DataValue | undefined>, expression: string, graphInputValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>): unknown | undefined;
|
|
120
|
+
export declare function resolveCodeInterpolationExpression(inputs: Record<string, DataValue | undefined>, expression: string, graphInputValues?: Record<string, DataValue>, contextValues?: Record<string, DataValue>, globalValues?: Record<string, DataValue>): unknown | undefined;
|