|
18 | 18 | import io.a2a.spec.APIKeySecurityScheme; |
19 | 19 | import io.a2a.spec.AgentCapabilities; |
20 | 20 | import io.a2a.spec.AgentCard; |
| 21 | +import io.a2a.spec.AgentCardSignature; |
21 | 22 | import io.a2a.spec.AgentExtension; |
22 | 23 | import io.a2a.spec.AgentInterface; |
23 | 24 | import io.a2a.spec.AgentProvider; |
@@ -124,6 +125,9 @@ public static io.a2a.grpc.AgentCard agentCard(AgentCard agentCard) { |
124 | 125 | builder.addAllSkills(agentCard.skills().stream().map(ToProto::agentSkill).collect(Collectors.toList())); |
125 | 126 | } |
126 | 127 | builder.setSupportsAuthenticatedExtendedCard(agentCard.supportsAuthenticatedExtendedCard()); |
| 128 | + if (agentCard.signatures() != null) { |
| 129 | + builder.addAllSignatures(agentCard.signatures().stream().map(ToProto::agentCardSignature).collect(Collectors.toList())); |
| 130 | + } |
127 | 131 | return builder.build(); |
128 | 132 | } |
129 | 133 |
|
@@ -398,6 +402,16 @@ private static io.a2a.grpc.AgentSkill agentSkill(AgentSkill agentSkill) { |
398 | 402 | return builder.build(); |
399 | 403 | } |
400 | 404 |
|
| 405 | + private static io.a2a.grpc.AgentCardSignature agentCardSignature(AgentCardSignature agentCardSignature) { |
| 406 | + io.a2a.grpc.AgentCardSignature.Builder builder = io.a2a.grpc.AgentCardSignature.newBuilder(); |
| 407 | + builder.setProtected(agentCardSignature.protectedHeader()); |
| 408 | + builder.setSignature(agentCardSignature.signature()); |
| 409 | + if (agentCardSignature.header() != null) { |
| 410 | + builder.setHeader(struct(agentCardSignature.header())); |
| 411 | + } |
| 412 | + return builder.build(); |
| 413 | + } |
| 414 | + |
401 | 415 | private static io.a2a.grpc.SecurityScheme securityScheme(SecurityScheme securityScheme) { |
402 | 416 | io.a2a.grpc.SecurityScheme.Builder builder = io.a2a.grpc.SecurityScheme.newBuilder(); |
403 | 417 | if (securityScheme instanceof APIKeySecurityScheme) { |
|
0 commit comments