fix(a2a): conductor bridge parses the hub's real SSE wire format (id/type in frame, data={ts,payload})

This commit is contained in:
diegosouzapw
2026-07-22 00:25:35 -03:00
parent 00e15af622
commit a75295f359
2 changed files with 12 additions and 10 deletions

View File

@@ -24,8 +24,10 @@ test.afterEach(async () => {
}
});
// Formato REAL do SSE do hub (verificado ao vivo 2026-07-22): id/type nos campos do
// frame; o `data:` carrega só {ts, payload}.
const sse = (id: number, type: string, payload: Record<string, unknown>) =>
`id: ${id}\nevent: ${type}\ndata: ${JSON.stringify({ id: String(id), type, ts: "2026-07-22T00:00:00Z", payload })}\n\n`;
`id: ${id}\nevent: ${type}\ndata: ${JSON.stringify({ ts: "2026-07-22T00:00:00Z", payload })}\n\n`;
interface FakeHub {
url: string;