getSecurityList() {
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3363,6 +3580,18 @@ public int getSecurityCount() {
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3378,6 +3607,18 @@ public io.a2a.grpc.Security getSecurity(int index) {
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3400,6 +3641,18 @@ public Builder setSecurity(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3419,6 +3672,18 @@ public Builder setSecurity(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3440,6 +3705,18 @@ public Builder addSecurity(io.a2a.grpc.Security value) {
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3462,6 +3739,18 @@ public Builder addSecurity(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3481,6 +3770,18 @@ public Builder addSecurity(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3500,6 +3801,18 @@ public Builder addSecurity(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3520,6 +3833,18 @@ public Builder addAllSecurity(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3538,6 +3863,18 @@ public Builder clearSecurity() {
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3556,6 +3893,18 @@ public Builder removeSecurity(int index) {
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3568,6 +3917,18 @@ public io.a2a.grpc.Security.Builder getSecurityBuilder(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3583,6 +3944,18 @@ public io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3599,6 +3972,18 @@ public io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3611,6 +3996,18 @@ public io.a2a.grpc.Security.Builder addSecurityBuilder() {
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -3624,6 +4021,18 @@ public io.a2a.grpc.Security.Builder addSecurityBuilder(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -4357,6 +4766,318 @@ public Builder clearSupportsAuthenticatedExtendedCard() {
return this;
}
+ private java.util.List signatures_ =
+ java.util.Collections.emptyList();
+ private void ensureSignaturesIsMutable() {
+ if (!((bitField0_ & 0x00010000) != 0)) {
+ signatures_ = new java.util.ArrayList(signatures_);
+ bitField0_ |= 0x00010000;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ io.a2a.grpc.AgentCardSignature, io.a2a.grpc.AgentCardSignature.Builder, io.a2a.grpc.AgentCardSignatureOrBuilder> signaturesBuilder_;
+
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public java.util.List getSignaturesList() {
+ if (signaturesBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(signatures_);
+ } else {
+ return signaturesBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public int getSignaturesCount() {
+ if (signaturesBuilder_ == null) {
+ return signatures_.size();
+ } else {
+ return signaturesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public io.a2a.grpc.AgentCardSignature getSignatures(int index) {
+ if (signaturesBuilder_ == null) {
+ return signatures_.get(index);
+ } else {
+ return signaturesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder setSignatures(
+ int index, io.a2a.grpc.AgentCardSignature value) {
+ if (signaturesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSignaturesIsMutable();
+ signatures_.set(index, value);
+ onChanged();
+ } else {
+ signaturesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder setSignatures(
+ int index, io.a2a.grpc.AgentCardSignature.Builder builderForValue) {
+ if (signaturesBuilder_ == null) {
+ ensureSignaturesIsMutable();
+ signatures_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ signaturesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder addSignatures(io.a2a.grpc.AgentCardSignature value) {
+ if (signaturesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSignaturesIsMutable();
+ signatures_.add(value);
+ onChanged();
+ } else {
+ signaturesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder addSignatures(
+ int index, io.a2a.grpc.AgentCardSignature value) {
+ if (signaturesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSignaturesIsMutable();
+ signatures_.add(index, value);
+ onChanged();
+ } else {
+ signaturesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder addSignatures(
+ io.a2a.grpc.AgentCardSignature.Builder builderForValue) {
+ if (signaturesBuilder_ == null) {
+ ensureSignaturesIsMutable();
+ signatures_.add(builderForValue.build());
+ onChanged();
+ } else {
+ signaturesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder addSignatures(
+ int index, io.a2a.grpc.AgentCardSignature.Builder builderForValue) {
+ if (signaturesBuilder_ == null) {
+ ensureSignaturesIsMutable();
+ signatures_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ signaturesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder addAllSignatures(
+ java.lang.Iterable extends io.a2a.grpc.AgentCardSignature> values) {
+ if (signaturesBuilder_ == null) {
+ ensureSignaturesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, signatures_);
+ onChanged();
+ } else {
+ signaturesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder clearSignatures() {
+ if (signaturesBuilder_ == null) {
+ signatures_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00010000);
+ onChanged();
+ } else {
+ signaturesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public Builder removeSignatures(int index) {
+ if (signaturesBuilder_ == null) {
+ ensureSignaturesIsMutable();
+ signatures_.remove(index);
+ onChanged();
+ } else {
+ signaturesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public io.a2a.grpc.AgentCardSignature.Builder getSignaturesBuilder(
+ int index) {
+ return internalGetSignaturesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public io.a2a.grpc.AgentCardSignatureOrBuilder getSignaturesOrBuilder(
+ int index) {
+ if (signaturesBuilder_ == null) {
+ return signatures_.get(index); } else {
+ return signaturesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public java.util.List extends io.a2a.grpc.AgentCardSignatureOrBuilder>
+ getSignaturesOrBuilderList() {
+ if (signaturesBuilder_ != null) {
+ return signaturesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(signatures_);
+ }
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public io.a2a.grpc.AgentCardSignature.Builder addSignaturesBuilder() {
+ return internalGetSignaturesFieldBuilder().addBuilder(
+ io.a2a.grpc.AgentCardSignature.getDefaultInstance());
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public io.a2a.grpc.AgentCardSignature.Builder addSignaturesBuilder(
+ int index) {
+ return internalGetSignaturesFieldBuilder().addBuilder(
+ index, io.a2a.grpc.AgentCardSignature.getDefaultInstance());
+ }
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ public java.util.List
+ getSignaturesBuilderList() {
+ return internalGetSignaturesFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ io.a2a.grpc.AgentCardSignature, io.a2a.grpc.AgentCardSignature.Builder, io.a2a.grpc.AgentCardSignatureOrBuilder>
+ internalGetSignaturesFieldBuilder() {
+ if (signaturesBuilder_ == null) {
+ signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ io.a2a.grpc.AgentCardSignature, io.a2a.grpc.AgentCardSignature.Builder, io.a2a.grpc.AgentCardSignatureOrBuilder>(
+ signatures_,
+ ((bitField0_ & 0x00010000) != 0),
+ getParentForChildren(),
+ isClean());
+ signatures_ = null;
+ }
+ return signaturesBuilder_;
+ }
+
// @@protoc_insertion_point(builder_scope:a2a.v1.AgentCard)
}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java
index 6a992f83e..3ad50a5fd 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java
@@ -319,6 +319,18 @@ io.a2a.grpc.SecurityScheme getSecuritySchemesOrThrow(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -329,6 +341,18 @@ io.a2a.grpc.SecurityScheme getSecuritySchemesOrThrow(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -338,6 +362,18 @@ io.a2a.grpc.SecurityScheme getSecuritySchemesOrThrow(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -347,6 +383,18 @@ io.a2a.grpc.SecurityScheme getSecuritySchemesOrThrow(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -357,6 +405,18 @@ io.a2a.grpc.SecurityScheme getSecuritySchemesOrThrow(
*
* protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
* Security requirements for contacting the agent.
+ * This list can be seen as an OR of ANDs. Each object in the list describes
+ * one possible set of security requirements that must be present on a
+ * request. This allows specifying, for example, "callers must either use
+ * OAuth OR an API Key AND mTLS."
+ * Example:
+ * security {
+ * schemes { key: "oauth" value { list: ["read"] } }
+ * }
+ * security {
+ * schemes { key: "api-key" }
+ * schemes { key: "mtls" }
+ * }
*
*
* repeated .a2a.v1.Security security = 9;
@@ -519,4 +579,48 @@ io.a2a.grpc.AgentSkillOrBuilder getSkillsOrBuilder(
* @return The supportsAuthenticatedExtendedCard.
*/
boolean getSupportsAuthenticatedExtendedCard();
+
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ java.util.List
+ getSignaturesList();
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ io.a2a.grpc.AgentCardSignature getSignatures(int index);
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ int getSignaturesCount();
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ java.util.List extends io.a2a.grpc.AgentCardSignatureOrBuilder>
+ getSignaturesOrBuilderList();
+ /**
+ *
+ * JSON Web Signatures computed for this AgentCard.
+ *
+ *
+ * repeated .a2a.v1.AgentCardSignature signatures = 17;
+ */
+ io.a2a.grpc.AgentCardSignatureOrBuilder getSignaturesOrBuilder(
+ int index);
}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentCardSignature.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentCardSignature.java
new file mode 100644
index 000000000..790bcd941
--- /dev/null
+++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentCardSignature.java
@@ -0,0 +1,952 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: a2a.proto
+// Protobuf Java Version: 4.31.1
+
+package io.a2a.grpc;
+
+/**
+ *
+ * AgentCardSignature represents a JWS signature of an AgentCard.
+ * This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
+ *
+ *
+ * Protobuf type {@code a2a.v1.AgentCardSignature}
+ */
+@com.google.protobuf.Generated
+public final class AgentCardSignature extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:a2a.v1.AgentCardSignature)
+ AgentCardSignatureOrBuilder {
+private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 31,
+ /* patch= */ 1,
+ /* suffix= */ "",
+ AgentCardSignature.class.getName());
+ }
+ // Use AgentCardSignature.newBuilder() to construct.
+ private AgentCardSignature(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+ private AgentCardSignature() {
+ protected_ = "";
+ signature_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_AgentCardSignature_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_AgentCardSignature_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.a2a.grpc.AgentCardSignature.class, io.a2a.grpc.AgentCardSignature.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int PROTECTED_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object protected_ = "";
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return The protected.
+ */
+ @java.lang.Override
+ public java.lang.String getProtected() {
+ java.lang.Object ref = protected_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ protected_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return The bytes for protected.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getProtectedBytes() {
+ java.lang.Object ref = protected_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ protected_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SIGNATURE_FIELD_NUMBER = 2;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object signature_ = "";
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return The signature.
+ */
+ @java.lang.Override
+ public java.lang.String getSignature() {
+ java.lang.Object ref = signature_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ signature_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return The bytes for signature.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getSignatureBytes() {
+ java.lang.Object ref = signature_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ signature_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int HEADER_FIELD_NUMBER = 3;
+ private com.google.protobuf.Struct header_;
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ * @return Whether the header field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeader() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ * @return The header.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getHeader() {
+ return header_ == null ? com.google.protobuf.Struct.getDefaultInstance() : header_;
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getHeaderOrBuilder() {
+ return header_ == null ? com.google.protobuf.Struct.getDefaultInstance() : header_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protected_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, protected_);
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, signature_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(3, getHeader());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protected_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, protected_);
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(signature_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, signature_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getHeader());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.a2a.grpc.AgentCardSignature)) {
+ return super.equals(obj);
+ }
+ io.a2a.grpc.AgentCardSignature other = (io.a2a.grpc.AgentCardSignature) obj;
+
+ if (!getProtected()
+ .equals(other.getProtected())) return false;
+ if (!getSignature()
+ .equals(other.getSignature())) return false;
+ if (hasHeader() != other.hasHeader()) return false;
+ if (hasHeader()) {
+ if (!getHeader()
+ .equals(other.getHeader())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PROTECTED_FIELD_NUMBER;
+ hash = (53 * hash) + getProtected().hashCode();
+ hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;
+ hash = (53 * hash) + getSignature().hashCode();
+ if (hasHeader()) {
+ hash = (37 * hash) + HEADER_FIELD_NUMBER;
+ hash = (53 * hash) + getHeader().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.a2a.grpc.AgentCardSignature parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static io.a2a.grpc.AgentCardSignature parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static io.a2a.grpc.AgentCardSignature parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.a2a.grpc.AgentCardSignature parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(io.a2a.grpc.AgentCardSignature prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * AgentCardSignature represents a JWS signature of an AgentCard.
+ * This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
+ *
+ *
+ * Protobuf type {@code a2a.v1.AgentCardSignature}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:a2a.v1.AgentCardSignature)
+ io.a2a.grpc.AgentCardSignatureOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_AgentCardSignature_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_AgentCardSignature_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.a2a.grpc.AgentCardSignature.class, io.a2a.grpc.AgentCardSignature.Builder.class);
+ }
+
+ // Construct using io.a2a.grpc.AgentCardSignature.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage
+ .alwaysUseFieldBuilders) {
+ internalGetHeaderFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ protected_ = "";
+ signature_ = "";
+ header_ = null;
+ if (headerBuilder_ != null) {
+ headerBuilder_.dispose();
+ headerBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_AgentCardSignature_descriptor;
+ }
+
+ @java.lang.Override
+ public io.a2a.grpc.AgentCardSignature getDefaultInstanceForType() {
+ return io.a2a.grpc.AgentCardSignature.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public io.a2a.grpc.AgentCardSignature build() {
+ io.a2a.grpc.AgentCardSignature result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public io.a2a.grpc.AgentCardSignature buildPartial() {
+ io.a2a.grpc.AgentCardSignature result = new io.a2a.grpc.AgentCardSignature(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(io.a2a.grpc.AgentCardSignature result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.protected_ = protected_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.signature_ = signature_;
+ }
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.header_ = headerBuilder_ == null
+ ? header_
+ : headerBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof io.a2a.grpc.AgentCardSignature) {
+ return mergeFrom((io.a2a.grpc.AgentCardSignature)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(io.a2a.grpc.AgentCardSignature other) {
+ if (other == io.a2a.grpc.AgentCardSignature.getDefaultInstance()) return this;
+ if (!other.getProtected().isEmpty()) {
+ protected_ = other.protected_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (!other.getSignature().isEmpty()) {
+ signature_ = other.signature_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ if (other.hasHeader()) {
+ mergeHeader(other.getHeader());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ protected_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18: {
+ signature_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26: {
+ input.readMessage(
+ internalGetHeaderFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object protected_ = "";
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return The protected.
+ */
+ public java.lang.String getProtected() {
+ java.lang.Object ref = protected_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ protected_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return The bytes for protected.
+ */
+ public com.google.protobuf.ByteString
+ getProtectedBytes() {
+ java.lang.Object ref = protected_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ protected_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param value The protected to set.
+ * @return This builder for chaining.
+ */
+ public Builder setProtected(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ protected_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return This builder for chaining.
+ */
+ public Builder clearProtected() {
+ protected_ = getDefaultInstance().getProtected();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param value The bytes for protected to set.
+ * @return This builder for chaining.
+ */
+ public Builder setProtectedBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
+ protected_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object signature_ = "";
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return The signature.
+ */
+ public java.lang.String getSignature() {
+ java.lang.Object ref = signature_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ signature_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return The bytes for signature.
+ */
+ public com.google.protobuf.ByteString
+ getSignatureBytes() {
+ java.lang.Object ref = signature_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ signature_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param value The signature to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSignature(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ signature_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return This builder for chaining.
+ */
+ public Builder clearSignature() {
+ signature_ = getDefaultInstance().getSignature();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param value The bytes for signature to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSignatureBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
+ signature_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Struct header_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> headerBuilder_;
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ * @return Whether the header field is set.
+ */
+ public boolean hasHeader() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ * @return The header.
+ */
+ public com.google.protobuf.Struct getHeader() {
+ if (headerBuilder_ == null) {
+ return header_ == null ? com.google.protobuf.Struct.getDefaultInstance() : header_;
+ } else {
+ return headerBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ public Builder setHeader(com.google.protobuf.Struct value) {
+ if (headerBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ header_ = value;
+ } else {
+ headerBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ public Builder setHeader(
+ com.google.protobuf.Struct.Builder builderForValue) {
+ if (headerBuilder_ == null) {
+ header_ = builderForValue.build();
+ } else {
+ headerBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ public Builder mergeHeader(com.google.protobuf.Struct value) {
+ if (headerBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0) &&
+ header_ != null &&
+ header_ != com.google.protobuf.Struct.getDefaultInstance()) {
+ getHeaderBuilder().mergeFrom(value);
+ } else {
+ header_ = value;
+ }
+ } else {
+ headerBuilder_.mergeFrom(value);
+ }
+ if (header_ != null) {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ public Builder clearHeader() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ header_ = null;
+ if (headerBuilder_ != null) {
+ headerBuilder_.dispose();
+ headerBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ public com.google.protobuf.Struct.Builder getHeaderBuilder() {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return internalGetHeaderFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ public com.google.protobuf.StructOrBuilder getHeaderOrBuilder() {
+ if (headerBuilder_ != null) {
+ return headerBuilder_.getMessageOrBuilder();
+ } else {
+ return header_ == null ?
+ com.google.protobuf.Struct.getDefaultInstance() : header_;
+ }
+ }
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
+ internalGetHeaderFieldBuilder() {
+ if (headerBuilder_ == null) {
+ headerBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
+ getHeader(),
+ getParentForChildren(),
+ isClean());
+ header_ = null;
+ }
+ return headerBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:a2a.v1.AgentCardSignature)
+ }
+
+ // @@protoc_insertion_point(class_scope:a2a.v1.AgentCardSignature)
+ private static final io.a2a.grpc.AgentCardSignature DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.a2a.grpc.AgentCardSignature();
+ }
+
+ public static io.a2a.grpc.AgentCardSignature getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public AgentCardSignature parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public io.a2a.grpc.AgentCardSignature getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentCardSignatureOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentCardSignatureOrBuilder.java
new file mode 100644
index 000000000..d863a9917
--- /dev/null
+++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentCardSignatureOrBuilder.java
@@ -0,0 +1,81 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: a2a.proto
+// Protobuf Java Version: 4.31.1
+
+package io.a2a.grpc;
+
+@com.google.protobuf.Generated
+public interface AgentCardSignatureOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:a2a.v1.AgentCardSignature)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return The protected.
+ */
+ java.lang.String getProtected();
+ /**
+ *
+ * The protected JWS header for the signature. This is always a
+ * base64url-encoded JSON object. Required.
+ *
+ *
+ * string protected = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return The bytes for protected.
+ */
+ com.google.protobuf.ByteString
+ getProtectedBytes();
+
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return The signature.
+ */
+ java.lang.String getSignature();
+ /**
+ *
+ * The computed signature, base64url-encoded. Required.
+ *
+ *
+ * string signature = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return The bytes for signature.
+ */
+ com.google.protobuf.ByteString
+ getSignatureBytes();
+
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ * @return Whether the header field is set.
+ */
+ boolean hasHeader();
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ * @return The header.
+ */
+ com.google.protobuf.Struct getHeader();
+ /**
+ *
+ * The unprotected JWS header values.
+ *
+ *
+ * .google.protobuf.Struct header = 3;
+ */
+ com.google.protobuf.StructOrBuilder getHeaderOrBuilder();
+}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java
index 1d6fed46c..794c3db57 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java
@@ -47,6 +47,7 @@ private AgentSkill() {
com.google.protobuf.LazyStringArrayList.emptyList();
outputModes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
+ security_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
@@ -433,6 +434,87 @@ public java.lang.String getOutputModes(int index) {
return outputModes_.getByteString(index);
}
+ public static final int SECURITY_FIELD_NUMBER = 8;
+ @SuppressWarnings("serial")
+ private java.util.List security_;
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ @java.lang.Override
+ public java.util.List getSecurityList() {
+ return security_;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ @java.lang.Override
+ public java.util.List extends io.a2a.grpc.SecurityOrBuilder>
+ getSecurityOrBuilderList() {
+ return security_;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ @java.lang.Override
+ public int getSecurityCount() {
+ return security_.size();
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ @java.lang.Override
+ public io.a2a.grpc.Security getSecurity(int index) {
+ return security_.get(index);
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ @java.lang.Override
+ public io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder(
+ int index) {
+ return security_.get(index);
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -468,6 +550,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
for (int i = 0; i < outputModes_.size(); i++) {
com.google.protobuf.GeneratedMessage.writeString(output, 7, outputModes_.getRaw(i));
}
+ for (int i = 0; i < security_.size(); i++) {
+ output.writeMessage(8, security_.get(i));
+ }
getUnknownFields().writeTo(output);
}
@@ -518,6 +603,10 @@ public int getSerializedSize() {
size += dataSize;
size += 1 * getOutputModesList().size();
}
+ for (int i = 0; i < security_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(8, security_.get(i));
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -547,6 +636,8 @@ public boolean equals(final java.lang.Object obj) {
.equals(other.getInputModesList())) return false;
if (!getOutputModesList()
.equals(other.getOutputModesList())) return false;
+ if (!getSecurityList()
+ .equals(other.getSecurityList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -580,6 +671,10 @@ public int hashCode() {
hash = (37 * hash) + OUTPUT_MODES_FIELD_NUMBER;
hash = (53 * hash) + getOutputModesList().hashCode();
}
+ if (getSecurityCount() > 0) {
+ hash = (37 * hash) + SECURITY_FIELD_NUMBER;
+ hash = (53 * hash) + getSecurityList().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -730,6 +825,13 @@ public Builder clear() {
com.google.protobuf.LazyStringArrayList.emptyList();
outputModes_ =
com.google.protobuf.LazyStringArrayList.emptyList();
+ if (securityBuilder_ == null) {
+ security_ = java.util.Collections.emptyList();
+ } else {
+ security_ = null;
+ securityBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000080);
return this;
}
@@ -756,11 +858,24 @@ public io.a2a.grpc.AgentSkill build() {
@java.lang.Override
public io.a2a.grpc.AgentSkill buildPartial() {
io.a2a.grpc.AgentSkill result = new io.a2a.grpc.AgentSkill(this);
+ buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
+ private void buildPartialRepeatedFields(io.a2a.grpc.AgentSkill result) {
+ if (securityBuilder_ == null) {
+ if (((bitField0_ & 0x00000080) != 0)) {
+ security_ = java.util.Collections.unmodifiableList(security_);
+ bitField0_ = (bitField0_ & ~0x00000080);
+ }
+ result.security_ = security_;
+ } else {
+ result.security_ = securityBuilder_.build();
+ }
+ }
+
private void buildPartial0(io.a2a.grpc.AgentSkill result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
@@ -857,6 +972,32 @@ public Builder mergeFrom(io.a2a.grpc.AgentSkill other) {
}
onChanged();
}
+ if (securityBuilder_ == null) {
+ if (!other.security_.isEmpty()) {
+ if (security_.isEmpty()) {
+ security_ = other.security_;
+ bitField0_ = (bitField0_ & ~0x00000080);
+ } else {
+ ensureSecurityIsMutable();
+ security_.addAll(other.security_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.security_.isEmpty()) {
+ if (securityBuilder_.isEmpty()) {
+ securityBuilder_.dispose();
+ securityBuilder_ = null;
+ security_ = other.security_;
+ bitField0_ = (bitField0_ & ~0x00000080);
+ securityBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ internalGetSecurityFieldBuilder() : null;
+ } else {
+ securityBuilder_.addAllMessages(other.security_);
+ }
+ }
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -922,6 +1063,19 @@ public Builder mergeFrom(
outputModes_.add(s);
break;
} // case 58
+ case 66: {
+ io.a2a.grpc.Security m =
+ input.readMessage(
+ io.a2a.grpc.Security.parser(),
+ extensionRegistry);
+ if (securityBuilder_ == null) {
+ ensureSecurityIsMutable();
+ security_.add(m);
+ } else {
+ securityBuilder_.addMessage(m);
+ }
+ break;
+ } // case 66
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -1844,6 +1998,390 @@ public Builder addOutputModesBytes(
return this;
}
+ private java.util.List security_ =
+ java.util.Collections.emptyList();
+ private void ensureSecurityIsMutable() {
+ if (!((bitField0_ & 0x00000080) != 0)) {
+ security_ = new java.util.ArrayList(security_);
+ bitField0_ |= 0x00000080;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilder<
+ io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder> securityBuilder_;
+
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public java.util.List getSecurityList() {
+ if (securityBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(security_);
+ } else {
+ return securityBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public int getSecurityCount() {
+ if (securityBuilder_ == null) {
+ return security_.size();
+ } else {
+ return securityBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public io.a2a.grpc.Security getSecurity(int index) {
+ if (securityBuilder_ == null) {
+ return security_.get(index);
+ } else {
+ return securityBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder setSecurity(
+ int index, io.a2a.grpc.Security value) {
+ if (securityBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSecurityIsMutable();
+ security_.set(index, value);
+ onChanged();
+ } else {
+ securityBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder setSecurity(
+ int index, io.a2a.grpc.Security.Builder builderForValue) {
+ if (securityBuilder_ == null) {
+ ensureSecurityIsMutable();
+ security_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ securityBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder addSecurity(io.a2a.grpc.Security value) {
+ if (securityBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSecurityIsMutable();
+ security_.add(value);
+ onChanged();
+ } else {
+ securityBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder addSecurity(
+ int index, io.a2a.grpc.Security value) {
+ if (securityBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSecurityIsMutable();
+ security_.add(index, value);
+ onChanged();
+ } else {
+ securityBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder addSecurity(
+ io.a2a.grpc.Security.Builder builderForValue) {
+ if (securityBuilder_ == null) {
+ ensureSecurityIsMutable();
+ security_.add(builderForValue.build());
+ onChanged();
+ } else {
+ securityBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder addSecurity(
+ int index, io.a2a.grpc.Security.Builder builderForValue) {
+ if (securityBuilder_ == null) {
+ ensureSecurityIsMutable();
+ security_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ securityBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder addAllSecurity(
+ java.lang.Iterable extends io.a2a.grpc.Security> values) {
+ if (securityBuilder_ == null) {
+ ensureSecurityIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, security_);
+ onChanged();
+ } else {
+ securityBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder clearSecurity() {
+ if (securityBuilder_ == null) {
+ security_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000080);
+ onChanged();
+ } else {
+ securityBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public Builder removeSecurity(int index) {
+ if (securityBuilder_ == null) {
+ ensureSecurityIsMutable();
+ security_.remove(index);
+ onChanged();
+ } else {
+ securityBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public io.a2a.grpc.Security.Builder getSecurityBuilder(
+ int index) {
+ return internalGetSecurityFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder(
+ int index) {
+ if (securityBuilder_ == null) {
+ return security_.get(index); } else {
+ return securityBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public java.util.List extends io.a2a.grpc.SecurityOrBuilder>
+ getSecurityOrBuilderList() {
+ if (securityBuilder_ != null) {
+ return securityBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(security_);
+ }
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public io.a2a.grpc.Security.Builder addSecurityBuilder() {
+ return internalGetSecurityFieldBuilder().addBuilder(
+ io.a2a.grpc.Security.getDefaultInstance());
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public io.a2a.grpc.Security.Builder addSecurityBuilder(
+ int index) {
+ return internalGetSecurityFieldBuilder().addBuilder(
+ index, io.a2a.grpc.Security.getDefaultInstance());
+ }
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ public java.util.List
+ getSecurityBuilderList() {
+ return internalGetSecurityFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder>
+ internalGetSecurityFieldBuilder() {
+ if (securityBuilder_ == null) {
+ securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder>(
+ security_,
+ ((bitField0_ & 0x00000080) != 0),
+ getParentForChildren(),
+ isClean());
+ security_ = null;
+ }
+ return securityBuilder_;
+ }
+
// @@protoc_insertion_point(builder_scope:a2a.v1.AgentSkill)
}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java
index d776b3112..88ebf7448 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java
@@ -251,4 +251,68 @@ public interface AgentSkillOrBuilder extends
*/
com.google.protobuf.ByteString
getOutputModesBytes(int index);
+
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ java.util.List
+ getSecurityList();
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ io.a2a.grpc.Security getSecurity(int index);
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ int getSecurityCount();
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ java.util.List extends io.a2a.grpc.SecurityOrBuilder>
+ getSecurityOrBuilderList();
+ /**
+ *
+ * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ * Security schemes necessary for the agent to leverage this skill.
+ * As in the overall AgentCard.security, this list represents a logical OR of
+ * security requirement objects. Each object is a set of security schemes
+ * that must be used together (a logical AND).
+ *
+ *
+ * repeated .a2a.v1.Security security = 8;
+ */
+ io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder(
+ int index);
}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/MutualTlsSecurityScheme.java b/spec-grpc/src/main/java/io/a2a/grpc/MutualTlsSecurityScheme.java
new file mode 100644
index 000000000..87ef07b99
--- /dev/null
+++ b/spec-grpc/src/main/java/io/a2a/grpc/MutualTlsSecurityScheme.java
@@ -0,0 +1,530 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: a2a.proto
+// Protobuf Java Version: 4.31.1
+
+package io.a2a.grpc;
+
+/**
+ * Protobuf type {@code a2a.v1.MutualTlsSecurityScheme}
+ */
+@com.google.protobuf.Generated
+public final class MutualTlsSecurityScheme extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:a2a.v1.MutualTlsSecurityScheme)
+ MutualTlsSecuritySchemeOrBuilder {
+private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 31,
+ /* patch= */ 1,
+ /* suffix= */ "",
+ MutualTlsSecurityScheme.class.getName());
+ }
+ // Use MutualTlsSecurityScheme.newBuilder() to construct.
+ private MutualTlsSecurityScheme(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+ private MutualTlsSecurityScheme() {
+ description_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_MutualTlsSecurityScheme_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_MutualTlsSecurityScheme_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.a2a.grpc.MutualTlsSecurityScheme.class, io.a2a.grpc.MutualTlsSecurityScheme.Builder.class);
+ }
+
+ public static final int DESCRIPTION_FIELD_NUMBER = 1;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @return The description.
+ */
+ @java.lang.Override
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @return The bytes for description.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, description_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.a2a.grpc.MutualTlsSecurityScheme)) {
+ return super.equals(obj);
+ }
+ io.a2a.grpc.MutualTlsSecurityScheme other = (io.a2a.grpc.MutualTlsSecurityScheme) obj;
+
+ if (!getDescription()
+ .equals(other.getDescription())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
+ hash = (53 * hash) + getDescription().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.a2a.grpc.MutualTlsSecurityScheme parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(io.a2a.grpc.MutualTlsSecurityScheme prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code a2a.v1.MutualTlsSecurityScheme}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:a2a.v1.MutualTlsSecurityScheme)
+ io.a2a.grpc.MutualTlsSecuritySchemeOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_MutualTlsSecurityScheme_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_MutualTlsSecurityScheme_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.a2a.grpc.MutualTlsSecurityScheme.class, io.a2a.grpc.MutualTlsSecurityScheme.Builder.class);
+ }
+
+ // Construct using io.a2a.grpc.MutualTlsSecurityScheme.newBuilder()
+ private Builder() {
+
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ description_ = "";
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return io.a2a.grpc.A2A.internal_static_a2a_v1_MutualTlsSecurityScheme_descriptor;
+ }
+
+ @java.lang.Override
+ public io.a2a.grpc.MutualTlsSecurityScheme getDefaultInstanceForType() {
+ return io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public io.a2a.grpc.MutualTlsSecurityScheme build() {
+ io.a2a.grpc.MutualTlsSecurityScheme result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public io.a2a.grpc.MutualTlsSecurityScheme buildPartial() {
+ io.a2a.grpc.MutualTlsSecurityScheme result = new io.a2a.grpc.MutualTlsSecurityScheme(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(io.a2a.grpc.MutualTlsSecurityScheme result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.description_ = description_;
+ }
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof io.a2a.grpc.MutualTlsSecurityScheme) {
+ return mergeFrom((io.a2a.grpc.MutualTlsSecurityScheme)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(io.a2a.grpc.MutualTlsSecurityScheme other) {
+ if (other == io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance()) return this;
+ if (!other.getDescription().isEmpty()) {
+ description_ = other.description_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ description_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object description_ = "";
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @return The description.
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @return The bytes for description.
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @param value The description to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDescription(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ description_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearDescription() {
+ description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @param value The bytes for description to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDescriptionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
+ description_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:a2a.v1.MutualTlsSecurityScheme)
+ }
+
+ // @@protoc_insertion_point(class_scope:a2a.v1.MutualTlsSecurityScheme)
+ private static final io.a2a.grpc.MutualTlsSecurityScheme DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.a2a.grpc.MutualTlsSecurityScheme();
+ }
+
+ public static io.a2a.grpc.MutualTlsSecurityScheme getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public MutualTlsSecurityScheme parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public io.a2a.grpc.MutualTlsSecurityScheme getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/MutualTlsSecuritySchemeOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/MutualTlsSecuritySchemeOrBuilder.java
new file mode 100644
index 000000000..a18e1311a
--- /dev/null
+++ b/spec-grpc/src/main/java/io/a2a/grpc/MutualTlsSecuritySchemeOrBuilder.java
@@ -0,0 +1,32 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: a2a.proto
+// Protobuf Java Version: 4.31.1
+
+package io.a2a.grpc;
+
+@com.google.protobuf.Generated
+public interface MutualTlsSecuritySchemeOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:a2a.v1.MutualTlsSecurityScheme)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @return The description.
+ */
+ java.lang.String getDescription();
+ /**
+ *
+ * Description of this security scheme.
+ *
+ *
+ * string description = 1;
+ * @return The bytes for description.
+ */
+ com.google.protobuf.ByteString
+ getDescriptionBytes();
+}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/OAuth2SecurityScheme.java b/spec-grpc/src/main/java/io/a2a/grpc/OAuth2SecurityScheme.java
index 11065d682..9de35587e 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/OAuth2SecurityScheme.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/OAuth2SecurityScheme.java
@@ -29,6 +29,7 @@ private OAuth2SecurityScheme(com.google.protobuf.GeneratedMessage.Builder> bui
}
private OAuth2SecurityScheme() {
description_ = "";
+ oauth2MetadataUrl_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
@@ -130,6 +131,55 @@ public io.a2a.grpc.OAuthFlowsOrBuilder getFlowsOrBuilder() {
return flows_ == null ? io.a2a.grpc.OAuthFlows.getDefaultInstance() : flows_;
}
+ public static final int OAUTH2_METADATA_URL_FIELD_NUMBER = 3;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object oauth2MetadataUrl_ = "";
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @return The oauth2MetadataUrl.
+ */
+ @java.lang.Override
+ public java.lang.String getOauth2MetadataUrl() {
+ java.lang.Object ref = oauth2MetadataUrl_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ oauth2MetadataUrl_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @return The bytes for oauth2MetadataUrl.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getOauth2MetadataUrlBytes() {
+ java.lang.Object ref = oauth2MetadataUrl_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ oauth2MetadataUrl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -150,6 +200,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getFlows());
}
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(oauth2MetadataUrl_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 3, oauth2MetadataUrl_);
+ }
getUnknownFields().writeTo(output);
}
@@ -166,6 +219,9 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getFlows());
}
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(oauth2MetadataUrl_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(3, oauth2MetadataUrl_);
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -188,6 +244,8 @@ public boolean equals(final java.lang.Object obj) {
if (!getFlows()
.equals(other.getFlows())) return false;
}
+ if (!getOauth2MetadataUrl()
+ .equals(other.getOauth2MetadataUrl())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -205,6 +263,8 @@ public int hashCode() {
hash = (37 * hash) + FLOWS_FIELD_NUMBER;
hash = (53 * hash) + getFlows().hashCode();
}
+ hash = (37 * hash) + OAUTH2_METADATA_URL_FIELD_NUMBER;
+ hash = (53 * hash) + getOauth2MetadataUrl().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -348,6 +408,7 @@ public Builder clear() {
flowsBuilder_.dispose();
flowsBuilder_ = null;
}
+ oauth2MetadataUrl_ = "";
return this;
}
@@ -391,6 +452,9 @@ private void buildPartial0(io.a2a.grpc.OAuth2SecurityScheme result) {
: flowsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.oauth2MetadataUrl_ = oauth2MetadataUrl_;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -414,6 +478,11 @@ public Builder mergeFrom(io.a2a.grpc.OAuth2SecurityScheme other) {
if (other.hasFlows()) {
mergeFlows(other.getFlows());
}
+ if (!other.getOauth2MetadataUrl().isEmpty()) {
+ oauth2MetadataUrl_ = other.oauth2MetadataUrl_;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -452,6 +521,11 @@ public Builder mergeFrom(
bitField0_ |= 0x00000002;
break;
} // case 18
+ case 26: {
+ oauth2MetadataUrl_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -718,6 +792,103 @@ public io.a2a.grpc.OAuthFlowsOrBuilder getFlowsOrBuilder() {
return flowsBuilder_;
}
+ private java.lang.Object oauth2MetadataUrl_ = "";
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @return The oauth2MetadataUrl.
+ */
+ public java.lang.String getOauth2MetadataUrl() {
+ java.lang.Object ref = oauth2MetadataUrl_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ oauth2MetadataUrl_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @return The bytes for oauth2MetadataUrl.
+ */
+ public com.google.protobuf.ByteString
+ getOauth2MetadataUrlBytes() {
+ java.lang.Object ref = oauth2MetadataUrl_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ oauth2MetadataUrl_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @param value The oauth2MetadataUrl to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOauth2MetadataUrl(
+ java.lang.String value) {
+ if (value == null) { throw new NullPointerException(); }
+ oauth2MetadataUrl_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearOauth2MetadataUrl() {
+ oauth2MetadataUrl_ = getDefaultInstance().getOauth2MetadataUrl();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @param value The bytes for oauth2MetadataUrl to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOauth2MetadataUrlBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ checkByteStringIsUtf8(value);
+ oauth2MetadataUrl_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:a2a.v1.OAuth2SecurityScheme)
}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/OAuth2SecuritySchemeOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/OAuth2SecuritySchemeOrBuilder.java
index 76620c1ba..84c35ce0c 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/OAuth2SecuritySchemeOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/OAuth2SecuritySchemeOrBuilder.java
@@ -56,4 +56,26 @@ public interface OAuth2SecuritySchemeOrBuilder extends
* .a2a.v1.OAuthFlows flows = 2;
*/
io.a2a.grpc.OAuthFlowsOrBuilder getFlowsOrBuilder();
+
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @return The oauth2MetadataUrl.
+ */
+ java.lang.String getOauth2MetadataUrl();
+ /**
+ *
+ * URL to the oauth2 authorization server metadata
+ * [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ *
+ *
+ * string oauth2_metadata_url = 3;
+ * @return The bytes for oauth2MetadataUrl.
+ */
+ com.google.protobuf.ByteString
+ getOauth2MetadataUrlBytes();
}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SecurityScheme.java b/spec-grpc/src/main/java/io/a2a/grpc/SecurityScheme.java
index b6726d097..90bc8672d 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/SecurityScheme.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/SecurityScheme.java
@@ -53,6 +53,7 @@ public enum SchemeCase
HTTP_AUTH_SECURITY_SCHEME(2),
OAUTH2_SECURITY_SCHEME(3),
OPEN_ID_CONNECT_SECURITY_SCHEME(4),
+ MTLS_SECURITY_SCHEME(5),
SCHEME_NOT_SET(0);
private final int value;
private SchemeCase(int value) {
@@ -74,6 +75,7 @@ public static SchemeCase forNumber(int value) {
case 2: return HTTP_AUTH_SECURITY_SCHEME;
case 3: return OAUTH2_SECURITY_SCHEME;
case 4: return OPEN_ID_CONNECT_SECURITY_SCHEME;
+ case 5: return MTLS_SECURITY_SCHEME;
case 0: return SCHEME_NOT_SET;
default: return null;
}
@@ -213,6 +215,37 @@ public io.a2a.grpc.OpenIdConnectSecuritySchemeOrBuilder getOpenIdConnectSecurity
return io.a2a.grpc.OpenIdConnectSecurityScheme.getDefaultInstance();
}
+ public static final int MTLS_SECURITY_SCHEME_FIELD_NUMBER = 5;
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ * @return Whether the mtlsSecurityScheme field is set.
+ */
+ @java.lang.Override
+ public boolean hasMtlsSecurityScheme() {
+ return schemeCase_ == 5;
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ * @return The mtlsSecurityScheme.
+ */
+ @java.lang.Override
+ public io.a2a.grpc.MutualTlsSecurityScheme getMtlsSecurityScheme() {
+ if (schemeCase_ == 5) {
+ return (io.a2a.grpc.MutualTlsSecurityScheme) scheme_;
+ }
+ return io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance();
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ @java.lang.Override
+ public io.a2a.grpc.MutualTlsSecuritySchemeOrBuilder getMtlsSecuritySchemeOrBuilder() {
+ if (schemeCase_ == 5) {
+ return (io.a2a.grpc.MutualTlsSecurityScheme) scheme_;
+ }
+ return io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
@@ -239,6 +272,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (schemeCase_ == 4) {
output.writeMessage(4, (io.a2a.grpc.OpenIdConnectSecurityScheme) scheme_);
}
+ if (schemeCase_ == 5) {
+ output.writeMessage(5, (io.a2a.grpc.MutualTlsSecurityScheme) scheme_);
+ }
getUnknownFields().writeTo(output);
}
@@ -264,6 +300,10 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (io.a2a.grpc.OpenIdConnectSecurityScheme) scheme_);
}
+ if (schemeCase_ == 5) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, (io.a2a.grpc.MutualTlsSecurityScheme) scheme_);
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -297,6 +337,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getOpenIdConnectSecurityScheme()
.equals(other.getOpenIdConnectSecurityScheme())) return false;
break;
+ case 5:
+ if (!getMtlsSecurityScheme()
+ .equals(other.getMtlsSecurityScheme())) return false;
+ break;
case 0:
default:
}
@@ -328,6 +372,10 @@ public int hashCode() {
hash = (37 * hash) + OPEN_ID_CONNECT_SECURITY_SCHEME_FIELD_NUMBER;
hash = (53 * hash) + getOpenIdConnectSecurityScheme().hashCode();
break;
+ case 5:
+ hash = (37 * hash) + MTLS_SECURITY_SCHEME_FIELD_NUMBER;
+ hash = (53 * hash) + getMtlsSecurityScheme().hashCode();
+ break;
case 0:
default:
}
@@ -474,6 +522,9 @@ public Builder clear() {
if (openIdConnectSecuritySchemeBuilder_ != null) {
openIdConnectSecuritySchemeBuilder_.clear();
}
+ if (mtlsSecuritySchemeBuilder_ != null) {
+ mtlsSecuritySchemeBuilder_.clear();
+ }
schemeCase_ = 0;
scheme_ = null;
return this;
@@ -531,6 +582,10 @@ private void buildPartialOneofs(io.a2a.grpc.SecurityScheme result) {
openIdConnectSecuritySchemeBuilder_ != null) {
result.scheme_ = openIdConnectSecuritySchemeBuilder_.build();
}
+ if (schemeCase_ == 5 &&
+ mtlsSecuritySchemeBuilder_ != null) {
+ result.scheme_ = mtlsSecuritySchemeBuilder_.build();
+ }
}
@java.lang.Override
@@ -562,6 +617,10 @@ public Builder mergeFrom(io.a2a.grpc.SecurityScheme other) {
mergeOpenIdConnectSecurityScheme(other.getOpenIdConnectSecurityScheme());
break;
}
+ case MTLS_SECURITY_SCHEME: {
+ mergeMtlsSecurityScheme(other.getMtlsSecurityScheme());
+ break;
+ }
case SCHEME_NOT_SET: {
break;
}
@@ -620,6 +679,13 @@ public Builder mergeFrom(
schemeCase_ = 4;
break;
} // case 34
+ case 42: {
+ input.readMessage(
+ internalGetMtlsSecuritySchemeFieldBuilder().getBuilder(),
+ extensionRegistry);
+ schemeCase_ = 5;
+ break;
+ } // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -1220,6 +1286,148 @@ public io.a2a.grpc.OpenIdConnectSecuritySchemeOrBuilder getOpenIdConnectSecurity
return openIdConnectSecuritySchemeBuilder_;
}
+ private com.google.protobuf.SingleFieldBuilder<
+ io.a2a.grpc.MutualTlsSecurityScheme, io.a2a.grpc.MutualTlsSecurityScheme.Builder, io.a2a.grpc.MutualTlsSecuritySchemeOrBuilder> mtlsSecuritySchemeBuilder_;
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ * @return Whether the mtlsSecurityScheme field is set.
+ */
+ @java.lang.Override
+ public boolean hasMtlsSecurityScheme() {
+ return schemeCase_ == 5;
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ * @return The mtlsSecurityScheme.
+ */
+ @java.lang.Override
+ public io.a2a.grpc.MutualTlsSecurityScheme getMtlsSecurityScheme() {
+ if (mtlsSecuritySchemeBuilder_ == null) {
+ if (schemeCase_ == 5) {
+ return (io.a2a.grpc.MutualTlsSecurityScheme) scheme_;
+ }
+ return io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance();
+ } else {
+ if (schemeCase_ == 5) {
+ return mtlsSecuritySchemeBuilder_.getMessage();
+ }
+ return io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance();
+ }
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ public Builder setMtlsSecurityScheme(io.a2a.grpc.MutualTlsSecurityScheme value) {
+ if (mtlsSecuritySchemeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ scheme_ = value;
+ onChanged();
+ } else {
+ mtlsSecuritySchemeBuilder_.setMessage(value);
+ }
+ schemeCase_ = 5;
+ return this;
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ public Builder setMtlsSecurityScheme(
+ io.a2a.grpc.MutualTlsSecurityScheme.Builder builderForValue) {
+ if (mtlsSecuritySchemeBuilder_ == null) {
+ scheme_ = builderForValue.build();
+ onChanged();
+ } else {
+ mtlsSecuritySchemeBuilder_.setMessage(builderForValue.build());
+ }
+ schemeCase_ = 5;
+ return this;
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ public Builder mergeMtlsSecurityScheme(io.a2a.grpc.MutualTlsSecurityScheme value) {
+ if (mtlsSecuritySchemeBuilder_ == null) {
+ if (schemeCase_ == 5 &&
+ scheme_ != io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance()) {
+ scheme_ = io.a2a.grpc.MutualTlsSecurityScheme.newBuilder((io.a2a.grpc.MutualTlsSecurityScheme) scheme_)
+ .mergeFrom(value).buildPartial();
+ } else {
+ scheme_ = value;
+ }
+ onChanged();
+ } else {
+ if (schemeCase_ == 5) {
+ mtlsSecuritySchemeBuilder_.mergeFrom(value);
+ } else {
+ mtlsSecuritySchemeBuilder_.setMessage(value);
+ }
+ }
+ schemeCase_ = 5;
+ return this;
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ public Builder clearMtlsSecurityScheme() {
+ if (mtlsSecuritySchemeBuilder_ == null) {
+ if (schemeCase_ == 5) {
+ schemeCase_ = 0;
+ scheme_ = null;
+ onChanged();
+ }
+ } else {
+ if (schemeCase_ == 5) {
+ schemeCase_ = 0;
+ scheme_ = null;
+ }
+ mtlsSecuritySchemeBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ public io.a2a.grpc.MutualTlsSecurityScheme.Builder getMtlsSecuritySchemeBuilder() {
+ return internalGetMtlsSecuritySchemeFieldBuilder().getBuilder();
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ @java.lang.Override
+ public io.a2a.grpc.MutualTlsSecuritySchemeOrBuilder getMtlsSecuritySchemeOrBuilder() {
+ if ((schemeCase_ == 5) && (mtlsSecuritySchemeBuilder_ != null)) {
+ return mtlsSecuritySchemeBuilder_.getMessageOrBuilder();
+ } else {
+ if (schemeCase_ == 5) {
+ return (io.a2a.grpc.MutualTlsSecurityScheme) scheme_;
+ }
+ return io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance();
+ }
+ }
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ io.a2a.grpc.MutualTlsSecurityScheme, io.a2a.grpc.MutualTlsSecurityScheme.Builder, io.a2a.grpc.MutualTlsSecuritySchemeOrBuilder>
+ internalGetMtlsSecuritySchemeFieldBuilder() {
+ if (mtlsSecuritySchemeBuilder_ == null) {
+ if (!(schemeCase_ == 5)) {
+ scheme_ = io.a2a.grpc.MutualTlsSecurityScheme.getDefaultInstance();
+ }
+ mtlsSecuritySchemeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ io.a2a.grpc.MutualTlsSecurityScheme, io.a2a.grpc.MutualTlsSecurityScheme.Builder, io.a2a.grpc.MutualTlsSecuritySchemeOrBuilder>(
+ (io.a2a.grpc.MutualTlsSecurityScheme) scheme_,
+ getParentForChildren(),
+ isClean());
+ scheme_ = null;
+ }
+ schemeCase_ = 5;
+ onChanged();
+ return mtlsSecuritySchemeBuilder_;
+ }
+
// @@protoc_insertion_point(builder_scope:a2a.v1.SecurityScheme)
}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SecuritySchemeOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/SecuritySchemeOrBuilder.java
index b79be8faf..83a6c0f00 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/SecuritySchemeOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/SecuritySchemeOrBuilder.java
@@ -70,5 +70,20 @@ public interface SecuritySchemeOrBuilder extends
*/
io.a2a.grpc.OpenIdConnectSecuritySchemeOrBuilder getOpenIdConnectSecuritySchemeOrBuilder();
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ * @return Whether the mtlsSecurityScheme field is set.
+ */
+ boolean hasMtlsSecurityScheme();
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ * @return The mtlsSecurityScheme.
+ */
+ io.a2a.grpc.MutualTlsSecurityScheme getMtlsSecurityScheme();
+ /**
+ * .a2a.v1.MutualTlsSecurityScheme mtls_security_scheme = 5;
+ */
+ io.a2a.grpc.MutualTlsSecuritySchemeOrBuilder getMtlsSecuritySchemeOrBuilder();
+
io.a2a.grpc.SecurityScheme.SchemeCase getSchemeCase();
}
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java
index 53e563640..8882b6d6a 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java
@@ -51,7 +51,7 @@ private SendMessageRequest() {
public static final int REQUEST_FIELD_NUMBER = 1;
private io.a2a.grpc.Message request_;
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
* @return Whether the request field is set.
*/
@java.lang.Override
@@ -59,7 +59,7 @@ public boolean hasRequest() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
* @return The request.
*/
@java.lang.Override
@@ -67,7 +67,7 @@ public io.a2a.grpc.Message getRequest() {
return request_ == null ? io.a2a.grpc.Message.getDefaultInstance() : request_;
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public io.a2a.grpc.MessageOrBuilder getRequestOrBuilder() {
@@ -525,14 +525,14 @@ public Builder mergeFrom(
private com.google.protobuf.SingleFieldBuilder<
io.a2a.grpc.Message, io.a2a.grpc.Message.Builder, io.a2a.grpc.MessageOrBuilder> requestBuilder_;
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
* @return Whether the request field is set.
*/
public boolean hasRequest() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
* @return The request.
*/
public io.a2a.grpc.Message getRequest() {
@@ -543,7 +543,7 @@ public io.a2a.grpc.Message getRequest() {
}
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
public Builder setRequest(io.a2a.grpc.Message value) {
if (requestBuilder_ == null) {
@@ -559,7 +559,7 @@ public Builder setRequest(io.a2a.grpc.Message value) {
return this;
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
public Builder setRequest(
io.a2a.grpc.Message.Builder builderForValue) {
@@ -573,7 +573,7 @@ public Builder setRequest(
return this;
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeRequest(io.a2a.grpc.Message value) {
if (requestBuilder_ == null) {
@@ -594,7 +594,7 @@ public Builder mergeRequest(io.a2a.grpc.Message value) {
return this;
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
public Builder clearRequest() {
bitField0_ = (bitField0_ & ~0x00000001);
@@ -607,7 +607,7 @@ public Builder clearRequest() {
return this;
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
public io.a2a.grpc.Message.Builder getRequestBuilder() {
bitField0_ |= 0x00000001;
@@ -615,7 +615,7 @@ public io.a2a.grpc.Message.Builder getRequestBuilder() {
return internalGetRequestFieldBuilder().getBuilder();
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
public io.a2a.grpc.MessageOrBuilder getRequestOrBuilder() {
if (requestBuilder_ != null) {
@@ -626,7 +626,7 @@ public io.a2a.grpc.MessageOrBuilder getRequestOrBuilder() {
}
}
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilder<
io.a2a.grpc.Message, io.a2a.grpc.Message.Builder, io.a2a.grpc.MessageOrBuilder>
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequestOrBuilder.java
index fc3632f6b..13dae6c0e 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequestOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequestOrBuilder.java
@@ -11,17 +11,17 @@ public interface SendMessageRequestOrBuilder extends
com.google.protobuf.MessageOrBuilder {
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
* @return Whether the request field is set.
*/
boolean hasRequest();
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
* @return The request.
*/
io.a2a.grpc.Message getRequest();
/**
- * .a2a.v1.Message request = 1 [(.google.api.field_behavior) = REQUIRED];
+ * .a2a.v1.Message request = 1 [json_name = "message", (.google.api.field_behavior) = REQUIRED];
*/
io.a2a.grpc.MessageOrBuilder getRequestOrBuilder();
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java b/spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java
index 73158ecf2..52a6b6719 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java
@@ -18,6 +18,7 @@
import io.a2a.spec.APIKeySecurityScheme;
import io.a2a.spec.AgentCapabilities;
import io.a2a.spec.AgentCard;
+import io.a2a.spec.AgentCardSignature;
import io.a2a.spec.AgentExtension;
import io.a2a.spec.AgentInterface;
import io.a2a.spec.AgentProvider;
@@ -35,10 +36,13 @@
import io.a2a.spec.GetTaskPushNotificationConfigParams;
import io.a2a.spec.HTTPAuthSecurityScheme;
import io.a2a.spec.ImplicitOAuthFlow;
+import io.a2a.spec.InvalidParamsError;
+import io.a2a.spec.InvalidRequestError;
import io.a2a.spec.ListTaskPushNotificationConfigParams;
import io.a2a.spec.Message;
import io.a2a.spec.MessageSendConfiguration;
import io.a2a.spec.MessageSendParams;
+import io.a2a.spec.MutualTLSSecurityScheme;
import io.a2a.spec.OAuth2SecurityScheme;
import io.a2a.spec.OAuthFlows;
import io.a2a.spec.OpenIdConnectSecurityScheme;
@@ -124,6 +128,9 @@ public static io.a2a.grpc.AgentCard agentCard(AgentCard agentCard) {
builder.addAllSkills(agentCard.skills().stream().map(ToProto::agentSkill).collect(Collectors.toList()));
}
builder.setSupportsAuthenticatedExtendedCard(agentCard.supportsAuthenticatedExtendedCard());
+ if (agentCard.signatures() != null) {
+ builder.addAllSignatures(agentCard.signatures().stream().map(ToProto::agentCardSignature).collect(Collectors.toList()));
+ }
return builder.build();
}
@@ -395,6 +402,27 @@ private static io.a2a.grpc.AgentSkill agentSkill(AgentSkill agentSkill) {
if (agentSkill.outputModes() != null) {
builder.addAllOutputModes(agentSkill.outputModes());
}
+ if (agentSkill.security() != null) {
+ builder.addAllSecurity(agentSkill.security().stream().map(s -> {
+ io.a2a.grpc.Security.Builder securityBuilder = io.a2a.grpc.Security.newBuilder();
+ s.forEach((key, value) -> {
+ io.a2a.grpc.StringList.Builder stringListBuilder = io.a2a.grpc.StringList.newBuilder();
+ stringListBuilder.addAllList(value);
+ securityBuilder.putSchemes(key, stringListBuilder.build());
+ });
+ return securityBuilder.build();
+ }).collect(Collectors.toList()));
+ }
+ return builder.build();
+ }
+
+ private static io.a2a.grpc.AgentCardSignature agentCardSignature(AgentCardSignature agentCardSignature) {
+ io.a2a.grpc.AgentCardSignature.Builder builder = io.a2a.grpc.AgentCardSignature.newBuilder();
+ builder.setProtected(agentCardSignature.protectedHeader());
+ builder.setSignature(agentCardSignature.signature());
+ if (agentCardSignature.header() != null) {
+ builder.setHeader(struct(agentCardSignature.header()));
+ }
return builder.build();
}
@@ -408,6 +436,8 @@ private static io.a2a.grpc.SecurityScheme securityScheme(SecurityScheme security
builder.setOauth2SecurityScheme(oauthSecurityScheme((OAuth2SecurityScheme) securityScheme));
} else if (securityScheme instanceof OpenIdConnectSecurityScheme) {
builder.setOpenIdConnectSecurityScheme(openIdConnectSecurityScheme((OpenIdConnectSecurityScheme) securityScheme));
+ } else if (securityScheme instanceof MutualTLSSecurityScheme) {
+ builder.setMtlsSecurityScheme(mutualTlsSecurityScheme((MutualTLSSecurityScheme) securityScheme));
}
return builder.build();
}
@@ -448,6 +478,9 @@ private static io.a2a.grpc.OAuth2SecurityScheme oauthSecurityScheme(OAuth2Securi
if (oauth2SecurityScheme.getFlows() != null) {
builder.setFlows(oauthFlows(oauth2SecurityScheme.getFlows()));
}
+ if (oauth2SecurityScheme.getOauth2MetadataUrl() != null) {
+ builder.setOauth2MetadataUrl(oauth2SecurityScheme.getOauth2MetadataUrl());
+ }
return builder.build();
}
@@ -538,6 +571,14 @@ private static io.a2a.grpc.OpenIdConnectSecurityScheme openIdConnectSecuritySche
return builder.build();
}
+ private static io.a2a.grpc.MutualTlsSecurityScheme mutualTlsSecurityScheme(MutualTLSSecurityScheme mutualTlsSecurityScheme) {
+ io.a2a.grpc.MutualTlsSecurityScheme.Builder builder = io.a2a.grpc.MutualTlsSecurityScheme.newBuilder();
+ if (mutualTlsSecurityScheme.getDescription() != null) {
+ builder.setDescription(mutualTlsSecurityScheme.getDescription());
+ }
+ return builder.build();
+ }
+
private static io.a2a.grpc.AgentInterface agentInterface(AgentInterface agentInterface) {
io.a2a.grpc.AgentInterface.Builder builder = io.a2a.grpc.AgentInterface.newBuilder();
if (agentInterface.transport() != null) {
@@ -751,12 +792,15 @@ public static Task task(io.a2a.grpc.Task task) {
}
public static Message message(io.a2a.grpc.Message message) {
+ if (message.getMessageId().isEmpty()) {
+ throw new InvalidParamsError();
+ }
return new Message(
role(message.getRole()),
message.getContentList().stream().map(item -> part(item)).collect(Collectors.toList()),
message.getMessageId().isEmpty() ? null : message.getMessageId(),
message.getContextId().isEmpty() ? null : message.getContextId(),
- message.getTaskId(),
+ message.getTaskId().isEmpty() ? null : message.getTaskId(),
null, // referenceTaskIds is not in grpc message
struct(message.getMetadata())
);
@@ -801,7 +845,7 @@ private static Part> part(io.a2a.grpc.Part part) {
} else if (part.hasData()) {
return dataPart(part.getData());
}
- return null;
+ throw new InvalidRequestError();
}
private static TextPart textPart(String text) {
@@ -814,7 +858,7 @@ private static FilePart filePart(io.a2a.grpc.FilePart filePart) {
} else if (filePart.hasFileWithUri()) {
return new FilePart(new FileWithUri(filePart.getMimeType(), null, filePart.getFileWithUri()));
}
- return null;
+ throw new InvalidRequestError();
}
private static DataPart dataPart(io.a2a.grpc.DataPart dataPart) {
@@ -839,7 +883,7 @@ private static Message.Role role(io.a2a.grpc.Role role) {
case ROLE_AGENT ->
Message.Role.AGENT;
default ->
- null;
+ throw new InvalidRequestError();
};
}
@@ -895,7 +939,7 @@ private static Object value(Value value) {
return value.getStringValue();
case NULL_VALUE:
default:
- return null;
+ throw new InvalidRequestError();
}
}
}
diff --git a/spec-grpc/src/main/proto/a2a.proto b/spec-grpc/src/main/proto/a2a.proto
index 8bada0795..8b1230059 100644
--- a/spec-grpc/src/main/proto/a2a.proto
+++ b/spec-grpc/src/main/proto/a2a.proto
@@ -9,7 +9,7 @@ import "google/protobuf/empty.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
-// Copied from https://github.com/a2aproject/A2A/blob/v0.2.6/specification/grpc/a2a.proto
+// Copied from https://github.com/a2aproject/A2A/blob/v0.3.0/specification/grpc/a2a.proto
// The only change is the 'java_package' update
option csharp_namespace = "A2a.V1";
@@ -345,6 +345,7 @@ message AgentInterface {
// - Skills; a set of actions/solutions the agent can perform
// - Default modalities/content types supported by the agent.
// - Authentication requirements
+// Next ID: 18
message AgentCard {
// The version of the A2A protocol this agent supports.
string protocol_version = 16;
@@ -375,6 +376,18 @@ message AgentCard {
map security_schemes = 8;
// protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
// Security requirements for contacting the agent.
+ // This list can be seen as an OR of ANDs. Each object in the list describes
+ // one possible set of security requirements that must be present on a
+ // request. This allows specifying, for example, "callers must either use
+ // OAuth OR an API Key AND mTLS."
+ // Example:
+ // security {
+ // schemes { key: "oauth" value { list: ["read"] } }
+ // }
+ // security {
+ // schemes { key: "api-key" }
+ // schemes { key: "mtls" }
+ // }
repeated Security security = 9;
// protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
// The set of interaction modes that the agent supports across all skills.
@@ -390,6 +403,8 @@ message AgentCard {
// the user is authenticated, i.e. is the card from .well-known
// different than the card from GetAgentCard.
bool supports_authenticated_extended_card = 13;
+ // JSON Web Signatures computed for this AgentCard.
+ repeated AgentCardSignature signatures = 17;
}
// Represents information about the service provider of an agent.
@@ -452,6 +467,24 @@ message AgentSkill {
repeated string input_modes = 6;
// Possible output modalities produced
repeated string output_modes = 7;
+ // protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
+ // Security schemes necessary for the agent to leverage this skill.
+ // As in the overall AgentCard.security, this list represents a logical OR of
+ // security requirement objects. Each object is a set of security schemes
+ // that must be used together (a logical AND).
+ repeated Security security = 8;
+}
+
+// AgentCardSignature represents a JWS signature of an AgentCard.
+// This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
+message AgentCardSignature {
+ // The protected JWS header for the signature. This is always a
+ // base64url-encoded JSON object. Required.
+ string protected = 1 [(google.api.field_behavior) = REQUIRED];
+ // The computed signature, base64url-encoded. Required.
+ string signature = 2 [(google.api.field_behavior) = REQUIRED];
+ // The unprotected JWS header values.
+ google.protobuf.Struct header = 3;
}
message TaskPushNotificationConfig {
@@ -476,6 +509,7 @@ message SecurityScheme {
HTTPAuthSecurityScheme http_auth_security_scheme = 2;
OAuth2SecurityScheme oauth2_security_scheme = 3;
OpenIdConnectSecurityScheme open_id_connect_security_scheme = 4;
+ MutualTlsSecurityScheme mtls_security_scheme = 5;
}
}
@@ -507,6 +541,9 @@ message OAuth2SecurityScheme {
string description = 1;
// An object containing configuration information for the flow types supported
OAuthFlows flows = 2;
+ // URL to the oauth2 authorization server metadata
+ // [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required.
+ string oauth2_metadata_url = 3;
}
message OpenIdConnectSecurityScheme {
@@ -517,6 +554,11 @@ message OpenIdConnectSecurityScheme {
string open_id_connect_url = 2;
}
+message MutualTlsSecurityScheme {
+ // Description of this security scheme.
+ string description = 1;
+}
+
message OAuthFlows {
oneof flow {
AuthorizationCodeOAuthFlow authorization_code = 1;
@@ -579,7 +621,8 @@ message PasswordOAuthFlow {
///////////// Request Messages ///////////
message SendMessageRequest {
- Message request = 1 [(google.api.field_behavior) = REQUIRED];
+ Message request = 1
+ [(google.api.field_behavior) = REQUIRED, json_name = "message"];
SendMessageConfiguration configuration = 2;
google.protobuf.Struct metadata = 3;
}
diff --git a/spec-grpc/src/main/resources/META-INF/beans.xml b/spec-grpc/src/main/resources/META-INF/beans.xml
index be7990041..e69de29bb 100644
--- a/spec-grpc/src/main/resources/META-INF/beans.xml
+++ b/spec-grpc/src/main/resources/META-INF/beans.xml
@@ -1,6 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/spec/pom.xml b/spec/pom.xml
index ce67def18..ee377b421 100644
--- a/spec/pom.xml
+++ b/spec/pom.xml
@@ -7,7 +7,7 @@
io.github.a2asdk
a2a-java-sdk-parent
- 0.2.6.Beta1-SNAPSHOT
+ 0.3.0.Beta1-SNAPSHOT
a2a-java-sdk-spec
diff --git a/spec/src/main/java/io/a2a/spec/APIKeySecurityScheme.java b/spec/src/main/java/io/a2a/spec/APIKeySecurityScheme.java
index acf33feba..73ecd134c 100644
--- a/spec/src/main/java/io/a2a/spec/APIKeySecurityScheme.java
+++ b/spec/src/main/java/io/a2a/spec/APIKeySecurityScheme.java
@@ -9,7 +9,7 @@
import io.a2a.util.Assert;
/**
- * Represents an API Key security scheme.
+ * Defines a security scheme using an API key.
*/
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/spec/src/main/java/io/a2a/spec/AgentCapabilities.java b/spec/src/main/java/io/a2a/spec/AgentCapabilities.java
index 641f56ccb..1c6fdf1b2 100644
--- a/spec/src/main/java/io/a2a/spec/AgentCapabilities.java
+++ b/spec/src/main/java/io/a2a/spec/AgentCapabilities.java
@@ -6,7 +6,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;
/**
- * An agent's capabilities.
+ * Defines optional capabilities supported by an agent.
*/
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/spec/src/main/java/io/a2a/spec/AgentCard.java b/spec/src/main/java/io/a2a/spec/AgentCard.java
index e394fb626..a2e806ffc 100644
--- a/spec/src/main/java/io/a2a/spec/AgentCard.java
+++ b/spec/src/main/java/io/a2a/spec/AgentCard.java
@@ -1,5 +1,6 @@
package io.a2a.spec;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -8,8 +9,9 @@
import io.a2a.util.Assert;
/**
- * A public metadata file that describes an agent's capabilities, skills, endpoint URL, and
- * authentication requirements. Clients use this for discovery.
+ * The AgentCard is a self-describing manifest for an agent. It provides essential
+ * metadata including the agent's identity, capabilities, skills, supported
+ * communication methods, and security requirements.
*/
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -18,9 +20,11 @@ public record AgentCard(String name, String description, String url, AgentProvid
List defaultInputModes, List defaultOutputModes, List skills,
boolean supportsAuthenticatedExtendedCard, Map securitySchemes,
List