import type { AgentCard, DeleteTaskPushNotificationConfigParams, GetTaskPushNotificationConfigParams, GetTaskResponse, ListTaskPushNotificationConfigParams, Message, MessageSendParams, SendMessageResponse, Task, TaskArtifactUpdateEvent, TaskIdParams, TaskPushNotificationConfig, TaskQueryParams, TaskStatusUpdateEvent } from '@mastra/core/a2a/client'; import type { AgentCard as AgentCardV1, CancelTaskRequest as CancelTaskRequestV1, DeleteTaskPushNotificationConfigRequest as DeleteTaskPushNotificationConfigRequestV1, GetTaskPushNotificationConfigRequest as GetTaskPushNotificationConfigRequestV1, ListTaskPushNotificationConfigsRequest as ListTaskPushNotificationConfigsRequestV1, ListTaskPushNotificationConfigsResponse as ListTaskPushNotificationConfigsResponseV1, TaskPushNotificationConfig as TaskPushNotificationConfigV1, GetTaskRequest as GetTaskRequestV1, ListTasksRequest as ListTasksRequestV1, ListTasksResponse as ListTasksResponseV1, SendMessageRequest as SendMessageRequestV1, SendMessageResponse as SendMessageResponseV1, StreamResponse as StreamResponseV1, SubscribeToTaskRequest as SubscribeToTaskRequestV1, Task as TaskV1 } from '@mastra/core/a2a/v1'; import type { ClientOptions } from '../types.js'; import type { AgentCardSignatureKeyProviderInput, AgentCardVerificationKey, VerifyAgentCardSignatureOptions } from '../utils/verify-agent-card-signature.js'; import { BaseResource } from './base.js'; export type A2AStreamEventData = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent; export type SendMessageResult = Message | Task; export type { AgentCardSignatureKeyProviderInput, AgentCardVerificationKey, VerifyAgentCardSignatureOptions }; /** * @experimental Agent Card verification may evolve as A2A JS signing support settles. */ export type GetAgentCardOptions = { verifySignature?: VerifyAgentCardSignatureOptions; }; /** * Class for interacting with an agent via the A2A protocol */ export declare class A2A extends BaseResource { private agentId; constructor(options: ClientOptions, agentId: string); /** * Get the agent card with metadata about the agent. * @param options - Optional Agent Card verification settings * @returns Promise containing the agent card information */ getAgentCard(options?: GetAgentCardOptions): Promise; /** * @deprecated Use getAgentCard() instead. */ getCard(options?: GetAgentCardOptions): Promise; /** * Get the authenticated extended agent card. * @returns Promise containing the authenticated extended agent card */ getExtendedAgentCard(): Promise; /** * @deprecated Use sendMessageStream() for the streaming experience. * Send a message to the agent and gets a message or task response. * @param params - Parameters for the task * @returns Promise containing the JSON-RPC response envelope */ sendMessage(params: MessageSendParams): Promise; /** * Sends a message to an agent to initiate or continue a task and subscribes * the client to real-time updates for that task via Server-Sent Events (SSE). * @param params - Parameters for the task * @returns An async generator of typed A2A stream events */ sendMessageStream(params: MessageSendParams): AsyncGenerator; /** * @deprecated Use sendMessageStream() instead. */ sendStreamingMessage(params: MessageSendParams): Promise; /** * Get the status and result of a task. * @param params - Parameters for querying the task * @returns Promise containing the JSON-RPC response envelope */ getTask(params: TaskQueryParams): Promise; /** * Cancel a running task. * @param params - Parameters identifying the task to cancel * @returns Promise containing the task response */ cancelTask(params: TaskQueryParams): Promise; /** * Resume a task stream for an existing task. * @param params - Parameters identifying the task to resubscribe to * @returns An async generator of typed A2A stream events */ resubscribeTask(params: TaskIdParams): AsyncGenerator; /** * Set push notification config for a task. * @param params - Push notification configuration for the task * @returns Promise containing the push notification configuration */ setTaskPushNotificationConfig(params: TaskPushNotificationConfig): Promise; /** * Get push notification config for a task. * @param params - Parameters identifying the task * @returns Promise containing the push notification configuration */ getTaskPushNotificationConfig(params: GetTaskPushNotificationConfigParams): Promise; /** * List push notification configs for a task. * @param params - Parameters identifying the task * @returns Promise containing the push notification configurations */ listTaskPushNotificationConfig(params: ListTaskPushNotificationConfigParams): Promise; /** * Delete a push notification config for a task. * @param params - Parameters identifying the config to delete * @returns Promise that resolves when the config is deleted */ deleteTaskPushNotificationConfig(params: DeleteTaskPushNotificationConfigParams): Promise; } /** Client for the A2A Protocol v1.0 wire format. */ export declare class A2AV1 extends BaseResource { private agentId; constructor(options: ClientOptions, agentId: string); private rpc; createTaskPushNotificationConfig(params: TaskPushNotificationConfigV1): Promise; getTaskPushNotificationConfig(params: GetTaskPushNotificationConfigRequestV1): Promise; listTaskPushNotificationConfigs(params: ListTaskPushNotificationConfigsRequestV1): Promise; deleteTaskPushNotificationConfig(params: DeleteTaskPushNotificationConfigRequestV1): Promise; getAgentCard(): Promise; sendMessage(params: SendMessageRequestV1): Promise; sendMessageStream(params: SendMessageRequestV1): AsyncGenerator; getTask(params: GetTaskRequestV1): Promise; listTasks(params: ListTasksRequestV1): Promise; cancelTask(params: CancelTaskRequestV1): Promise; resubscribeTask(params: SubscribeToTaskRequestV1): AsyncGenerator; } //# sourceMappingURL=a2a.d.ts.map