Skip to content

SseHooks

Defined in: core/src/transport.ts:35

optional finished?: () => boolean;

Defined in: core/src/transport.ts:53

Whether the turn already stated its finish, so only trailing frames (the usage record, [DONE]) are left. Once this says true, a read that fails ends the stream instead of throwing. Kimi, GLM and OpenCode Go drop the socket there, and the failure threw away an answer the reader had already been shown (cc-proxy, measured on live traffic). The usage may be lost; the answer is not.

boolean


optional maxFrameChars?: number;

Defined in: core/src/transport.ts:58

Largest partial frame held before giving up. Defaults to 8 MiB.


optional onActivity?: () => void;

Defined in: core/src/transport.ts:38

Every read of the body, keep-alives and partial frames included: the stream is alive even when no event is complete yet.

void


optional onDone?: () => void;

Defined in: core/src/transport.ts:44

The body said [DONE]. The payload itself is swallowed, but its arrival is the OpenAI dialect’s only proof that a stream which stated no finish reason was not simply cut off.

void


optional provider?: string;

Defined in: core/src/transport.ts:60

Names the provider on the oversized-frame error.


optional signal?: AbortSignal;

Defined in: core/src/transport.ts:56

The request’s signal. A caller’s Stop is never swallowed, finished or not: a loop that sees a clean end goes on to run the turn’s tools.