Documentation
¶
Overview ¶
Code generated from JSON schema. DO NOT EDIT.
Index ¶
- Constants
- Variables
- type A2AClient
- func (c *A2AClient) CancelTask(ctx context.Context, request *adk.CancelTaskRequest, agentURL string) (*adk.CancelTaskSuccessResponse, error)
- func (c *A2AClient) GetAgentCapabilities() map[string]adk.AgentCapabilities
- func (c *A2AClient) GetAgentCard(ctx context.Context, agentURL string) (*adk.AgentCard, error)
- func (c *A2AClient) GetAgentSkills(agentURL string) ([]adk.AgentSkill, error)
- func (c *A2AClient) GetAgentStatus(agentURL string) AgentStatus
- func (c *A2AClient) GetAgents() []string
- func (c *A2AClient) GetAllAgentStatuses() map[string]AgentStatus
- func (c *A2AClient) GetTask(ctx context.Context, request *adk.GetTaskRequest, agentURL string) (*adk.GetTaskSuccessResponse, error)
- func (c *A2AClient) InitializeAll(ctx context.Context) error
- func (c *A2AClient) IsInitialized() bool
- func (c *A2AClient) RefreshAgentCard(ctx context.Context, agentURL string) (*adk.AgentCard, error)
- func (c *A2AClient) SendMessage(ctx context.Context, request *adk.SendMessageRequest, agentURL string) (*adk.SendMessageSuccessResponse, error)
- func (c *A2AClient) SendStreamingMessage(ctx context.Context, request *adk.SendStreamingMessageRequest, agentURL string) (<-chan []byte, error)
- func (c *A2AClient) StartStatusPolling(ctx context.Context)
- func (c *A2AClient) StopStatusPolling()
- type A2AClientInterface
- type A2AError
- type A2ARequest
- type APIKeySecurityScheme
- type Agent
- type AgentCapabilities
- type AgentCard
- type AgentExtension
- type AgentProvider
- type AgentSkill
- type AgentStatus
- type Artifact
- type AuthorizationCodeOAuthFlow
- type CancelTaskRequest
- type CancelTaskResponse
- type CancelTaskSuccessResponse
- type ClientCredentialsOAuthFlow
- type ContentTypeNotSupportedError
- type DataPart
- type FileBase
- type FilePart
- type FileWithBytes
- type FileWithUri
- type GetTaskPushNotificationConfigRequest
- type GetTaskPushNotificationConfigResponse
- type GetTaskPushNotificationConfigSuccessResponse
- type GetTaskRequest
- type GetTaskResponse
- type GetTaskSuccessResponse
- type HTTPAuthSecurityScheme
- type ImplicitOAuthFlow
- type InternalError
- type InvalidAgentResponseError
- type InvalidParamsError
- type InvalidRequestError
- type JSONParseError
- type JSONRPCError
- type JSONRPCErrorResponse
- type JSONRPCMessage
- type JSONRPCRequest
- type JSONRPCResponse
- type JSONRPCSuccessResponse
- type Message
- type MessageSendConfiguration
- type MessageSendParams
- type MethodNotFoundError
- type OAuth2SecurityScheme
- type OAuthFlows
- type OpenIdConnectSecurityScheme
- type Part
- type PartBase
- type PasswordOAuthFlow
- type PushNotificationAuthenticationInfo
- type PushNotificationConfig
- type PushNotificationNotSupportedError
- type SecurityScheme
- type SecuritySchemeBase
- type SendMessageRequest
- type SendMessageResponse
- type SendMessageSuccessResponse
- type SendStreamingMessageRequest
- type SendStreamingMessageResponse
- type SendStreamingMessageSuccessResponse
- type SetTaskPushNotificationConfigRequest
- type SetTaskPushNotificationConfigResponse
- type SetTaskPushNotificationConfigSuccessResponse
- type Task
- type TaskArtifactUpdateEvent
- type TaskIdParams
- type TaskNotCancelableError
- type TaskNotFoundError
- type TaskPushNotificationConfig
- type TaskQueryParams
- type TaskResubscriptionRequest
- type TaskState
- type TaskStatus
- type TaskStatusUpdateEvent
- type TextPart
- type UnsupportedOperationError
Constants ¶
const ( ToolQueryAgentCard = "a2a_query_agent_card" ToolSubmitTaskToAgent = "a2a_submit_task_to_agent" )
Supported A2A tool function names
const MaxAgentIterations = 10
MaxAgentIterations limits the number of agent loop iterations
Variables ¶
Functions ¶
This section is empty.
Types ¶
type A2AClient ¶
type A2AClient struct { AgentURLs []string Logger logger.Logger Config config.Config AgentClients map[string]client.A2AClient AgentCards map[string]*adk.AgentCard AgentCapabilities map[string]adk.AgentCapabilities Initialized bool AgentStatuses map[string]AgentStatus // contains filtered or unexported fields }
A2AClient provides methods to interact with A2A agents using the external client library
func NewA2AClient ¶
NewA2AClient creates a new A2A client instance using the external client library
func (*A2AClient) CancelTask ¶
func (c *A2AClient) CancelTask(ctx context.Context, request *adk.CancelTaskRequest, agentURL string) (*adk.CancelTaskSuccessResponse, error)
CancelTask cancels a running task using the external client
func (*A2AClient) GetAgentCapabilities ¶
func (c *A2AClient) GetAgentCapabilities() map[string]adk.AgentCapabilities
GetAgentCapabilities returns the agent capabilities map
func (*A2AClient) GetAgentCard ¶
GetAgentCard retrieves an agent card from the specified agent URL First checks the cache, then fetches from remote if not found
func (*A2AClient) GetAgentSkills ¶
func (c *A2AClient) GetAgentSkills(agentURL string) ([]adk.AgentSkill, error)
GetAgentSkills returns the skills available for the specified agent
func (*A2AClient) GetAgentStatus ¶ added in v0.13.0
func (c *A2AClient) GetAgentStatus(agentURL string) AgentStatus
GetAgentStatus returns the status of a specific agent
func (*A2AClient) GetAllAgentStatuses ¶ added in v0.13.0
func (c *A2AClient) GetAllAgentStatuses() map[string]AgentStatus
GetAllAgentStatuses returns the status of all agents
func (*A2AClient) GetTask ¶
func (c *A2AClient) GetTask(ctx context.Context, request *adk.GetTaskRequest, agentURL string) (*adk.GetTaskSuccessResponse, error)
GetTask retrieves the status of a task using the external client
func (*A2AClient) InitializeAll ¶
InitializeAll discovers and connects to A2A agents using the external client library
func (*A2AClient) IsInitialized ¶
IsInitialized returns whether the client has been successfully initialized
func (*A2AClient) RefreshAgentCard ¶
RefreshAgentCard forces a refresh of an agent card from the remote source using the external client
func (*A2AClient) SendMessage ¶
func (c *A2AClient) SendMessage(ctx context.Context, request *adk.SendMessageRequest, agentURL string) (*adk.SendMessageSuccessResponse, error)
SendMessage sends a message to the specified agent using the external client library
func (*A2AClient) SendStreamingMessage ¶ added in v0.11.0
func (c *A2AClient) SendStreamingMessage(ctx context.Context, request *adk.SendStreamingMessageRequest, agentURL string) (<-chan []byte, error)
SendStreamingMessage sends a streaming message to the specified agent using the external client
func (*A2AClient) StartStatusPolling ¶ added in v0.13.0
StartStatusPolling starts the background status polling goroutine
func (*A2AClient) StopStatusPolling ¶ added in v0.13.0
func (c *A2AClient) StopStatusPolling()
StopStatusPolling stops the background status polling goroutine
type A2AClientInterface ¶
type A2AClientInterface interface { // InitializeAll discovers and connects to A2A agents InitializeAll(ctx context.Context) error // IsInitialized returns whether the client has been successfully initialized IsInitialized() bool // GetAgentCard retrieves an agent card from the specified agent URL GetAgentCard(ctx context.Context, agentURL string) (*adk.AgentCard, error) // RefreshAgentCard forces a refresh of an agent card from the remote source RefreshAgentCard(ctx context.Context, agentURL string) (*adk.AgentCard, error) // SendMessage sends a message to the specified agent (A2A's main task submission method) SendMessage(ctx context.Context, request *adk.SendMessageRequest, agentURL string) (*adk.SendMessageSuccessResponse, error) // SendStreamingMessage sends a streaming message to the specified agent SendStreamingMessage(ctx context.Context, request *adk.SendStreamingMessageRequest, agentURL string) (<-chan []byte, error) // GetTask retrieves the status of a task GetTask(ctx context.Context, request *adk.GetTaskRequest, agentURL string) (*adk.GetTaskSuccessResponse, error) // CancelTask cancels a running task CancelTask(ctx context.Context, request *adk.CancelTaskRequest, agentURL string) (*adk.CancelTaskSuccessResponse, error) // GetAgents returns the list of A2A agent URLs GetAgents() []string // GetAgentCapabilities returns the agent capabilities map GetAgentCapabilities() map[string]adk.AgentCapabilities // GetAgentSkills returns the skills available for the specified agent GetAgentSkills(agentURL string) ([]adk.AgentSkill, error) // GetAgentStatus returns the status of a specific agent GetAgentStatus(agentURL string) AgentStatus // GetAllAgentStatuses returns the status of all agents GetAllAgentStatuses() map[string]AgentStatus // StartStatusPolling starts the background status polling goroutine StartStatusPolling(ctx context.Context) // StopStatusPolling stops the background status polling goroutine StopStatusPolling() }
A2AClientInterface defines the interface for A2A client implementations
type APIKeySecurityScheme ¶
type APIKeySecurityScheme struct { Description *string `json:"description,omitempty"` In string `json:"in"` Name string `json:"name"` Type string `json:"type"` }
API Key security scheme.
type Agent ¶
type Agent interface { Run(ctx context.Context, request *providers.CreateChatCompletionRequest, response *providers.CreateChatCompletionResponse) error RunWithStream(ctx context.Context, middlewareStreamCh chan []byte, c *gin.Context, body *providers.CreateChatCompletionRequest) error SetProvider(provider providers.IProvider) SetModel(model *string) }
Agent defines the interface for running agent operations
type AgentCapabilities ¶
type AgentCapabilities struct { Extensions []AgentExtension `json:"extensions,omitempty"` PushNotifications *bool `json:"pushNotifications,omitempty"` StateTransitionHistory *bool `json:"stateTransitionHistory,omitempty"` Streaming *bool `json:"streaming,omitempty"` }
Defines optional capabilities supported by an agent.
type AgentCard ¶
type AgentCard struct { Capabilities AgentCapabilities `json:"capabilities"` DefaultInputModes []string `json:"defaultInputModes"` DefaultOutputModes []string `json:"defaultOutputModes"` Description string `json:"description"` DocumentationURL *string `json:"documentationUrl,omitempty"` IconURL *string `json:"iconUrl,omitempty"` Name string `json:"name"` Provider *AgentProvider `json:"provider,omitempty"` Security []map[string][]string `json:"security,omitempty"` SecuritySchemes map[string]SecurityScheme `json:"securitySchemes,omitempty"` Skills []AgentSkill `json:"skills"` SupportsAuthenticatedExtendedCard *bool `json:"supportsAuthenticatedExtendedCard,omitempty"` URL string `json:"url"` Version string `json:"version"` }
An AgentCard conveys key information: - Overall details (version, name, description, uses) - Skills: A set of capabilities the agent can perform - Default modalities/content types supported by the agent. - Authentication requirements
type AgentExtension ¶
type AgentExtension struct { Description *string `json:"description,omitempty"` Params map[string]interface{} `json:"params,omitempty"` Required *bool `json:"required,omitempty"` URI string `json:"uri"` }
A declaration of an extension supported by an Agent.
type AgentProvider ¶
Represents the service provider of an agent.
type AgentSkill ¶
type AgentSkill struct { Description string `json:"description"` Examples []string `json:"examples,omitempty"` ID string `json:"id"` InputModes []string `json:"inputModes,omitempty"` Name string `json:"name"` OutputModes []string `json:"outputModes,omitempty"` Tags []string `json:"tags"` }
Represents a unit of capability that an agent can perform.
type AgentStatus ¶ added in v0.13.0
type AgentStatus string
AgentStatus represents the status of an A2A agent
const ( AgentStatusUnknown AgentStatus = "unknown" AgentStatusAvailable AgentStatus = "available" )
type Artifact ¶
type Artifact struct { ArtifactID string `json:"artifactId"` Description *string `json:"description,omitempty"` Extensions []string `json:"extensions,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` Parts []Part `json:"parts"` }
Represents an artifact generated for a task.
type AuthorizationCodeOAuthFlow ¶
type AuthorizationCodeOAuthFlow struct { AuthorizationURL string `json:"authorizationUrl"` RefreshURL *string `json:"refreshUrl,omitempty"` Scopes map[string]string `json:"scopes"` TokenURL string `json:"tokenUrl"` }
Configuration details for a supported OAuth Flow
type CancelTaskRequest ¶
type CancelTaskRequest struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params TaskIdParams `json:"params"` }
JSON-RPC request model for the 'tasks/cancel' method.
type CancelTaskResponse ¶
type CancelTaskResponse interface{}
JSON-RPC response for the 'tasks/cancel' method.
type CancelTaskSuccessResponse ¶
type CancelTaskSuccessResponse struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Result Task `json:"result"` }
JSON-RPC success response model for the 'tasks/cancel' method.
type ClientCredentialsOAuthFlow ¶
type ClientCredentialsOAuthFlow struct { RefreshURL *string `json:"refreshUrl,omitempty"` Scopes map[string]string `json:"scopes"` TokenURL string `json:"tokenUrl"` }
Configuration details for a supported OAuth Flow
type ContentTypeNotSupportedError ¶
type ContentTypeNotSupportedError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
A2A specific error indicating incompatible content types between request and agent capabilities.
type DataPart ¶
type DataPart struct { Data map[string]interface{} `json:"data"` Kind string `json:"kind"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Represents a structured data segment within a message part.
type FileBase ¶
type FileBase struct { MIMEType *string `json:"mimeType,omitempty"` Name *string `json:"name,omitempty"` }
Represents the base entity for FileParts
type FilePart ¶
type FilePart struct { File interface{} `json:"file"` Kind string `json:"kind"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Represents a File segment within parts.
type FileWithBytes ¶
type FileWithBytes struct { Bytes string `json:"bytes"` MIMEType *string `json:"mimeType,omitempty"` Name *string `json:"name,omitempty"` }
Define the variant where 'bytes' is present and 'uri' is absent
type FileWithUri ¶
type FileWithUri struct { MIMEType *string `json:"mimeType,omitempty"` Name *string `json:"name,omitempty"` URI string `json:"uri"` }
Define the variant where 'uri' is present and 'bytes' is absent
type GetTaskPushNotificationConfigRequest ¶
type GetTaskPushNotificationConfigRequest struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params TaskIdParams `json:"params"` }
JSON-RPC request model for the 'tasks/pushNotificationConfig/get' method.
type GetTaskPushNotificationConfigResponse ¶
type GetTaskPushNotificationConfigResponse interface{}
JSON-RPC response for the 'tasks/pushNotificationConfig/set' method.
type GetTaskPushNotificationConfigSuccessResponse ¶
type GetTaskPushNotificationConfigSuccessResponse struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Result TaskPushNotificationConfig `json:"result"` }
JSON-RPC success response model for the 'tasks/pushNotificationConfig/get' method.
type GetTaskRequest ¶
type GetTaskRequest struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params TaskQueryParams `json:"params"` }
JSON-RPC request model for the 'tasks/get' method.
type GetTaskResponse ¶
type GetTaskResponse interface{}
JSON-RPC response for the 'tasks/get' method.
type GetTaskSuccessResponse ¶
type GetTaskSuccessResponse struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Result Task `json:"result"` }
JSON-RPC success response for the 'tasks/get' method.
type HTTPAuthSecurityScheme ¶
type HTTPAuthSecurityScheme struct { BearerFormat *string `json:"bearerFormat,omitempty"` Description *string `json:"description,omitempty"` Scheme string `json:"scheme"` Type string `json:"type"` }
HTTP Authentication security scheme.
type ImplicitOAuthFlow ¶
type ImplicitOAuthFlow struct { AuthorizationURL string `json:"authorizationUrl"` RefreshURL *string `json:"refreshUrl,omitempty"` Scopes map[string]string `json:"scopes"` }
Configuration details for a supported OAuth Flow
type InternalError ¶
type InternalError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
JSON-RPC error indicating an internal JSON-RPC error on the server.
type InvalidAgentResponseError ¶
type InvalidAgentResponseError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
A2A specific error indicating agent returned invalid response for the current method
type InvalidParamsError ¶
type InvalidParamsError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
JSON-RPC error indicating invalid method parameter(s).
type InvalidRequestError ¶
type InvalidRequestError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
JSON-RPC error indicating the JSON sent is not a valid Request object.
type JSONParseError ¶
type JSONParseError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
JSON-RPC error indicating invalid JSON was received by the server.
type JSONRPCError ¶
type JSONRPCError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
Represents a JSON-RPC 2.0 Error object. This is typically included in a JSONRPCErrorResponse when an error occurs.
type JSONRPCErrorResponse ¶
type JSONRPCErrorResponse struct { Error interface{} `json:"error"` ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` }
Represents a JSON-RPC 2.0 Error Response object.
type JSONRPCMessage ¶
type JSONRPCMessage struct { ID *interface{} `json:"id,omitempty"` JSONRPC string `json:"jsonrpc"` }
Base interface for any JSON-RPC 2.0 request or response.
type JSONRPCRequest ¶
type JSONRPCRequest struct { ID *interface{} `json:"id,omitempty"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params map[string]interface{} `json:"params,omitempty"` }
Represents a JSON-RPC 2.0 Request object.
type JSONRPCSuccessResponse ¶
type JSONRPCSuccessResponse struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Result interface{} `json:"result"` }
Represents a JSON-RPC 2.0 Success Response object.
type Message ¶
type Message struct { ContextID *string `json:"contextId,omitempty"` Extensions []string `json:"extensions,omitempty"` Kind string `json:"kind"` MessageID string `json:"messageId"` Metadata map[string]interface{} `json:"metadata,omitempty"` Parts []Part `json:"parts"` ReferenceTaskIds []string `json:"referenceTaskIds,omitempty"` Role string `json:"role"` TaskID *string `json:"taskId,omitempty"` }
Represents a single message exchanged between user and agent.
type MessageSendConfiguration ¶
type MessageSendConfiguration struct { AcceptedOutputModes []string `json:"acceptedOutputModes"` Blocking *bool `json:"blocking,omitempty"` HistoryLength *int `json:"historyLength,omitempty"` PushNotificationConfig *PushNotificationConfig `json:"pushNotificationConfig,omitempty"` }
Configuration for the send message request.
type MessageSendParams ¶
type MessageSendParams struct { Configuration *MessageSendConfiguration `json:"configuration,omitempty"` Message Message `json:"message"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Sent by the client to the agent as a request. May create, continue or restart a task.
type MethodNotFoundError ¶
type MethodNotFoundError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
JSON-RPC error indicating the method does not exist or is not available.
type OAuth2SecurityScheme ¶
type OAuth2SecurityScheme struct { Description *string `json:"description,omitempty"` Flows OAuthFlows `json:"flows"` Type string `json:"type"` }
OAuth2.0 security scheme configuration.
type OAuthFlows ¶
type OAuthFlows struct { AuthorizationCode *AuthorizationCodeOAuthFlow `json:"authorizationCode,omitempty"` ClientCredentials *ClientCredentialsOAuthFlow `json:"clientCredentials,omitempty"` Implicit *ImplicitOAuthFlow `json:"implicit,omitempty"` Password *PasswordOAuthFlow `json:"password,omitempty"` }
Allows configuration of the supported OAuth Flows
type OpenIdConnectSecurityScheme ¶
type OpenIdConnectSecurityScheme struct { Description *string `json:"description,omitempty"` OpenIDConnectURL string `json:"openIdConnectUrl"` Type string `json:"type"` }
OpenID Connect security scheme configuration.
type Part ¶
type Part interface{}
Represents a part of a message, which can be text, a file, or structured data.
type PartBase ¶
type PartBase struct {
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
Base properties common to all message parts.
type PasswordOAuthFlow ¶
type PasswordOAuthFlow struct { RefreshURL *string `json:"refreshUrl,omitempty"` Scopes map[string]string `json:"scopes"` TokenURL string `json:"tokenUrl"` }
Configuration details for a supported OAuth Flow
type PushNotificationAuthenticationInfo ¶
type PushNotificationAuthenticationInfo struct { Credentials *string `json:"credentials,omitempty"` Schemes []string `json:"schemes"` }
Defines authentication details for push notifications.
type PushNotificationConfig ¶
type PushNotificationConfig struct { Authentication *PushNotificationAuthenticationInfo `json:"authentication,omitempty"` ID *string `json:"id,omitempty"` Token *string `json:"token,omitempty"` URL string `json:"url"` }
Configuration for setting up push notifications for task updates.
type PushNotificationNotSupportedError ¶
type PushNotificationNotSupportedError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
A2A specific error indicating the agent does not support push notifications.
type SecurityScheme ¶
type SecurityScheme interface{}
Mirrors the OpenAPI Security Scheme Object (https://swagger.io/specification/#security-scheme-object)
type SecuritySchemeBase ¶
type SecuritySchemeBase struct {
Description *string `json:"description,omitempty"`
}
Base properties shared by all security schemes.
type SendMessageRequest ¶
type SendMessageRequest struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params MessageSendParams `json:"params"` }
JSON-RPC request model for the 'message/send' method.
type SendMessageResponse ¶
type SendMessageResponse interface{}
JSON-RPC response model for the 'message/send' method.
type SendMessageSuccessResponse ¶
type SendMessageSuccessResponse struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Result interface{} `json:"result"` }
JSON-RPC success response model for the 'message/send' method.
type SendStreamingMessageRequest ¶
type SendStreamingMessageRequest struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params MessageSendParams `json:"params"` }
JSON-RPC request model for the 'message/stream' method.
type SendStreamingMessageResponse ¶
type SendStreamingMessageResponse interface{}
JSON-RPC response model for the 'message/stream' method.
type SendStreamingMessageSuccessResponse ¶
type SendStreamingMessageSuccessResponse struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Result interface{} `json:"result"` }
JSON-RPC success response model for the 'message/stream' method.
type SetTaskPushNotificationConfigRequest ¶
type SetTaskPushNotificationConfigRequest struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params TaskPushNotificationConfig `json:"params"` }
JSON-RPC request model for the 'tasks/pushNotificationConfig/set' method.
type SetTaskPushNotificationConfigResponse ¶
type SetTaskPushNotificationConfigResponse interface{}
JSON-RPC response for the 'tasks/pushNotificationConfig/set' method.
type SetTaskPushNotificationConfigSuccessResponse ¶
type SetTaskPushNotificationConfigSuccessResponse struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Result TaskPushNotificationConfig `json:"result"` }
JSON-RPC success response model for the 'tasks/pushNotificationConfig/set' method.
type TaskArtifactUpdateEvent ¶
type TaskArtifactUpdateEvent struct { Append *bool `json:"append,omitempty"` Artifact Artifact `json:"artifact"` ContextID string `json:"contextId"` Kind string `json:"kind"` LastChunk *bool `json:"lastChunk,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` TaskID string `json:"taskId"` }
Sent by server during sendStream or subscribe requests
type TaskIdParams ¶
type TaskIdParams struct { ID string `json:"id"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Parameters containing only a task ID, used for simple task operations.
type TaskNotCancelableError ¶
type TaskNotCancelableError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
A2A specific error indicating the task is in a state where it cannot be canceled.
type TaskNotFoundError ¶
type TaskNotFoundError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
A2A specific error indicating the requested task ID was not found.
type TaskPushNotificationConfig ¶
type TaskPushNotificationConfig struct { PushNotificationConfig PushNotificationConfig `json:"pushNotificationConfig"` TaskID string `json:"taskId"` }
Parameters for setting or getting push notification configuration for a task
type TaskQueryParams ¶
type TaskQueryParams struct { HistoryLength *int `json:"historyLength,omitempty"` ID string `json:"id"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Parameters for querying a task, including optional history length.
type TaskResubscriptionRequest ¶
type TaskResubscriptionRequest struct { ID interface{} `json:"id"` JSONRPC string `json:"jsonrpc"` Method string `json:"method"` Params TaskIdParams `json:"params"` }
JSON-RPC request model for the 'tasks/resubscribe' method.
type TaskState ¶
type TaskState string
Represents the possible states of a Task.
const ( TaskStateAuthRequired TaskState = "auth-required" TaskStateCanceled TaskState = "canceled" TaskStateCompleted TaskState = "completed" TaskStateFailed TaskState = "failed" TaskStateInputRequired TaskState = "input-required" TaskStateRejected TaskState = "rejected" TaskStateSubmitted TaskState = "submitted" TaskStateUnknown TaskState = "unknown" TaskStateWorking TaskState = "working" )
TaskState enum values
type TaskStatus ¶
type TaskStatus struct { Message *Message `json:"message,omitempty"` State TaskState `json:"state"` Timestamp *string `json:"timestamp,omitempty"` }
TaskState and accompanying message.
type TaskStatusUpdateEvent ¶
type TaskStatusUpdateEvent struct { ContextID string `json:"contextId"` Final bool `json:"final"` Kind string `json:"kind"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status TaskStatus `json:"status"` TaskID string `json:"taskId"` }
Sent by server during sendStream or subscribe requests
type TextPart ¶
type TextPart struct { Kind string `json:"kind"` Metadata map[string]interface{} `json:"metadata,omitempty"` Text string `json:"text"` }
Represents a text segment within parts.
type UnsupportedOperationError ¶
type UnsupportedOperationError struct { Code int `json:"code"` Data *interface{} `json:"data,omitempty"` Message string `json:"message"` }
A2A specific error indicating the requested operation is not supported by the agent.