Skip to main content

Crate a2a_rs_core

Crate a2a_rs_core 

Source
Expand description

Core data structures for A2A RC 1.0 JSON-RPC over HTTP. Provides shared types for server/client plus minimal helpers for JSON-RPC envelopes and error codes. Aligned with the authoritative proto definition (specification/a2a.proto).

Modules§

compat
v0.3 ↔ v1.0 wire format conversion utilities.
errors
JSON-RPC and A2A-specific error codes

Structs§

AgentCapabilities
AgentCard
Complete Agent Card per A2A RC 1.0 proto spec
AgentCardSignature
Cryptographic signature for Agent Card verification (JWS)
AgentExtension
AgentInterface
Agent interface / transport endpoint
AgentProvider
Provider/organization information
AgentSkill
Agent skill/capability definition
ApiKeySecurityScheme
Artifact
Artifact output from task processing per proto spec
AuthenticationInfo
Authentication info for push notification delivery per proto spec
AuthorizationCodeOAuthFlow
CancelTaskRequest
Parameters for tasks/cancel operation
ClientCredentialsOAuthFlow
CreateTaskPushNotificationConfigRequest
Parameters for tasks/pushNotificationConfig/create
DeleteTaskPushNotificationConfigRequest
Parameters for tasks/pushNotificationConfig/delete
DeviceCodeOAuthFlow
FileContent
File content — either inline bytes or a URI reference.
GetExtendedAgentCardRequest
Parameters for agentCard/getExtended
GetTaskPushNotificationConfigRequest
Parameters for tasks/pushNotificationConfig/get
GetTaskRequest
Parameters for tasks/get operation
HttpAuthSecurityScheme
ImplicitOAuthFlow
JsonRpcError
JsonRpcRequest
JsonRpcResponse
ListTaskPushNotificationConfigRequest
Parameters for tasks/pushNotificationConfig/list
ListTaskPushNotificationConfigResponse
Response for tasks/pushNotificationConfig/list
ListTasksRequest
Parameters for tasks/list operation
Message
Message structure per A2A RC 1.0 spec
MutualTlsSecurityScheme
OAuth2SecurityScheme
OpenIdConnectSecurityScheme
PasswordOAuthFlow
PushNotificationConfig
Push notification configuration per proto spec
SecurityRequirement
Security requirement for operations
SendMessageConfiguration
Configuration for message send requests
SendMessageRequest
Parameters for message/send operation
StringList
Helper struct for lists of strings in security requirements
SubscribeToTaskRequest
Parameters for tasks/subscribe operation
Task
Task resource per A2A RC 1.0 spec
TaskArtifactUpdateEvent
Task artifact update event
TaskListResponse
Response for tasks/list operation
TaskPushNotificationConfig
Wrapper for push notification config with task context
TaskStatus
Task status information
TaskStatusUpdateEvent
Task status update event

Enums§

OAuthFlows
OAuth2 flows — proto oneof
Part
Part content — flat proto-JSON format per A2A v1.0 spec.
Role
Message role per proto spec
SecurityScheme
Authentication scheme definition (externally tagged, proto oneof)
SendMessageResponse
Handler-level response from SendMessage — can be a Task or direct Message.
SendMessageResult
Wire-format result for message/send — the value inside the JSON-RPC result field.
StreamResponse
Streaming response per proto spec — uses externally tagged oneof
StreamingMessageResult
Wire-format result for streaming events — the value inside each SSE JSON-RPC result field.
TaskState
Task lifecycle state per proto spec

Constants§

PROTOCOL_VERSION

Functions§

completed_task_with_text
Create a completed task with text response
error
new_message
Create a new message with text content
now_iso8601
Generate ISO 8601 timestamp
success
validate_task_id
Validate task ID format (UUID)