feat(agent): add event debugging and streamline configuration

This commit is contained in:
huanghuoguoguo
2026-08-23 20:32:51 +08:00
parent 5170e2e2f3
commit 0fbb1f897e
13 changed files with 1035 additions and 228 deletions
@@ -47,6 +47,24 @@ class AgentsRouterGroup(group.RouterGroup):
async def _(request_context: RequestContext) -> str:
return self.success(data=await self.ap.agent_service.get_agent_metadata(request_context))
@self.route(
'/<agent_uuid>/debug',
methods=['POST'],
auth_type=group.AuthType.USER_TOKEN_OR_API_KEY,
permission=Permission.RUNTIME_OPERATE,
)
async def _(agent_uuid: str, request_context: RequestContext) -> str:
json_data = await quart.request.json
try:
result = await self.ap.agent_service.debug_agent(
request_context,
agent_uuid,
json_data or {},
)
except ValueError as exc:
return self.http_status(400, -1, str(exc))
return self.success(data=result)
@self.route(
'/<agent_uuid>',
methods=['GET', 'PUT', 'DELETE'],