@valerypopoff/rivet2-core 2.4.0 → 2.6.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 +1800 -753
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/cjs/interpolationRuntime.cjs +1578 -0
- package/dist/cjs/interpolationRuntime.cjs.map +7 -0
- package/dist/cjs/interpolationSyntax.cjs +186 -0
- package/dist/cjs/interpolationSyntax.cjs.map +7 -0
- package/dist/cjs/webAppRuntime.cjs.map +2 -2
- package/dist/esm/exports.js +2 -1
- package/dist/esm/integrations/CodeRunner.js +5 -0
- package/dist/esm/integrations/mcp/MCPBase.js +16 -6
- package/dist/esm/interpolationRuntime.js +5 -0
- package/dist/esm/model/AgentResponseTrace.js +8 -3
- package/dist/esm/model/GraphBoundaryCache.js +0 -6
- package/dist/esm/model/GraphBoundaryEffects.js +5 -1
- package/dist/esm/model/GraphOutputSelection.js +34 -0
- package/dist/esm/model/GraphProcessor.js +177 -50
- package/dist/esm/model/ProcessContextBuilder.js +4 -1
- package/dist/esm/model/RecordingPlayer.js +46 -14
- package/dist/esm/model/SplitRunProcessor.js +37 -16
- package/dist/esm/model/StoredValueStore.js +4 -3
- package/dist/esm/model/UiGraphRendererStyles.js +20 -0
- package/dist/esm/model/chat/aiSdkStreaming.js +3 -2
- package/dist/esm/model/chat-v2/aiSdkBridge.js +63 -5
- package/dist/esm/model/chat-v2/chatV2Pipeline.js +66 -3
- package/dist/esm/model/chat-v2/llmInvocationResultProjector.js +20 -7
- package/dist/esm/model/chat-v2/llmProfileFallback.js +12 -4
- package/dist/esm/model/nodes/CodeNewNode.js +16 -16
- package/dist/esm/model/nodes/DestructureNode.js +2 -2
- package/dist/esm/model/nodes/ExpressionNode.js +16 -16
- package/dist/esm/model/nodes/ExtractObjectPathNode.js +2 -2
- package/dist/esm/model/nodes/ExtractYamlNode.js +5 -5
- package/dist/esm/model/nodes/JSFilterNode.js +3 -1
- package/dist/esm/model/nodes/JSMapNode.js +3 -1
- package/dist/esm/model/nodes/LLMChatV2Node.js +30 -4
- package/dist/esm/model/nodes/MCPGetPromptNode.js +6 -2
- package/dist/esm/model/nodes/MCPToolCallNode.js +6 -2
- package/dist/esm/model/nodes/ObjectNode.js +19 -20
- package/dist/esm/model/nodes/PromptNode.js +10 -11
- package/dist/esm/model/nodes/ReferencedGraphAliasNode.js +2 -40
- package/dist/esm/model/nodes/SubGraphNode.js +40 -26
- package/dist/esm/model/nodes/TextNode.js +11 -32
- package/dist/esm/model/nodes/ToTreeNode.js +6 -13
- package/dist/esm/model/nodes/ToolNode.js +33 -16
- package/dist/esm/model/nodes/jsListCallbackHelpers.js +19 -15
- package/dist/esm/model/nodes/jsValueInterpolation.js +83 -30
- package/dist/esm/model/nodes/nodeBodyPreview.js +23 -0
- package/dist/esm/plugins/openai/nodes/ThreadMessageNode.js +14 -11
- package/dist/esm/recording/ExecutionRecorder.js +55 -23
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/utils/interpolation.js +478 -221
- package/dist/esm/utils/interpolationSyntax.js +175 -0
- package/dist/esm/utils/jsonPath.js +129 -0
- package/dist/types/exports.d.ts +3 -1
- package/dist/types/integrations/CodeRunnerOptions.d.ts +9 -0
- package/dist/types/integrations/mcp/MCPBase.d.ts +3 -1
- package/dist/types/interpolationRuntime.d.ts +5 -0
- package/dist/types/model/AgentResponseTrace.d.ts +2 -0
- package/dist/types/model/ExecutorProtocol.d.ts +4 -0
- package/dist/types/model/GraphBoundaryCache.d.ts +0 -2
- package/dist/types/model/GraphOutputSelection.d.ts +8 -0
- package/dist/types/model/GraphProcessor.d.ts +12 -3
- package/dist/types/model/ProcessContext.d.ts +9 -2
- package/dist/types/model/ProcessContextBuilder.d.ts +2 -1
- package/dist/types/model/SplitRunProcessor.d.ts +2 -1
- package/dist/types/model/UiGraphRendererStyles.d.ts +1 -1
- package/dist/types/model/chat/aiSdkStreaming.d.ts +1 -1
- package/dist/types/model/chat-v2/chatV2RequestPlan.d.ts +1 -1
- package/dist/types/model/chat-v2/chatV2Types.d.ts +29 -0
- package/dist/types/model/chat-v2/llmInvocationResultProjector.d.ts +5 -1
- package/dist/types/model/nodes/ObjectNode.d.ts +1 -1
- package/dist/types/model/nodes/SubGraphNode.d.ts +2 -0
- package/dist/types/model/nodes/ToTreeNode.d.ts +5 -2
- package/dist/types/model/nodes/ToolNode.d.ts +13 -1
- package/dist/types/model/nodes/jsValueInterpolation.d.ts +16 -8
- package/dist/types/model/nodes/nodeBodyPreview.d.ts +7 -0
- package/dist/types/recording/ExecutionRecorder.d.ts +6 -1
- package/dist/types/recording/RecordedEvents.d.ts +2 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/interpolation.d.ts +93 -8
- package/dist/types/utils/interpolationSyntax.d.ts +21 -0
- package/dist/types/utils/jsonPath.d.ts +15 -0
- package/package.json +11 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type InterpolationTokenSpan = {
|
|
2
|
+
start: number;
|
|
3
|
+
end: number;
|
|
4
|
+
rawInner: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function isInterpolationSyntaxCharacterEscaped(value: string, index: number): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* JSONPath filters can contain JavaScript regex literals. Treat their contents
|
|
9
|
+
* as opaque while looking for an interpolation terminator or processor pipe;
|
|
10
|
+
* otherwise a `]` or `|` inside the regex can be mistaken for JSONPath syntax.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isInterpolationRegexLiteralStart(value: string, index: number): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Scans token boundaries without parsing expressions or resolving values.
|
|
15
|
+
*
|
|
16
|
+
* This deliberately has no evaluator dependencies, so editor-only surfaces
|
|
17
|
+
* can share Core's malformed-token recovery rules without loading JSONPath or
|
|
18
|
+
* the rest of the execution runtime. The returned spans are fresh data and
|
|
19
|
+
* exclude escaped triple-brace tokens.
|
|
20
|
+
*/
|
|
21
|
+
export declare function scanInterpolationTokenSpans(template: string): InterpolationTokenSpan[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes Rivet's historically accepted convenience whitespace around
|
|
3
|
+
* JSONPath structural separators. Quoted values, regular expressions, filter
|
|
4
|
+
* expressions, and object literals keep their authored contents unchanged.
|
|
5
|
+
*
|
|
6
|
+
* All runtime JSONPath consumers must pass through this helper so stored node
|
|
7
|
+
* paths and interpolation suffixes accept the same path language.
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeJsonPathExpression(path: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Evaluates a JSONPath expression with the same engine and options used by the
|
|
12
|
+
* object-path nodes. Callers retain ownership of their no-match and error
|
|
13
|
+
* policy; this helper deliberately lets JSONPath errors propagate.
|
|
14
|
+
*/
|
|
15
|
+
export declare function evaluateJsonPath<T = unknown>(value: unknown, path: string, wrap?: boolean): T | T[] | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valerypopoff/rivet2-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/cjs/bundle.cjs",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -28,6 +28,16 @@
|
|
|
28
28
|
"types": "./dist/types/webAppRuntime.d.ts",
|
|
29
29
|
"import": "./dist/esm/webAppRuntime.js",
|
|
30
30
|
"require": "./dist/cjs/webAppRuntime.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./interpolation-runtime": {
|
|
33
|
+
"types": "./dist/types/interpolationRuntime.d.ts",
|
|
34
|
+
"import": "./dist/esm/interpolationRuntime.js",
|
|
35
|
+
"require": "./dist/cjs/interpolationRuntime.cjs"
|
|
36
|
+
},
|
|
37
|
+
"./interpolation-syntax": {
|
|
38
|
+
"types": "./dist/types/utils/interpolationSyntax.d.ts",
|
|
39
|
+
"import": "./dist/esm/utils/interpolationSyntax.js",
|
|
40
|
+
"require": "./dist/cjs/interpolationSyntax.cjs"
|
|
31
41
|
}
|
|
32
42
|
},
|
|
33
43
|
"files": [
|