mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-19 08:50:58 +00:00
feat(agent-platform): show bot route runtime status
This commit is contained in:
@@ -274,6 +274,38 @@ export interface BotRouteDryRunResult {
|
||||
matched_binding_index?: number | null;
|
||||
}
|
||||
|
||||
export interface BotEventRouteStatus {
|
||||
binding_id?: string | null;
|
||||
event_pattern?: string | null;
|
||||
event_type?: string | null;
|
||||
target_type?: EventBinding['target_type'] | string | null;
|
||||
target_uuid?: string | null;
|
||||
last_status?:
|
||||
| 'matched'
|
||||
| 'delivered'
|
||||
| 'discarded'
|
||||
| 'failed'
|
||||
| 'not_matched'
|
||||
| string
|
||||
| null;
|
||||
failure_code?: string | null;
|
||||
reason?: string | null;
|
||||
run_id?: string | null;
|
||||
timestamp?: number | null;
|
||||
seq_id?: number | null;
|
||||
level?: string | null;
|
||||
message?: string | null;
|
||||
order?: number | null;
|
||||
enabled?: boolean;
|
||||
current?: boolean;
|
||||
}
|
||||
|
||||
export interface BotEventRouteStatusResponse {
|
||||
routes: BotEventRouteStatus[];
|
||||
unmatched_events: BotEventRouteStatus[];
|
||||
stale_routes: BotEventRouteStatus[];
|
||||
}
|
||||
|
||||
export interface ApiRespKnowledgeBases {
|
||||
bases: KnowledgeBase[];
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ import {
|
||||
ApiRespSkill,
|
||||
BotRouteDryRunRequest,
|
||||
BotRouteDryRunResult,
|
||||
BotEventRouteStatusResponse,
|
||||
} from '@/app/infra/entities/api';
|
||||
import { Plugin } from '@/app/infra/entities/plugin';
|
||||
import type { PluginLogEntry } from '@/app/infra/entities/plugin';
|
||||
@@ -466,6 +467,12 @@ export class BackendClient extends BaseHttpClient {
|
||||
);
|
||||
}
|
||||
|
||||
public getBotEventRouteStatuses(
|
||||
botId: string,
|
||||
): Promise<BotEventRouteStatusResponse> {
|
||||
return this.get(`/api/v1/platform/bots/${botId}/event-routes/status`);
|
||||
}
|
||||
|
||||
public deleteBot(uuid: string): Promise<object> {
|
||||
return this.delete(`/api/v1/platform/bots/${uuid}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user