# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import TYPE_CHECKING, Dict, List, Union, Optional
from datetime import datetime
from typing_extensions import Literal, TypeAlias

from pydantic import Field as FieldInfo

from .._models import BaseModel
from .chat_settings import ChatSettings

__all__ = [
    "Task",
    "Main",
    "MainEvaluateStep",
    "MainToolCallStep",
    "MainPromptStepOutput",
    "MainPromptStepOutputPromptUnionMember0",
    "MainPromptStepOutputPromptUnionMember0ContentUnionMember1",
    "MainPromptStepOutputPromptUnionMember0ContentUnionMember1Content",
    "MainPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel",
    "MainPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL",
    "MainPromptStepOutputToolChoice",
    "MainPromptStepOutputToolChoiceNamedToolChoice",
    "MainPromptStepOutputToolChoiceNamedToolChoiceFunction",
    "MainPromptStepOutputToolsUnionMember1",
    "MainPromptStepOutputToolsUnionMember1ToolRef",
    "MainPromptStepOutputToolsUnionMember1ToolRefRef",
    "MainPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID",
    "MainPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutput",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem",
    "MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022",
    "MainGetStep",
    "MainSetStep",
    "MainLogStep",
    "MainYieldStep",
    "MainReturnStep",
    "MainSleepStep",
    "MainSleepStepSleep",
    "MainErrorWorkflowStep",
    "MainWaitForInputStep",
    "MainWaitForInputStepWaitForInput",
    "MainIfElseWorkflowStepOutput",
    "MainIfElseWorkflowStepOutputThen",
    "MainIfElseWorkflowStepOutputThenEvaluateStep",
    "MainIfElseWorkflowStepOutputThenToolCallStep",
    "MainIfElseWorkflowStepOutputThenPromptStepOutput",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1Content",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoice",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoiceNamedToolChoice",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoiceNamedToolChoiceFunction",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutput",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem",
    "MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022",
    "MainIfElseWorkflowStepOutputThenGetStep",
    "MainIfElseWorkflowStepOutputThenSetStep",
    "MainIfElseWorkflowStepOutputThenLogStep",
    "MainIfElseWorkflowStepOutputThenYieldStep",
    "MainIfElseWorkflowStepOutputThenReturnStep",
    "MainIfElseWorkflowStepOutputThenSleepStep",
    "MainIfElseWorkflowStepOutputThenSleepStepSleep",
    "MainIfElseWorkflowStepOutputThenErrorWorkflowStep",
    "MainIfElseWorkflowStepOutputThenWaitForInputStep",
    "MainIfElseWorkflowStepOutputThenWaitForInputStepWaitForInput",
    "MainIfElseWorkflowStepOutputElse",
    "MainIfElseWorkflowStepOutputElseEvaluateStep",
    "MainIfElseWorkflowStepOutputElseToolCallStep",
    "MainIfElseWorkflowStepOutputElsePromptStepOutput",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1Content",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoice",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoiceNamedToolChoice",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoiceNamedToolChoiceFunction",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRefToolRefByID",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRefToolRefByName",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutput",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem",
    "MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022",
    "MainIfElseWorkflowStepOutputElseGetStep",
    "MainIfElseWorkflowStepOutputElseSetStep",
    "MainIfElseWorkflowStepOutputElseLogStep",
    "MainIfElseWorkflowStepOutputElseYieldStep",
    "MainIfElseWorkflowStepOutputElseReturnStep",
    "MainIfElseWorkflowStepOutputElseSleepStep",
    "MainIfElseWorkflowStepOutputElseSleepStepSleep",
    "MainIfElseWorkflowStepOutputElseErrorWorkflowStep",
    "MainIfElseWorkflowStepOutputElseWaitForInputStep",
    "MainIfElseWorkflowStepOutputElseWaitForInputStepWaitForInput",
    "MainSwitchStepOutput",
    "MainSwitchStepOutputSwitch",
    "MainSwitchStepOutputSwitchThen",
    "MainSwitchStepOutputSwitchThenEvaluateStep",
    "MainSwitchStepOutputSwitchThenToolCallStep",
    "MainSwitchStepOutputSwitchThenPromptStepOutput",
    "MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0",
    "MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1",
    "MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1Content",
    "MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel",
    "MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolChoice",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolChoiceNamedToolChoice",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolChoiceNamedToolChoiceFunction",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutput",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem",
    "MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022",
    "MainSwitchStepOutputSwitchThenGetStep",
    "MainSwitchStepOutputSwitchThenSetStep",
    "MainSwitchStepOutputSwitchThenLogStep",
    "MainSwitchStepOutputSwitchThenYieldStep",
    "MainSwitchStepOutputSwitchThenReturnStep",
    "MainSwitchStepOutputSwitchThenSleepStep",
    "MainSwitchStepOutputSwitchThenSleepStepSleep",
    "MainSwitchStepOutputSwitchThenErrorWorkflowStep",
    "MainSwitchStepOutputSwitchThenWaitForInputStep",
    "MainSwitchStepOutputSwitchThenWaitForInputStepWaitForInput",
    "MainForeachStepOutput",
    "MainForeachStepOutputForeach",
    "MainForeachStepOutputForeachDo",
    "MainForeachStepOutputForeachDoWaitForInputStep",
    "MainForeachStepOutputForeachDoWaitForInputStepWaitForInput",
    "MainForeachStepOutputForeachDoEvaluateStep",
    "MainForeachStepOutputForeachDoToolCallStep",
    "MainForeachStepOutputForeachDoPromptStepOutput",
    "MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0",
    "MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1",
    "MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1Content",
    "MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel",
    "MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL",
    "MainForeachStepOutputForeachDoPromptStepOutputToolChoice",
    "MainForeachStepOutputForeachDoPromptStepOutputToolChoiceNamedToolChoice",
    "MainForeachStepOutputForeachDoPromptStepOutputToolChoiceNamedToolChoiceFunction",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutput",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem",
    "MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022",
    "MainForeachStepOutputForeachDoGetStep",
    "MainForeachStepOutputForeachDoSetStep",
    "MainForeachStepOutputForeachDoLogStep",
    "MainForeachStepOutputForeachDoYieldStep",
    "MainParallelStepOutput",
    "MainParallelStepOutputParallel",
    "MainParallelStepOutputParallelEvaluateStep",
    "MainParallelStepOutputParallelToolCallStep",
    "MainParallelStepOutputParallelPromptStepOutput",
    "MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0",
    "MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1",
    "MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1Content",
    "MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel",
    "MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL",
    "MainParallelStepOutputParallelPromptStepOutputToolChoice",
    "MainParallelStepOutputParallelPromptStepOutputToolChoiceNamedToolChoice",
    "MainParallelStepOutputParallelPromptStepOutputToolChoiceNamedToolChoiceFunction",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutput",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem",
    "MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022",
    "MainParallelStepOutputParallelGetStep",
    "MainParallelStepOutputParallelSetStep",
    "MainParallelStepOutputParallelLogStep",
    "MainParallelStepOutputParallelYieldStep",
    "MainMainOutput",
    "MainMainOutputMap",
    "MainMainOutputMapEvaluateStep",
    "MainMainOutputMapToolCallStep",
    "MainMainOutputMapPromptStepOutput",
    "MainMainOutputMapPromptStepOutputPromptUnionMember0",
    "MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1",
    "MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1Content",
    "MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel",
    "MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL",
    "MainMainOutputMapPromptStepOutputToolChoice",
    "MainMainOutputMapPromptStepOutputToolChoiceNamedToolChoice",
    "MainMainOutputMapPromptStepOutputToolChoiceNamedToolChoiceFunction",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutput",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem",
    "MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022",
    "MainMainOutputMapGetStep",
    "MainMainOutputMapSetStep",
    "MainMainOutputMapLogStep",
    "MainMainOutputMapYieldStep",
    "Tool",
    "ToolAPICall",
    "ToolBash20241022",
    "ToolComputer20241022",
    "ToolFunction",
    "ToolIntegration",
    "ToolIntegrationDummyIntegrationDef",
    "ToolIntegrationBraveIntegrationDef",
    "ToolIntegrationBraveIntegrationDefArguments",
    "ToolIntegrationBraveIntegrationDefSetup",
    "ToolIntegrationEmailIntegrationDef",
    "ToolIntegrationEmailIntegrationDefArguments",
    "ToolIntegrationEmailIntegrationDefSetup",
    "ToolIntegrationSpiderIntegrationDef",
    "ToolIntegrationSpiderIntegrationDefArguments",
    "ToolIntegrationSpiderIntegrationDefSetup",
    "ToolIntegrationWikipediaIntegrationDef",
    "ToolIntegrationWikipediaIntegrationDefArguments",
    "ToolIntegrationWeatherIntegrationDef",
    "ToolIntegrationWeatherIntegrationDefArguments",
    "ToolIntegrationWeatherIntegrationDefSetup",
    "ToolIntegrationBrowserbaseContextIntegrationDef",
    "ToolIntegrationBrowserbaseContextIntegrationDefArguments",
    "ToolIntegrationBrowserbaseContextIntegrationDefSetup",
    "ToolIntegrationBrowserbaseExtensionIntegrationDef",
    "ToolIntegrationBrowserbaseExtensionIntegrationDefArguments",
    "ToolIntegrationBrowserbaseExtensionIntegrationDefSetup",
    "ToolIntegrationBrowserbaseListSessionsIntegrationDef",
    "ToolIntegrationBrowserbaseListSessionsIntegrationDefArguments",
    "ToolIntegrationBrowserbaseListSessionsIntegrationDefSetup",
    "ToolIntegrationBrowserbaseCreateSessionIntegrationDef",
    "ToolIntegrationBrowserbaseCreateSessionIntegrationDefArguments",
    "ToolIntegrationBrowserbaseCreateSessionIntegrationDefSetup",
    "ToolIntegrationBrowserbaseGetSessionIntegrationDef",
    "ToolIntegrationBrowserbaseGetSessionIntegrationDefArguments",
    "ToolIntegrationBrowserbaseGetSessionIntegrationDefSetup",
    "ToolIntegrationBrowserbaseCompleteSessionIntegrationDef",
    "ToolIntegrationBrowserbaseCompleteSessionIntegrationDefArguments",
    "ToolIntegrationBrowserbaseCompleteSessionIntegrationDefSetup",
    "ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef",
    "ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments",
    "ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup",
    "ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDef",
    "ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments",
    "ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup",
    "ToolIntegrationRemoteBrowserIntegrationDef",
    "ToolIntegrationRemoteBrowserIntegrationDefSetup",
    "ToolIntegrationRemoteBrowserIntegrationDefArguments",
    "ToolSystem",
    "ToolTextEditor20241022",
]


class MainEvaluateStep(BaseModel):
    evaluate: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]

    kind: Optional[Literal["evaluate"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainToolCallStep(BaseModel):
    tool: str

    arguments: Union[
        Dict[
            str,
            Union[
                Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                str,
            ],
        ],
        List[
            Dict[
                str,
                Union[
                    Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                    List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                    str,
                ],
            ]
        ],
        Literal["_"],
        None,
    ] = None

    kind: Optional[Literal["tool_call"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainPromptStepOutputPromptUnionMember0ContentUnionMember1Content(BaseModel):
    text: str

    type: Optional[Literal["text"]] = None


class MainPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL(BaseModel):
    url: str

    detail: Optional[Literal["low", "high", "auto"]] = None


class MainPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel(BaseModel):
    image_url: MainPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL
    """The image URL"""

    type: Optional[Literal["image_url"]] = None


MainPromptStepOutputPromptUnionMember0ContentUnionMember1: TypeAlias = Union[
    MainPromptStepOutputPromptUnionMember0ContentUnionMember1Content,
    MainPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel,
]


class MainPromptStepOutputPromptUnionMember0(BaseModel):
    content: Union[List[str], List[MainPromptStepOutputPromptUnionMember0ContentUnionMember1], str]

    role: Literal["user", "assistant", "system", "function", "function_response", "function_call", "auto"]

    continue_: Optional[bool] = FieldInfo(alias="continue", default=None)

    name: Optional[str] = None


class MainPromptStepOutputToolChoiceNamedToolChoiceFunction(BaseModel):
    name: str


class MainPromptStepOutputToolChoiceNamedToolChoice(BaseModel):
    function: Optional[MainPromptStepOutputToolChoiceNamedToolChoiceFunction] = None


MainPromptStepOutputToolChoice: TypeAlias = Union[
    Literal["auto", "none"], MainPromptStepOutputToolChoiceNamedToolChoice, None
]


class MainPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID(BaseModel):
    id: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName(BaseModel):
    name: Optional[str] = None


MainPromptStepOutputToolsUnionMember1ToolRefRef: TypeAlias = Union[
    MainPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID,
    MainPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName,
]


class MainPromptStepOutputToolsUnionMember1ToolRef(BaseModel):
    ref: MainPromptStepOutputToolsUnionMember1ToolRefRef
    """Reference to a tool by id"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall(BaseModel):
    method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"]

    url: str

    content: Optional[str] = None

    cookies: Optional[Dict[str, str]] = None

    data: Optional[object] = None

    follow_redirects: Optional[bool] = None

    headers: Optional[Dict[str, str]] = None

    json_: Optional[object] = FieldInfo(alias="json", default=None)

    params: Union[str, object, None] = None

    schema_: Optional[object] = FieldInfo(alias="schema", default=None)

    timeout: Optional[int] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["bash_20241022"]] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022(BaseModel):
    display_height_px: Optional[int] = None

    display_number: Optional[int] = None

    display_width_px: Optional[int] = None

    name: Optional[str] = None

    type: Optional[Literal["computer_20241022"]] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction(BaseModel):
    description: Optional[object] = None

    name: Optional[object] = None

    parameters: Optional[object] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef(BaseModel):
    arguments: Optional[object] = None

    method: Optional[str] = None

    provider: Optional[Literal["dummy"]] = None

    setup: Optional[object] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments(BaseModel):
    query: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup(BaseModel):
    api_key: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef(BaseModel):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments
    ] = None
    """Arguments for Brave Search"""

    method: Optional[str] = None

    provider: Optional[Literal["brave"]] = None

    setup: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup] = (
        None
    )
    """Integration definition for Brave Search"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments(BaseModel):
    body: str

    from_: str = FieldInfo(alias="from")

    subject: str

    to: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup(BaseModel):
    host: str

    password: str

    port: int

    user: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef(BaseModel):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments
    ] = None
    """Arguments for Email sending"""

    method: Optional[str] = None

    provider: Optional[Literal["email"]] = None

    setup: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup] = (
        None
    )
    """Setup parameters for Email integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments(BaseModel):
    url: str

    mode: Optional[Literal["scrape"]] = None

    params: Optional[object] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup(BaseModel):
    spider_api_key: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef(BaseModel):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments
    ] = None
    """Arguments for Spider integration"""

    method: Optional[str] = None

    provider: Optional[Literal["spider"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup
    ] = None
    """Setup parameters for Spider integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments(
    BaseModel
):
    query: str

    load_max_docs: Optional[int] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef(BaseModel):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments
    ] = None
    """Arguments for Wikipedia Search"""

    method: Optional[str] = None

    provider: Optional[Literal["wikipedia"]] = None

    setup: Optional[object] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments(BaseModel):
    location: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup(BaseModel):
    openweathermap_api_key: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef(BaseModel):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments
    ] = None
    """Arguments for Weather"""

    method: Optional[str] = None

    provider: Optional[Literal["weather"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup
    ] = None
    """Integration definition for Weather"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments(
    BaseModel
):
    project_id: str = FieldInfo(alias="projectId")


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_context"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments(
    BaseModel
):
    repository_name: str = FieldInfo(alias="repositoryName")

    ref: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments
    ] = None

    method: Optional[Literal["install_extension_from_github"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments(
    BaseModel
):
    status: Optional[Literal["RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments
    ] = None

    method: Optional[Literal["list_sessions"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments(
    BaseModel
):
    browser_settings: Optional[object] = FieldInfo(alias="browserSettings", default=None)

    extension_id: Optional[str] = FieldInfo(alias="extensionId", default=None)

    keep_alive: Optional[bool] = FieldInfo(alias="keepAlive", default=None)

    project_id: Optional[str] = FieldInfo(alias="projectId", default=None)

    proxies: Union[bool, List[object], None] = None

    timeout: Optional[int] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments(
    BaseModel
):
    id: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments(
    BaseModel
):
    id: str

    status: Optional[Literal["REQUEST_RELEASE"]] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["complete_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments(
    BaseModel
):
    id: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_live_urls"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments(
    BaseModel
):
    id: str


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_connect_url"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup(
    BaseModel
):
    connect_url: Optional[str] = None

    height: Optional[int] = None

    width: Optional[int] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments(
    BaseModel
):
    action: Literal[
        "key",
        "type",
        "mouse_move",
        "left_click",
        "left_click_drag",
        "right_click",
        "middle_click",
        "double_click",
        "screenshot",
        "cursor_position",
        "navigate",
        "refresh",
    ]

    connect_url: Optional[str] = None

    coordinate: Optional[List[object]] = None

    text: Optional[str] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef(BaseModel):
    setup: MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup
    """The setup parameters for the remote browser"""

    arguments: Optional[
        MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments
    ] = None
    """The arguments for the remote browser"""

    method: Optional[Literal["perform_action"]] = None

    provider: Optional[Literal["remote_browser"]] = None


MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration: TypeAlias = Union[
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef,
    MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef,
    None,
]


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem(BaseModel):
    operation: Literal[
        "create",
        "update",
        "patch",
        "create_or_update",
        "embed",
        "change_status",
        "search",
        "chat",
        "history",
        "delete",
        "get",
        "list",
    ]

    resource: Literal["agent", "user", "task", "execution", "doc", "session", "job"]

    arguments: Optional[object] = None

    resource_id: Optional[str] = None

    subresource: Optional[Literal["tool", "doc", "execution", "transition"]] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["text_editor_20241022"]] = None


class MainPromptStepOutputToolsUnionMember1CreateToolRequestOutput(BaseModel):
    name: str

    type: Literal[
        "function", "integration", "system", "api_call", "computer_20241022", "text_editor_20241022", "bash_20241022"
    ]

    api_call: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall] = None
    """API call definition"""

    bash_20241022: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022] = None

    computer_20241022: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022] = None
    """Anthropic new tools"""

    description: Optional[str] = None

    function: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction] = None
    """Function definition"""

    integration: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration] = None
    """Brave integration definition"""

    system: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem] = None
    """System definition"""

    text_editor_20241022: Optional[MainPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022] = (
        None
    )


MainPromptStepOutputToolsUnionMember1: TypeAlias = Union[
    MainPromptStepOutputToolsUnionMember1ToolRef, MainPromptStepOutputToolsUnionMember1CreateToolRequestOutput
]


class MainPromptStepOutput(BaseModel):
    prompt: Union[List[MainPromptStepOutputPromptUnionMember0], str]

    auto_run_tools: Optional[bool] = None

    disable_cache: Optional[bool] = None

    kind: Optional[Literal["prompt"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None

    settings: Optional[ChatSettings] = None

    tool_choice: Optional[MainPromptStepOutputToolChoice] = None

    tools: Union[Literal["all"], List[MainPromptStepOutputToolsUnionMember1], None] = None

    unwrap: Optional[bool] = None


class MainGetStep(BaseModel):
    get: str

    kind: Optional[Literal["get"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSetStep(BaseModel):
    set: Dict[str, str]

    kind: Optional[Literal["set"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainLogStep(BaseModel):
    log: str

    kind: Optional[Literal["log"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainYieldStep(BaseModel):
    workflow: str

    arguments: Union[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]], Literal["_"], None] = None

    kind: Optional[Literal["yield"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainReturnStep(BaseModel):
    return_: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]] = FieldInfo(alias="return")

    kind: Optional[Literal["return"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSleepStepSleep(BaseModel):
    days: Optional[int] = None

    hours: Optional[int] = None

    minutes: Optional[int] = None

    seconds: Optional[int] = None


class MainSleepStep(BaseModel):
    sleep: MainSleepStepSleep

    kind: Optional[Literal["sleep"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainErrorWorkflowStep(BaseModel):
    error: str

    kind: Optional[Literal["error"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainWaitForInputStepWaitForInput(BaseModel):
    info: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]


class MainWaitForInputStep(BaseModel):
    wait_for_input: MainWaitForInputStepWaitForInput

    kind: Optional[Literal["wait_for_input"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenEvaluateStep(BaseModel):
    evaluate: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]

    kind: Optional[Literal["evaluate"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenToolCallStep(BaseModel):
    tool: str

    arguments: Union[
        Dict[
            str,
            Union[
                Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                str,
            ],
        ],
        List[
            Dict[
                str,
                Union[
                    Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                    List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                    str,
                ],
            ]
        ],
        Literal["_"],
        None,
    ] = None

    kind: Optional[Literal["tool_call"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1Content(BaseModel):
    text: str

    type: Optional[Literal["text"]] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL(
    BaseModel
):
    url: str

    detail: Optional[Literal["low", "high", "auto"]] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel(BaseModel):
    image_url: MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL
    """The image URL"""

    type: Optional[Literal["image_url"]] = None


MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1: TypeAlias = Union[
    MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1Content,
    MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel,
]


class MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0(BaseModel):
    content: Union[
        List[str], List[MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0ContentUnionMember1], str
    ]

    role: Literal["user", "assistant", "system", "function", "function_response", "function_call", "auto"]

    continue_: Optional[bool] = FieldInfo(alias="continue", default=None)

    name: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoiceNamedToolChoiceFunction(BaseModel):
    name: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoiceNamedToolChoice(BaseModel):
    function: Optional[MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoiceNamedToolChoiceFunction] = None


MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoice: TypeAlias = Union[
    Literal["auto", "none"], MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoiceNamedToolChoice, None
]


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID(BaseModel):
    id: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName(BaseModel):
    name: Optional[str] = None


MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRef: TypeAlias = Union[
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName,
]


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRef(BaseModel):
    ref: MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRefRef
    """Reference to a tool by id"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall(BaseModel):
    method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"]

    url: str

    content: Optional[str] = None

    cookies: Optional[Dict[str, str]] = None

    data: Optional[object] = None

    follow_redirects: Optional[bool] = None

    headers: Optional[Dict[str, str]] = None

    json_: Optional[object] = FieldInfo(alias="json", default=None)

    params: Union[str, object, None] = None

    schema_: Optional[object] = FieldInfo(alias="schema", default=None)

    timeout: Optional[int] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["bash_20241022"]] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022(
    BaseModel
):
    display_height_px: Optional[int] = None

    display_number: Optional[int] = None

    display_width_px: Optional[int] = None

    name: Optional[str] = None

    type: Optional[Literal["computer_20241022"]] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction(BaseModel):
    description: Optional[object] = None

    name: Optional[object] = None

    parameters: Optional[object] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef(
    BaseModel
):
    arguments: Optional[object] = None

    method: Optional[str] = None

    provider: Optional[Literal["dummy"]] = None

    setup: Optional[object] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments(
    BaseModel
):
    query: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup(
    BaseModel
):
    api_key: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments
    ] = None
    """Arguments for Brave Search"""

    method: Optional[str] = None

    provider: Optional[Literal["brave"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup
    ] = None
    """Integration definition for Brave Search"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments(
    BaseModel
):
    body: str

    from_: str = FieldInfo(alias="from")

    subject: str

    to: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup(
    BaseModel
):
    host: str

    password: str

    port: int

    user: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments
    ] = None
    """Arguments for Email sending"""

    method: Optional[str] = None

    provider: Optional[Literal["email"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup
    ] = None
    """Setup parameters for Email integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments(
    BaseModel
):
    url: str

    mode: Optional[Literal["scrape"]] = None

    params: Optional[object] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup(
    BaseModel
):
    spider_api_key: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments
    ] = None
    """Arguments for Spider integration"""

    method: Optional[str] = None

    provider: Optional[Literal["spider"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup
    ] = None
    """Setup parameters for Spider integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments(
    BaseModel
):
    query: str

    load_max_docs: Optional[int] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments
    ] = None
    """Arguments for Wikipedia Search"""

    method: Optional[str] = None

    provider: Optional[Literal["wikipedia"]] = None

    setup: Optional[object] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments(
    BaseModel
):
    location: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup(
    BaseModel
):
    openweathermap_api_key: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments
    ] = None
    """Arguments for Weather"""

    method: Optional[str] = None

    provider: Optional[Literal["weather"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup
    ] = None
    """Integration definition for Weather"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments(
    BaseModel
):
    project_id: str = FieldInfo(alias="projectId")


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_context"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments(
    BaseModel
):
    repository_name: str = FieldInfo(alias="repositoryName")

    ref: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments
    ] = None

    method: Optional[Literal["install_extension_from_github"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments(
    BaseModel
):
    status: Optional[Literal["RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments
    ] = None

    method: Optional[Literal["list_sessions"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments(
    BaseModel
):
    browser_settings: Optional[object] = FieldInfo(alias="browserSettings", default=None)

    extension_id: Optional[str] = FieldInfo(alias="extensionId", default=None)

    keep_alive: Optional[bool] = FieldInfo(alias="keepAlive", default=None)

    project_id: Optional[str] = FieldInfo(alias="projectId", default=None)

    proxies: Union[bool, List[object], None] = None

    timeout: Optional[int] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments(
    BaseModel
):
    id: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments(
    BaseModel
):
    id: str

    status: Optional[Literal["REQUEST_RELEASE"]] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["complete_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments(
    BaseModel
):
    id: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_live_urls"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments(
    BaseModel
):
    id: str


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_connect_url"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup(
    BaseModel
):
    connect_url: Optional[str] = None

    height: Optional[int] = None

    width: Optional[int] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments(
    BaseModel
):
    action: Literal[
        "key",
        "type",
        "mouse_move",
        "left_click",
        "left_click_drag",
        "right_click",
        "middle_click",
        "double_click",
        "screenshot",
        "cursor_position",
        "navigate",
        "refresh",
    ]

    connect_url: Optional[str] = None

    coordinate: Optional[List[object]] = None

    text: Optional[str] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef(
    BaseModel
):
    setup: MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup
    """The setup parameters for the remote browser"""

    arguments: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments
    ] = None
    """The arguments for the remote browser"""

    method: Optional[Literal["perform_action"]] = None

    provider: Optional[Literal["remote_browser"]] = None


MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration: TypeAlias = Union[
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef,
    None,
]


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem(BaseModel):
    operation: Literal[
        "create",
        "update",
        "patch",
        "create_or_update",
        "embed",
        "change_status",
        "search",
        "chat",
        "history",
        "delete",
        "get",
        "list",
    ]

    resource: Literal["agent", "user", "task", "execution", "doc", "session", "job"]

    arguments: Optional[object] = None

    resource_id: Optional[str] = None

    subresource: Optional[Literal["tool", "doc", "execution", "transition"]] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022(
    BaseModel
):
    name: Optional[str] = None

    type: Optional[Literal["text_editor_20241022"]] = None


class MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutput(BaseModel):
    name: str

    type: Literal[
        "function", "integration", "system", "api_call", "computer_20241022", "text_editor_20241022", "bash_20241022"
    ]

    api_call: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall
    ] = None
    """API call definition"""

    bash_20241022: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022
    ] = None

    computer_20241022: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022
    ] = None
    """Anthropic new tools"""

    description: Optional[str] = None

    function: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction
    ] = None
    """Function definition"""

    integration: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration
    ] = None
    """Brave integration definition"""

    system: Optional[MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem] = (
        None
    )
    """System definition"""

    text_editor_20241022: Optional[
        MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022
    ] = None


MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1: TypeAlias = Union[
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1ToolRef,
    MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1CreateToolRequestOutput,
]


class MainIfElseWorkflowStepOutputThenPromptStepOutput(BaseModel):
    prompt: Union[List[MainIfElseWorkflowStepOutputThenPromptStepOutputPromptUnionMember0], str]

    auto_run_tools: Optional[bool] = None

    disable_cache: Optional[bool] = None

    kind: Optional[Literal["prompt"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None

    settings: Optional[ChatSettings] = None

    tool_choice: Optional[MainIfElseWorkflowStepOutputThenPromptStepOutputToolChoice] = None

    tools: Union[Literal["all"], List[MainIfElseWorkflowStepOutputThenPromptStepOutputToolsUnionMember1], None] = None

    unwrap: Optional[bool] = None


class MainIfElseWorkflowStepOutputThenGetStep(BaseModel):
    get: str

    kind: Optional[Literal["get"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenSetStep(BaseModel):
    set: Dict[str, str]

    kind: Optional[Literal["set"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenLogStep(BaseModel):
    log: str

    kind: Optional[Literal["log"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenYieldStep(BaseModel):
    workflow: str

    arguments: Union[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]], Literal["_"], None] = None

    kind: Optional[Literal["yield"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenReturnStep(BaseModel):
    return_: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]] = FieldInfo(alias="return")

    kind: Optional[Literal["return"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenSleepStepSleep(BaseModel):
    days: Optional[int] = None

    hours: Optional[int] = None

    minutes: Optional[int] = None

    seconds: Optional[int] = None


class MainIfElseWorkflowStepOutputThenSleepStep(BaseModel):
    sleep: MainIfElseWorkflowStepOutputThenSleepStepSleep

    kind: Optional[Literal["sleep"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenErrorWorkflowStep(BaseModel):
    error: str

    kind: Optional[Literal["error"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputThenWaitForInputStepWaitForInput(BaseModel):
    info: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]


class MainIfElseWorkflowStepOutputThenWaitForInputStep(BaseModel):
    wait_for_input: MainIfElseWorkflowStepOutputThenWaitForInputStepWaitForInput

    kind: Optional[Literal["wait_for_input"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


MainIfElseWorkflowStepOutputThen: TypeAlias = Union[
    MainIfElseWorkflowStepOutputThenEvaluateStep,
    MainIfElseWorkflowStepOutputThenToolCallStep,
    MainIfElseWorkflowStepOutputThenPromptStepOutput,
    MainIfElseWorkflowStepOutputThenGetStep,
    MainIfElseWorkflowStepOutputThenSetStep,
    MainIfElseWorkflowStepOutputThenLogStep,
    MainIfElseWorkflowStepOutputThenYieldStep,
    MainIfElseWorkflowStepOutputThenReturnStep,
    MainIfElseWorkflowStepOutputThenSleepStep,
    MainIfElseWorkflowStepOutputThenErrorWorkflowStep,
    MainIfElseWorkflowStepOutputThenWaitForInputStep,
]


class MainIfElseWorkflowStepOutputElseEvaluateStep(BaseModel):
    evaluate: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]

    kind: Optional[Literal["evaluate"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElseToolCallStep(BaseModel):
    tool: str

    arguments: Union[
        Dict[
            str,
            Union[
                Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                str,
            ],
        ],
        List[
            Dict[
                str,
                Union[
                    Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                    List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                    str,
                ],
            ]
        ],
        Literal["_"],
        None,
    ] = None

    kind: Optional[Literal["tool_call"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1Content(BaseModel):
    text: str

    type: Optional[Literal["text"]] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL(
    BaseModel
):
    url: str

    detail: Optional[Literal["low", "high", "auto"]] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel(BaseModel):
    image_url: MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL
    """The image URL"""

    type: Optional[Literal["image_url"]] = None


MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1: TypeAlias = Union[
    MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1Content,
    MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel,
]


class MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0(BaseModel):
    content: Union[
        List[str], List[MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0ContentUnionMember1], str
    ]

    role: Literal["user", "assistant", "system", "function", "function_response", "function_call", "auto"]

    continue_: Optional[bool] = FieldInfo(alias="continue", default=None)

    name: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoiceNamedToolChoiceFunction(BaseModel):
    name: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoiceNamedToolChoice(BaseModel):
    function: Optional[MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoiceNamedToolChoiceFunction] = None


MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoice: TypeAlias = Union[
    Literal["auto", "none"], MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoiceNamedToolChoice, None
]


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRefToolRefByID(BaseModel):
    id: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRefToolRefByName(BaseModel):
    name: Optional[str] = None


MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRef: TypeAlias = Union[
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRefToolRefByID,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRefToolRefByName,
]


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRef(BaseModel):
    ref: MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRefRef
    """Reference to a tool by id"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall(BaseModel):
    method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"]

    url: str

    content: Optional[str] = None

    cookies: Optional[Dict[str, str]] = None

    data: Optional[object] = None

    follow_redirects: Optional[bool] = None

    headers: Optional[Dict[str, str]] = None

    json_: Optional[object] = FieldInfo(alias="json", default=None)

    params: Union[str, object, None] = None

    schema_: Optional[object] = FieldInfo(alias="schema", default=None)

    timeout: Optional[int] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["bash_20241022"]] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022(
    BaseModel
):
    display_height_px: Optional[int] = None

    display_number: Optional[int] = None

    display_width_px: Optional[int] = None

    name: Optional[str] = None

    type: Optional[Literal["computer_20241022"]] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction(BaseModel):
    description: Optional[object] = None

    name: Optional[object] = None

    parameters: Optional[object] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef(
    BaseModel
):
    arguments: Optional[object] = None

    method: Optional[str] = None

    provider: Optional[Literal["dummy"]] = None

    setup: Optional[object] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments(
    BaseModel
):
    query: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup(
    BaseModel
):
    api_key: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments
    ] = None
    """Arguments for Brave Search"""

    method: Optional[str] = None

    provider: Optional[Literal["brave"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup
    ] = None
    """Integration definition for Brave Search"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments(
    BaseModel
):
    body: str

    from_: str = FieldInfo(alias="from")

    subject: str

    to: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup(
    BaseModel
):
    host: str

    password: str

    port: int

    user: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments
    ] = None
    """Arguments for Email sending"""

    method: Optional[str] = None

    provider: Optional[Literal["email"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup
    ] = None
    """Setup parameters for Email integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments(
    BaseModel
):
    url: str

    mode: Optional[Literal["scrape"]] = None

    params: Optional[object] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup(
    BaseModel
):
    spider_api_key: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments
    ] = None
    """Arguments for Spider integration"""

    method: Optional[str] = None

    provider: Optional[Literal["spider"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup
    ] = None
    """Setup parameters for Spider integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments(
    BaseModel
):
    query: str

    load_max_docs: Optional[int] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments
    ] = None
    """Arguments for Wikipedia Search"""

    method: Optional[str] = None

    provider: Optional[Literal["wikipedia"]] = None

    setup: Optional[object] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments(
    BaseModel
):
    location: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup(
    BaseModel
):
    openweathermap_api_key: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments
    ] = None
    """Arguments for Weather"""

    method: Optional[str] = None

    provider: Optional[Literal["weather"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup
    ] = None
    """Integration definition for Weather"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments(
    BaseModel
):
    project_id: str = FieldInfo(alias="projectId")


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_context"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments(
    BaseModel
):
    repository_name: str = FieldInfo(alias="repositoryName")

    ref: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments
    ] = None

    method: Optional[Literal["install_extension_from_github"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments(
    BaseModel
):
    status: Optional[Literal["RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments
    ] = None

    method: Optional[Literal["list_sessions"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments(
    BaseModel
):
    browser_settings: Optional[object] = FieldInfo(alias="browserSettings", default=None)

    extension_id: Optional[str] = FieldInfo(alias="extensionId", default=None)

    keep_alive: Optional[bool] = FieldInfo(alias="keepAlive", default=None)

    project_id: Optional[str] = FieldInfo(alias="projectId", default=None)

    proxies: Union[bool, List[object], None] = None

    timeout: Optional[int] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments(
    BaseModel
):
    id: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments(
    BaseModel
):
    id: str

    status: Optional[Literal["REQUEST_RELEASE"]] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["complete_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments(
    BaseModel
):
    id: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_live_urls"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments(
    BaseModel
):
    id: str


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_connect_url"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup(
    BaseModel
):
    connect_url: Optional[str] = None

    height: Optional[int] = None

    width: Optional[int] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments(
    BaseModel
):
    action: Literal[
        "key",
        "type",
        "mouse_move",
        "left_click",
        "left_click_drag",
        "right_click",
        "middle_click",
        "double_click",
        "screenshot",
        "cursor_position",
        "navigate",
        "refresh",
    ]

    connect_url: Optional[str] = None

    coordinate: Optional[List[object]] = None

    text: Optional[str] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef(
    BaseModel
):
    setup: MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup
    """The setup parameters for the remote browser"""

    arguments: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments
    ] = None
    """The arguments for the remote browser"""

    method: Optional[Literal["perform_action"]] = None

    provider: Optional[Literal["remote_browser"]] = None


MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration: TypeAlias = Union[
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef,
    None,
]


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem(BaseModel):
    operation: Literal[
        "create",
        "update",
        "patch",
        "create_or_update",
        "embed",
        "change_status",
        "search",
        "chat",
        "history",
        "delete",
        "get",
        "list",
    ]

    resource: Literal["agent", "user", "task", "execution", "doc", "session", "job"]

    arguments: Optional[object] = None

    resource_id: Optional[str] = None

    subresource: Optional[Literal["tool", "doc", "execution", "transition"]] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022(
    BaseModel
):
    name: Optional[str] = None

    type: Optional[Literal["text_editor_20241022"]] = None


class MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutput(BaseModel):
    name: str

    type: Literal[
        "function", "integration", "system", "api_call", "computer_20241022", "text_editor_20241022", "bash_20241022"
    ]

    api_call: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall
    ] = None
    """API call definition"""

    bash_20241022: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022
    ] = None

    computer_20241022: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022
    ] = None
    """Anthropic new tools"""

    description: Optional[str] = None

    function: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction
    ] = None
    """Function definition"""

    integration: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration
    ] = None
    """Brave integration definition"""

    system: Optional[MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem] = (
        None
    )
    """System definition"""

    text_editor_20241022: Optional[
        MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022
    ] = None


MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1: TypeAlias = Union[
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1ToolRef,
    MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1CreateToolRequestOutput,
]


class MainIfElseWorkflowStepOutputElsePromptStepOutput(BaseModel):
    prompt: Union[List[MainIfElseWorkflowStepOutputElsePromptStepOutputPromptUnionMember0], str]

    auto_run_tools: Optional[bool] = None

    disable_cache: Optional[bool] = None

    kind: Optional[Literal["prompt"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None

    settings: Optional[ChatSettings] = None

    tool_choice: Optional[MainIfElseWorkflowStepOutputElsePromptStepOutputToolChoice] = None

    tools: Union[Literal["all"], List[MainIfElseWorkflowStepOutputElsePromptStepOutputToolsUnionMember1], None] = None

    unwrap: Optional[bool] = None


class MainIfElseWorkflowStepOutputElseGetStep(BaseModel):
    get: str

    kind: Optional[Literal["get"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElseSetStep(BaseModel):
    set: Dict[str, str]

    kind: Optional[Literal["set"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElseLogStep(BaseModel):
    log: str

    kind: Optional[Literal["log"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElseYieldStep(BaseModel):
    workflow: str

    arguments: Union[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]], Literal["_"], None] = None

    kind: Optional[Literal["yield"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElseReturnStep(BaseModel):
    return_: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]] = FieldInfo(alias="return")

    kind: Optional[Literal["return"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElseSleepStepSleep(BaseModel):
    days: Optional[int] = None

    hours: Optional[int] = None

    minutes: Optional[int] = None

    seconds: Optional[int] = None


class MainIfElseWorkflowStepOutputElseSleepStep(BaseModel):
    sleep: MainIfElseWorkflowStepOutputElseSleepStepSleep

    kind: Optional[Literal["sleep"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElseErrorWorkflowStep(BaseModel):
    error: str

    kind: Optional[Literal["error"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainIfElseWorkflowStepOutputElseWaitForInputStepWaitForInput(BaseModel):
    info: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]


class MainIfElseWorkflowStepOutputElseWaitForInputStep(BaseModel):
    wait_for_input: MainIfElseWorkflowStepOutputElseWaitForInputStepWaitForInput

    kind: Optional[Literal["wait_for_input"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


MainIfElseWorkflowStepOutputElse: TypeAlias = Union[
    MainIfElseWorkflowStepOutputElseEvaluateStep,
    MainIfElseWorkflowStepOutputElseToolCallStep,
    MainIfElseWorkflowStepOutputElsePromptStepOutput,
    MainIfElseWorkflowStepOutputElseGetStep,
    MainIfElseWorkflowStepOutputElseSetStep,
    MainIfElseWorkflowStepOutputElseLogStep,
    MainIfElseWorkflowStepOutputElseYieldStep,
    MainIfElseWorkflowStepOutputElseReturnStep,
    MainIfElseWorkflowStepOutputElseSleepStep,
    MainIfElseWorkflowStepOutputElseErrorWorkflowStep,
    MainIfElseWorkflowStepOutputElseWaitForInputStep,
    None,
]


class MainIfElseWorkflowStepOutput(BaseModel):
    if_: str = FieldInfo(alias="if")

    then: MainIfElseWorkflowStepOutputThen

    else_: Optional[MainIfElseWorkflowStepOutputElse] = FieldInfo(alias="else", default=None)

    kind: Optional[Literal["if_else"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenEvaluateStep(BaseModel):
    evaluate: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]

    kind: Optional[Literal["evaluate"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenToolCallStep(BaseModel):
    tool: str

    arguments: Union[
        Dict[
            str,
            Union[
                Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                str,
            ],
        ],
        List[
            Dict[
                str,
                Union[
                    Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                    List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                    str,
                ],
            ]
        ],
        Literal["_"],
        None,
    ] = None

    kind: Optional[Literal["tool_call"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1Content(BaseModel):
    text: str

    type: Optional[Literal["text"]] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL(
    BaseModel
):
    url: str

    detail: Optional[Literal["low", "high", "auto"]] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel(BaseModel):
    image_url: MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL
    """The image URL"""

    type: Optional[Literal["image_url"]] = None


MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1: TypeAlias = Union[
    MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1Content,
    MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel,
]


class MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0(BaseModel):
    content: Union[
        List[str], List[MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0ContentUnionMember1], str
    ]

    role: Literal["user", "assistant", "system", "function", "function_response", "function_call", "auto"]

    continue_: Optional[bool] = FieldInfo(alias="continue", default=None)

    name: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolChoiceNamedToolChoiceFunction(BaseModel):
    name: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolChoiceNamedToolChoice(BaseModel):
    function: Optional[MainSwitchStepOutputSwitchThenPromptStepOutputToolChoiceNamedToolChoiceFunction] = None


MainSwitchStepOutputSwitchThenPromptStepOutputToolChoice: TypeAlias = Union[
    Literal["auto", "none"], MainSwitchStepOutputSwitchThenPromptStepOutputToolChoiceNamedToolChoice, None
]


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID(BaseModel):
    id: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName(BaseModel):
    name: Optional[str] = None


MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRef: TypeAlias = Union[
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName,
]


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRef(BaseModel):
    ref: MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRefRef
    """Reference to a tool by id"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall(BaseModel):
    method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"]

    url: str

    content: Optional[str] = None

    cookies: Optional[Dict[str, str]] = None

    data: Optional[object] = None

    follow_redirects: Optional[bool] = None

    headers: Optional[Dict[str, str]] = None

    json_: Optional[object] = FieldInfo(alias="json", default=None)

    params: Union[str, object, None] = None

    schema_: Optional[object] = FieldInfo(alias="schema", default=None)

    timeout: Optional[int] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["bash_20241022"]] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022(BaseModel):
    display_height_px: Optional[int] = None

    display_number: Optional[int] = None

    display_width_px: Optional[int] = None

    name: Optional[str] = None

    type: Optional[Literal["computer_20241022"]] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction(BaseModel):
    description: Optional[object] = None

    name: Optional[object] = None

    parameters: Optional[object] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef(
    BaseModel
):
    arguments: Optional[object] = None

    method: Optional[str] = None

    provider: Optional[Literal["dummy"]] = None

    setup: Optional[object] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments(
    BaseModel
):
    query: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup(
    BaseModel
):
    api_key: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments
    ] = None
    """Arguments for Brave Search"""

    method: Optional[str] = None

    provider: Optional[Literal["brave"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup
    ] = None
    """Integration definition for Brave Search"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments(
    BaseModel
):
    body: str

    from_: str = FieldInfo(alias="from")

    subject: str

    to: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup(
    BaseModel
):
    host: str

    password: str

    port: int

    user: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments
    ] = None
    """Arguments for Email sending"""

    method: Optional[str] = None

    provider: Optional[Literal["email"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup
    ] = None
    """Setup parameters for Email integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments(
    BaseModel
):
    url: str

    mode: Optional[Literal["scrape"]] = None

    params: Optional[object] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup(
    BaseModel
):
    spider_api_key: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments
    ] = None
    """Arguments for Spider integration"""

    method: Optional[str] = None

    provider: Optional[Literal["spider"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup
    ] = None
    """Setup parameters for Spider integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments(
    BaseModel
):
    query: str

    load_max_docs: Optional[int] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments
    ] = None
    """Arguments for Wikipedia Search"""

    method: Optional[str] = None

    provider: Optional[Literal["wikipedia"]] = None

    setup: Optional[object] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments(
    BaseModel
):
    location: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup(
    BaseModel
):
    openweathermap_api_key: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments
    ] = None
    """Arguments for Weather"""

    method: Optional[str] = None

    provider: Optional[Literal["weather"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup
    ] = None
    """Integration definition for Weather"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments(
    BaseModel
):
    project_id: str = FieldInfo(alias="projectId")


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_context"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments(
    BaseModel
):
    repository_name: str = FieldInfo(alias="repositoryName")

    ref: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments
    ] = None

    method: Optional[Literal["install_extension_from_github"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments(
    BaseModel
):
    status: Optional[Literal["RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments
    ] = None

    method: Optional[Literal["list_sessions"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments(
    BaseModel
):
    browser_settings: Optional[object] = FieldInfo(alias="browserSettings", default=None)

    extension_id: Optional[str] = FieldInfo(alias="extensionId", default=None)

    keep_alive: Optional[bool] = FieldInfo(alias="keepAlive", default=None)

    project_id: Optional[str] = FieldInfo(alias="projectId", default=None)

    proxies: Union[bool, List[object], None] = None

    timeout: Optional[int] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments(
    BaseModel
):
    id: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments(
    BaseModel
):
    id: str

    status: Optional[Literal["REQUEST_RELEASE"]] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["complete_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments(
    BaseModel
):
    id: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_live_urls"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments(
    BaseModel
):
    id: str


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_connect_url"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup(
    BaseModel
):
    connect_url: Optional[str] = None

    height: Optional[int] = None

    width: Optional[int] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments(
    BaseModel
):
    action: Literal[
        "key",
        "type",
        "mouse_move",
        "left_click",
        "left_click_drag",
        "right_click",
        "middle_click",
        "double_click",
        "screenshot",
        "cursor_position",
        "navigate",
        "refresh",
    ]

    connect_url: Optional[str] = None

    coordinate: Optional[List[object]] = None

    text: Optional[str] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef(
    BaseModel
):
    setup: MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup
    """The setup parameters for the remote browser"""

    arguments: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments
    ] = None
    """The arguments for the remote browser"""

    method: Optional[Literal["perform_action"]] = None

    provider: Optional[Literal["remote_browser"]] = None


MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration: TypeAlias = Union[
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef,
    None,
]


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem(BaseModel):
    operation: Literal[
        "create",
        "update",
        "patch",
        "create_or_update",
        "embed",
        "change_status",
        "search",
        "chat",
        "history",
        "delete",
        "get",
        "list",
    ]

    resource: Literal["agent", "user", "task", "execution", "doc", "session", "job"]

    arguments: Optional[object] = None

    resource_id: Optional[str] = None

    subresource: Optional[Literal["tool", "doc", "execution", "transition"]] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022(
    BaseModel
):
    name: Optional[str] = None

    type: Optional[Literal["text_editor_20241022"]] = None


class MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutput(BaseModel):
    name: str

    type: Literal[
        "function", "integration", "system", "api_call", "computer_20241022", "text_editor_20241022", "bash_20241022"
    ]

    api_call: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall
    ] = None
    """API call definition"""

    bash_20241022: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022
    ] = None

    computer_20241022: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022
    ] = None
    """Anthropic new tools"""

    description: Optional[str] = None

    function: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction
    ] = None
    """Function definition"""

    integration: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration
    ] = None
    """Brave integration definition"""

    system: Optional[MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem] = (
        None
    )
    """System definition"""

    text_editor_20241022: Optional[
        MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022
    ] = None


MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1: TypeAlias = Union[
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1ToolRef,
    MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1CreateToolRequestOutput,
]


class MainSwitchStepOutputSwitchThenPromptStepOutput(BaseModel):
    prompt: Union[List[MainSwitchStepOutputSwitchThenPromptStepOutputPromptUnionMember0], str]

    auto_run_tools: Optional[bool] = None

    disable_cache: Optional[bool] = None

    kind: Optional[Literal["prompt"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None

    settings: Optional[ChatSettings] = None

    tool_choice: Optional[MainSwitchStepOutputSwitchThenPromptStepOutputToolChoice] = None

    tools: Union[Literal["all"], List[MainSwitchStepOutputSwitchThenPromptStepOutputToolsUnionMember1], None] = None

    unwrap: Optional[bool] = None


class MainSwitchStepOutputSwitchThenGetStep(BaseModel):
    get: str

    kind: Optional[Literal["get"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenSetStep(BaseModel):
    set: Dict[str, str]

    kind: Optional[Literal["set"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenLogStep(BaseModel):
    log: str

    kind: Optional[Literal["log"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenYieldStep(BaseModel):
    workflow: str

    arguments: Union[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]], Literal["_"], None] = None

    kind: Optional[Literal["yield"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenReturnStep(BaseModel):
    return_: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]] = FieldInfo(alias="return")

    kind: Optional[Literal["return"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenSleepStepSleep(BaseModel):
    days: Optional[int] = None

    hours: Optional[int] = None

    minutes: Optional[int] = None

    seconds: Optional[int] = None


class MainSwitchStepOutputSwitchThenSleepStep(BaseModel):
    sleep: MainSwitchStepOutputSwitchThenSleepStepSleep

    kind: Optional[Literal["sleep"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenErrorWorkflowStep(BaseModel):
    error: str

    kind: Optional[Literal["error"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainSwitchStepOutputSwitchThenWaitForInputStepWaitForInput(BaseModel):
    info: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]


class MainSwitchStepOutputSwitchThenWaitForInputStep(BaseModel):
    wait_for_input: MainSwitchStepOutputSwitchThenWaitForInputStepWaitForInput

    kind: Optional[Literal["wait_for_input"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


MainSwitchStepOutputSwitchThen: TypeAlias = Union[
    MainSwitchStepOutputSwitchThenEvaluateStep,
    MainSwitchStepOutputSwitchThenToolCallStep,
    MainSwitchStepOutputSwitchThenPromptStepOutput,
    MainSwitchStepOutputSwitchThenGetStep,
    MainSwitchStepOutputSwitchThenSetStep,
    MainSwitchStepOutputSwitchThenLogStep,
    MainSwitchStepOutputSwitchThenYieldStep,
    MainSwitchStepOutputSwitchThenReturnStep,
    MainSwitchStepOutputSwitchThenSleepStep,
    MainSwitchStepOutputSwitchThenErrorWorkflowStep,
    MainSwitchStepOutputSwitchThenWaitForInputStep,
]


class MainSwitchStepOutputSwitch(BaseModel):
    case: Union[Literal["_"], str]

    then: MainSwitchStepOutputSwitchThen


class MainSwitchStepOutput(BaseModel):
    switch: List[MainSwitchStepOutputSwitch]

    kind: Optional[Literal["switch"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainForeachStepOutputForeachDoWaitForInputStepWaitForInput(BaseModel):
    info: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]


class MainForeachStepOutputForeachDoWaitForInputStep(BaseModel):
    wait_for_input: MainForeachStepOutputForeachDoWaitForInputStepWaitForInput

    kind: Optional[Literal["wait_for_input"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainForeachStepOutputForeachDoEvaluateStep(BaseModel):
    evaluate: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]

    kind: Optional[Literal["evaluate"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainForeachStepOutputForeachDoToolCallStep(BaseModel):
    tool: str

    arguments: Union[
        Dict[
            str,
            Union[
                Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                str,
            ],
        ],
        List[
            Dict[
                str,
                Union[
                    Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                    List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                    str,
                ],
            ]
        ],
        Literal["_"],
        None,
    ] = None

    kind: Optional[Literal["tool_call"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1Content(BaseModel):
    text: str

    type: Optional[Literal["text"]] = None


class MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL(
    BaseModel
):
    url: str

    detail: Optional[Literal["low", "high", "auto"]] = None


class MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel(BaseModel):
    image_url: MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL
    """The image URL"""

    type: Optional[Literal["image_url"]] = None


MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1: TypeAlias = Union[
    MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1Content,
    MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel,
]


class MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0(BaseModel):
    content: Union[
        List[str], List[MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0ContentUnionMember1], str
    ]

    role: Literal["user", "assistant", "system", "function", "function_response", "function_call", "auto"]

    continue_: Optional[bool] = FieldInfo(alias="continue", default=None)

    name: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolChoiceNamedToolChoiceFunction(BaseModel):
    name: str


class MainForeachStepOutputForeachDoPromptStepOutputToolChoiceNamedToolChoice(BaseModel):
    function: Optional[MainForeachStepOutputForeachDoPromptStepOutputToolChoiceNamedToolChoiceFunction] = None


MainForeachStepOutputForeachDoPromptStepOutputToolChoice: TypeAlias = Union[
    Literal["auto", "none"], MainForeachStepOutputForeachDoPromptStepOutputToolChoiceNamedToolChoice, None
]


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID(BaseModel):
    id: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName(BaseModel):
    name: Optional[str] = None


MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRef: TypeAlias = Union[
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName,
]


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRef(BaseModel):
    ref: MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRefRef
    """Reference to a tool by id"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall(BaseModel):
    method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"]

    url: str

    content: Optional[str] = None

    cookies: Optional[Dict[str, str]] = None

    data: Optional[object] = None

    follow_redirects: Optional[bool] = None

    headers: Optional[Dict[str, str]] = None

    json_: Optional[object] = FieldInfo(alias="json", default=None)

    params: Union[str, object, None] = None

    schema_: Optional[object] = FieldInfo(alias="schema", default=None)

    timeout: Optional[int] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["bash_20241022"]] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022(BaseModel):
    display_height_px: Optional[int] = None

    display_number: Optional[int] = None

    display_width_px: Optional[int] = None

    name: Optional[str] = None

    type: Optional[Literal["computer_20241022"]] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction(BaseModel):
    description: Optional[object] = None

    name: Optional[object] = None

    parameters: Optional[object] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef(
    BaseModel
):
    arguments: Optional[object] = None

    method: Optional[str] = None

    provider: Optional[Literal["dummy"]] = None

    setup: Optional[object] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments(
    BaseModel
):
    query: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup(
    BaseModel
):
    api_key: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments
    ] = None
    """Arguments for Brave Search"""

    method: Optional[str] = None

    provider: Optional[Literal["brave"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup
    ] = None
    """Integration definition for Brave Search"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments(
    BaseModel
):
    body: str

    from_: str = FieldInfo(alias="from")

    subject: str

    to: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup(
    BaseModel
):
    host: str

    password: str

    port: int

    user: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments
    ] = None
    """Arguments for Email sending"""

    method: Optional[str] = None

    provider: Optional[Literal["email"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup
    ] = None
    """Setup parameters for Email integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments(
    BaseModel
):
    url: str

    mode: Optional[Literal["scrape"]] = None

    params: Optional[object] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup(
    BaseModel
):
    spider_api_key: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments
    ] = None
    """Arguments for Spider integration"""

    method: Optional[str] = None

    provider: Optional[Literal["spider"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup
    ] = None
    """Setup parameters for Spider integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments(
    BaseModel
):
    query: str

    load_max_docs: Optional[int] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments
    ] = None
    """Arguments for Wikipedia Search"""

    method: Optional[str] = None

    provider: Optional[Literal["wikipedia"]] = None

    setup: Optional[object] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments(
    BaseModel
):
    location: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup(
    BaseModel
):
    openweathermap_api_key: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments
    ] = None
    """Arguments for Weather"""

    method: Optional[str] = None

    provider: Optional[Literal["weather"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup
    ] = None
    """Integration definition for Weather"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments(
    BaseModel
):
    project_id: str = FieldInfo(alias="projectId")


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_context"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments(
    BaseModel
):
    repository_name: str = FieldInfo(alias="repositoryName")

    ref: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments
    ] = None

    method: Optional[Literal["install_extension_from_github"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments(
    BaseModel
):
    status: Optional[Literal["RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments
    ] = None

    method: Optional[Literal["list_sessions"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments(
    BaseModel
):
    browser_settings: Optional[object] = FieldInfo(alias="browserSettings", default=None)

    extension_id: Optional[str] = FieldInfo(alias="extensionId", default=None)

    keep_alive: Optional[bool] = FieldInfo(alias="keepAlive", default=None)

    project_id: Optional[str] = FieldInfo(alias="projectId", default=None)

    proxies: Union[bool, List[object], None] = None

    timeout: Optional[int] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments(
    BaseModel
):
    id: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments(
    BaseModel
):
    id: str

    status: Optional[Literal["REQUEST_RELEASE"]] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["complete_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments(
    BaseModel
):
    id: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_live_urls"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments(
    BaseModel
):
    id: str


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_connect_url"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup(
    BaseModel
):
    connect_url: Optional[str] = None

    height: Optional[int] = None

    width: Optional[int] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments(
    BaseModel
):
    action: Literal[
        "key",
        "type",
        "mouse_move",
        "left_click",
        "left_click_drag",
        "right_click",
        "middle_click",
        "double_click",
        "screenshot",
        "cursor_position",
        "navigate",
        "refresh",
    ]

    connect_url: Optional[str] = None

    coordinate: Optional[List[object]] = None

    text: Optional[str] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef(
    BaseModel
):
    setup: MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup
    """The setup parameters for the remote browser"""

    arguments: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments
    ] = None
    """The arguments for the remote browser"""

    method: Optional[Literal["perform_action"]] = None

    provider: Optional[Literal["remote_browser"]] = None


MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration: TypeAlias = Union[
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef,
    None,
]


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem(BaseModel):
    operation: Literal[
        "create",
        "update",
        "patch",
        "create_or_update",
        "embed",
        "change_status",
        "search",
        "chat",
        "history",
        "delete",
        "get",
        "list",
    ]

    resource: Literal["agent", "user", "task", "execution", "doc", "session", "job"]

    arguments: Optional[object] = None

    resource_id: Optional[str] = None

    subresource: Optional[Literal["tool", "doc", "execution", "transition"]] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022(
    BaseModel
):
    name: Optional[str] = None

    type: Optional[Literal["text_editor_20241022"]] = None


class MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutput(BaseModel):
    name: str

    type: Literal[
        "function", "integration", "system", "api_call", "computer_20241022", "text_editor_20241022", "bash_20241022"
    ]

    api_call: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall
    ] = None
    """API call definition"""

    bash_20241022: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022
    ] = None

    computer_20241022: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022
    ] = None
    """Anthropic new tools"""

    description: Optional[str] = None

    function: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction
    ] = None
    """Function definition"""

    integration: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration
    ] = None
    """Brave integration definition"""

    system: Optional[MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem] = (
        None
    )
    """System definition"""

    text_editor_20241022: Optional[
        MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022
    ] = None


MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1: TypeAlias = Union[
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1ToolRef,
    MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1CreateToolRequestOutput,
]


class MainForeachStepOutputForeachDoPromptStepOutput(BaseModel):
    prompt: Union[List[MainForeachStepOutputForeachDoPromptStepOutputPromptUnionMember0], str]

    auto_run_tools: Optional[bool] = None

    disable_cache: Optional[bool] = None

    kind: Optional[Literal["prompt"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None

    settings: Optional[ChatSettings] = None

    tool_choice: Optional[MainForeachStepOutputForeachDoPromptStepOutputToolChoice] = None

    tools: Union[Literal["all"], List[MainForeachStepOutputForeachDoPromptStepOutputToolsUnionMember1], None] = None

    unwrap: Optional[bool] = None


class MainForeachStepOutputForeachDoGetStep(BaseModel):
    get: str

    kind: Optional[Literal["get"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainForeachStepOutputForeachDoSetStep(BaseModel):
    set: Dict[str, str]

    kind: Optional[Literal["set"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainForeachStepOutputForeachDoLogStep(BaseModel):
    log: str

    kind: Optional[Literal["log"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainForeachStepOutputForeachDoYieldStep(BaseModel):
    workflow: str

    arguments: Union[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]], Literal["_"], None] = None

    kind: Optional[Literal["yield"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


MainForeachStepOutputForeachDo: TypeAlias = Union[
    MainForeachStepOutputForeachDoWaitForInputStep,
    MainForeachStepOutputForeachDoEvaluateStep,
    MainForeachStepOutputForeachDoToolCallStep,
    MainForeachStepOutputForeachDoPromptStepOutput,
    MainForeachStepOutputForeachDoGetStep,
    MainForeachStepOutputForeachDoSetStep,
    MainForeachStepOutputForeachDoLogStep,
    MainForeachStepOutputForeachDoYieldStep,
]


class MainForeachStepOutputForeach(BaseModel):
    do: MainForeachStepOutputForeachDo

    in_: str = FieldInfo(alias="in")


class MainForeachStepOutput(BaseModel):
    foreach: MainForeachStepOutputForeach

    kind: Optional[Literal["foreach"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainParallelStepOutputParallelEvaluateStep(BaseModel):
    evaluate: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]

    kind: Optional[Literal["evaluate"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainParallelStepOutputParallelToolCallStep(BaseModel):
    tool: str

    arguments: Union[
        Dict[
            str,
            Union[
                Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                str,
            ],
        ],
        List[
            Dict[
                str,
                Union[
                    Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                    List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                    str,
                ],
            ]
        ],
        Literal["_"],
        None,
    ] = None

    kind: Optional[Literal["tool_call"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1Content(BaseModel):
    text: str

    type: Optional[Literal["text"]] = None


class MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL(
    BaseModel
):
    url: str

    detail: Optional[Literal["low", "high", "auto"]] = None


class MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel(BaseModel):
    image_url: MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL
    """The image URL"""

    type: Optional[Literal["image_url"]] = None


MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1: TypeAlias = Union[
    MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1Content,
    MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel,
]


class MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0(BaseModel):
    content: Union[
        List[str], List[MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0ContentUnionMember1], str
    ]

    role: Literal["user", "assistant", "system", "function", "function_response", "function_call", "auto"]

    continue_: Optional[bool] = FieldInfo(alias="continue", default=None)

    name: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolChoiceNamedToolChoiceFunction(BaseModel):
    name: str


class MainParallelStepOutputParallelPromptStepOutputToolChoiceNamedToolChoice(BaseModel):
    function: Optional[MainParallelStepOutputParallelPromptStepOutputToolChoiceNamedToolChoiceFunction] = None


MainParallelStepOutputParallelPromptStepOutputToolChoice: TypeAlias = Union[
    Literal["auto", "none"], MainParallelStepOutputParallelPromptStepOutputToolChoiceNamedToolChoice, None
]


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID(BaseModel):
    id: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName(BaseModel):
    name: Optional[str] = None


MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRef: TypeAlias = Union[
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName,
]


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRef(BaseModel):
    ref: MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRefRef
    """Reference to a tool by id"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall(BaseModel):
    method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"]

    url: str

    content: Optional[str] = None

    cookies: Optional[Dict[str, str]] = None

    data: Optional[object] = None

    follow_redirects: Optional[bool] = None

    headers: Optional[Dict[str, str]] = None

    json_: Optional[object] = FieldInfo(alias="json", default=None)

    params: Union[str, object, None] = None

    schema_: Optional[object] = FieldInfo(alias="schema", default=None)

    timeout: Optional[int] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["bash_20241022"]] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022(BaseModel):
    display_height_px: Optional[int] = None

    display_number: Optional[int] = None

    display_width_px: Optional[int] = None

    name: Optional[str] = None

    type: Optional[Literal["computer_20241022"]] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction(BaseModel):
    description: Optional[object] = None

    name: Optional[object] = None

    parameters: Optional[object] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef(
    BaseModel
):
    arguments: Optional[object] = None

    method: Optional[str] = None

    provider: Optional[Literal["dummy"]] = None

    setup: Optional[object] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments(
    BaseModel
):
    query: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup(
    BaseModel
):
    api_key: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments
    ] = None
    """Arguments for Brave Search"""

    method: Optional[str] = None

    provider: Optional[Literal["brave"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup
    ] = None
    """Integration definition for Brave Search"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments(
    BaseModel
):
    body: str

    from_: str = FieldInfo(alias="from")

    subject: str

    to: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup(
    BaseModel
):
    host: str

    password: str

    port: int

    user: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments
    ] = None
    """Arguments for Email sending"""

    method: Optional[str] = None

    provider: Optional[Literal["email"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup
    ] = None
    """Setup parameters for Email integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments(
    BaseModel
):
    url: str

    mode: Optional[Literal["scrape"]] = None

    params: Optional[object] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup(
    BaseModel
):
    spider_api_key: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments
    ] = None
    """Arguments for Spider integration"""

    method: Optional[str] = None

    provider: Optional[Literal["spider"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup
    ] = None
    """Setup parameters for Spider integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments(
    BaseModel
):
    query: str

    load_max_docs: Optional[int] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments
    ] = None
    """Arguments for Wikipedia Search"""

    method: Optional[str] = None

    provider: Optional[Literal["wikipedia"]] = None

    setup: Optional[object] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments(
    BaseModel
):
    location: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup(
    BaseModel
):
    openweathermap_api_key: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments
    ] = None
    """Arguments for Weather"""

    method: Optional[str] = None

    provider: Optional[Literal["weather"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup
    ] = None
    """Integration definition for Weather"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments(
    BaseModel
):
    project_id: str = FieldInfo(alias="projectId")


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_context"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments(
    BaseModel
):
    repository_name: str = FieldInfo(alias="repositoryName")

    ref: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments
    ] = None

    method: Optional[Literal["install_extension_from_github"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments(
    BaseModel
):
    status: Optional[Literal["RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments
    ] = None

    method: Optional[Literal["list_sessions"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments(
    BaseModel
):
    browser_settings: Optional[object] = FieldInfo(alias="browserSettings", default=None)

    extension_id: Optional[str] = FieldInfo(alias="extensionId", default=None)

    keep_alive: Optional[bool] = FieldInfo(alias="keepAlive", default=None)

    project_id: Optional[str] = FieldInfo(alias="projectId", default=None)

    proxies: Union[bool, List[object], None] = None

    timeout: Optional[int] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments(
    BaseModel
):
    id: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments(
    BaseModel
):
    id: str

    status: Optional[Literal["REQUEST_RELEASE"]] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["complete_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments(
    BaseModel
):
    id: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_live_urls"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments(
    BaseModel
):
    id: str


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_connect_url"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup(
    BaseModel
):
    connect_url: Optional[str] = None

    height: Optional[int] = None

    width: Optional[int] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments(
    BaseModel
):
    action: Literal[
        "key",
        "type",
        "mouse_move",
        "left_click",
        "left_click_drag",
        "right_click",
        "middle_click",
        "double_click",
        "screenshot",
        "cursor_position",
        "navigate",
        "refresh",
    ]

    connect_url: Optional[str] = None

    coordinate: Optional[List[object]] = None

    text: Optional[str] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef(
    BaseModel
):
    setup: MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup
    """The setup parameters for the remote browser"""

    arguments: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments
    ] = None
    """The arguments for the remote browser"""

    method: Optional[Literal["perform_action"]] = None

    provider: Optional[Literal["remote_browser"]] = None


MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration: TypeAlias = Union[
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef,
    None,
]


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem(BaseModel):
    operation: Literal[
        "create",
        "update",
        "patch",
        "create_or_update",
        "embed",
        "change_status",
        "search",
        "chat",
        "history",
        "delete",
        "get",
        "list",
    ]

    resource: Literal["agent", "user", "task", "execution", "doc", "session", "job"]

    arguments: Optional[object] = None

    resource_id: Optional[str] = None

    subresource: Optional[Literal["tool", "doc", "execution", "transition"]] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022(
    BaseModel
):
    name: Optional[str] = None

    type: Optional[Literal["text_editor_20241022"]] = None


class MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutput(BaseModel):
    name: str

    type: Literal[
        "function", "integration", "system", "api_call", "computer_20241022", "text_editor_20241022", "bash_20241022"
    ]

    api_call: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall
    ] = None
    """API call definition"""

    bash_20241022: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022
    ] = None

    computer_20241022: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022
    ] = None
    """Anthropic new tools"""

    description: Optional[str] = None

    function: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction
    ] = None
    """Function definition"""

    integration: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration
    ] = None
    """Brave integration definition"""

    system: Optional[MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem] = (
        None
    )
    """System definition"""

    text_editor_20241022: Optional[
        MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022
    ] = None


MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1: TypeAlias = Union[
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1ToolRef,
    MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1CreateToolRequestOutput,
]


class MainParallelStepOutputParallelPromptStepOutput(BaseModel):
    prompt: Union[List[MainParallelStepOutputParallelPromptStepOutputPromptUnionMember0], str]

    auto_run_tools: Optional[bool] = None

    disable_cache: Optional[bool] = None

    kind: Optional[Literal["prompt"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None

    settings: Optional[ChatSettings] = None

    tool_choice: Optional[MainParallelStepOutputParallelPromptStepOutputToolChoice] = None

    tools: Union[Literal["all"], List[MainParallelStepOutputParallelPromptStepOutputToolsUnionMember1], None] = None

    unwrap: Optional[bool] = None


class MainParallelStepOutputParallelGetStep(BaseModel):
    get: str

    kind: Optional[Literal["get"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainParallelStepOutputParallelSetStep(BaseModel):
    set: Dict[str, str]

    kind: Optional[Literal["set"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainParallelStepOutputParallelLogStep(BaseModel):
    log: str

    kind: Optional[Literal["log"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainParallelStepOutputParallelYieldStep(BaseModel):
    workflow: str

    arguments: Union[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]], Literal["_"], None] = None

    kind: Optional[Literal["yield"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


MainParallelStepOutputParallel: TypeAlias = Union[
    MainParallelStepOutputParallelEvaluateStep,
    MainParallelStepOutputParallelToolCallStep,
    MainParallelStepOutputParallelPromptStepOutput,
    MainParallelStepOutputParallelGetStep,
    MainParallelStepOutputParallelSetStep,
    MainParallelStepOutputParallelLogStep,
    MainParallelStepOutputParallelYieldStep,
]


class MainParallelStepOutput(BaseModel):
    parallel: List[MainParallelStepOutputParallel]

    kind: Optional[Literal["parallel"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainMainOutputMapEvaluateStep(BaseModel):
    evaluate: Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]

    kind: Optional[Literal["evaluate"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainMainOutputMapToolCallStep(BaseModel):
    tool: str

    arguments: Union[
        Dict[
            str,
            Union[
                Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                str,
            ],
        ],
        List[
            Dict[
                str,
                Union[
                    Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]],
                    List[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]]],
                    str,
                ],
            ]
        ],
        Literal["_"],
        None,
    ] = None

    kind: Optional[Literal["tool_call"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1Content(BaseModel):
    text: str

    type: Optional[Literal["text"]] = None


class MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL(BaseModel):
    url: str

    detail: Optional[Literal["low", "high", "auto"]] = None


class MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel(BaseModel):
    image_url: MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModelImageURL
    """The image URL"""

    type: Optional[Literal["image_url"]] = None


MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1: TypeAlias = Union[
    MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1Content,
    MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1ContentModel,
]


class MainMainOutputMapPromptStepOutputPromptUnionMember0(BaseModel):
    content: Union[List[str], List[MainMainOutputMapPromptStepOutputPromptUnionMember0ContentUnionMember1], str]

    role: Literal["user", "assistant", "system", "function", "function_response", "function_call", "auto"]

    continue_: Optional[bool] = FieldInfo(alias="continue", default=None)

    name: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolChoiceNamedToolChoiceFunction(BaseModel):
    name: str


class MainMainOutputMapPromptStepOutputToolChoiceNamedToolChoice(BaseModel):
    function: Optional[MainMainOutputMapPromptStepOutputToolChoiceNamedToolChoiceFunction] = None


MainMainOutputMapPromptStepOutputToolChoice: TypeAlias = Union[
    Literal["auto", "none"], MainMainOutputMapPromptStepOutputToolChoiceNamedToolChoice, None
]


class MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID(BaseModel):
    id: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName(BaseModel):
    name: Optional[str] = None


MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRef: TypeAlias = Union[
    MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRefToolRefByID,
    MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRefToolRefByName,
]


class MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRef(BaseModel):
    ref: MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRefRef
    """Reference to a tool by id"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall(BaseModel):
    method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"]

    url: str

    content: Optional[str] = None

    cookies: Optional[Dict[str, str]] = None

    data: Optional[object] = None

    follow_redirects: Optional[bool] = None

    headers: Optional[Dict[str, str]] = None

    json_: Optional[object] = FieldInfo(alias="json", default=None)

    params: Union[str, object, None] = None

    schema_: Optional[object] = FieldInfo(alias="schema", default=None)

    timeout: Optional[int] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["bash_20241022"]] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022(BaseModel):
    display_height_px: Optional[int] = None

    display_number: Optional[int] = None

    display_width_px: Optional[int] = None

    name: Optional[str] = None

    type: Optional[Literal["computer_20241022"]] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction(BaseModel):
    description: Optional[object] = None

    name: Optional[object] = None

    parameters: Optional[object] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef(
    BaseModel
):
    arguments: Optional[object] = None

    method: Optional[str] = None

    provider: Optional[Literal["dummy"]] = None

    setup: Optional[object] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments(
    BaseModel
):
    query: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup(
    BaseModel
):
    api_key: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefArguments
    ] = None
    """Arguments for Brave Search"""

    method: Optional[str] = None

    provider: Optional[Literal["brave"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDefSetup
    ] = None
    """Integration definition for Brave Search"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments(
    BaseModel
):
    body: str

    from_: str = FieldInfo(alias="from")

    subject: str

    to: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup(
    BaseModel
):
    host: str

    password: str

    port: int

    user: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefArguments
    ] = None
    """Arguments for Email sending"""

    method: Optional[str] = None

    provider: Optional[Literal["email"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDefSetup
    ] = None
    """Setup parameters for Email integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments(
    BaseModel
):
    url: str

    mode: Optional[Literal["scrape"]] = None

    params: Optional[object] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup(
    BaseModel
):
    spider_api_key: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefArguments
    ] = None
    """Arguments for Spider integration"""

    method: Optional[str] = None

    provider: Optional[Literal["spider"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDefSetup
    ] = None
    """Setup parameters for Spider integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments(
    BaseModel
):
    query: str

    load_max_docs: Optional[int] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDefArguments
    ] = None
    """Arguments for Wikipedia Search"""

    method: Optional[str] = None

    provider: Optional[Literal["wikipedia"]] = None

    setup: Optional[object] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments(
    BaseModel
):
    location: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup(
    BaseModel
):
    openweathermap_api_key: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefArguments
    ] = None
    """Arguments for Weather"""

    method: Optional[str] = None

    provider: Optional[Literal["weather"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDefSetup
    ] = None
    """Integration definition for Weather"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments(
    BaseModel
):
    project_id: str = FieldInfo(alias="projectId")


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_context"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments(
    BaseModel
):
    repository_name: str = FieldInfo(alias="repositoryName")

    ref: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefArguments
    ] = None

    method: Optional[Literal["install_extension_from_github"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments(
    BaseModel
):
    status: Optional[Literal["RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefArguments
    ] = None

    method: Optional[Literal["list_sessions"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments(
    BaseModel
):
    browser_settings: Optional[object] = FieldInfo(alias="browserSettings", default=None)

    extension_id: Optional[str] = FieldInfo(alias="extensionId", default=None)

    keep_alive: Optional[bool] = FieldInfo(alias="keepAlive", default=None)

    project_id: Optional[str] = FieldInfo(alias="projectId", default=None)

    proxies: Union[bool, List[object], None] = None

    timeout: Optional[int] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["create_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments(
    BaseModel
):
    id: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments(
    BaseModel
):
    id: str

    status: Optional[Literal["REQUEST_RELEASE"]] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefArguments
    ] = None

    method: Optional[Literal["complete_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments(
    BaseModel
):
    id: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_live_urls"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments(
    BaseModel
):
    id: str


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup(
    BaseModel
):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef(
    BaseModel
):
    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments
    ] = None

    method: Optional[Literal["get_connect_url"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup
    ] = None
    """The setup parameters for the browserbase integration"""


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup(
    BaseModel
):
    connect_url: Optional[str] = None

    height: Optional[int] = None

    width: Optional[int] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments(
    BaseModel
):
    action: Literal[
        "key",
        "type",
        "mouse_move",
        "left_click",
        "left_click_drag",
        "right_click",
        "middle_click",
        "double_click",
        "screenshot",
        "cursor_position",
        "navigate",
        "refresh",
    ]

    connect_url: Optional[str] = None

    coordinate: Optional[List[object]] = None

    text: Optional[str] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef(
    BaseModel
):
    setup: MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefSetup
    """The setup parameters for the remote browser"""

    arguments: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDefArguments
    ] = None
    """The arguments for the remote browser"""

    method: Optional[Literal["perform_action"]] = None

    provider: Optional[Literal["remote_browser"]] = None


MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration: TypeAlias = Union[
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationDummyIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBraveIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationEmailIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationSpiderIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWikipediaIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationWeatherIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseContextIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseExtensionIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseListSessionsIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCreateSessionIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseCompleteSessionIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationBrowserbaseGetSessionConnectURLIntegrationDef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegrationRemoteBrowserIntegrationDef,
    None,
]


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem(BaseModel):
    operation: Literal[
        "create",
        "update",
        "patch",
        "create_or_update",
        "embed",
        "change_status",
        "search",
        "chat",
        "history",
        "delete",
        "get",
        "list",
    ]

    resource: Literal["agent", "user", "task", "execution", "doc", "session", "job"]

    arguments: Optional[object] = None

    resource_id: Optional[str] = None

    subresource: Optional[Literal["tool", "doc", "execution", "transition"]] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["text_editor_20241022"]] = None


class MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutput(BaseModel):
    name: str

    type: Literal[
        "function", "integration", "system", "api_call", "computer_20241022", "text_editor_20241022", "bash_20241022"
    ]

    api_call: Optional[MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputAPICall] = None
    """API call definition"""

    bash_20241022: Optional[MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputBash20241022] = (
        None
    )

    computer_20241022: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputComputer20241022
    ] = None
    """Anthropic new tools"""

    description: Optional[str] = None

    function: Optional[MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputFunction] = None
    """Function definition"""

    integration: Optional[MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputIntegration] = None
    """Brave integration definition"""

    system: Optional[MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputSystem] = None
    """System definition"""

    text_editor_20241022: Optional[
        MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutputTextEditor20241022
    ] = None


MainMainOutputMapPromptStepOutputToolsUnionMember1: TypeAlias = Union[
    MainMainOutputMapPromptStepOutputToolsUnionMember1ToolRef,
    MainMainOutputMapPromptStepOutputToolsUnionMember1CreateToolRequestOutput,
]


class MainMainOutputMapPromptStepOutput(BaseModel):
    prompt: Union[List[MainMainOutputMapPromptStepOutputPromptUnionMember0], str]

    auto_run_tools: Optional[bool] = None

    disable_cache: Optional[bool] = None

    kind: Optional[Literal["prompt"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None

    settings: Optional[ChatSettings] = None

    tool_choice: Optional[MainMainOutputMapPromptStepOutputToolChoice] = None

    tools: Union[Literal["all"], List[MainMainOutputMapPromptStepOutputToolsUnionMember1], None] = None

    unwrap: Optional[bool] = None


class MainMainOutputMapGetStep(BaseModel):
    get: str

    kind: Optional[Literal["get"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainMainOutputMapSetStep(BaseModel):
    set: Dict[str, str]

    kind: Optional[Literal["set"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainMainOutputMapLogStep(BaseModel):
    log: str

    kind: Optional[Literal["log"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


class MainMainOutputMapYieldStep(BaseModel):
    workflow: str

    arguments: Union[Dict[str, Union[List[str], Dict[str, str], List[Dict[str, str]], str]], Literal["_"], None] = None

    kind: Optional[Literal["yield"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None


MainMainOutputMap: TypeAlias = Union[
    MainMainOutputMapEvaluateStep,
    MainMainOutputMapToolCallStep,
    MainMainOutputMapPromptStepOutput,
    MainMainOutputMapGetStep,
    MainMainOutputMapSetStep,
    MainMainOutputMapLogStep,
    MainMainOutputMapYieldStep,
]


class MainMainOutput(BaseModel):
    map: MainMainOutputMap

    over: str

    initial: Optional[object] = None

    kind: Optional[Literal["map_reduce"]] = FieldInfo(alias="kind_", default=None)

    label: Optional[str] = None

    parallelism: Optional[int] = None

    reduce: Optional[str] = None


Main: TypeAlias = Union[
    MainEvaluateStep,
    MainToolCallStep,
    MainPromptStepOutput,
    MainGetStep,
    MainSetStep,
    MainLogStep,
    MainYieldStep,
    MainReturnStep,
    MainSleepStep,
    MainErrorWorkflowStep,
    MainWaitForInputStep,
    MainIfElseWorkflowStepOutput,
    MainSwitchStepOutput,
    MainForeachStepOutput,
    MainParallelStepOutput,
    MainMainOutput,
]


class ToolAPICall(BaseModel):
    method: Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE"]

    url: str

    content: Optional[str] = None

    cookies: Optional[Dict[str, str]] = None

    data: Optional[object] = None

    follow_redirects: Optional[bool] = None

    headers: Optional[Dict[str, str]] = None

    json_: Optional[object] = FieldInfo(alias="json", default=None)

    params: Union[str, object, None] = None

    schema_: Optional[object] = FieldInfo(alias="schema", default=None)

    timeout: Optional[int] = None


class ToolBash20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["bash_20241022"]] = None


class ToolComputer20241022(BaseModel):
    display_height_px: Optional[int] = None

    display_number: Optional[int] = None

    display_width_px: Optional[int] = None

    name: Optional[str] = None

    type: Optional[Literal["computer_20241022"]] = None


class ToolFunction(BaseModel):
    description: Optional[object] = None

    name: Optional[object] = None

    parameters: Optional[object] = None


class ToolIntegrationDummyIntegrationDef(BaseModel):
    arguments: Optional[object] = None

    method: Optional[str] = None

    provider: Optional[Literal["dummy"]] = None

    setup: Optional[object] = None


class ToolIntegrationBraveIntegrationDefArguments(BaseModel):
    query: str


class ToolIntegrationBraveIntegrationDefSetup(BaseModel):
    api_key: str


class ToolIntegrationBraveIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBraveIntegrationDefArguments] = None
    """Arguments for Brave Search"""

    method: Optional[str] = None

    provider: Optional[Literal["brave"]] = None

    setup: Optional[ToolIntegrationBraveIntegrationDefSetup] = None
    """Integration definition for Brave Search"""


class ToolIntegrationEmailIntegrationDefArguments(BaseModel):
    body: str

    from_: str = FieldInfo(alias="from")

    subject: str

    to: str


class ToolIntegrationEmailIntegrationDefSetup(BaseModel):
    host: str

    password: str

    port: int

    user: str


class ToolIntegrationEmailIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationEmailIntegrationDefArguments] = None
    """Arguments for Email sending"""

    method: Optional[str] = None

    provider: Optional[Literal["email"]] = None

    setup: Optional[ToolIntegrationEmailIntegrationDefSetup] = None
    """Setup parameters for Email integration"""


class ToolIntegrationSpiderIntegrationDefArguments(BaseModel):
    url: str

    mode: Optional[Literal["scrape"]] = None

    params: Optional[object] = None


class ToolIntegrationSpiderIntegrationDefSetup(BaseModel):
    spider_api_key: str


class ToolIntegrationSpiderIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationSpiderIntegrationDefArguments] = None
    """Arguments for Spider integration"""

    method: Optional[str] = None

    provider: Optional[Literal["spider"]] = None

    setup: Optional[ToolIntegrationSpiderIntegrationDefSetup] = None
    """Setup parameters for Spider integration"""


class ToolIntegrationWikipediaIntegrationDefArguments(BaseModel):
    query: str

    load_max_docs: Optional[int] = None


class ToolIntegrationWikipediaIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationWikipediaIntegrationDefArguments] = None
    """Arguments for Wikipedia Search"""

    method: Optional[str] = None

    provider: Optional[Literal["wikipedia"]] = None

    setup: Optional[object] = None


class ToolIntegrationWeatherIntegrationDefArguments(BaseModel):
    location: str


class ToolIntegrationWeatherIntegrationDefSetup(BaseModel):
    openweathermap_api_key: str


class ToolIntegrationWeatherIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationWeatherIntegrationDefArguments] = None
    """Arguments for Weather"""

    method: Optional[str] = None

    provider: Optional[Literal["weather"]] = None

    setup: Optional[ToolIntegrationWeatherIntegrationDefSetup] = None
    """Integration definition for Weather"""


class ToolIntegrationBrowserbaseContextIntegrationDefArguments(BaseModel):
    project_id: str = FieldInfo(alias="projectId")


class ToolIntegrationBrowserbaseContextIntegrationDefSetup(BaseModel):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class ToolIntegrationBrowserbaseContextIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBrowserbaseContextIntegrationDefArguments] = None

    method: Optional[Literal["create_context"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[ToolIntegrationBrowserbaseContextIntegrationDefSetup] = None
    """The setup parameters for the browserbase integration"""


class ToolIntegrationBrowserbaseExtensionIntegrationDefArguments(BaseModel):
    repository_name: str = FieldInfo(alias="repositoryName")

    ref: Optional[str] = None


class ToolIntegrationBrowserbaseExtensionIntegrationDefSetup(BaseModel):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class ToolIntegrationBrowserbaseExtensionIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBrowserbaseExtensionIntegrationDefArguments] = None

    method: Optional[Literal["install_extension_from_github"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[ToolIntegrationBrowserbaseExtensionIntegrationDefSetup] = None
    """The setup parameters for the browserbase integration"""


class ToolIntegrationBrowserbaseListSessionsIntegrationDefArguments(BaseModel):
    status: Optional[Literal["RUNNING", "ERROR", "TIMED_OUT", "COMPLETED"]] = None


class ToolIntegrationBrowserbaseListSessionsIntegrationDefSetup(BaseModel):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class ToolIntegrationBrowserbaseListSessionsIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBrowserbaseListSessionsIntegrationDefArguments] = None

    method: Optional[Literal["list_sessions"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[ToolIntegrationBrowserbaseListSessionsIntegrationDefSetup] = None
    """The setup parameters for the browserbase integration"""


class ToolIntegrationBrowserbaseCreateSessionIntegrationDefArguments(BaseModel):
    browser_settings: Optional[object] = FieldInfo(alias="browserSettings", default=None)

    extension_id: Optional[str] = FieldInfo(alias="extensionId", default=None)

    keep_alive: Optional[bool] = FieldInfo(alias="keepAlive", default=None)

    project_id: Optional[str] = FieldInfo(alias="projectId", default=None)

    proxies: Union[bool, List[object], None] = None

    timeout: Optional[int] = None


class ToolIntegrationBrowserbaseCreateSessionIntegrationDefSetup(BaseModel):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class ToolIntegrationBrowserbaseCreateSessionIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBrowserbaseCreateSessionIntegrationDefArguments] = None

    method: Optional[Literal["create_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[ToolIntegrationBrowserbaseCreateSessionIntegrationDefSetup] = None
    """The setup parameters for the browserbase integration"""


class ToolIntegrationBrowserbaseGetSessionIntegrationDefArguments(BaseModel):
    id: str


class ToolIntegrationBrowserbaseGetSessionIntegrationDefSetup(BaseModel):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class ToolIntegrationBrowserbaseGetSessionIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBrowserbaseGetSessionIntegrationDefArguments] = None

    method: Optional[Literal["get_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[ToolIntegrationBrowserbaseGetSessionIntegrationDefSetup] = None
    """The setup parameters for the browserbase integration"""


class ToolIntegrationBrowserbaseCompleteSessionIntegrationDefArguments(BaseModel):
    id: str

    status: Optional[Literal["REQUEST_RELEASE"]] = None


class ToolIntegrationBrowserbaseCompleteSessionIntegrationDefSetup(BaseModel):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class ToolIntegrationBrowserbaseCompleteSessionIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBrowserbaseCompleteSessionIntegrationDefArguments] = None

    method: Optional[Literal["complete_session"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[ToolIntegrationBrowserbaseCompleteSessionIntegrationDefSetup] = None
    """The setup parameters for the browserbase integration"""


class ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments(BaseModel):
    id: str


class ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup(BaseModel):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefArguments] = None

    method: Optional[Literal["get_live_urls"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDefSetup] = None
    """The setup parameters for the browserbase integration"""


class ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments(BaseModel):
    id: str


class ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup(BaseModel):
    api_key: str

    project_id: str

    api_url: Optional[str] = None

    connect_url: Optional[str] = None


class ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDef(BaseModel):
    arguments: Optional[ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDefArguments] = None

    method: Optional[Literal["get_connect_url"]] = None

    provider: Optional[Literal["browserbase"]] = None

    setup: Optional[ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDefSetup] = None
    """The setup parameters for the browserbase integration"""


class ToolIntegrationRemoteBrowserIntegrationDefSetup(BaseModel):
    connect_url: Optional[str] = None

    height: Optional[int] = None

    width: Optional[int] = None


class ToolIntegrationRemoteBrowserIntegrationDefArguments(BaseModel):
    action: Literal[
        "key",
        "type",
        "mouse_move",
        "left_click",
        "left_click_drag",
        "right_click",
        "middle_click",
        "double_click",
        "screenshot",
        "cursor_position",
        "navigate",
        "refresh",
    ]

    connect_url: Optional[str] = None

    coordinate: Optional[List[object]] = None

    text: Optional[str] = None


class ToolIntegrationRemoteBrowserIntegrationDef(BaseModel):
    setup: ToolIntegrationRemoteBrowserIntegrationDefSetup
    """The setup parameters for the remote browser"""

    arguments: Optional[ToolIntegrationRemoteBrowserIntegrationDefArguments] = None
    """The arguments for the remote browser"""

    method: Optional[Literal["perform_action"]] = None

    provider: Optional[Literal["remote_browser"]] = None


ToolIntegration: TypeAlias = Union[
    ToolIntegrationDummyIntegrationDef,
    ToolIntegrationBraveIntegrationDef,
    ToolIntegrationEmailIntegrationDef,
    ToolIntegrationSpiderIntegrationDef,
    ToolIntegrationWikipediaIntegrationDef,
    ToolIntegrationWeatherIntegrationDef,
    ToolIntegrationBrowserbaseContextIntegrationDef,
    ToolIntegrationBrowserbaseExtensionIntegrationDef,
    ToolIntegrationBrowserbaseListSessionsIntegrationDef,
    ToolIntegrationBrowserbaseCreateSessionIntegrationDef,
    ToolIntegrationBrowserbaseGetSessionIntegrationDef,
    ToolIntegrationBrowserbaseCompleteSessionIntegrationDef,
    ToolIntegrationBrowserbaseGetSessionLiveURLsIntegrationDef,
    ToolIntegrationBrowserbaseGetSessionConnectURLIntegrationDef,
    ToolIntegrationRemoteBrowserIntegrationDef,
    None,
]


class ToolSystem(BaseModel):
    operation: Literal[
        "create",
        "update",
        "patch",
        "create_or_update",
        "embed",
        "change_status",
        "search",
        "chat",
        "history",
        "delete",
        "get",
        "list",
    ]

    resource: Literal["agent", "user", "task", "execution", "doc", "session", "job"]

    arguments: Optional[object] = None

    resource_id: Optional[str] = None

    subresource: Optional[Literal["tool", "doc", "execution", "transition"]] = None


class ToolTextEditor20241022(BaseModel):
    name: Optional[str] = None

    type: Optional[Literal["text_editor_20241022"]] = None


class Tool(BaseModel):
    name: str

    type: Literal[
        "function", "integration", "system", "api_call", "computer_20241022", "text_editor_20241022", "bash_20241022"
    ]

    api_call: Optional[ToolAPICall] = None
    """API call definition"""

    bash_20241022: Optional[ToolBash20241022] = None

    computer_20241022: Optional[ToolComputer20241022] = None
    """Anthropic new tools"""

    description: Optional[str] = None

    function: Optional[ToolFunction] = None
    """Function definition"""

    inherited: Optional[bool] = None

    integration: Optional[ToolIntegration] = None
    """Brave integration definition"""

    system: Optional[ToolSystem] = None
    """System definition"""

    text_editor_20241022: Optional[ToolTextEditor20241022] = None


class Task(BaseModel):
    id: str

    created_at: datetime

    main: List[Main]

    name: str

    updated_at: datetime

    description: Optional[str] = None

    inherit_tools: Optional[bool] = None

    input_schema: Optional[object] = None

    metadata: Optional[object] = None

    tools: Optional[List[Tool]] = None

    if TYPE_CHECKING:
        # Stub to indicate that arbitrary properties are accepted.
        # To access properties that are not valid identifiers you can use `getattr`, e.g.
        # `getattr(obj, '$type')`
        def __getattr__(self, attr: str) -> object: ...
