fix(core): patch bug w/ sleeptime agents and client-side tool executions [LET-6081] (#6001)

* fix(core): patch bug w/ sleeptime agents and client-side tool executions

* fix: add groupid to approvalcreate

* chore: just stage-api && just publish-api
This commit is contained in:
Charles Packer
2025-11-06 10:47:36 -08:00
committed by Caren Thomas
parent 849d0dc64a
commit 4b371dd6fb
3 changed files with 16 additions and 0 deletions

View File

@@ -19233,6 +19233,18 @@
"title": "Reason",
"description": "An optional explanation for the provided approval status",
"deprecated": true
},
"group_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Group Id",
"description": "The multi-agent group that the message was sent in"
}
},
"type": "object",

View File

@@ -134,6 +134,7 @@ class ApprovalCreate(MessageCreateBase):
approve: Optional[bool] = Field(None, description="Whether the tool has been approved", deprecated=True)
approval_request_id: Optional[str] = Field(None, description="The message ID of the approval request", deprecated=True)
reason: Optional[str] = Field(None, description="An optional explanation for the provided approval status", deprecated=True)
group_id: Optional[str] = Field(default=None, description="The multi-agent group that the message was sent in")
@model_validator(mode="after")
def migrate_deprecated_fields(self):

View File

@@ -196,6 +196,9 @@ def create_approval_response_message_from_input(
denial_reason=input_message.reason,
approvals=[maybe_convert_tool_return_message(approval) for approval in input_message.approvals],
run_id=run_id,
group_id=input_message.group_id
if input_message.group_id
else (agent_state.multi_agent_group.id if agent_state.multi_agent_group else None),
)
]