/** Named data-part contract used to stream a direct child agent inside its parent tool card. */ export declare const INVOKE_AGENT_STREAM_EVENT_NAME = "veryfront.invoke_agent.stream"; /** One child runtime event associated with its parent `invoke_agent` tool call. */ export interface InvokeAgentStreamValue { toolCallId: string; agentId: string; /** Child agent display name, for the card header (falls back to the id). */ agentName?: string; /** Child agent avatar URL, so the card header matches the main chat header. */ avatarUrl?: string; event: Record & { type: string; }; } /** Durable, compact representation of all visible events from one child run. */ export interface InvokeAgentStreamSnapshot { toolCallId: string; agentId: string; agentName?: string; avatarUrl?: string; events: Array & { type: string; }>; } /** * The child agent's identity carried alongside its event stream. * * `avatarUrl` (not the message-metadata spelling `agentAvatarUrl`) matches the * `invoke_agent` tool output field the card already falls back to, so both * sources of the child avatar read the same key. */ export interface InvokeAgentStreamIdentity { agentName?: string; avatarUrl?: string; } /** Read the child agent's display identity from a live value or a snapshot. */ export declare function getInvokeAgentStreamIdentity(value: unknown): InvokeAgentStreamIdentity; /** Build the generic tool data event consumed by the chat renderer. */ export declare function buildInvokeAgentStreamDataEvent(value: InvokeAgentStreamValue): { type: typeof INVOKE_AGENT_STREAM_EVENT_NAME; name: typeof INVOKE_AGENT_STREAM_EVENT_NAME; value: InvokeAgentStreamValue; }; /** Parse an untrusted chat data part into the child-stream contract. */ export declare function parseInvokeAgentStreamValue(value: unknown): InvokeAgentStreamValue | null; /** Return one or more child events from either a live event or a compact snapshot. */ export declare function getInvokeAgentStreamEvents(value: unknown): Array & { type: string; }>; /** * Upsert a child event into its parent message part. * * The chat persistence contract bounds message parts, so every live child * event for one parent tool call must share one durable part. Consecutive * deltas are compacted without changing their visible order. */ export declare function appendInvokeAgentStreamSnapshot(existing: unknown, next: unknown): InvokeAgentStreamSnapshot | null; //# sourceMappingURL=invoke-agent-stream.d.ts.map