Base RequestContext interface (local definition based on actual usage)

This defines the structure that the A2A SDK RequestContext actually has based on how it's used in PaymentsRequestHandler.

interface RequestContext {
    existingTask?: Task;
    requestMetadata?: Record<string, any>;
    taskId: string;
    userMessage: Message;
}

Properties

existingTask?: Task

Any existing task state (for task continuation scenarios)

requestMetadata?: Record<string, any>

Additional metadata from the original request

taskId: string

Unique identifier for the task

userMessage: Message

The original message from the user containing the request