
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
Rust implementation of the Agent-to-Agent (A2A) Protocol types.
| Crate Version | A2A Protocol Version | Notes |
|---|---|---|
| 0.1.0 - 0.1.x | 0.3.0 | Initial implementation |
See the A2A Protocol Releases for the specification.
This crate provides the complete type definitions for the A2A Protocol, enabling interoperability between AI agents. It includes:
This crate is a direct implementation of the official A2A JSON Schema. It is designed to be robust, idiomatic, and correct.
Key implementation patterns include:
serde for Serialization: All types are derived with serde::Serialize and serde::Deserialize for seamless JSON handling. Attributes like #[serde(rename = "...")] are used to map Rust's snake_case fields to the camelCase or other conventions used in the JSON schema.anyOf structures that have a clear discriminator field (like A2ARequest which is tagged by method, or SecurityScheme tagged by type), the crate uses #[serde(tag = "...")]. This provides safe, explicit, and efficient deserialization.JSONRPCResponse), the crate uses #[serde(untagged)] to deserialize based on structural matching.#[serde(default)] is used for optional fields (especially Vec<T>) to ensure that missing fields in the JSON payload deserialize to a default empty value instead of causing an error.Box<T> to keep the enum's size on the stack small and prevent potential stack overflows.Add this to your Cargo.toml:
[dependencies]
a2a-types = "0.1.1"
Then use the types in your code:
use a2a_types::{Task, Message, MessageRole, Part, TaskState};
// Create a new message
let message = Message {
role: MessageRole::User,
content: vec![Part::Text {
text: "Hello, agent!".to_string(),
metadata: None,
}],
metadata: None,
};
// Work with task states
let state = TaskState::Working;
The crate is organized around the core concepts of the A2A protocol.
AgentCard: The central manifest describing an agent's capabilities, skills, and security requirements.AgentSkill: A distinct capability or function the agent can perform.AgentCapabilities: Optional features supported by the agent (e.g., streaming).SecurityScheme: A tagged enum describing authentication methods (API Key, OAuth2, etc.).Task: The stateful unit of work, tracking status, history, and results.Message: A single communication turn between a client and an agent.Part: A discriminated enum for content within a Message or Artifact (Text, File, Data).Artifact: An output (e.g., a document, image) generated by a Task.TaskState: An enum representing the task lifecycle (Submitted, Working, Completed, etc.).A2ARequest: The primary struct for all client requests. It wraps the A2ARequestPayload.A2ARequestPayload: A tagged enum where each variant represents a specific A2A method (e.g., SendMessage, GetTask, CancelTask).JSONRPCResponse: An enum representing all possible success or error responses from the agent.A2AError: An enum representing all A2A-specific and standard JSON-RPC errors.MIT
FAQs
Unknown package
We found that a2a-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.