feat: decline pending action

This commit is contained in:
2026-05-05 20:14:06 -04:00
parent 761eda6155
commit 36c91ce500
5 changed files with 69 additions and 1 deletions
+14
View File
@@ -241,6 +241,20 @@ class ToolRegistry:
return {"error": f"Pending action not found: {action_id}"}
return await self.uex.post(action.endpoint, action.payload, authenticated=True)
async def decline(self, action_id: str) -> dict[str, Any]:
action = self.pending_actions.pop(action_id, None)
if not action:
return {"error": f"Pending action not found: {action_id}"}
return {
"declined": True,
"pending_action": {
"id": action.id,
"label": action.label,
"endpoint": action.endpoint,
"payload": action.payload,
},
}
async def search_marketplace_listings(
self,
query: str | None = None,