|
17 | 17 | import io.a2a.spec.APIKeySecurityScheme; |
18 | 18 | import io.a2a.spec.AgentCapabilities; |
19 | 19 | import io.a2a.spec.AgentCard; |
| 20 | +import io.a2a.spec.AgentCardSignature; |
20 | 21 | import io.a2a.spec.AgentExtension; |
21 | 22 | import io.a2a.spec.AgentInterface; |
22 | 23 | import io.a2a.spec.AgentProvider; |
@@ -122,6 +123,9 @@ public static io.a2a.grpc.AgentCard agentCard(AgentCard agentCard) { |
122 | 123 | builder.addAllSkills(agentCard.skills().stream().map(ToProto::agentSkill).collect(Collectors.toList())); |
123 | 124 | } |
124 | 125 | builder.setSupportsAuthenticatedExtendedCard(agentCard.supportsAuthenticatedExtendedCard()); |
| 126 | + if (agentCard.signatures() != null) { |
| 127 | + builder.addAllSignatures(agentCard.signatures().stream().map(ToProto::agentCardSignature).collect(Collectors.toList())); |
| 128 | + } |
125 | 129 | return builder.build(); |
126 | 130 | } |
127 | 131 |
|
@@ -377,6 +381,16 @@ private static io.a2a.grpc.AgentSkill agentSkill(AgentSkill agentSkill) { |
377 | 381 | return builder.build(); |
378 | 382 | } |
379 | 383 |
|
| 384 | + private static io.a2a.grpc.AgentCardSignature agentCardSignature(AgentCardSignature agentCardSignature) { |
| 385 | + io.a2a.grpc.AgentCardSignature.Builder builder = io.a2a.grpc.AgentCardSignature.newBuilder(); |
| 386 | + builder.setProtected(agentCardSignature.protectedHeader()); |
| 387 | + builder.setSignature(agentCardSignature.signature()); |
| 388 | + if (agentCardSignature.header() != null) { |
| 389 | + builder.setHeader(struct(agentCardSignature.header())); |
| 390 | + } |
| 391 | + return builder.build(); |
| 392 | + } |
| 393 | + |
380 | 394 | private static io.a2a.grpc.SecurityScheme securityScheme(SecurityScheme securityScheme) { |
381 | 395 | io.a2a.grpc.SecurityScheme.Builder builder = io.a2a.grpc.SecurityScheme.newBuilder(); |
382 | 396 | if (securityScheme instanceof APIKeySecurityScheme) { |
|
0 commit comments