import type { TToolStatus } from "../../../types/index.js"; import { OpenAIStreamEventLike } from "../types/openAiTypes.js"; export type StreamEventTextDelta = { kind: 'text_delta'; delta: string; }; export type StreamEventToolAdd = { kind: 'tool_add'; id: string; toolName: string; serverLabel?: string; /** Initial status; use 'waitingConfirmation' for mcp_approval_request, 'waitingSubmission' if API defines such. Default 'loading'. */ status?: TToolStatus; /** Optional payload to show in tool card (e.g. approval request arguments). */ headerContent?: string; /** MCP request arguments, pretty-printed JSON. Surfaced for AIStudioChat's tool renderer. */ mcpRequest?: string; }; export type StreamEventToolUpdate = { kind: 'tool_update'; item_id: string; status: TToolStatus; toolName?: string; output?: string; error?: string; /** MCP request arguments, pretty-printed JSON. */ mcpRequest?: string; /** MCP response or error, pretty-printed JSON. */ mcpResponse?: string; }; export type StreamEventThinkingAdd = { kind: 'thinking_add'; item_id: string; }; export type StreamEventThinkingDelta = { kind: 'thinking_delta'; item_id: string; delta: string; }; export type StreamEventThinkingDone = { kind: 'thinking_done'; item_id: string; text: string; }; export type StreamEventContentUpdate = StreamEventTextDelta | StreamEventToolAdd | StreamEventToolUpdate | StreamEventThinkingAdd | StreamEventThinkingDelta | StreamEventThinkingDone; /** Stream event → content update (text delta, tool add/update, thinking add/delta/done) or null. */ export declare function getStreamEventContentUpdate(event: OpenAIStreamEventLike | null | undefined): StreamEventContentUpdate | null;