@runtypelabs/sdk 4.6.1 → 4.7.1
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/index.cjs +609 -70
- package/dist/index.d.cts +1360 -14
- package/dist/index.d.ts +1360 -14
- package/dist/index.mjs +609 -70
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -523,6 +523,21 @@ var FlowBuilder = class {
|
|
|
523
523
|
this.optionsConfig = { ...this.optionsConfig, ...options };
|
|
524
524
|
return this;
|
|
525
525
|
}
|
|
526
|
+
/**
|
|
527
|
+
* Add a generic flow step. Prefer the typed helper methods when available;
|
|
528
|
+
* this escape hatch keeps code-first flows compatible with newer dashboard/API
|
|
529
|
+
* step types before a dedicated SDK convenience method exists.
|
|
530
|
+
*/
|
|
531
|
+
step(config) {
|
|
532
|
+
this.addStep(
|
|
533
|
+
config.type,
|
|
534
|
+
config.name || config.type,
|
|
535
|
+
config.config || {},
|
|
536
|
+
config.enabled,
|
|
537
|
+
config.when
|
|
538
|
+
);
|
|
539
|
+
return this;
|
|
540
|
+
}
|
|
526
541
|
// ============================================================================
|
|
527
542
|
// Step Methods
|
|
528
543
|
// ============================================================================
|
|
@@ -541,6 +556,7 @@ var FlowBuilder = class {
|
|
|
541
556
|
systemPrompt: config.systemPrompt,
|
|
542
557
|
previousMessages: config.previousMessages,
|
|
543
558
|
outputVariable: config.outputVariable,
|
|
559
|
+
mode: config.mode,
|
|
544
560
|
responseFormat: config.responseFormat,
|
|
545
561
|
temperature: config.temperature,
|
|
546
562
|
topP: config.topP,
|
|
@@ -550,11 +566,13 @@ var FlowBuilder = class {
|
|
|
550
566
|
seed: config.seed,
|
|
551
567
|
maxTokens: config.maxTokens,
|
|
552
568
|
reasoning: config.reasoning,
|
|
569
|
+
artifacts: config.artifacts,
|
|
553
570
|
streamOutput: config.streamOutput,
|
|
554
571
|
tools: config.tools,
|
|
555
572
|
errorHandling: config.errorHandling
|
|
556
573
|
},
|
|
557
|
-
config.enabled
|
|
574
|
+
config.enabled,
|
|
575
|
+
config.when
|
|
558
576
|
);
|
|
559
577
|
return this;
|
|
560
578
|
}
|
|
@@ -586,11 +604,14 @@ var FlowBuilder = class {
|
|
|
586
604
|
jsonOptions: config.jsonOptions,
|
|
587
605
|
outputVariable: config.outputVariable,
|
|
588
606
|
errorHandling: config.errorHandling,
|
|
607
|
+
defaultValue: config.defaultValue,
|
|
589
608
|
streamOutput: config.streamOutput,
|
|
590
609
|
pollIntervalMs: config.pollIntervalMs,
|
|
591
|
-
completionTimeoutMs: config.completionTimeoutMs
|
|
610
|
+
completionTimeoutMs: config.completionTimeoutMs,
|
|
611
|
+
asyncCrawl: config.asyncCrawl
|
|
592
612
|
},
|
|
593
|
-
config.enabled
|
|
613
|
+
config.enabled,
|
|
614
|
+
config.when
|
|
594
615
|
);
|
|
595
616
|
return this;
|
|
596
617
|
}
|
|
@@ -608,15 +629,18 @@ var FlowBuilder = class {
|
|
|
608
629
|
headers: config.headers,
|
|
609
630
|
body: config.body
|
|
610
631
|
},
|
|
632
|
+
auth: config.auth,
|
|
611
633
|
responseType: config.responseType,
|
|
612
634
|
markdownIfAvailable: config.markdownIfAvailable,
|
|
613
|
-
fetchMethod: config.fetchMethod,
|
|
635
|
+
fetchMethod: config.fetchMethod === "http" ? "standard" : config.fetchMethod,
|
|
614
636
|
firecrawl: config.firecrawl,
|
|
615
637
|
outputVariable: config.outputVariable,
|
|
616
638
|
errorHandling: config.errorHandling,
|
|
639
|
+
defaultValue: config.defaultValue,
|
|
617
640
|
streamOutput: config.streamOutput
|
|
618
641
|
},
|
|
619
|
-
config.enabled
|
|
642
|
+
config.enabled,
|
|
643
|
+
config.when
|
|
620
644
|
);
|
|
621
645
|
return this;
|
|
622
646
|
}
|
|
@@ -628,12 +652,23 @@ var FlowBuilder = class {
|
|
|
628
652
|
"transform-data",
|
|
629
653
|
config.name,
|
|
630
654
|
{
|
|
655
|
+
inputVariables: config.inputVariables,
|
|
631
656
|
script: config.script,
|
|
632
657
|
outputVariable: config.outputVariable,
|
|
633
658
|
sandboxProvider: config.sandboxProvider,
|
|
659
|
+
language: config.language,
|
|
660
|
+
inputMode: config.inputMode,
|
|
661
|
+
packageJson: config.packageJson,
|
|
662
|
+
persistSandbox: config.persistSandbox,
|
|
663
|
+
reuseSandboxId: config.reuseSandboxId,
|
|
664
|
+
networkAccess: config.networkAccess,
|
|
665
|
+
errorHandling: config.errorHandling,
|
|
666
|
+
defaultValue: config.defaultValue,
|
|
667
|
+
tools: config.tools,
|
|
634
668
|
streamOutput: config.streamOutput
|
|
635
669
|
},
|
|
636
|
-
config.enabled
|
|
670
|
+
config.enabled,
|
|
671
|
+
config.when
|
|
637
672
|
);
|
|
638
673
|
return this;
|
|
639
674
|
}
|
|
@@ -648,7 +683,8 @@ var FlowBuilder = class {
|
|
|
648
683
|
variableName: config.variableName,
|
|
649
684
|
value: config.value
|
|
650
685
|
},
|
|
651
|
-
config.enabled
|
|
686
|
+
config.enabled,
|
|
687
|
+
config.when
|
|
652
688
|
);
|
|
653
689
|
return this;
|
|
654
690
|
}
|
|
@@ -664,7 +700,8 @@ var FlowBuilder = class {
|
|
|
664
700
|
trueSteps: config.trueSteps || [],
|
|
665
701
|
falseSteps: config.falseSteps || []
|
|
666
702
|
},
|
|
667
|
-
config.enabled
|
|
703
|
+
config.enabled,
|
|
704
|
+
config.when
|
|
668
705
|
);
|
|
669
706
|
return this;
|
|
670
707
|
}
|
|
@@ -678,13 +715,22 @@ var FlowBuilder = class {
|
|
|
678
715
|
{
|
|
679
716
|
provider: config.provider,
|
|
680
717
|
query: config.query,
|
|
718
|
+
temperature: config.temperature,
|
|
719
|
+
maxTokens: config.maxTokens,
|
|
681
720
|
maxResults: config.maxResults,
|
|
721
|
+
dateRange: config.dateRange,
|
|
722
|
+
allowedDomains: config.allowedDomains,
|
|
723
|
+
blockedDomains: config.blockedDomains,
|
|
724
|
+
userLocation: config.userLocation,
|
|
725
|
+
sources: config.sources,
|
|
726
|
+
exaOptions: config.exaOptions,
|
|
682
727
|
outputVariable: config.outputVariable,
|
|
683
728
|
returnCitations: config.returnCitations,
|
|
684
729
|
errorHandling: config.errorHandling,
|
|
685
730
|
streamOutput: config.streamOutput
|
|
686
731
|
},
|
|
687
|
-
config.enabled
|
|
732
|
+
config.enabled,
|
|
733
|
+
config.when
|
|
688
734
|
);
|
|
689
735
|
return this;
|
|
690
736
|
}
|
|
@@ -699,12 +745,19 @@ var FlowBuilder = class {
|
|
|
699
745
|
to: config.to,
|
|
700
746
|
from: config.from || "{{_flow.id}}@runtype.email",
|
|
701
747
|
subject: config.subject,
|
|
748
|
+
replyTo: config.replyTo,
|
|
749
|
+
cc: config.cc,
|
|
750
|
+
bcc: config.bcc,
|
|
702
751
|
html: config.html,
|
|
752
|
+
text: config.text,
|
|
753
|
+
attachments: config.attachments,
|
|
703
754
|
outputVariable: config.outputVariable,
|
|
704
755
|
errorHandling: config.errorHandling,
|
|
756
|
+
defaultValue: config.defaultValue,
|
|
705
757
|
streamOutput: config.streamOutput
|
|
706
758
|
},
|
|
707
|
-
config.enabled
|
|
759
|
+
config.enabled,
|
|
760
|
+
config.when
|
|
708
761
|
);
|
|
709
762
|
return this;
|
|
710
763
|
}
|
|
@@ -718,7 +771,8 @@ var FlowBuilder = class {
|
|
|
718
771
|
{
|
|
719
772
|
message: config.message
|
|
720
773
|
},
|
|
721
|
-
config.enabled
|
|
774
|
+
config.enabled,
|
|
775
|
+
config.when
|
|
722
776
|
);
|
|
723
777
|
return this;
|
|
724
778
|
}
|
|
@@ -730,14 +784,21 @@ var FlowBuilder = class {
|
|
|
730
784
|
"retrieve-record",
|
|
731
785
|
config.name,
|
|
732
786
|
{
|
|
787
|
+
retrievalMode: config.retrievalMode,
|
|
733
788
|
recordType: config.recordType,
|
|
734
789
|
recordName: config.recordName,
|
|
790
|
+
recordId: config.recordId,
|
|
791
|
+
recordFilter: config.recordFilter,
|
|
735
792
|
fieldsToInclude: config.fieldsToInclude,
|
|
736
793
|
fieldsToExclude: config.fieldsToExclude,
|
|
794
|
+
availableFields: config.availableFields,
|
|
737
795
|
outputVariable: config.outputVariable,
|
|
796
|
+
fields: config.fields,
|
|
797
|
+
includeMetadata: config.includeMetadata,
|
|
738
798
|
streamOutput: config.streamOutput
|
|
739
799
|
},
|
|
740
|
-
config.enabled
|
|
800
|
+
config.enabled,
|
|
801
|
+
config.when
|
|
741
802
|
);
|
|
742
803
|
return this;
|
|
743
804
|
}
|
|
@@ -757,7 +818,8 @@ var FlowBuilder = class {
|
|
|
757
818
|
errorHandling: config.errorHandling,
|
|
758
819
|
streamOutput: config.streamOutput
|
|
759
820
|
},
|
|
760
|
-
config.enabled
|
|
821
|
+
config.enabled,
|
|
822
|
+
config.when
|
|
761
823
|
);
|
|
762
824
|
return this;
|
|
763
825
|
}
|
|
@@ -772,12 +834,20 @@ var FlowBuilder = class {
|
|
|
772
834
|
query: config.query,
|
|
773
835
|
recordType: config.recordType,
|
|
774
836
|
embeddingModel: config.embeddingModel,
|
|
837
|
+
vectorStore: config.vectorStore,
|
|
838
|
+
weaviateConfig: config.weaviateConfig,
|
|
839
|
+
vectorizeConfig: config.vectorizeConfig,
|
|
840
|
+
pineconeConfig: config.pineconeConfig,
|
|
775
841
|
limit: config.limit,
|
|
776
842
|
threshold: config.threshold,
|
|
843
|
+
metadataFilters: config.metadataFilters,
|
|
777
844
|
outputVariable: config.outputVariable,
|
|
845
|
+
includeEmbedding: config.includeEmbedding,
|
|
846
|
+
includeMetadata: config.includeMetadata,
|
|
778
847
|
streamOutput: config.streamOutput
|
|
779
848
|
},
|
|
780
|
-
config.enabled
|
|
849
|
+
config.enabled,
|
|
850
|
+
config.when
|
|
781
851
|
);
|
|
782
852
|
return this;
|
|
783
853
|
}
|
|
@@ -789,14 +859,27 @@ var FlowBuilder = class {
|
|
|
789
859
|
"generate-embedding",
|
|
790
860
|
config.name,
|
|
791
861
|
{
|
|
792
|
-
inputSource: "text",
|
|
862
|
+
inputSource: config.inputSource || "text",
|
|
793
863
|
text: config.text,
|
|
864
|
+
variableName: config.variableName,
|
|
865
|
+
recordId: config.recordId,
|
|
866
|
+
recordType: config.recordType,
|
|
867
|
+
recordName: config.recordName,
|
|
868
|
+
textField: config.textField,
|
|
869
|
+
storeInRecord: config.storeInRecord,
|
|
794
870
|
embeddingModel: config.embeddingModel,
|
|
795
871
|
maxLength: config.maxLength,
|
|
872
|
+
inputMode: config.inputMode,
|
|
873
|
+
inputVariable: config.inputVariable,
|
|
874
|
+
itemAlias: config.itemAlias,
|
|
875
|
+
textTemplate: config.textTemplate,
|
|
876
|
+
batchSize: config.batchSize,
|
|
877
|
+
vectorStore: config.vectorStore,
|
|
796
878
|
outputVariable: config.outputVariable,
|
|
797
879
|
streamOutput: config.streamOutput
|
|
798
880
|
},
|
|
799
|
-
config.enabled
|
|
881
|
+
config.enabled,
|
|
882
|
+
config.when
|
|
800
883
|
);
|
|
801
884
|
return this;
|
|
802
885
|
}
|
|
@@ -815,7 +898,8 @@ var FlowBuilder = class {
|
|
|
815
898
|
errorHandling: config.errorHandling,
|
|
816
899
|
streamOutput: config.streamOutput
|
|
817
900
|
},
|
|
818
|
-
config.enabled
|
|
901
|
+
config.enabled,
|
|
902
|
+
config.when
|
|
819
903
|
);
|
|
820
904
|
return this;
|
|
821
905
|
}
|
|
@@ -834,7 +918,8 @@ var FlowBuilder = class {
|
|
|
834
918
|
errorHandling: config.errorHandling,
|
|
835
919
|
streamOutput: config.streamOutput
|
|
836
920
|
},
|
|
837
|
-
config.enabled
|
|
921
|
+
config.enabled,
|
|
922
|
+
config.when
|
|
838
923
|
);
|
|
839
924
|
return this;
|
|
840
925
|
}
|
|
@@ -853,7 +938,8 @@ var FlowBuilder = class {
|
|
|
853
938
|
errorHandling: config.errorHandling,
|
|
854
939
|
streamOutput: config.streamOutput
|
|
855
940
|
},
|
|
856
|
-
config.enabled
|
|
941
|
+
config.enabled,
|
|
942
|
+
config.when
|
|
857
943
|
);
|
|
858
944
|
return this;
|
|
859
945
|
}
|
|
@@ -868,13 +954,68 @@ var FlowBuilder = class {
|
|
|
868
954
|
repository: config.repository,
|
|
869
955
|
branch: config.branch,
|
|
870
956
|
path: config.path,
|
|
957
|
+
token: config.token,
|
|
871
958
|
outputVariable: config.outputVariable,
|
|
959
|
+
contentType: config.contentType,
|
|
960
|
+
includePatterns: config.includePatterns,
|
|
961
|
+
excludePatterns: config.excludePatterns,
|
|
962
|
+
compress: config.compress,
|
|
963
|
+
style: config.style,
|
|
872
964
|
streamOutput: config.streamOutput
|
|
873
965
|
},
|
|
874
|
-
config.enabled
|
|
966
|
+
config.enabled,
|
|
967
|
+
config.when
|
|
875
968
|
);
|
|
876
969
|
return this;
|
|
877
970
|
}
|
|
971
|
+
/** Add an api-call step. */
|
|
972
|
+
apiCall(config) {
|
|
973
|
+
return this.addRawStep("api-call", config);
|
|
974
|
+
}
|
|
975
|
+
/** Add a template rendering step. */
|
|
976
|
+
template(config) {
|
|
977
|
+
return this.addRawStep("template", config);
|
|
978
|
+
}
|
|
979
|
+
/** Add an update-record step. */
|
|
980
|
+
updateRecord(config) {
|
|
981
|
+
return this.addRawStep("update-record", config);
|
|
982
|
+
}
|
|
983
|
+
/** Add a deterministic tool-call step. */
|
|
984
|
+
toolCall(config) {
|
|
985
|
+
return this.addRawStep("tool-call", config);
|
|
986
|
+
}
|
|
987
|
+
/** Add a paginate-api step. */
|
|
988
|
+
paginateApi(config) {
|
|
989
|
+
return this.addRawStep("paginate-api", config);
|
|
990
|
+
}
|
|
991
|
+
/** Add a store-vector step. */
|
|
992
|
+
storeVector(config) {
|
|
993
|
+
return this.addRawStep("store-vector", config);
|
|
994
|
+
}
|
|
995
|
+
/** Add an execute-agent step. */
|
|
996
|
+
executeAgent(config) {
|
|
997
|
+
return this.addRawStep("execute-agent", config);
|
|
998
|
+
}
|
|
999
|
+
/** Add a store-asset step. */
|
|
1000
|
+
storeAsset(config) {
|
|
1001
|
+
return this.addRawStep("store-asset", config);
|
|
1002
|
+
}
|
|
1003
|
+
/** Add a generate-pdf step. */
|
|
1004
|
+
generatePdf(config) {
|
|
1005
|
+
return this.addRawStep("generate-pdf", config);
|
|
1006
|
+
}
|
|
1007
|
+
/** Add a save-memory step. */
|
|
1008
|
+
saveMemory(config) {
|
|
1009
|
+
return this.addRawStep("save-memory", config);
|
|
1010
|
+
}
|
|
1011
|
+
/** Add a recall-memory step. */
|
|
1012
|
+
recallMemory(config) {
|
|
1013
|
+
return this.addRawStep("recall-memory", config);
|
|
1014
|
+
}
|
|
1015
|
+
/** Add a memory-summary step. */
|
|
1016
|
+
memorySummary(config) {
|
|
1017
|
+
return this.addRawStep("memory-summary", config);
|
|
1018
|
+
}
|
|
878
1019
|
// ============================================================================
|
|
879
1020
|
// Subagent Helpers
|
|
880
1021
|
// ============================================================================
|
|
@@ -1064,7 +1205,12 @@ var FlowBuilder = class {
|
|
|
1064
1205
|
// ============================================================================
|
|
1065
1206
|
// Private Helpers
|
|
1066
1207
|
// ============================================================================
|
|
1067
|
-
|
|
1208
|
+
addRawStep(type, config) {
|
|
1209
|
+
const { name, enabled, when, ...stepConfig } = config;
|
|
1210
|
+
this.addStep(type, name, stepConfig, enabled, when);
|
|
1211
|
+
return this;
|
|
1212
|
+
}
|
|
1213
|
+
addStep(type, name, config, enabled = true, when) {
|
|
1068
1214
|
this.stepCounter++;
|
|
1069
1215
|
const cleanConfig = {};
|
|
1070
1216
|
for (const [key, value] of Object.entries(config)) {
|
|
@@ -1078,6 +1224,7 @@ var FlowBuilder = class {
|
|
|
1078
1224
|
name,
|
|
1079
1225
|
order: this.stepCounter,
|
|
1080
1226
|
enabled,
|
|
1227
|
+
...when ? { when } : {},
|
|
1081
1228
|
config: cleanConfig
|
|
1082
1229
|
});
|
|
1083
1230
|
}
|
|
@@ -1382,6 +1529,13 @@ var RuntypeFlowBuilder = class {
|
|
|
1382
1529
|
this.messagesConfig = messages;
|
|
1383
1530
|
return this;
|
|
1384
1531
|
}
|
|
1532
|
+
/**
|
|
1533
|
+
* Set top-level input variables accessible as {{varName}} in templates.
|
|
1534
|
+
*/
|
|
1535
|
+
withInputs(inputs) {
|
|
1536
|
+
this.inputsConfig = inputs;
|
|
1537
|
+
return this;
|
|
1538
|
+
}
|
|
1385
1539
|
/**
|
|
1386
1540
|
* Set dispatch options
|
|
1387
1541
|
*/
|
|
@@ -1389,6 +1543,21 @@ var RuntypeFlowBuilder = class {
|
|
|
1389
1543
|
this.dispatchOptions = { ...this.dispatchOptions, ...options };
|
|
1390
1544
|
return this;
|
|
1391
1545
|
}
|
|
1546
|
+
/**
|
|
1547
|
+
* Add a generic flow step. Prefer the typed helper methods when available;
|
|
1548
|
+
* this escape hatch keeps code-first flows compatible with newer dashboard/API
|
|
1549
|
+
* step types before a dedicated SDK convenience method exists.
|
|
1550
|
+
*/
|
|
1551
|
+
step(config) {
|
|
1552
|
+
this.addStep(
|
|
1553
|
+
config.type,
|
|
1554
|
+
config.name || config.type,
|
|
1555
|
+
config.config || {},
|
|
1556
|
+
config.enabled,
|
|
1557
|
+
config.when
|
|
1558
|
+
);
|
|
1559
|
+
return this;
|
|
1560
|
+
}
|
|
1392
1561
|
// ============================================================================
|
|
1393
1562
|
// Step Methods
|
|
1394
1563
|
// ============================================================================
|
|
@@ -1406,15 +1575,62 @@ var RuntypeFlowBuilder = class {
|
|
|
1406
1575
|
systemPrompt: config.systemPrompt,
|
|
1407
1576
|
previousMessages: config.previousMessages,
|
|
1408
1577
|
outputVariable: config.outputVariable,
|
|
1578
|
+
mode: config.mode,
|
|
1409
1579
|
responseFormat: config.responseFormat,
|
|
1410
1580
|
temperature: config.temperature,
|
|
1581
|
+
topP: config.topP,
|
|
1582
|
+
topK: config.topK,
|
|
1583
|
+
frequencyPenalty: config.frequencyPenalty,
|
|
1584
|
+
presencePenalty: config.presencePenalty,
|
|
1585
|
+
seed: config.seed,
|
|
1411
1586
|
maxTokens: config.maxTokens,
|
|
1412
1587
|
reasoning: config.reasoning,
|
|
1588
|
+
artifacts: config.artifacts,
|
|
1413
1589
|
streamOutput: config.streamOutput,
|
|
1414
1590
|
tools: config.tools,
|
|
1415
1591
|
errorHandling: config.errorHandling
|
|
1416
1592
|
},
|
|
1417
|
-
config.enabled
|
|
1593
|
+
config.enabled,
|
|
1594
|
+
config.when
|
|
1595
|
+
);
|
|
1596
|
+
return this;
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Add a crawl step
|
|
1600
|
+
*/
|
|
1601
|
+
crawl(config) {
|
|
1602
|
+
this.addStep(
|
|
1603
|
+
"crawl",
|
|
1604
|
+
config.name,
|
|
1605
|
+
{
|
|
1606
|
+
url: config.url,
|
|
1607
|
+
limit: config.limit,
|
|
1608
|
+
depth: config.depth,
|
|
1609
|
+
source: config.source,
|
|
1610
|
+
formats: config.formats,
|
|
1611
|
+
render: config.render,
|
|
1612
|
+
maxAge: config.maxAge,
|
|
1613
|
+
modifiedSince: config.modifiedSince,
|
|
1614
|
+
options: config.options,
|
|
1615
|
+
authenticate: config.authenticate,
|
|
1616
|
+
cookies: config.cookies,
|
|
1617
|
+
setExtraHTTPHeaders: config.setExtraHTTPHeaders,
|
|
1618
|
+
gotoOptions: config.gotoOptions,
|
|
1619
|
+
waitForSelector: config.waitForSelector,
|
|
1620
|
+
rejectResourceTypes: config.rejectResourceTypes,
|
|
1621
|
+
rejectRequestPattern: config.rejectRequestPattern,
|
|
1622
|
+
userAgent: config.userAgent,
|
|
1623
|
+
jsonOptions: config.jsonOptions,
|
|
1624
|
+
outputVariable: config.outputVariable,
|
|
1625
|
+
errorHandling: config.errorHandling,
|
|
1626
|
+
defaultValue: config.defaultValue,
|
|
1627
|
+
streamOutput: config.streamOutput,
|
|
1628
|
+
pollIntervalMs: config.pollIntervalMs,
|
|
1629
|
+
completionTimeoutMs: config.completionTimeoutMs,
|
|
1630
|
+
asyncCrawl: config.asyncCrawl
|
|
1631
|
+
},
|
|
1632
|
+
config.enabled,
|
|
1633
|
+
config.when
|
|
1418
1634
|
);
|
|
1419
1635
|
return this;
|
|
1420
1636
|
}
|
|
@@ -1432,15 +1648,18 @@ var RuntypeFlowBuilder = class {
|
|
|
1432
1648
|
headers: config.headers,
|
|
1433
1649
|
body: config.body
|
|
1434
1650
|
},
|
|
1651
|
+
auth: config.auth,
|
|
1435
1652
|
responseType: config.responseType,
|
|
1436
1653
|
markdownIfAvailable: config.markdownIfAvailable,
|
|
1437
|
-
fetchMethod: config.fetchMethod,
|
|
1654
|
+
fetchMethod: config.fetchMethod === "http" ? "standard" : config.fetchMethod,
|
|
1438
1655
|
firecrawl: config.firecrawl,
|
|
1439
1656
|
outputVariable: config.outputVariable,
|
|
1440
1657
|
errorHandling: config.errorHandling,
|
|
1658
|
+
defaultValue: config.defaultValue,
|
|
1441
1659
|
streamOutput: config.streamOutput
|
|
1442
1660
|
},
|
|
1443
|
-
config.enabled
|
|
1661
|
+
config.enabled,
|
|
1662
|
+
config.when
|
|
1444
1663
|
);
|
|
1445
1664
|
return this;
|
|
1446
1665
|
}
|
|
@@ -1452,11 +1671,23 @@ var RuntypeFlowBuilder = class {
|
|
|
1452
1671
|
"transform-data",
|
|
1453
1672
|
config.name,
|
|
1454
1673
|
{
|
|
1674
|
+
inputVariables: config.inputVariables,
|
|
1455
1675
|
script: config.script,
|
|
1456
1676
|
outputVariable: config.outputVariable,
|
|
1677
|
+
sandboxProvider: config.sandboxProvider,
|
|
1678
|
+
language: config.language,
|
|
1679
|
+
inputMode: config.inputMode,
|
|
1680
|
+
packageJson: config.packageJson,
|
|
1681
|
+
persistSandbox: config.persistSandbox,
|
|
1682
|
+
reuseSandboxId: config.reuseSandboxId,
|
|
1683
|
+
networkAccess: config.networkAccess,
|
|
1684
|
+
errorHandling: config.errorHandling,
|
|
1685
|
+
defaultValue: config.defaultValue,
|
|
1686
|
+
tools: config.tools,
|
|
1457
1687
|
streamOutput: config.streamOutput
|
|
1458
1688
|
},
|
|
1459
|
-
config.enabled
|
|
1689
|
+
config.enabled,
|
|
1690
|
+
config.when
|
|
1460
1691
|
);
|
|
1461
1692
|
return this;
|
|
1462
1693
|
}
|
|
@@ -1471,7 +1702,8 @@ var RuntypeFlowBuilder = class {
|
|
|
1471
1702
|
variableName: config.variableName,
|
|
1472
1703
|
value: config.value
|
|
1473
1704
|
},
|
|
1474
|
-
config.enabled
|
|
1705
|
+
config.enabled,
|
|
1706
|
+
config.when
|
|
1475
1707
|
);
|
|
1476
1708
|
return this;
|
|
1477
1709
|
}
|
|
@@ -1487,7 +1719,8 @@ var RuntypeFlowBuilder = class {
|
|
|
1487
1719
|
trueSteps: config.trueSteps || [],
|
|
1488
1720
|
falseSteps: config.falseSteps || []
|
|
1489
1721
|
},
|
|
1490
|
-
config.enabled
|
|
1722
|
+
config.enabled,
|
|
1723
|
+
config.when
|
|
1491
1724
|
);
|
|
1492
1725
|
return this;
|
|
1493
1726
|
}
|
|
@@ -1501,13 +1734,22 @@ var RuntypeFlowBuilder = class {
|
|
|
1501
1734
|
{
|
|
1502
1735
|
provider: config.provider,
|
|
1503
1736
|
query: config.query,
|
|
1737
|
+
temperature: config.temperature,
|
|
1738
|
+
maxTokens: config.maxTokens,
|
|
1504
1739
|
maxResults: config.maxResults,
|
|
1740
|
+
dateRange: config.dateRange,
|
|
1741
|
+
allowedDomains: config.allowedDomains,
|
|
1742
|
+
blockedDomains: config.blockedDomains,
|
|
1743
|
+
userLocation: config.userLocation,
|
|
1744
|
+
sources: config.sources,
|
|
1745
|
+
exaOptions: config.exaOptions,
|
|
1505
1746
|
outputVariable: config.outputVariable,
|
|
1506
1747
|
returnCitations: config.returnCitations,
|
|
1507
1748
|
errorHandling: config.errorHandling,
|
|
1508
1749
|
streamOutput: config.streamOutput
|
|
1509
1750
|
},
|
|
1510
|
-
config.enabled
|
|
1751
|
+
config.enabled,
|
|
1752
|
+
config.when
|
|
1511
1753
|
);
|
|
1512
1754
|
return this;
|
|
1513
1755
|
}
|
|
@@ -1522,12 +1764,19 @@ var RuntypeFlowBuilder = class {
|
|
|
1522
1764
|
to: config.to,
|
|
1523
1765
|
from: config.from || "{{_flow.id}}@runtype.email",
|
|
1524
1766
|
subject: config.subject,
|
|
1767
|
+
replyTo: config.replyTo,
|
|
1768
|
+
cc: config.cc,
|
|
1769
|
+
bcc: config.bcc,
|
|
1525
1770
|
html: config.html,
|
|
1771
|
+
text: config.text,
|
|
1772
|
+
attachments: config.attachments,
|
|
1526
1773
|
outputVariable: config.outputVariable,
|
|
1527
1774
|
errorHandling: config.errorHandling,
|
|
1775
|
+
defaultValue: config.defaultValue,
|
|
1528
1776
|
streamOutput: config.streamOutput
|
|
1529
1777
|
},
|
|
1530
|
-
config.enabled
|
|
1778
|
+
config.enabled,
|
|
1779
|
+
config.when
|
|
1531
1780
|
);
|
|
1532
1781
|
return this;
|
|
1533
1782
|
}
|
|
@@ -1541,7 +1790,8 @@ var RuntypeFlowBuilder = class {
|
|
|
1541
1790
|
{
|
|
1542
1791
|
message: config.message
|
|
1543
1792
|
},
|
|
1544
|
-
config.enabled
|
|
1793
|
+
config.enabled,
|
|
1794
|
+
config.when
|
|
1545
1795
|
);
|
|
1546
1796
|
return this;
|
|
1547
1797
|
}
|
|
@@ -1553,14 +1803,21 @@ var RuntypeFlowBuilder = class {
|
|
|
1553
1803
|
"retrieve-record",
|
|
1554
1804
|
config.name,
|
|
1555
1805
|
{
|
|
1806
|
+
retrievalMode: config.retrievalMode,
|
|
1556
1807
|
recordType: config.recordType,
|
|
1557
1808
|
recordName: config.recordName,
|
|
1809
|
+
recordId: config.recordId,
|
|
1810
|
+
recordFilter: config.recordFilter,
|
|
1558
1811
|
fieldsToInclude: config.fieldsToInclude,
|
|
1559
1812
|
fieldsToExclude: config.fieldsToExclude,
|
|
1813
|
+
availableFields: config.availableFields,
|
|
1560
1814
|
outputVariable: config.outputVariable,
|
|
1815
|
+
fields: config.fields,
|
|
1816
|
+
includeMetadata: config.includeMetadata,
|
|
1561
1817
|
streamOutput: config.streamOutput
|
|
1562
1818
|
},
|
|
1563
|
-
config.enabled
|
|
1819
|
+
config.enabled,
|
|
1820
|
+
config.when
|
|
1564
1821
|
);
|
|
1565
1822
|
return this;
|
|
1566
1823
|
}
|
|
@@ -1580,7 +1837,8 @@ var RuntypeFlowBuilder = class {
|
|
|
1580
1837
|
errorHandling: config.errorHandling,
|
|
1581
1838
|
streamOutput: config.streamOutput
|
|
1582
1839
|
},
|
|
1583
|
-
config.enabled
|
|
1840
|
+
config.enabled,
|
|
1841
|
+
config.when
|
|
1584
1842
|
);
|
|
1585
1843
|
return this;
|
|
1586
1844
|
}
|
|
@@ -1595,12 +1853,20 @@ var RuntypeFlowBuilder = class {
|
|
|
1595
1853
|
query: config.query,
|
|
1596
1854
|
recordType: config.recordType,
|
|
1597
1855
|
embeddingModel: config.embeddingModel,
|
|
1856
|
+
vectorStore: config.vectorStore,
|
|
1857
|
+
weaviateConfig: config.weaviateConfig,
|
|
1858
|
+
vectorizeConfig: config.vectorizeConfig,
|
|
1859
|
+
pineconeConfig: config.pineconeConfig,
|
|
1598
1860
|
limit: config.limit,
|
|
1599
1861
|
threshold: config.threshold,
|
|
1862
|
+
metadataFilters: config.metadataFilters,
|
|
1600
1863
|
outputVariable: config.outputVariable,
|
|
1864
|
+
includeEmbedding: config.includeEmbedding,
|
|
1865
|
+
includeMetadata: config.includeMetadata,
|
|
1601
1866
|
streamOutput: config.streamOutput
|
|
1602
1867
|
},
|
|
1603
|
-
config.enabled
|
|
1868
|
+
config.enabled,
|
|
1869
|
+
config.when
|
|
1604
1870
|
);
|
|
1605
1871
|
return this;
|
|
1606
1872
|
}
|
|
@@ -1612,14 +1878,27 @@ var RuntypeFlowBuilder = class {
|
|
|
1612
1878
|
"generate-embedding",
|
|
1613
1879
|
config.name,
|
|
1614
1880
|
{
|
|
1615
|
-
inputSource: "text",
|
|
1881
|
+
inputSource: config.inputSource || "text",
|
|
1616
1882
|
text: config.text,
|
|
1883
|
+
variableName: config.variableName,
|
|
1884
|
+
recordId: config.recordId,
|
|
1885
|
+
recordType: config.recordType,
|
|
1886
|
+
recordName: config.recordName,
|
|
1887
|
+
textField: config.textField,
|
|
1888
|
+
storeInRecord: config.storeInRecord,
|
|
1617
1889
|
embeddingModel: config.embeddingModel,
|
|
1618
1890
|
maxLength: config.maxLength,
|
|
1891
|
+
inputMode: config.inputMode,
|
|
1892
|
+
inputVariable: config.inputVariable,
|
|
1893
|
+
itemAlias: config.itemAlias,
|
|
1894
|
+
textTemplate: config.textTemplate,
|
|
1895
|
+
batchSize: config.batchSize,
|
|
1896
|
+
vectorStore: config.vectorStore,
|
|
1619
1897
|
outputVariable: config.outputVariable,
|
|
1620
1898
|
streamOutput: config.streamOutput
|
|
1621
1899
|
},
|
|
1622
|
-
config.enabled
|
|
1900
|
+
config.enabled,
|
|
1901
|
+
config.when
|
|
1623
1902
|
);
|
|
1624
1903
|
return this;
|
|
1625
1904
|
}
|
|
@@ -1638,7 +1917,8 @@ var RuntypeFlowBuilder = class {
|
|
|
1638
1917
|
errorHandling: config.errorHandling,
|
|
1639
1918
|
streamOutput: config.streamOutput
|
|
1640
1919
|
},
|
|
1641
|
-
config.enabled
|
|
1920
|
+
config.enabled,
|
|
1921
|
+
config.when
|
|
1642
1922
|
);
|
|
1643
1923
|
return this;
|
|
1644
1924
|
}
|
|
@@ -1657,7 +1937,8 @@ var RuntypeFlowBuilder = class {
|
|
|
1657
1937
|
errorHandling: config.errorHandling,
|
|
1658
1938
|
streamOutput: config.streamOutput
|
|
1659
1939
|
},
|
|
1660
|
-
config.enabled
|
|
1940
|
+
config.enabled,
|
|
1941
|
+
config.when
|
|
1661
1942
|
);
|
|
1662
1943
|
return this;
|
|
1663
1944
|
}
|
|
@@ -1676,7 +1957,8 @@ var RuntypeFlowBuilder = class {
|
|
|
1676
1957
|
errorHandling: config.errorHandling,
|
|
1677
1958
|
streamOutput: config.streamOutput
|
|
1678
1959
|
},
|
|
1679
|
-
config.enabled
|
|
1960
|
+
config.enabled,
|
|
1961
|
+
config.when
|
|
1680
1962
|
);
|
|
1681
1963
|
return this;
|
|
1682
1964
|
}
|
|
@@ -1691,13 +1973,77 @@ var RuntypeFlowBuilder = class {
|
|
|
1691
1973
|
repository: config.repository,
|
|
1692
1974
|
branch: config.branch,
|
|
1693
1975
|
path: config.path,
|
|
1976
|
+
token: config.token,
|
|
1694
1977
|
outputVariable: config.outputVariable,
|
|
1978
|
+
contentType: config.contentType,
|
|
1979
|
+
includePatterns: config.includePatterns,
|
|
1980
|
+
excludePatterns: config.excludePatterns,
|
|
1981
|
+
compress: config.compress,
|
|
1982
|
+
style: config.style,
|
|
1695
1983
|
streamOutput: config.streamOutput
|
|
1696
1984
|
},
|
|
1697
|
-
config.enabled
|
|
1985
|
+
config.enabled,
|
|
1986
|
+
config.when
|
|
1698
1987
|
);
|
|
1699
1988
|
return this;
|
|
1700
1989
|
}
|
|
1990
|
+
/** Add an api-call step. */
|
|
1991
|
+
apiCall(config) {
|
|
1992
|
+
return this.addRawStep("api-call", config);
|
|
1993
|
+
}
|
|
1994
|
+
/** Add a template rendering step. */
|
|
1995
|
+
template(config) {
|
|
1996
|
+
return this.addRawStep("template", config);
|
|
1997
|
+
}
|
|
1998
|
+
/** Add an update-record step. */
|
|
1999
|
+
updateRecord(config) {
|
|
2000
|
+
return this.addRawStep("update-record", config);
|
|
2001
|
+
}
|
|
2002
|
+
/** Add a deterministic tool-call step. */
|
|
2003
|
+
toolCall(config) {
|
|
2004
|
+
return this.addRawStep("tool-call", config);
|
|
2005
|
+
}
|
|
2006
|
+
/** Add a paginate-api step. */
|
|
2007
|
+
paginateApi(config) {
|
|
2008
|
+
return this.addRawStep("paginate-api", config);
|
|
2009
|
+
}
|
|
2010
|
+
/** Add a store-vector step. */
|
|
2011
|
+
storeVector(config) {
|
|
2012
|
+
return this.addRawStep("store-vector", config);
|
|
2013
|
+
}
|
|
2014
|
+
/** Add an execute-agent step. */
|
|
2015
|
+
executeAgent(config) {
|
|
2016
|
+
return this.addRawStep("execute-agent", config);
|
|
2017
|
+
}
|
|
2018
|
+
/** Add a store-asset step. */
|
|
2019
|
+
storeAsset(config) {
|
|
2020
|
+
return this.addRawStep("store-asset", config);
|
|
2021
|
+
}
|
|
2022
|
+
/** Add a generate-pdf step. */
|
|
2023
|
+
generatePdf(config) {
|
|
2024
|
+
return this.addRawStep("generate-pdf", config);
|
|
2025
|
+
}
|
|
2026
|
+
/** Add a save-memory step. */
|
|
2027
|
+
saveMemory(config) {
|
|
2028
|
+
return this.addRawStep("save-memory", config);
|
|
2029
|
+
}
|
|
2030
|
+
/** Add a recall-memory step. */
|
|
2031
|
+
recallMemory(config) {
|
|
2032
|
+
return this.addRawStep("recall-memory", config);
|
|
2033
|
+
}
|
|
2034
|
+
/** Add a memory-summary step. */
|
|
2035
|
+
memorySummary(config) {
|
|
2036
|
+
return this.addRawStep("memory-summary", config);
|
|
2037
|
+
}
|
|
2038
|
+
/**
|
|
2039
|
+
* Set a run condition (when predicate) on the last added step.
|
|
2040
|
+
* If the expression evaluates to falsy at runtime, the step is skipped.
|
|
2041
|
+
*/
|
|
2042
|
+
when(expression) {
|
|
2043
|
+
const lastStep = this.steps[this.steps.length - 1];
|
|
2044
|
+
if (lastStep) lastStep.when = expression;
|
|
2045
|
+
return this;
|
|
2046
|
+
}
|
|
1701
2047
|
async stream(arg1, arg2) {
|
|
1702
2048
|
const config = this.build();
|
|
1703
2049
|
let callbacks;
|
|
@@ -1919,6 +2265,9 @@ var RuntypeFlowBuilder = class {
|
|
|
1919
2265
|
if (this.messagesConfig) {
|
|
1920
2266
|
request.messages = this.messagesConfig;
|
|
1921
2267
|
}
|
|
2268
|
+
if (this.inputsConfig) {
|
|
2269
|
+
request.inputs = this.inputsConfig;
|
|
2270
|
+
}
|
|
1922
2271
|
const options = {
|
|
1923
2272
|
flowMode,
|
|
1924
2273
|
...this.dispatchOptions
|
|
@@ -2005,7 +2354,12 @@ var RuntypeFlowBuilder = class {
|
|
|
2005
2354
|
async computeContentHash() {
|
|
2006
2355
|
return computeFlowContentHash(this.steps);
|
|
2007
2356
|
}
|
|
2008
|
-
|
|
2357
|
+
addRawStep(type, config) {
|
|
2358
|
+
const { name, enabled, when, ...stepConfig } = config;
|
|
2359
|
+
this.addStep(type, name, stepConfig, enabled, when);
|
|
2360
|
+
return this;
|
|
2361
|
+
}
|
|
2362
|
+
addStep(type, name, config, enabled = true, when) {
|
|
2009
2363
|
this.stepCounter++;
|
|
2010
2364
|
const cleanConfig = {};
|
|
2011
2365
|
for (const [key, value] of Object.entries(config)) {
|
|
@@ -2019,6 +2373,7 @@ var RuntypeFlowBuilder = class {
|
|
|
2019
2373
|
name,
|
|
2020
2374
|
order: this.stepCounter,
|
|
2021
2375
|
enabled,
|
|
2376
|
+
...when ? { when } : {},
|
|
2022
2377
|
config: cleanConfig
|
|
2023
2378
|
});
|
|
2024
2379
|
}
|
|
@@ -9275,6 +9630,7 @@ var PROMPT_FIELDS = [
|
|
|
9275
9630
|
{ key: "systemPrompt", format: "template" },
|
|
9276
9631
|
{ key: "previousMessages", format: "value" },
|
|
9277
9632
|
{ key: "outputVariable", format: "json" },
|
|
9633
|
+
{ key: "mode", format: "json" },
|
|
9278
9634
|
{ key: "responseFormat", format: "json", skipDefault: "text" },
|
|
9279
9635
|
{ key: "temperature", format: "raw" },
|
|
9280
9636
|
{ key: "topP", format: "raw" },
|
|
@@ -9284,6 +9640,7 @@ var PROMPT_FIELDS = [
|
|
|
9284
9640
|
{ key: "seed", format: "raw" },
|
|
9285
9641
|
{ key: "maxTokens", format: "raw" },
|
|
9286
9642
|
{ key: "reasoning", format: "value" },
|
|
9643
|
+
{ key: "artifacts", format: "value" },
|
|
9287
9644
|
{ key: "streamOutput", format: "raw", emitWhen: "falsy" },
|
|
9288
9645
|
{ key: "tools", format: "value" },
|
|
9289
9646
|
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
@@ -9309,27 +9666,41 @@ var CRAWL_FIELDS = [
|
|
|
9309
9666
|
{ key: "jsonOptions", format: "value" },
|
|
9310
9667
|
{ key: "pollIntervalMs", format: "raw" },
|
|
9311
9668
|
{ key: "completionTimeoutMs", format: "raw" },
|
|
9669
|
+
{ key: "asyncCrawl", format: "raw" },
|
|
9312
9670
|
{ key: "outputVariable", format: "json" },
|
|
9313
9671
|
{ key: "streamOutput", format: "raw" },
|
|
9314
|
-
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
9672
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9673
|
+
{ key: "defaultValue", format: "value" }
|
|
9315
9674
|
];
|
|
9316
9675
|
var FETCH_URL_FIELDS = [
|
|
9317
9676
|
{ key: "url", format: "json", source: "http.url" },
|
|
9318
9677
|
{ key: "method", format: "json", source: "http.method", skipDefault: "GET" },
|
|
9319
9678
|
{ key: "headers", format: "value", source: "http.headers" },
|
|
9320
9679
|
{ key: "body", format: "template", source: "http.body" },
|
|
9680
|
+
{ key: "auth", format: "value" },
|
|
9321
9681
|
{ key: "responseType", format: "json" },
|
|
9322
9682
|
{ key: "markdownIfAvailable", format: "raw" },
|
|
9323
|
-
{ key: "fetchMethod", format: "json", skipDefault: "
|
|
9683
|
+
{ key: "fetchMethod", format: "json", skipDefault: "standard" },
|
|
9324
9684
|
{ key: "firecrawl", format: "value" },
|
|
9325
9685
|
{ key: "outputVariable", format: "json" },
|
|
9326
9686
|
{ key: "streamOutput", format: "raw" },
|
|
9327
|
-
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
9687
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9688
|
+
{ key: "defaultValue", format: "value" }
|
|
9328
9689
|
];
|
|
9329
9690
|
var TRANSFORM_DATA_FIELDS = [
|
|
9691
|
+
{ key: "inputVariables", format: "value" },
|
|
9330
9692
|
{ key: "script", format: "template" },
|
|
9331
9693
|
{ key: "outputVariable", format: "json" },
|
|
9332
9694
|
{ key: "sandboxProvider", format: "json" },
|
|
9695
|
+
{ key: "language", format: "json" },
|
|
9696
|
+
{ key: "inputMode", format: "json" },
|
|
9697
|
+
{ key: "packageJson", format: "template" },
|
|
9698
|
+
{ key: "persistSandbox", format: "raw" },
|
|
9699
|
+
{ key: "reuseSandboxId", format: "json" },
|
|
9700
|
+
{ key: "networkAccess", format: "value" },
|
|
9701
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9702
|
+
{ key: "defaultValue", format: "value" },
|
|
9703
|
+
{ key: "tools", format: "value" },
|
|
9333
9704
|
{ key: "streamOutput", format: "raw" }
|
|
9334
9705
|
];
|
|
9335
9706
|
var SET_VARIABLE_FIELDS = [
|
|
@@ -9344,8 +9715,16 @@ var CONDITIONAL_FIELDS = [
|
|
|
9344
9715
|
var SEARCH_FIELDS = [
|
|
9345
9716
|
{ key: "provider", format: "json" },
|
|
9346
9717
|
{ key: "query", format: "template" },
|
|
9718
|
+
{ key: "temperature", format: "raw" },
|
|
9719
|
+
{ key: "maxTokens", format: "raw" },
|
|
9347
9720
|
{ key: "maxResults", format: "raw", skipDefault: 10 },
|
|
9348
9721
|
{ key: "returnCitations", format: "raw" },
|
|
9722
|
+
{ key: "dateRange", format: "value" },
|
|
9723
|
+
{ key: "allowedDomains", format: "value" },
|
|
9724
|
+
{ key: "blockedDomains", format: "value" },
|
|
9725
|
+
{ key: "userLocation", format: "value" },
|
|
9726
|
+
{ key: "sources", format: "value" },
|
|
9727
|
+
{ key: "exaOptions", format: "value" },
|
|
9349
9728
|
{ key: "outputVariable", format: "json" },
|
|
9350
9729
|
{ key: "streamOutput", format: "raw" },
|
|
9351
9730
|
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
@@ -9354,21 +9733,32 @@ var SEND_EMAIL_FIELDS = [
|
|
|
9354
9733
|
{ key: "to", format: "json" },
|
|
9355
9734
|
{ key: "from", format: "json" },
|
|
9356
9735
|
{ key: "subject", format: "template" },
|
|
9736
|
+
{ key: "replyTo", format: "json" },
|
|
9737
|
+
{ key: "cc", format: "json" },
|
|
9738
|
+
{ key: "bcc", format: "json" },
|
|
9357
9739
|
{ key: "html", format: "template" },
|
|
9740
|
+
{ key: "text", format: "template" },
|
|
9741
|
+
{ key: "attachments", format: "value" },
|
|
9358
9742
|
{ key: "outputVariable", format: "json" },
|
|
9359
9743
|
{ key: "streamOutput", format: "raw" },
|
|
9360
|
-
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
9744
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9745
|
+
{ key: "defaultValue", format: "value" }
|
|
9361
9746
|
];
|
|
9362
9747
|
var SEND_STREAM_FIELDS = [
|
|
9363
9748
|
{ key: "message", format: "template" }
|
|
9364
9749
|
];
|
|
9365
9750
|
var RETRIEVE_RECORD_FIELDS = [
|
|
9751
|
+
{ key: "retrievalMode", format: "json" },
|
|
9366
9752
|
{ key: "recordType", format: "json" },
|
|
9367
9753
|
{ key: "recordName", format: "json" },
|
|
9754
|
+
{ key: "recordId", format: "json" },
|
|
9368
9755
|
{ key: "recordFilter", format: "value" },
|
|
9369
9756
|
{ key: "fieldsToInclude", format: "json" },
|
|
9370
9757
|
{ key: "fieldsToExclude", format: "json" },
|
|
9758
|
+
{ key: "availableFields", format: "value" },
|
|
9371
9759
|
{ key: "outputVariable", format: "json" },
|
|
9760
|
+
{ key: "fields", format: "value" },
|
|
9761
|
+
{ key: "includeMetadata", format: "raw" },
|
|
9372
9762
|
{ key: "streamOutput", format: "raw" }
|
|
9373
9763
|
];
|
|
9374
9764
|
var UPSERT_RECORD_FIELDS = [
|
|
@@ -9384,15 +9774,35 @@ var VECTOR_SEARCH_FIELDS = [
|
|
|
9384
9774
|
{ key: "query", format: "template" },
|
|
9385
9775
|
{ key: "recordType", format: "json" },
|
|
9386
9776
|
{ key: "embeddingModel", format: "json" },
|
|
9777
|
+
{ key: "vectorStore", format: "json" },
|
|
9778
|
+
{ key: "weaviateConfig", format: "value" },
|
|
9779
|
+
{ key: "vectorizeConfig", format: "value" },
|
|
9780
|
+
{ key: "pineconeConfig", format: "value" },
|
|
9387
9781
|
{ key: "limit", format: "raw", skipDefault: 5 },
|
|
9388
9782
|
{ key: "threshold", format: "raw", skipDefault: 0.7 },
|
|
9783
|
+
{ key: "metadataFilters", format: "value" },
|
|
9389
9784
|
{ key: "outputVariable", format: "json" },
|
|
9785
|
+
{ key: "includeEmbedding", format: "raw" },
|
|
9786
|
+
{ key: "includeMetadata", format: "raw" },
|
|
9390
9787
|
{ key: "streamOutput", format: "raw" }
|
|
9391
9788
|
];
|
|
9392
9789
|
var GENERATE_EMBEDDING_FIELDS = [
|
|
9790
|
+
{ key: "inputSource", format: "json", skipDefault: "text" },
|
|
9393
9791
|
{ key: "text", format: "template" },
|
|
9792
|
+
{ key: "variableName", format: "json" },
|
|
9793
|
+
{ key: "recordId", format: "json" },
|
|
9794
|
+
{ key: "recordType", format: "json" },
|
|
9795
|
+
{ key: "recordName", format: "json" },
|
|
9796
|
+
{ key: "textField", format: "json" },
|
|
9797
|
+
{ key: "storeInRecord", format: "raw" },
|
|
9394
9798
|
{ key: "embeddingModel", format: "json" },
|
|
9395
9799
|
{ key: "maxLength", format: "raw" },
|
|
9800
|
+
{ key: "inputMode", format: "json" },
|
|
9801
|
+
{ key: "inputVariable", format: "json" },
|
|
9802
|
+
{ key: "itemAlias", format: "json" },
|
|
9803
|
+
{ key: "textTemplate", format: "template" },
|
|
9804
|
+
{ key: "batchSize", format: "raw" },
|
|
9805
|
+
{ key: "vectorStore", format: "value" },
|
|
9396
9806
|
{ key: "outputVariable", format: "json" },
|
|
9397
9807
|
{ key: "streamOutput", format: "raw" }
|
|
9398
9808
|
];
|
|
@@ -9424,19 +9834,47 @@ var FETCH_GITHUB_FIELDS = [
|
|
|
9424
9834
|
{ key: "repository", format: "json" },
|
|
9425
9835
|
{ key: "branch", format: "json" },
|
|
9426
9836
|
{ key: "path", format: "json" },
|
|
9837
|
+
{ key: "token", format: "json" },
|
|
9427
9838
|
{ key: "outputVariable", format: "json" },
|
|
9839
|
+
{ key: "contentType", format: "json" },
|
|
9840
|
+
{ key: "includePatterns", format: "value" },
|
|
9841
|
+
{ key: "excludePatterns", format: "value" },
|
|
9842
|
+
{ key: "compress", format: "raw" },
|
|
9843
|
+
{ key: "style", format: "json" },
|
|
9428
9844
|
{ key: "streamOutput", format: "raw" }
|
|
9429
9845
|
];
|
|
9846
|
+
var API_CALL_FIELDS = [
|
|
9847
|
+
{ key: "http", format: "value" },
|
|
9848
|
+
{ key: "auth", format: "value" },
|
|
9849
|
+
{ key: "requestTemplate", format: "template" },
|
|
9850
|
+
{ key: "responseMapping", format: "value" },
|
|
9851
|
+
{ key: "outputVariable", format: "json" },
|
|
9852
|
+
{ key: "streamOutput", format: "raw" },
|
|
9853
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9854
|
+
{ key: "defaultValue", format: "value" }
|
|
9855
|
+
];
|
|
9856
|
+
var EXECUTE_AGENT_FIELDS = [
|
|
9857
|
+
{ key: "agentId", format: "json" },
|
|
9858
|
+
{ key: "message", format: "template" },
|
|
9859
|
+
{ key: "outputVariable", format: "json" },
|
|
9860
|
+
{ key: "variables", format: "value" },
|
|
9861
|
+
{ key: "maxTurns", format: "raw" },
|
|
9862
|
+
{ key: "timeout", format: "raw" },
|
|
9863
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9864
|
+
{ key: "defaultValue", format: "value" }
|
|
9865
|
+
];
|
|
9430
9866
|
var TEMPLATE_FIELDS = [
|
|
9431
9867
|
{ key: "template", format: "template" },
|
|
9432
|
-
{ key: "outputFormat", format: "json" },
|
|
9433
9868
|
{ key: "inputs", format: "value" },
|
|
9869
|
+
{ key: "outputFormat", format: "json" },
|
|
9870
|
+
{ key: "outputVariable", format: "json" },
|
|
9434
9871
|
{ key: "partials", format: "value" },
|
|
9435
9872
|
{ key: "pdfOptions", format: "value" },
|
|
9436
9873
|
{ key: "asArtifact", format: "raw" },
|
|
9437
9874
|
{ key: "streamOutput", format: "raw" },
|
|
9438
|
-
{ key: "
|
|
9439
|
-
{ key: "
|
|
9875
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9876
|
+
{ key: "defaultValue", format: "value" },
|
|
9877
|
+
{ key: "sampleData", format: "value" }
|
|
9440
9878
|
];
|
|
9441
9879
|
var STORE_ASSET_FIELDS = [
|
|
9442
9880
|
{ key: "url", format: "json" },
|
|
@@ -9445,7 +9883,9 @@ var STORE_ASSET_FIELDS = [
|
|
|
9445
9883
|
{ key: "contentType", format: "json" },
|
|
9446
9884
|
{ key: "visibility", format: "json" },
|
|
9447
9885
|
{ key: "outputVariable", format: "json" },
|
|
9448
|
-
{ key: "
|
|
9886
|
+
{ key: "streamOutput", format: "raw" },
|
|
9887
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9888
|
+
{ key: "defaultValue", format: "value" }
|
|
9449
9889
|
];
|
|
9450
9890
|
var GENERATE_PDF_FIELDS = [
|
|
9451
9891
|
{ key: "html", format: "template" },
|
|
@@ -9454,53 +9894,152 @@ var GENERATE_PDF_FIELDS = [
|
|
|
9454
9894
|
{ key: "visibility", format: "json" },
|
|
9455
9895
|
{ key: "pdfOptions", format: "value" },
|
|
9456
9896
|
{ key: "outputVariable", format: "json" },
|
|
9457
|
-
{ key: "
|
|
9897
|
+
{ key: "streamOutput", format: "raw" },
|
|
9898
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9899
|
+
{ key: "defaultValue", format: "value" }
|
|
9900
|
+
];
|
|
9901
|
+
var UPDATE_RECORD_FIELDS = [
|
|
9902
|
+
{ key: "recordId", format: "json" },
|
|
9903
|
+
{ key: "recordType", format: "json" },
|
|
9904
|
+
{ key: "recordName", format: "json" },
|
|
9905
|
+
{ key: "recordFilter", format: "value" },
|
|
9906
|
+
{ key: "updates", format: "value" },
|
|
9907
|
+
{ key: "updatesTemplate", format: "template" },
|
|
9908
|
+
{ key: "mergeStrategy", format: "json" },
|
|
9909
|
+
{ key: "outputVariable", format: "json" },
|
|
9910
|
+
{ key: "streamOutput", format: "raw" },
|
|
9911
|
+
{ key: "includeFullRecord", format: "raw" },
|
|
9912
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9913
|
+
{ key: "defaultValue", format: "value" }
|
|
9458
9914
|
];
|
|
9459
|
-
var
|
|
9915
|
+
var TOOL_CALL_FIELDS = [
|
|
9916
|
+
{ key: "toolId", format: "json" },
|
|
9917
|
+
{ key: "parameters", format: "value" },
|
|
9460
9918
|
{ key: "outputVariable", format: "json" },
|
|
9461
|
-
{ key: "
|
|
9919
|
+
{ key: "streamOutput", format: "raw" },
|
|
9920
|
+
{ key: "maxRetries", format: "raw" },
|
|
9921
|
+
{ key: "timeout", format: "raw" },
|
|
9922
|
+
{ key: "onError", format: "json" }
|
|
9923
|
+
];
|
|
9924
|
+
var PAGINATE_API_FIELDS = [
|
|
9925
|
+
{ key: "url", format: "json" },
|
|
9926
|
+
{ key: "http", format: "value" },
|
|
9927
|
+
{ key: "method", format: "json" },
|
|
9928
|
+
{ key: "headers", format: "value" },
|
|
9929
|
+
{ key: "body", format: "template" },
|
|
9930
|
+
{ key: "authType", format: "json" },
|
|
9931
|
+
{ key: "authConfig", format: "value" },
|
|
9932
|
+
{ key: "paginationType", format: "json" },
|
|
9933
|
+
{ key: "paginationConfig", format: "value" },
|
|
9934
|
+
{ key: "pageSize", format: "raw" },
|
|
9935
|
+
{ key: "maxPages", format: "raw" },
|
|
9936
|
+
{ key: "offsetParam", format: "json" },
|
|
9937
|
+
{ key: "limitParam", format: "json" },
|
|
9938
|
+
{ key: "cursorParam", format: "json" },
|
|
9939
|
+
{ key: "cursorPath", format: "json" },
|
|
9940
|
+
{ key: "pageParam", format: "json" },
|
|
9941
|
+
{ key: "startPage", format: "raw" },
|
|
9942
|
+
{ key: "entitiesPath", format: "json" },
|
|
9943
|
+
{ key: "entityPath", format: "json" },
|
|
9944
|
+
{ key: "entityIdPath", format: "json" },
|
|
9945
|
+
{ key: "maxEntities", format: "raw" },
|
|
9946
|
+
{ key: "requestDelayMs", format: "raw" },
|
|
9947
|
+
{ key: "retryOnRateLimit", format: "raw" },
|
|
9948
|
+
{ key: "maxRetries", format: "raw" },
|
|
9949
|
+
{ key: "outputVariable", format: "json" },
|
|
9950
|
+
{ key: "includeMetadata", format: "raw" },
|
|
9951
|
+
{ key: "streamOutput", format: "raw" },
|
|
9952
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9953
|
+
{ key: "defaultValue", format: "value" }
|
|
9954
|
+
];
|
|
9955
|
+
var STORE_VECTOR_FIELDS = [
|
|
9956
|
+
{ key: "vectorsSource", format: "json" },
|
|
9957
|
+
{ key: "inputMode", format: "json" },
|
|
9958
|
+
{ key: "inputVariable", format: "json" },
|
|
9959
|
+
{ key: "itemAlias", format: "json" },
|
|
9960
|
+
{ key: "batchSize", format: "raw" },
|
|
9961
|
+
{ key: "destination", format: "json" },
|
|
9962
|
+
{ key: "weaviateConfig", format: "value" },
|
|
9963
|
+
{ key: "vectorizeConfig", format: "value" },
|
|
9964
|
+
{ key: "pineconeConfig", format: "value" },
|
|
9965
|
+
{ key: "weaviateConfigId", format: "json" },
|
|
9966
|
+
{ key: "weaviateClassName", format: "json" },
|
|
9967
|
+
{ key: "vectorizeConfigId", format: "json" },
|
|
9968
|
+
{ key: "vectorizeNamespace", format: "json" },
|
|
9969
|
+
{ key: "pineconeConfigId", format: "json" },
|
|
9970
|
+
{ key: "pineconeNamespace", format: "json" },
|
|
9971
|
+
{ key: "idTemplate", format: "template" },
|
|
9972
|
+
{ key: "metadata", format: "value" },
|
|
9973
|
+
{ key: "outputVariable", format: "json" },
|
|
9974
|
+
{ key: "streamOutput", format: "raw" },
|
|
9975
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9976
|
+
{ key: "defaultValue", format: "value" }
|
|
9977
|
+
];
|
|
9978
|
+
var SAVE_MEMORY_FIELDS = [
|
|
9979
|
+
{ key: "profileTemplate", format: "template" },
|
|
9980
|
+
{ key: "contentVariable", format: "json" },
|
|
9981
|
+
{ key: "sessionId", format: "json" },
|
|
9982
|
+
{ key: "outputVariable", format: "json" },
|
|
9983
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9984
|
+
{ key: "defaultValue", format: "value" }
|
|
9985
|
+
];
|
|
9986
|
+
var RECALL_MEMORY_FIELDS = [
|
|
9987
|
+
{ key: "profileTemplate", format: "template" },
|
|
9988
|
+
{ key: "queryTemplate", format: "template" },
|
|
9989
|
+
{ key: "thinkingLevel", format: "json" },
|
|
9990
|
+
{ key: "responseLength", format: "json" },
|
|
9991
|
+
{ key: "outputVariable", format: "json" },
|
|
9992
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
9993
|
+
{ key: "defaultValue", format: "value" }
|
|
9994
|
+
];
|
|
9995
|
+
var MEMORY_SUMMARY_FIELDS = [
|
|
9996
|
+
{ key: "profileTemplate", format: "template" },
|
|
9997
|
+
{ key: "sessionId", format: "json" },
|
|
9998
|
+
{ key: "outputVariable", format: "json" },
|
|
9999
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" },
|
|
10000
|
+
{ key: "defaultValue", format: "value" }
|
|
9462
10001
|
];
|
|
9463
10002
|
var STEP_FIELD_REGISTRY = {
|
|
9464
|
-
|
|
9465
|
-
|
|
10003
|
+
prompt: PROMPT_FIELDS,
|
|
10004
|
+
crawl: CRAWL_FIELDS,
|
|
9466
10005
|
"fetch-url": FETCH_URL_FIELDS,
|
|
9467
|
-
"api-call":
|
|
10006
|
+
"api-call": API_CALL_FIELDS,
|
|
9468
10007
|
"transform-data": TRANSFORM_DATA_FIELDS,
|
|
9469
10008
|
"set-variable": SET_VARIABLE_FIELDS,
|
|
9470
|
-
|
|
9471
|
-
|
|
10009
|
+
conditional: CONDITIONAL_FIELDS,
|
|
10010
|
+
search: SEARCH_FIELDS,
|
|
9472
10011
|
"send-email": SEND_EMAIL_FIELDS,
|
|
9473
10012
|
"send-stream": SEND_STREAM_FIELDS,
|
|
9474
10013
|
"retrieve-record": RETRIEVE_RECORD_FIELDS,
|
|
9475
10014
|
"upsert-record": UPSERT_RECORD_FIELDS,
|
|
9476
|
-
"update-record":
|
|
10015
|
+
"update-record": UPDATE_RECORD_FIELDS,
|
|
9477
10016
|
"vector-search": VECTOR_SEARCH_FIELDS,
|
|
9478
10017
|
"generate-embedding": GENERATE_EMBEDDING_FIELDS,
|
|
9479
10018
|
"wait-until": WAIT_UNTIL_FIELDS,
|
|
9480
10019
|
"send-event": SEND_EVENT_FIELDS,
|
|
9481
10020
|
"send-text": SEND_TEXT_FIELDS,
|
|
9482
10021
|
"fetch-github": FETCH_GITHUB_FIELDS,
|
|
9483
|
-
|
|
10022
|
+
template: TEMPLATE_FIELDS,
|
|
9484
10023
|
"store-asset": STORE_ASSET_FIELDS,
|
|
9485
10024
|
"generate-pdf": GENERATE_PDF_FIELDS,
|
|
9486
|
-
"tool-call":
|
|
9487
|
-
"paginate-api":
|
|
9488
|
-
"store-vector":
|
|
9489
|
-
"execute-agent":
|
|
9490
|
-
"save-memory":
|
|
9491
|
-
"recall-memory":
|
|
9492
|
-
"memory-summary":
|
|
10025
|
+
"tool-call": TOOL_CALL_FIELDS,
|
|
10026
|
+
"paginate-api": PAGINATE_API_FIELDS,
|
|
10027
|
+
"store-vector": STORE_VECTOR_FIELDS,
|
|
10028
|
+
"execute-agent": EXECUTE_AGENT_FIELDS,
|
|
10029
|
+
"save-memory": SAVE_MEMORY_FIELDS,
|
|
10030
|
+
"recall-memory": RECALL_MEMORY_FIELDS,
|
|
10031
|
+
"memory-summary": MEMORY_SUMMARY_FIELDS
|
|
9493
10032
|
};
|
|
9494
10033
|
var STEP_TYPE_TO_METHOD = {
|
|
9495
|
-
|
|
9496
|
-
|
|
10034
|
+
prompt: "prompt",
|
|
10035
|
+
crawl: "crawl",
|
|
9497
10036
|
"fetch-url": "fetchUrl",
|
|
9498
10037
|
"api-call": "apiCall",
|
|
9499
10038
|
"retrieve-record": "retrieveRecord",
|
|
9500
10039
|
"fetch-github": "fetchGitHub",
|
|
9501
10040
|
"transform-data": "transformData",
|
|
9502
|
-
|
|
9503
|
-
|
|
10041
|
+
template: "template",
|
|
10042
|
+
conditional: "conditional",
|
|
9504
10043
|
"set-variable": "setVariable",
|
|
9505
10044
|
"upsert-record": "upsertRecord",
|
|
9506
10045
|
"update-record": "updateRecord",
|
|
@@ -9508,7 +10047,7 @@ var STEP_TYPE_TO_METHOD = {
|
|
|
9508
10047
|
"send-text": "sendText",
|
|
9509
10048
|
"send-event": "sendEvent",
|
|
9510
10049
|
"send-stream": "sendStream",
|
|
9511
|
-
|
|
10050
|
+
search: "search",
|
|
9512
10051
|
"generate-embedding": "generateEmbedding",
|
|
9513
10052
|
"vector-search": "vectorSearch",
|
|
9514
10053
|
"tool-call": "toolCall",
|