add engine to more blocks (#2457)
This commit is contained in:
@@ -391,3 +391,12 @@ export type CreditCardCredential = {
|
|||||||
card_brand: string;
|
card_brand: string;
|
||||||
card_holder_name: string;
|
card_holder_name: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const RunEngine = {
|
||||||
|
SkyvernV1: "skyvern-1.0",
|
||||||
|
SkyvernV2: "skyvern-2.0",
|
||||||
|
OpenaiCua: "openai-cua",
|
||||||
|
AnthropicCua: "anthropic-cua",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type RunEngine = (typeof RunEngine)[keyof typeof RunEngine];
|
||||||
|
|||||||
31
skyvern-frontend/src/components/EngineSelector.tsx
Normal file
31
skyvern-frontend/src/components/EngineSelector.tsx
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import { RunEngine } from "@/api/types";
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue,
|
||||||
|
} from "./ui/select";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
value: RunEngine | null;
|
||||||
|
onChange: (value: RunEngine) => void;
|
||||||
|
className?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
function RunEngineSelector({ value, onChange, className }: Props) {
|
||||||
|
return (
|
||||||
|
<Select value={value ?? RunEngine.SkyvernV1} onValueChange={onChange}>
|
||||||
|
<SelectTrigger className={className}>
|
||||||
|
<SelectValue />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value={RunEngine.SkyvernV1}>Skyvern 1.0</SelectItem>
|
||||||
|
<SelectItem value={RunEngine.OpenaiCua}>OpenAI CUA</SelectItem>
|
||||||
|
<SelectItem value={RunEngine.AnthropicCua}>Anthropic CUA</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export { RunEngineSelector };
|
||||||
@@ -34,6 +34,7 @@ import { AppNode } from "..";
|
|||||||
import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
||||||
import { ParametersMultiSelect } from "../TaskNode/ParametersMultiSelect";
|
import { ParametersMultiSelect } from "../TaskNode/ParametersMultiSelect";
|
||||||
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
||||||
|
import { RunEngineSelector } from "@/components/EngineSelector";
|
||||||
|
|
||||||
const urlTooltip =
|
const urlTooltip =
|
||||||
"The URL Skyvern is navigating to. Leave this field blank to pick up from where the last block left off.";
|
"The URL Skyvern is navigating to. Leave this field blank to pick up from where the last block left off.";
|
||||||
@@ -59,6 +60,7 @@ function ActionNode({ id, data }: NodeProps<ActionNode>) {
|
|||||||
downloadSuffix: data.downloadSuffix,
|
downloadSuffix: data.downloadSuffix,
|
||||||
totpVerificationUrl: data.totpVerificationUrl,
|
totpVerificationUrl: data.totpVerificationUrl,
|
||||||
totpIdentifier: data.totpIdentifier,
|
totpIdentifier: data.totpIdentifier,
|
||||||
|
engine: data.engine,
|
||||||
});
|
});
|
||||||
const deleteNodeCallback = useDeleteNodeCallback();
|
const deleteNodeCallback = useDeleteNodeCallback();
|
||||||
|
|
||||||
@@ -181,6 +183,20 @@ function ActionNode({ id, data }: NodeProps<ActionNode>) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
Engine
|
||||||
|
</Label>
|
||||||
|
</div>
|
||||||
|
<RunEngineSelector
|
||||||
|
value={inputs.engine}
|
||||||
|
onChange={(value) => {
|
||||||
|
handleChange("engine", value);
|
||||||
|
}}
|
||||||
|
className="nopan w-52 text-xs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<div className="flex gap-4">
|
<div className="flex gap-4">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { Node } from "@xyflow/react";
|
import type { Node } from "@xyflow/react";
|
||||||
import { NodeBaseData } from "../types";
|
import { NodeBaseData } from "../types";
|
||||||
|
import { RunEngine } from "@/api/types";
|
||||||
|
|
||||||
export type ActionNodeData = NodeBaseData & {
|
export type ActionNodeData = NodeBaseData & {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -12,6 +13,7 @@ export type ActionNodeData = NodeBaseData & {
|
|||||||
totpVerificationUrl: string | null;
|
totpVerificationUrl: string | null;
|
||||||
totpIdentifier: string | null;
|
totpIdentifier: string | null;
|
||||||
cacheActions: boolean;
|
cacheActions: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ActionNode = Node<ActionNodeData, "action">;
|
export type ActionNode = Node<ActionNodeData, "action">;
|
||||||
@@ -30,6 +32,7 @@ export const actionNodeDefaultData: ActionNodeData = {
|
|||||||
totpIdentifier: null,
|
totpIdentifier: null,
|
||||||
continueOnFailure: false,
|
continueOnFailure: false,
|
||||||
cacheActions: false,
|
cacheActions: false,
|
||||||
|
engine: RunEngine.SkyvernV1,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export function isActionNode(node: Node): node is ActionNode {
|
export function isActionNode(node: Node): node is ActionNode {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
|||||||
import { ParametersMultiSelect } from "../TaskNode/ParametersMultiSelect";
|
import { ParametersMultiSelect } from "../TaskNode/ParametersMultiSelect";
|
||||||
import { WorkflowDataSchemaInputGroup } from "@/components/DataSchemaInputGroup/WorkflowDataSchemaInputGroup";
|
import { WorkflowDataSchemaInputGroup } from "@/components/DataSchemaInputGroup/WorkflowDataSchemaInputGroup";
|
||||||
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
||||||
|
import { RunEngineSelector } from "@/components/EngineSelector";
|
||||||
|
|
||||||
function ExtractionNode({ id, data }: NodeProps<ExtractionNode>) {
|
function ExtractionNode({ id, data }: NodeProps<ExtractionNode>) {
|
||||||
const { updateNodeData } = useReactFlow();
|
const { updateNodeData } = useReactFlow();
|
||||||
@@ -48,6 +49,7 @@ function ExtractionNode({ id, data }: NodeProps<ExtractionNode>) {
|
|||||||
maxStepsOverride: data.maxStepsOverride,
|
maxStepsOverride: data.maxStepsOverride,
|
||||||
continueOnFailure: data.continueOnFailure,
|
continueOnFailure: data.continueOnFailure,
|
||||||
cacheActions: data.cacheActions,
|
cacheActions: data.cacheActions,
|
||||||
|
engine: data.engine,
|
||||||
});
|
});
|
||||||
const deleteNodeCallback = useDeleteNodeCallback();
|
const deleteNodeCallback = useDeleteNodeCallback();
|
||||||
const nodes = useNodes<AppNode>();
|
const nodes = useNodes<AppNode>();
|
||||||
@@ -159,6 +161,20 @@ function ExtractionNode({ id, data }: NodeProps<ExtractionNode>) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
Engine
|
||||||
|
</Label>
|
||||||
|
</div>
|
||||||
|
<RunEngineSelector
|
||||||
|
value={inputs.engine}
|
||||||
|
onChange={(value) => {
|
||||||
|
handleChange("engine", value);
|
||||||
|
}}
|
||||||
|
className="nopan w-52 text-xs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Label className="text-xs font-normal text-slate-300">
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { Node } from "@xyflow/react";
|
import type { Node } from "@xyflow/react";
|
||||||
import { NodeBaseData } from "../types";
|
import { NodeBaseData } from "../types";
|
||||||
|
import { RunEngine } from "@/api/types";
|
||||||
|
|
||||||
export type ExtractionNodeData = NodeBaseData & {
|
export type ExtractionNodeData = NodeBaseData & {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -9,6 +10,7 @@ export type ExtractionNodeData = NodeBaseData & {
|
|||||||
maxStepsOverride: number | null;
|
maxStepsOverride: number | null;
|
||||||
parameterKeys: Array<string>;
|
parameterKeys: Array<string>;
|
||||||
cacheActions: boolean;
|
cacheActions: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ExtractionNode = Node<ExtractionNodeData, "extraction">;
|
export type ExtractionNode = Node<ExtractionNodeData, "extraction">;
|
||||||
@@ -24,6 +26,7 @@ export const extractionNodeDefaultData: ExtractionNodeData = {
|
|||||||
parameterKeys: [],
|
parameterKeys: [],
|
||||||
continueOnFailure: false,
|
continueOnFailure: false,
|
||||||
cacheActions: false,
|
cacheActions: false,
|
||||||
|
engine: RunEngine.SkyvernV1,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export function isExtractionNode(node: Node): node is ExtractionNode {
|
export function isExtractionNode(node: Node): node is ExtractionNode {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import { AppNode } from "..";
|
|||||||
import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
||||||
import { ParametersMultiSelect } from "../TaskNode/ParametersMultiSelect";
|
import { ParametersMultiSelect } from "../TaskNode/ParametersMultiSelect";
|
||||||
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
||||||
|
import { RunEngineSelector } from "@/components/EngineSelector";
|
||||||
|
|
||||||
const urlTooltip =
|
const urlTooltip =
|
||||||
"The URL Skyvern is navigating to. Leave this field blank to pick up from where the last block left off.";
|
"The URL Skyvern is navigating to. Leave this field blank to pick up from where the last block left off.";
|
||||||
@@ -58,6 +59,7 @@ function FileDownloadNode({ id, data }: NodeProps<FileDownloadNode>) {
|
|||||||
downloadSuffix: data.downloadSuffix,
|
downloadSuffix: data.downloadSuffix,
|
||||||
totpVerificationUrl: data.totpVerificationUrl,
|
totpVerificationUrl: data.totpVerificationUrl,
|
||||||
totpIdentifier: data.totpIdentifier,
|
totpIdentifier: data.totpIdentifier,
|
||||||
|
engine: data.engine,
|
||||||
});
|
});
|
||||||
const deleteNodeCallback = useDeleteNodeCallback();
|
const deleteNodeCallback = useDeleteNodeCallback();
|
||||||
|
|
||||||
@@ -173,6 +175,20 @@ function FileDownloadNode({ id, data }: NodeProps<FileDownloadNode>) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
Engine
|
||||||
|
</Label>
|
||||||
|
</div>
|
||||||
|
<RunEngineSelector
|
||||||
|
value={inputs.engine}
|
||||||
|
onChange={(value) => {
|
||||||
|
handleChange("engine", value);
|
||||||
|
}}
|
||||||
|
className="nopan w-52 text-xs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Label className="text-xs font-normal text-slate-300">
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { Node } from "@xyflow/react";
|
import type { Node } from "@xyflow/react";
|
||||||
import { NodeBaseData } from "../types";
|
import { NodeBaseData } from "../types";
|
||||||
|
import { RunEngine } from "@/api/types";
|
||||||
|
|
||||||
export type FileDownloadNodeData = NodeBaseData & {
|
export type FileDownloadNodeData = NodeBaseData & {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -11,6 +12,7 @@ export type FileDownloadNodeData = NodeBaseData & {
|
|||||||
parameterKeys: Array<string>;
|
parameterKeys: Array<string>;
|
||||||
totpVerificationUrl: string | null;
|
totpVerificationUrl: string | null;
|
||||||
totpIdentifier: string | null;
|
totpIdentifier: string | null;
|
||||||
|
engine: RunEngine | null;
|
||||||
cacheActions: boolean;
|
cacheActions: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -30,6 +32,7 @@ export const fileDownloadNodeDefaultData: FileDownloadNodeData = {
|
|||||||
totpIdentifier: null,
|
totpIdentifier: null,
|
||||||
continueOnFailure: false,
|
continueOnFailure: false,
|
||||||
cacheActions: false,
|
cacheActions: false,
|
||||||
|
engine: RunEngine.SkyvernV1,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export function isFileDownloadNode(node: Node): node is FileDownloadNode {
|
export function isFileDownloadNode(node: Node): node is FileDownloadNode {
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import { AppNode } from "..";
|
|||||||
import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
||||||
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
||||||
import { LoginBlockCredentialSelector } from "./LoginBlockCredentialSelector";
|
import { LoginBlockCredentialSelector } from "./LoginBlockCredentialSelector";
|
||||||
|
import { RunEngineSelector } from "@/components/EngineSelector";
|
||||||
function LoginNode({ id, data }: NodeProps<LoginNode>) {
|
function LoginNode({ id, data }: NodeProps<LoginNode>) {
|
||||||
const { updateNodeData } = useReactFlow();
|
const { updateNodeData } = useReactFlow();
|
||||||
const { editable } = data;
|
const { editable } = data;
|
||||||
@@ -53,6 +54,7 @@ function LoginNode({ id, data }: NodeProps<LoginNode>) {
|
|||||||
totpIdentifier: data.totpIdentifier,
|
totpIdentifier: data.totpIdentifier,
|
||||||
completeCriterion: data.completeCriterion,
|
completeCriterion: data.completeCriterion,
|
||||||
terminateCriterion: data.terminateCriterion,
|
terminateCriterion: data.terminateCriterion,
|
||||||
|
engine: data.engine,
|
||||||
});
|
});
|
||||||
const deleteNodeCallback = useDeleteNodeCallback();
|
const deleteNodeCallback = useDeleteNodeCallback();
|
||||||
|
|
||||||
@@ -197,6 +199,20 @@ function LoginNode({ id, data }: NodeProps<LoginNode>) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Separator />
|
<Separator />
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
Engine
|
||||||
|
</Label>
|
||||||
|
</div>
|
||||||
|
<RunEngineSelector
|
||||||
|
value={inputs.engine}
|
||||||
|
onChange={(value) => {
|
||||||
|
handleChange("engine", value);
|
||||||
|
}}
|
||||||
|
className="nopan w-52 text-xs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Label className="text-xs font-normal text-slate-300">
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { Node } from "@xyflow/react";
|
import type { Node } from "@xyflow/react";
|
||||||
import { NodeBaseData } from "../types";
|
import { NodeBaseData } from "../types";
|
||||||
|
import { RunEngine } from "@/api/types";
|
||||||
|
|
||||||
export type LoginNodeData = NodeBaseData & {
|
export type LoginNodeData = NodeBaseData & {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -13,6 +14,7 @@ export type LoginNodeData = NodeBaseData & {
|
|||||||
cacheActions: boolean;
|
cacheActions: boolean;
|
||||||
completeCriterion: string;
|
completeCriterion: string;
|
||||||
terminateCriterion: string;
|
terminateCriterion: string;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LoginNode = Node<LoginNodeData, "login">;
|
export type LoginNode = Node<LoginNodeData, "login">;
|
||||||
@@ -33,6 +35,7 @@ export const loginNodeDefaultData: LoginNodeData = {
|
|||||||
cacheActions: false,
|
cacheActions: false,
|
||||||
completeCriterion: "",
|
completeCriterion: "",
|
||||||
terminateCriterion: "",
|
terminateCriterion: "",
|
||||||
|
engine: RunEngine.SkyvernV1,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export function isLoginNode(node: Node): node is LoginNode {
|
export function isLoginNode(node: Node): node is LoginNode {
|
||||||
|
|||||||
@@ -35,13 +35,7 @@ import { ParametersMultiSelect } from "../TaskNode/ParametersMultiSelect";
|
|||||||
import { AppNode } from "..";
|
import { AppNode } from "..";
|
||||||
import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
import { getAvailableOutputParameterKeys } from "../../workflowEditorUtils";
|
||||||
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
||||||
import {
|
import { RunEngineSelector } from "@/components/EngineSelector";
|
||||||
Select,
|
|
||||||
SelectTrigger,
|
|
||||||
SelectContent,
|
|
||||||
SelectValue,
|
|
||||||
SelectItem,
|
|
||||||
} from "@/components/ui/select";
|
|
||||||
|
|
||||||
function NavigationNode({ id, data }: NodeProps<NavigationNode>) {
|
function NavigationNode({ id, data }: NodeProps<NavigationNode>) {
|
||||||
const { updateNodeData } = useReactFlow();
|
const { updateNodeData } = useReactFlow();
|
||||||
@@ -210,23 +204,13 @@ function NavigationNode({ id, data }: NodeProps<NavigationNode>) {
|
|||||||
Engine
|
Engine
|
||||||
</Label>
|
</Label>
|
||||||
</div>
|
</div>
|
||||||
<Select
|
<RunEngineSelector
|
||||||
value={inputs.engine ?? "skyvern-1.0"}
|
value={inputs.engine}
|
||||||
onValueChange={(value) => {
|
onChange={(value) => {
|
||||||
handleChange("engine", value);
|
handleChange("engine", value);
|
||||||
}}
|
}}
|
||||||
>
|
className="nopan w-52 text-xs"
|
||||||
<SelectTrigger className="nopan w-52 text-xs">
|
/>
|
||||||
<SelectValue />
|
|
||||||
</SelectTrigger>
|
|
||||||
<SelectContent>
|
|
||||||
<SelectItem value="skyvern-1.0">Skyvern 1.0</SelectItem>
|
|
||||||
<SelectItem value="openai-cua">OpenAI CUA</SelectItem>
|
|
||||||
<SelectItem value="anthropic-cua">
|
|
||||||
Anthropic CUA
|
|
||||||
</SelectItem>
|
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { Node } from "@xyflow/react";
|
import type { Node } from "@xyflow/react";
|
||||||
import { NodeBaseData } from "../types";
|
import { NodeBaseData } from "../types";
|
||||||
|
import { RunEngine } from "@/api/types";
|
||||||
|
|
||||||
export type NavigationNodeData = NodeBaseData & {
|
export type NavigationNodeData = NodeBaseData & {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -7,7 +8,7 @@ export type NavigationNodeData = NodeBaseData & {
|
|||||||
errorCodeMapping: string;
|
errorCodeMapping: string;
|
||||||
completeCriterion: string;
|
completeCriterion: string;
|
||||||
terminateCriterion: string;
|
terminateCriterion: string;
|
||||||
engine: string | null;
|
engine: RunEngine | null;
|
||||||
maxRetries: number | null;
|
maxRetries: number | null;
|
||||||
maxStepsOverride: number | null;
|
maxStepsOverride: number | null;
|
||||||
allowDownloads: boolean;
|
allowDownloads: boolean;
|
||||||
@@ -28,7 +29,7 @@ export const navigationNodeDefaultData: NavigationNodeData = {
|
|||||||
completeCriterion: "",
|
completeCriterion: "",
|
||||||
terminateCriterion: "",
|
terminateCriterion: "",
|
||||||
errorCodeMapping: "null",
|
errorCodeMapping: "null",
|
||||||
engine: "skyvern-1.0",
|
engine: RunEngine.SkyvernV1,
|
||||||
maxRetries: null,
|
maxRetries: null,
|
||||||
maxStepsOverride: null,
|
maxStepsOverride: null,
|
||||||
allowDownloads: false,
|
allowDownloads: false,
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import { ParametersMultiSelect } from "./ParametersMultiSelect";
|
|||||||
import type { TaskNode } from "./types";
|
import type { TaskNode } from "./types";
|
||||||
import { WorkflowDataSchemaInputGroup } from "@/components/DataSchemaInputGroup/WorkflowDataSchemaInputGroup";
|
import { WorkflowDataSchemaInputGroup } from "@/components/DataSchemaInputGroup/WorkflowDataSchemaInputGroup";
|
||||||
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
import { useIsFirstBlockInWorkflow } from "../../hooks/useIsFirstNodeInWorkflow";
|
||||||
|
import { RunEngineSelector } from "@/components/EngineSelector";
|
||||||
|
|
||||||
function TaskNode({ id, data }: NodeProps<TaskNode>) {
|
function TaskNode({ id, data }: NodeProps<TaskNode>) {
|
||||||
const { updateNodeData } = useReactFlow();
|
const { updateNodeData } = useReactFlow();
|
||||||
@@ -67,6 +68,7 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
|
|||||||
totpVerificationUrl: data.totpVerificationUrl,
|
totpVerificationUrl: data.totpVerificationUrl,
|
||||||
totpIdentifier: data.totpIdentifier,
|
totpIdentifier: data.totpIdentifier,
|
||||||
includeActionHistoryInVerification: data.includeActionHistoryInVerification,
|
includeActionHistoryInVerification: data.includeActionHistoryInVerification,
|
||||||
|
engine: data.engine,
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleChange(key: string, value: unknown) {
|
function handleChange(key: string, value: unknown) {
|
||||||
@@ -229,6 +231,20 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Separator />
|
<Separator />
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
Engine
|
||||||
|
</Label>
|
||||||
|
</div>
|
||||||
|
<RunEngineSelector
|
||||||
|
value={inputs.engine}
|
||||||
|
onChange={(value) => {
|
||||||
|
handleChange("engine", value);
|
||||||
|
}}
|
||||||
|
className="nopan w-52 text-xs"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Label className="text-xs font-normal text-slate-300">
|
<Label className="text-xs font-normal text-slate-300">
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { Node } from "@xyflow/react";
|
import type { Node } from "@xyflow/react";
|
||||||
import { NodeBaseData } from "../types";
|
import { NodeBaseData } from "../types";
|
||||||
|
import { RunEngine } from "@/api/types";
|
||||||
|
|
||||||
export type TaskNodeData = NodeBaseData & {
|
export type TaskNodeData = NodeBaseData & {
|
||||||
url: string;
|
url: string;
|
||||||
@@ -18,6 +19,7 @@ export type TaskNodeData = NodeBaseData & {
|
|||||||
totpIdentifier: string | null;
|
totpIdentifier: string | null;
|
||||||
cacheActions: boolean;
|
cacheActions: boolean;
|
||||||
includeActionHistoryInVerification: boolean;
|
includeActionHistoryInVerification: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TaskNode = Node<TaskNodeData, "task">;
|
export type TaskNode = Node<TaskNodeData, "task">;
|
||||||
@@ -42,6 +44,7 @@ export const taskNodeDefaultData: TaskNodeData = {
|
|||||||
continueOnFailure: false,
|
continueOnFailure: false,
|
||||||
cacheActions: false,
|
cacheActions: false,
|
||||||
includeActionHistoryInVerification: false,
|
includeActionHistoryInVerification: false,
|
||||||
|
engine: RunEngine.SkyvernV1,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export function isTaskNode(node: Node): node is TaskNode {
|
export function isTaskNode(node: Node): node is TaskNode {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ import {
|
|||||||
import { loginNodeDefaultData } from "./nodes/LoginNode/types";
|
import { loginNodeDefaultData } from "./nodes/LoginNode/types";
|
||||||
import { isWaitNode, waitNodeDefaultData } from "./nodes/WaitNode/types";
|
import { isWaitNode, waitNodeDefaultData } from "./nodes/WaitNode/types";
|
||||||
import { fileDownloadNodeDefaultData } from "./nodes/FileDownloadNode/types";
|
import { fileDownloadNodeDefaultData } from "./nodes/FileDownloadNode/types";
|
||||||
import { ProxyLocation } from "@/api/types";
|
import { ProxyLocation, RunEngine } from "@/api/types";
|
||||||
import {
|
import {
|
||||||
isPdfParserNode,
|
isPdfParserNode,
|
||||||
pdfParserNodeDefaultData,
|
pdfParserNodeDefaultData,
|
||||||
@@ -234,6 +234,7 @@ function convertToNode(
|
|||||||
terminateCriterion: block.terminate_criterion ?? "",
|
terminateCriterion: block.terminate_criterion ?? "",
|
||||||
includeActionHistoryInVerification:
|
includeActionHistoryInVerification:
|
||||||
block.include_action_history_in_verification ?? false,
|
block.include_action_history_in_verification ?? false,
|
||||||
|
engine: block.engine ?? RunEngine.SkyvernV1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -283,6 +284,7 @@ function convertToNode(
|
|||||||
totpIdentifier: block.totp_identifier ?? null,
|
totpIdentifier: block.totp_identifier ?? null,
|
||||||
totpVerificationUrl: block.totp_verification_url ?? null,
|
totpVerificationUrl: block.totp_verification_url ?? null,
|
||||||
cacheActions: block.cache_actions,
|
cacheActions: block.cache_actions,
|
||||||
|
engine: block.engine ?? RunEngine.SkyvernV1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -306,7 +308,7 @@ function convertToNode(
|
|||||||
maxStepsOverride: block.max_steps_per_run ?? null,
|
maxStepsOverride: block.max_steps_per_run ?? null,
|
||||||
completeCriterion: block.complete_criterion ?? "",
|
completeCriterion: block.complete_criterion ?? "",
|
||||||
terminateCriterion: block.terminate_criterion ?? "",
|
terminateCriterion: block.terminate_criterion ?? "",
|
||||||
engine: block.engine ?? "skyvern-1.0",
|
engine: block.engine ?? RunEngine.SkyvernV1,
|
||||||
includeActionHistoryInVerification:
|
includeActionHistoryInVerification:
|
||||||
block.include_action_history_in_verification ?? false,
|
block.include_action_history_in_verification ?? false,
|
||||||
},
|
},
|
||||||
@@ -326,6 +328,7 @@ function convertToNode(
|
|||||||
maxRetries: block.max_retries ?? null,
|
maxRetries: block.max_retries ?? null,
|
||||||
maxStepsOverride: block.max_steps_per_run ?? null,
|
maxStepsOverride: block.max_steps_per_run ?? null,
|
||||||
cacheActions: block.cache_actions,
|
cacheActions: block.cache_actions,
|
||||||
|
engine: block.engine ?? RunEngine.SkyvernV1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -347,6 +350,7 @@ function convertToNode(
|
|||||||
maxStepsOverride: block.max_steps_per_run ?? null,
|
maxStepsOverride: block.max_steps_per_run ?? null,
|
||||||
completeCriterion: block.complete_criterion ?? "",
|
completeCriterion: block.complete_criterion ?? "",
|
||||||
terminateCriterion: block.terminate_criterion ?? "",
|
terminateCriterion: block.terminate_criterion ?? "",
|
||||||
|
engine: block.engine ?? RunEngine.SkyvernV1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -378,6 +382,7 @@ function convertToNode(
|
|||||||
totpVerificationUrl: block.totp_verification_url ?? null,
|
totpVerificationUrl: block.totp_verification_url ?? null,
|
||||||
cacheActions: block.cache_actions,
|
cacheActions: block.cache_actions,
|
||||||
maxStepsOverride: block.max_steps_per_run ?? null,
|
maxStepsOverride: block.max_steps_per_run ?? null,
|
||||||
|
engine: block.engine ?? RunEngine.SkyvernV1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -982,6 +987,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
|
|||||||
cache_actions: node.data.cacheActions,
|
cache_actions: node.data.cacheActions,
|
||||||
include_action_history_in_verification:
|
include_action_history_in_verification:
|
||||||
node.data.includeActionHistoryInVerification,
|
node.data.includeActionHistoryInVerification,
|
||||||
|
engine: node.data.engine,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
case "taskv2": {
|
case "taskv2": {
|
||||||
@@ -1028,6 +1034,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
|
|||||||
totp_identifier: node.data.totpIdentifier,
|
totp_identifier: node.data.totpIdentifier,
|
||||||
totp_verification_url: node.data.totpVerificationUrl,
|
totp_verification_url: node.data.totpVerificationUrl,
|
||||||
cache_actions: node.data.cacheActions,
|
cache_actions: node.data.cacheActions,
|
||||||
|
engine: node.data.engine,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
case "navigation": {
|
case "navigation": {
|
||||||
@@ -1072,6 +1079,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
|
|||||||
max_steps_per_run: node.data.maxStepsOverride,
|
max_steps_per_run: node.data.maxStepsOverride,
|
||||||
parameter_keys: node.data.parameterKeys,
|
parameter_keys: node.data.parameterKeys,
|
||||||
cache_actions: node.data.cacheActions,
|
cache_actions: node.data.cacheActions,
|
||||||
|
engine: node.data.engine,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
case "login": {
|
case "login": {
|
||||||
@@ -1095,6 +1103,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
|
|||||||
cache_actions: node.data.cacheActions,
|
cache_actions: node.data.cacheActions,
|
||||||
complete_criterion: node.data.completeCriterion,
|
complete_criterion: node.data.completeCriterion,
|
||||||
terminate_criterion: node.data.terminateCriterion,
|
terminate_criterion: node.data.terminateCriterion,
|
||||||
|
engine: node.data.engine,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
case "wait": {
|
case "wait": {
|
||||||
@@ -1124,6 +1133,7 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
|
|||||||
totp_identifier: node.data.totpIdentifier,
|
totp_identifier: node.data.totpIdentifier,
|
||||||
totp_verification_url: node.data.totpVerificationUrl,
|
totp_verification_url: node.data.totpVerificationUrl,
|
||||||
cache_actions: node.data.cacheActions,
|
cache_actions: node.data.cacheActions,
|
||||||
|
engine: node.data.engine,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
case "sendEmail": {
|
case "sendEmail": {
|
||||||
@@ -1715,6 +1725,7 @@ function convertBlocksToBlockYAML(
|
|||||||
cache_actions: block.cache_actions,
|
cache_actions: block.cache_actions,
|
||||||
include_action_history_in_verification:
|
include_action_history_in_verification:
|
||||||
block.include_action_history_in_verification,
|
block.include_action_history_in_verification,
|
||||||
|
engine: block.engine,
|
||||||
};
|
};
|
||||||
return blockYaml;
|
return blockYaml;
|
||||||
}
|
}
|
||||||
@@ -1756,6 +1767,7 @@ function convertBlocksToBlockYAML(
|
|||||||
totp_identifier: block.totp_identifier,
|
totp_identifier: block.totp_identifier,
|
||||||
totp_verification_url: block.totp_verification_url,
|
totp_verification_url: block.totp_verification_url,
|
||||||
cache_actions: block.cache_actions,
|
cache_actions: block.cache_actions,
|
||||||
|
engine: block.engine,
|
||||||
};
|
};
|
||||||
return blockYaml;
|
return blockYaml;
|
||||||
}
|
}
|
||||||
@@ -1795,6 +1807,7 @@ function convertBlocksToBlockYAML(
|
|||||||
max_steps_per_run: block.max_steps_per_run,
|
max_steps_per_run: block.max_steps_per_run,
|
||||||
parameter_keys: block.parameters.map((p) => p.key),
|
parameter_keys: block.parameters.map((p) => p.key),
|
||||||
cache_actions: block.cache_actions,
|
cache_actions: block.cache_actions,
|
||||||
|
engine: block.engine,
|
||||||
};
|
};
|
||||||
return blockYaml;
|
return blockYaml;
|
||||||
}
|
}
|
||||||
@@ -1814,6 +1827,7 @@ function convertBlocksToBlockYAML(
|
|||||||
cache_actions: block.cache_actions,
|
cache_actions: block.cache_actions,
|
||||||
complete_criterion: block.complete_criterion,
|
complete_criterion: block.complete_criterion,
|
||||||
terminate_criterion: block.terminate_criterion,
|
terminate_criterion: block.terminate_criterion,
|
||||||
|
engine: block.engine,
|
||||||
};
|
};
|
||||||
return blockYaml;
|
return blockYaml;
|
||||||
}
|
}
|
||||||
@@ -1840,6 +1854,7 @@ function convertBlocksToBlockYAML(
|
|||||||
totp_identifier: block.totp_identifier,
|
totp_identifier: block.totp_identifier,
|
||||||
totp_verification_url: block.totp_verification_url,
|
totp_verification_url: block.totp_verification_url,
|
||||||
cache_actions: block.cache_actions,
|
cache_actions: block.cache_actions,
|
||||||
|
engine: block.engine,
|
||||||
};
|
};
|
||||||
return blockYaml;
|
return blockYaml;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ProxyLocation } from "@/api/types";
|
import { ProxyLocation, RunEngine } from "@/api/types";
|
||||||
|
|
||||||
export type WorkflowParameterBase = {
|
export type WorkflowParameterBase = {
|
||||||
parameter_type: WorkflowParameterType;
|
parameter_type: WorkflowParameterType;
|
||||||
@@ -252,6 +252,7 @@ export type TaskBlock = WorkflowBlockBase & {
|
|||||||
totp_identifier?: string | null;
|
totp_identifier?: string | null;
|
||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
include_action_history_in_verification: boolean;
|
include_action_history_in_verification: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Taskv2Block = WorkflowBlockBase & {
|
export type Taskv2Block = WorkflowBlockBase & {
|
||||||
@@ -346,6 +347,7 @@ export type ActionBlock = WorkflowBlockBase & {
|
|||||||
totp_verification_url?: string | null;
|
totp_verification_url?: string | null;
|
||||||
totp_identifier?: string | null;
|
totp_identifier?: string | null;
|
||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NavigationBlock = WorkflowBlockBase & {
|
export type NavigationBlock = WorkflowBlockBase & {
|
||||||
@@ -364,7 +366,7 @@ export type NavigationBlock = WorkflowBlockBase & {
|
|||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
complete_criterion: string | null;
|
complete_criterion: string | null;
|
||||||
terminate_criterion: string | null;
|
terminate_criterion: string | null;
|
||||||
engine: string | null;
|
engine: RunEngine | null;
|
||||||
include_action_history_in_verification: boolean;
|
include_action_history_in_verification: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -378,6 +380,7 @@ export type ExtractionBlock = WorkflowBlockBase & {
|
|||||||
max_steps_per_run?: number | null;
|
max_steps_per_run?: number | null;
|
||||||
parameters: Array<WorkflowParameter>;
|
parameters: Array<WorkflowParameter>;
|
||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LoginBlock = WorkflowBlockBase & {
|
export type LoginBlock = WorkflowBlockBase & {
|
||||||
@@ -394,6 +397,7 @@ export type LoginBlock = WorkflowBlockBase & {
|
|||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
complete_criterion: string | null;
|
complete_criterion: string | null;
|
||||||
terminate_criterion: string | null;
|
terminate_criterion: string | null;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type WaitBlock = WorkflowBlockBase & {
|
export type WaitBlock = WorkflowBlockBase & {
|
||||||
@@ -414,6 +418,7 @@ export type FileDownloadBlock = WorkflowBlockBase & {
|
|||||||
totp_verification_url?: string | null;
|
totp_verification_url?: string | null;
|
||||||
totp_identifier?: string | null;
|
totp_identifier?: string | null;
|
||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type PDFParserBlock = WorkflowBlockBase & {
|
export type PDFParserBlock = WorkflowBlockBase & {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { RunEngine } from "@/api/types";
|
||||||
import { WorkflowBlockType } from "./workflowTypes";
|
import { WorkflowBlockType } from "./workflowTypes";
|
||||||
|
|
||||||
export type WorkflowCreateYAMLRequest = {
|
export type WorkflowCreateYAMLRequest = {
|
||||||
@@ -135,6 +136,7 @@ export type TaskBlockYAML = BlockYAMLBase & {
|
|||||||
complete_criterion: string | null;
|
complete_criterion: string | null;
|
||||||
terminate_criterion: string | null;
|
terminate_criterion: string | null;
|
||||||
include_action_history_in_verification: boolean;
|
include_action_history_in_verification: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Taskv2BlockYAML = BlockYAMLBase & {
|
export type Taskv2BlockYAML = BlockYAMLBase & {
|
||||||
@@ -167,6 +169,7 @@ export type ActionBlockYAML = BlockYAMLBase & {
|
|||||||
totp_verification_url?: string | null;
|
totp_verification_url?: string | null;
|
||||||
totp_identifier?: string | null;
|
totp_identifier?: string | null;
|
||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NavigationBlockYAML = BlockYAMLBase & {
|
export type NavigationBlockYAML = BlockYAMLBase & {
|
||||||
@@ -185,7 +188,7 @@ export type NavigationBlockYAML = BlockYAMLBase & {
|
|||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
complete_criterion: string | null;
|
complete_criterion: string | null;
|
||||||
terminate_criterion: string | null;
|
terminate_criterion: string | null;
|
||||||
engine: string | null;
|
engine: RunEngine | null;
|
||||||
include_action_history_in_verification: boolean;
|
include_action_history_in_verification: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -199,6 +202,7 @@ export type ExtractionBlockYAML = BlockYAMLBase & {
|
|||||||
max_steps_per_run?: number | null;
|
max_steps_per_run?: number | null;
|
||||||
parameter_keys?: Array<string> | null;
|
parameter_keys?: Array<string> | null;
|
||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type LoginBlockYAML = BlockYAMLBase & {
|
export type LoginBlockYAML = BlockYAMLBase & {
|
||||||
@@ -215,6 +219,7 @@ export type LoginBlockYAML = BlockYAMLBase & {
|
|||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
complete_criterion: string | null;
|
complete_criterion: string | null;
|
||||||
terminate_criterion: string | null;
|
terminate_criterion: string | null;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type WaitBlockYAML = BlockYAMLBase & {
|
export type WaitBlockYAML = BlockYAMLBase & {
|
||||||
@@ -235,6 +240,7 @@ export type FileDownloadBlockYAML = BlockYAMLBase & {
|
|||||||
totp_verification_url?: string | null;
|
totp_verification_url?: string | null;
|
||||||
totp_identifier?: string | null;
|
totp_identifier?: string | null;
|
||||||
cache_actions: boolean;
|
cache_actions: boolean;
|
||||||
|
engine: RunEngine | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type CodeBlockYAML = BlockYAMLBase & {
|
export type CodeBlockYAML = BlockYAMLBase & {
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ class TaskBlockYAML(BlockYAML):
|
|||||||
|
|
||||||
url: str | None = None
|
url: str | None = None
|
||||||
title: str = ""
|
title: str = ""
|
||||||
|
engine: RunEngine = RunEngine.skyvern_v1
|
||||||
navigation_goal: str | None = None
|
navigation_goal: str | None = None
|
||||||
data_extraction_goal: str | None = None
|
data_extraction_goal: str | None = None
|
||||||
data_schema: dict[str, Any] | list | None = None
|
data_schema: dict[str, Any] | list | None = None
|
||||||
@@ -259,6 +260,7 @@ class ActionBlockYAML(BlockYAML):
|
|||||||
|
|
||||||
url: str | None = None
|
url: str | None = None
|
||||||
title: str = ""
|
title: str = ""
|
||||||
|
engine: RunEngine = RunEngine.skyvern_v1
|
||||||
navigation_goal: str | None = None
|
navigation_goal: str | None = None
|
||||||
error_code_mapping: dict[str, str] | None = None
|
error_code_mapping: dict[str, str] | None = None
|
||||||
max_retries: int = 0
|
max_retries: int = 0
|
||||||
@@ -298,6 +300,7 @@ class ExtractionBlockYAML(BlockYAML):
|
|||||||
data_extraction_goal: str
|
data_extraction_goal: str
|
||||||
url: str | None = None
|
url: str | None = None
|
||||||
title: str = ""
|
title: str = ""
|
||||||
|
engine: RunEngine = RunEngine.skyvern_v1
|
||||||
data_schema: dict[str, Any] | list | None = None
|
data_schema: dict[str, Any] | list | None = None
|
||||||
max_retries: int = 0
|
max_retries: int = 0
|
||||||
max_steps_per_run: int | None = None
|
max_steps_per_run: int | None = None
|
||||||
@@ -310,6 +313,7 @@ class LoginBlockYAML(BlockYAML):
|
|||||||
|
|
||||||
url: str | None = None
|
url: str | None = None
|
||||||
title: str = ""
|
title: str = ""
|
||||||
|
engine: RunEngine = RunEngine.skyvern_v1
|
||||||
navigation_goal: str | None = None
|
navigation_goal: str | None = None
|
||||||
error_code_mapping: dict[str, str] | None = None
|
error_code_mapping: dict[str, str] | None = None
|
||||||
max_retries: int = 0
|
max_retries: int = 0
|
||||||
@@ -334,6 +338,7 @@ class FileDownloadBlockYAML(BlockYAML):
|
|||||||
navigation_goal: str
|
navigation_goal: str
|
||||||
url: str | None = None
|
url: str | None = None
|
||||||
title: str = ""
|
title: str = ""
|
||||||
|
engine: RunEngine = RunEngine.skyvern_v1
|
||||||
error_code_mapping: dict[str, str] | None = None
|
error_code_mapping: dict[str, str] | None = None
|
||||||
max_retries: int = 0
|
max_retries: int = 0
|
||||||
max_steps_per_run: int | None = None
|
max_steps_per_run: int | None = None
|
||||||
|
|||||||
@@ -1642,6 +1642,7 @@ class WorkflowService:
|
|||||||
label=block_yaml.label,
|
label=block_yaml.label,
|
||||||
url=block_yaml.url,
|
url=block_yaml.url,
|
||||||
title=block_yaml.title,
|
title=block_yaml.title,
|
||||||
|
engine=block_yaml.engine,
|
||||||
parameters=task_block_parameters,
|
parameters=task_block_parameters,
|
||||||
output_parameter=output_parameter,
|
output_parameter=output_parameter,
|
||||||
navigation_goal=block_yaml.navigation_goal,
|
navigation_goal=block_yaml.navigation_goal,
|
||||||
@@ -1812,6 +1813,7 @@ class WorkflowService:
|
|||||||
label=block_yaml.label,
|
label=block_yaml.label,
|
||||||
url=block_yaml.url,
|
url=block_yaml.url,
|
||||||
title=block_yaml.title,
|
title=block_yaml.title,
|
||||||
|
engine=block_yaml.engine,
|
||||||
task_type=TaskType.action,
|
task_type=TaskType.action,
|
||||||
parameters=action_block_parameters,
|
parameters=action_block_parameters,
|
||||||
output_parameter=output_parameter,
|
output_parameter=output_parameter,
|
||||||
@@ -1868,6 +1870,7 @@ class WorkflowService:
|
|||||||
label=block_yaml.label,
|
label=block_yaml.label,
|
||||||
url=block_yaml.url,
|
url=block_yaml.url,
|
||||||
title=block_yaml.title,
|
title=block_yaml.title,
|
||||||
|
engine=block_yaml.engine,
|
||||||
parameters=extraction_block_parameters,
|
parameters=extraction_block_parameters,
|
||||||
output_parameter=output_parameter,
|
output_parameter=output_parameter,
|
||||||
data_extraction_goal=block_yaml.data_extraction_goal,
|
data_extraction_goal=block_yaml.data_extraction_goal,
|
||||||
@@ -1889,6 +1892,7 @@ class WorkflowService:
|
|||||||
label=block_yaml.label,
|
label=block_yaml.label,
|
||||||
url=block_yaml.url,
|
url=block_yaml.url,
|
||||||
title=block_yaml.title,
|
title=block_yaml.title,
|
||||||
|
engine=block_yaml.engine,
|
||||||
parameters=login_block_parameters,
|
parameters=login_block_parameters,
|
||||||
output_parameter=output_parameter,
|
output_parameter=output_parameter,
|
||||||
navigation_goal=block_yaml.navigation_goal,
|
navigation_goal=block_yaml.navigation_goal,
|
||||||
@@ -1925,6 +1929,7 @@ class WorkflowService:
|
|||||||
label=block_yaml.label,
|
label=block_yaml.label,
|
||||||
url=block_yaml.url,
|
url=block_yaml.url,
|
||||||
title=block_yaml.title,
|
title=block_yaml.title,
|
||||||
|
engine=block_yaml.engine,
|
||||||
parameters=file_download_block_parameters,
|
parameters=file_download_block_parameters,
|
||||||
output_parameter=output_parameter,
|
output_parameter=output_parameter,
|
||||||
navigation_goal=block_yaml.navigation_goal,
|
navigation_goal=block_yaml.navigation_goal,
|
||||||
|
|||||||
Reference in New Issue
Block a user