feat: add agent websocket endpoint (#142)

This commit is contained in:
2026-06-17 23:19:45 +01:00
committed by GitHub
parent e1c58cdf28
commit 227f196d5e
12 changed files with 714 additions and 12 deletions

View File

@@ -0,0 +1,21 @@
export interface SendMessageResult {
message: string
conversationId: string
}
export type AgentEvent =
| { type: "conversation_started"; conversationId: string }
| { type: "message_created"; text: string }
| { type: "tool_started"; toolName: string }
| { type: "tool_finished"; toolName: string; ok: boolean }
| { type: "message_finished" }
| { type: "message_failed"; error: string }
export interface AgentServerApi {
sendMessage(message: string): Promise<SendMessageResult>
ping(): "pong"
}
export interface AgentClientApi {
notify(event: AgentEvent): void
}