Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/uipath/agent/models/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ class AgentEscalationRecipientType(str, CaseInsensitiveEnum):
ASSET_USER_EMAIL = "AssetUserEmail"
GROUP_NAME = "GroupName"
ASSET_GROUP_NAME = "AssetGroupName"
ARGUMENT_EMAIL = "ArgumentEmail"
ARGUMENT_GROUP_NAME = "ArgumentGroupName"


class AgentContextRetrievalMode(str, CaseInsensitiveEnum):
Expand Down Expand Up @@ -429,6 +431,8 @@ class AgentMcpResourceConfig(BaseAgentResourceConfig):
5: AgentEscalationRecipientType.GROUP_NAME,
"staticgroupname": AgentEscalationRecipientType.GROUP_NAME,
6: AgentEscalationRecipientType.ASSET_GROUP_NAME,
7: AgentEscalationRecipientType.ARGUMENT_EMAIL,
8: AgentEscalationRecipientType.ARGUMENT_GROUP_NAME,
}


Expand Down Expand Up @@ -484,8 +488,26 @@ class AssetRecipient(BaseEscalationRecipient):
folder_path: str = Field(..., alias="folderPath")


class ArgumentEmailRecipient(BaseEscalationRecipient):
"""Argument email recipient resolved from a named input argument."""

type: Literal[
AgentEscalationRecipientType.ARGUMENT_EMAIL,
] = Field(..., alias="type")
argument_name: str = Field(..., alias="argumentName")


class ArgumentGroupNameRecipient(BaseEscalationRecipient):
"""Argument group name recipient resolved from a named input argument."""

type: Literal[
AgentEscalationRecipientType.ARGUMENT_GROUP_NAME,
] = Field(..., alias="type")
argument_name: str = Field(..., alias="argumentName")


AgentEscalationRecipient = Annotated[
Union[StandardRecipient, AssetRecipient],
Union[StandardRecipient, AssetRecipient, ArgumentEmailRecipient, ArgumentGroupNameRecipient],
Field(discriminator="type"),
BeforeValidator(_normalize_recipient_type),
]
Expand Down