NeutralStreamChunk
@forge/monorepo / backend/src / NeutralStreamChunk
Type Alias: NeutralStreamChunk
NeutralStreamChunk = {
id:string;text:string;type:"text-delta"; } | {input:unknown;toolCallId:string;toolName:string;type:"tool-call"; } | {output:unknown;toolCallId:string;toolName:string;type:"tool-result"; } | {type:"finish";usage:NeutralUsage; } | {type:"structured-output";value:unknown; } | {error:unknown;type:"error"; }
Defined in: backend/src/models/streaming.ts:224
Provider-neutral stream chunk — the engine maps these to RunEvents.
Union Members
Type Literal
{ id: string; text: string; type: "text-delta"; }
Type Literal
{ input: unknown; toolCallId: string; toolName: string; type: "tool-call"; }
Type Literal
{ output: unknown; toolCallId: string; toolName: string; type: "tool-result"; }
Type Literal
{ type: "finish"; usage: NeutralUsage; }
Type Literal
{ type: "structured-output"; value: unknown; }
A validated structured answer — emitted once, at the end, only when structuredOutput was asked for.
Type Literal
{ error: unknown; type: "error"; }