-
Notifications
You must be signed in to change notification settings - Fork 27
feat(agent): add tool-output and V2 escalation recipient types [ACTN-10480] #1667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,18 +22,35 @@ class TaskRecipientType(str, enum.Enum): | |
| GROUP_ID = "GroupId" | ||
| EMAIL = "UserEmail" | ||
| GROUP_NAME = "GroupName" | ||
| WORKLOAD = "Workload" | ||
| ROUND_ROBIN = "RoundRobin" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should CustomAssignments be required as an option here?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Intentionally omitted: |
||
|
|
||
|
|
||
| class TaskRecipient(BaseModel): | ||
| """Model representing a task recipient.""" | ||
| """Model representing a task recipient. | ||
|
|
||
| `value` is the single identifier (group name, group id, user id, email, …). | ||
| `values` is the multi-assignee form used by Workload-with-custom-emails | ||
| assignments; when set it takes precedence over `value` for the | ||
| `assigneeNamesOrEmails` payload. | ||
|
|
||
| Note: there is no CustomAssignees member here on purpose. The agent-side | ||
| CustomAssignees criteria (AgentEscalationRecipientType.CUSTOM_ASSIGNEES, | ||
| type 11) is resolved to a Workload assignment with the explicit email list | ||
| in `values` before reaching this layer, so the Action Center | ||
| AssignTasks API only ever sees the existing literal types. | ||
| """ | ||
|
|
||
| type: Literal[ | ||
| TaskRecipientType.USER_ID, | ||
| TaskRecipientType.GROUP_ID, | ||
| TaskRecipientType.EMAIL, | ||
| TaskRecipientType.GROUP_NAME, | ||
| TaskRecipientType.WORKLOAD, | ||
| TaskRecipientType.ROUND_ROBIN, | ||
| ] = Field(..., alias="type") | ||
| value: str = Field(..., alias="value") | ||
| values: Optional[List[str]] = Field(default=None, alias="values") | ||
| display_name: Optional[str] = Field(default=None, alias="displayName") | ||
|
|
||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT - Can clarify here that even custom assignments will follow this criteria
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call — added an inline comment in the
WORKLOADbranch of_assign_task_specclarifying that this branch handles both agent-Workloadrecipients and agent-CustomAssignees(which map toWorkloadserver-side).