LibreChat/packages
Marco Beretta 13b62283fc 📐 refactor: Normalize Stream Events Behind a ChatTransport Type (#16335)
* refactor: normalize stream events behind a ChatTransport type

Add the ChatTransport interface and a ChatEvent union discriminated by
type, covering every frame the client handles today: the created, sync
and final control frames, the step and side-channel { event, data }
frames, legacy content and text frames, attachments, errors, open and
abort. Types only; nothing consumes them yet.

* fix: type the stream frames the server actually sends

Assistants final frames carry a partial requestMessage, aborts can send
title: null, Assistants content frames omit userMessageId, and the error
event body can be a bare string or { error, generationProtocolVersion }.
Widen the frame types to admit each.

* fix: admit the remaining step, attachment and error payloads

on_agent_update also carries a { runId, message } status line when
sequential outputs are hidden, on_run_step_completed can arrive without
a result, a published run artifact is a plain TFile, and sendError marks
its body with error: true. The frame types now admit each.

(cherry picked from commit 2f8a207317)

Original-PR: https://github.com/LibreChat-AI/LibreChat/pull/16335
2026-10-01 03:46:17 +00:00
..
api 🖼️ fix: Paint the Shared Link Tenant's Deployment Theme (#16333) 2026-10-01 03:46:17 +00:00
client 🎨 feat: Theme the Shared Code Block With surface-code and a New surface-code-body Role (#16334) 2026-10-01 03:46:17 +00:00
data-provider 📐 refactor: Normalize Stream Events Behind a ChatTransport Type (#16335) 2026-10-01 03:46:17 +00:00
data-schemas 🔑 fix: Invalidate the Auth User Cache After a CLI Password Reset (#16257) 2026-10-01 03:46:17 +00:00