MentorSseEndpoint class
The MentorSseEndpoint class of Novior.MentorAgent.Server.Endpoints: Server-Sent Events (SSE) endpoint for clients that prefer HTTP streaming over SignalR…
On this page
Server-Sent Events (SSE) endpoint for clients that prefer HTTP streaming over SignalR (React, Vue, curl, Axios, etc.). GET /mentor/chat?message=hello — text-only POST /mentor/chat { "message": "...", — text + image attachments (roadmap #13); "attachments": [ … ] } a base64 image never fits in a query string. Response format: text/event-stream data: {"type":"chunk","text":"Hello","aiGenerated":true} data: {"type":"cards","cards":[…]} data: {"type":"navigation","url":"/orders"} data: {"type":"confirmationRequired","actionId":"…","tool":"…","message":"…"} data: {"type":"completed","aiGenerated":true} data: {"type":"error","message":"..."}
Every frame beyond chunk/completed/error is additive: a client that does not know a type ignores it and still receives the whole answer as text. That is what lets the protocol grow without breaking the three-frame clients the README has always shown.
Definition
Section titled “Definition”Namespace: Novior.MentorAgent.Server.Endpoints. Package: Novior.MentorAgent.Server.
public static class MentorSseEndpoint
dotnet add package Novior.MentorAgent.ServerMethods
Section titled “Methods”HandleAsync
Section titled “HandleAsync”public static Task HandleAsync(HttpContext ctx)
GET /mentor/chat?message=…&language=… — text-only streaming.
HandlePostAsync
Section titled “HandlePostAsync”public static Task HandlePostAsync(HttpContext ctx)
POST /mentor/chat — streaming with optional image attachments (#13).
