a2a_protocol_types/generated/extensions.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Tom F. <[email protected]> (https://github.com/tomtom215)
3// @generated by tools/a2a-codegen from proto/a2a_v1/a2a.proto,
4// sha256 e195bf96ab630c69797851970203e1b2b6b19528f2e9803b7d904b91a5104016.
5// Included by the `extensions` module. Do not edit: change the proto or
6// crates/a2a-protocol-types/codegen.toml and regenerate (ADR 0016).
7
8/// A declaration of a protocol extension supported by an Agent.
9#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
10#[serde(rename_all = "camelCase")]
11#[non_exhaustive]
12pub struct AgentExtension {
13 /// The unique URI identifying the extension.
14 pub uri: String,
15 /// A human-readable description of how this agent uses the extension.
16 #[serde(skip_serializing_if = "Option::is_none")]
17 pub description: Option<String>,
18 /// If true, the client must understand and comply with the extension's requirements.
19 #[serde(skip_serializing_if = "Option::is_none")]
20 pub required: Option<bool>,
21 /// Optional. Extension-specific configuration parameters.
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub params: Option<serde_json::Value>,
24}
25
26/// `AgentCardSignature` represents a JWS signature of an `AgentCard`.
27/// This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
28#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
29#[serde(rename_all = "camelCase")]
30#[non_exhaustive]
31pub struct AgentCardSignature {
32 /// Required. The protected JWS header for the signature. This is always a
33 /// base64url-encoded JSON object.
34 pub protected: String,
35 /// Required. The computed signature, base64url-encoded.
36 pub signature: String,
37 /// The unprotected JWS header values.
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub header: Option<serde_json::Value>,
40}