@valerypopoff/rivet2-core 2.0.6 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cjs/bundle.cjs +1440 -769
  2. package/dist/cjs/bundle.cjs.map +4 -4
  3. package/dist/esm/api/createProcessor.js +8 -2
  4. package/dist/esm/model/GraphPreprocessor.js +129 -7
  5. package/dist/esm/model/GraphProcessor.js +204 -82
  6. package/dist/esm/model/NodeExclusionPolicy.js +67 -0
  7. package/dist/esm/model/NodeExecutionPlanner.js +66 -22
  8. package/dist/esm/model/Nodes.js +3 -0
  9. package/dist/esm/model/chat-v2/chatV2Outputs.js +183 -0
  10. package/dist/esm/model/chat-v2/chatV2Pipeline.js +30 -212
  11. package/dist/esm/model/nodes/CodeNewNode.js +207 -0
  12. package/dist/esm/model/nodes/CodeNode.js +11 -10
  13. package/dist/esm/model/nodes/CommentNode.js +1 -1
  14. package/dist/esm/model/nodes/ExpressionNode.js +23 -39
  15. package/dist/esm/model/nodes/HttpCallNode.js +20 -18
  16. package/dist/esm/model/nodes/ObjectNode.js +1 -0
  17. package/dist/esm/model/nodes/ToolNode.js +1 -0
  18. package/dist/esm/model/nodes/codeNodeErrorDiagnostics.js +16 -11
  19. package/dist/esm/model/nodes/jsListCallbackHelpers.js +26 -30
  20. package/dist/esm/model/nodes/jsValueInterpolation.js +56 -2
  21. package/dist/esm/utils/serialization/serialization.js +22 -1
  22. package/dist/types/api/createProcessor.d.ts +8 -2
  23. package/dist/types/model/EditorDefinition.d.ts +2 -0
  24. package/dist/types/model/GraphPreprocessor.d.ts +36 -2
  25. package/dist/types/model/GraphProcessor.d.ts +12 -1
  26. package/dist/types/model/NodeExclusionPolicy.d.ts +21 -0
  27. package/dist/types/model/NodeExecutionPlanner.d.ts +3 -8
  28. package/dist/types/model/Nodes.d.ts +3 -2
  29. package/dist/types/model/ProcessContext.d.ts +2 -2
  30. package/dist/types/model/chat-v2/chatV2Outputs.d.ts +29 -0
  31. package/dist/types/model/nodes/CodeNewNode.d.ts +27 -0
  32. package/dist/types/model/nodes/codeNodeErrorDiagnostics.d.ts +4 -2
  33. package/dist/types/model/nodes/jsValueInterpolation.d.ts +20 -0
  34. package/package.json +1 -1
@@ -1,11 +1,31 @@
1
1
  import type { Inputs } from '../GraphProcessor.js';
2
+ import type { NodeInputDefinition } from '../NodeBase.js';
2
3
  type JsValueInterpolationOptions = {
3
4
  localIdentifiers?: ReadonlySet<string>;
5
+ trim?: boolean;
4
6
  };
7
+ export type JsValueInterpolationRuntimeContext = {
8
+ inputNames: string[];
9
+ inputsIdentifier: string;
10
+ };
11
+ export declare function getSafeJsValueInterpolationIdentifier(source: string, baseIdentifier: string): string;
12
+ export declare function buildJsValuePreview(source: string, maxLines: number): string;
5
13
  export declare function getJsValueInterpolationInputNames(template: string, options?: JsValueInterpolationOptions): string[];
14
+ export declare function getJsValueInterpolationInputDefinitions(template: string, options?: JsValueInterpolationOptions): NodeInputDefinition[];
15
+ export declare function getJsValueInterpolationRuntimeContext(template: string, baseInputsIdentifier: string, options?: JsValueInterpolationOptions): JsValueInterpolationRuntimeContext;
6
16
  export declare function buildJsValueInterpolatedSource(template: string, targetIdentifier: string, options?: JsValueInterpolationOptions): string;
7
17
  export declare function interpolateJsValuePreviewSource(template: string, inputs: Inputs, options?: JsValueInterpolationOptions): string;
8
18
  export declare function buildCloneJsInputValueFunction(): string;
9
19
  export declare function buildClonedInputValueAssignments(inputNames: string[], targetIdentifier: string, cacheIdentifier: string): string;
20
+ export declare function buildJsValueInputClonePreamble({ cacheIdentifier, inputsIdentifier, }: {
21
+ cacheIdentifier: string;
22
+ inputsIdentifier: string;
23
+ }): string;
24
+ export declare function buildJsValueInputsInitializer({ cacheIdentifier, inputNames, inputsIdentifier, }: {
25
+ cacheIdentifier: string;
26
+ inputNames: string[];
27
+ inputsIdentifier: string;
28
+ }): string;
10
29
  export declare function sanitizeGeneratedJsValueText(text: string | undefined, inputNames: string[], targetIdentifier: string, fallbackLabel: string): string | undefined;
30
+ export declare function sanitizeGeneratedJsValueError(error: unknown, inputNames: string[], targetIdentifier: string, fallbackLabel: string): Error;
11
31
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valerypopoff/rivet2-core",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "license": "MIT",
5
5
  "main": "dist/cjs/bundle.cjs",
6
6
  "module": "dist/esm/index.js",