import type { AgentChatEvent } from "../agent/types.js"; import type { DataPart, Part } from "./types.js"; export declare const A2A_AGENT_ACTIVITY_KIND = "agent-native/agent-activity"; export declare const A2A_AGENT_ACTIVITY_VERSION = 1; export declare const MAX_A2A_ACTIVITY_REASONING_CHARS = 32768; export declare const MAX_A2A_ACTIVITY_RESPONSE_CHARS = 32768; export declare const MAX_A2A_ACTIVITY_TOTAL_CHARS = 98304; export declare const MAX_A2A_ACTIVITY_REASONING_SEGMENTS = 128; export declare const MAX_A2A_ACTIVITY_TOOL_CALLS = 64; export declare const MAX_A2A_ACTIVITY_TOOL_NAME_CHARS = 96; export declare const MAX_A2A_ACTIVITY_TOOL_ID_CHARS = 128; export type A2AAgentActivityPhase = "reasoning" | "tool" | "responding" | "complete" | "error"; export type A2AAgentActivityToolStatus = "running" | "completed" | "failed"; export interface A2AAgentActivityToolCall { name: string; id?: string; status: A2AAgentActivityToolStatus; } export interface A2AAgentActivitySnapshot extends Record { kind: typeof A2A_AGENT_ACTIVITY_KIND; version: typeof A2A_AGENT_ACTIVITY_VERSION; sequence: number; startedAt: number; updatedAt: number; durationMs: number; activePhase: A2AAgentActivityPhase; reasoning: string[]; toolCalls: A2AAgentActivityToolCall[]; /** Response text segments, indexed by how many tool calls preceded them. */ response?: string[]; /** Tail segment only. Kept so peers predating `response` still render. */ responseText?: string; } export interface A2AAgentActivityState { sequence: number; startedAt: number; updatedAt: number; activePhase: A2AAgentActivityPhase; reasoning: string[]; toolCalls: A2AAgentActivityToolCall[]; response: string[]; } export declare function createA2AAgentActivityState(startedAt?: number): A2AAgentActivityState; /** * Converts internal loop events into a bounded activity snapshot. It carries * only reasoning text already emitted to the local chat, never tool inputs or * results. */ export declare function applyA2AAgentActivityEvent(state: A2AAgentActivityState, event: AgentChatEvent, updatedAt?: number): A2AAgentActivityState; export declare function buildA2AAgentActivitySnapshot(state: A2AAgentActivityState): A2AAgentActivitySnapshot; export declare function buildA2AAgentActivityPart(state: A2AAgentActivityState): DataPart; export declare function parseA2AAgentActivityPart(part: Part | unknown): A2AAgentActivitySnapshot | null; //# sourceMappingURL=activity.d.ts.map