feat(agent-platform): productize bot event route testing

This commit is contained in:
huanghuoguoguo
2026-07-19 22:44:08 +08:00
parent 4cbb9415bf
commit 00fb6f8236
17 changed files with 1313 additions and 376 deletions
+23
View File
@@ -113,6 +113,29 @@ class LangBotMCPServer:
await ap.bot_service.delete_bot(bot_uuid)
return _dump({'ok': True})
@mcp.tool(description='List recent runtime route status for a bot event route table.')
async def list_bot_event_route_statuses(bot_uuid: str) -> str:
return _dump(await ap.bot_service.list_event_route_statuses(bot_uuid))
@mcp.tool(
description=(
'Dispatch a synthetic event through the saved bot event routes. '
'This validates routing without sending real outbound platform messages.'
)
)
async def test_bot_event_route(
bot_uuid: str,
event_type: str,
payload: dict | None = None,
) -> str:
return _dump(
await ap.bot_service.dispatch_test_event_route(
bot_uuid=bot_uuid,
event_type=event_type,
payload=payload,
)
)
# ----- Pipelines ----------------------------------------------- #
@mcp.tool(description='List all pipelines.')
async def list_pipelines() -> str: