a2a.compat.v0_3.context_builders module¶
Context builders that add v0.3 backwards-compatibility for extensions.
The current spec uses A2A-Extensions (RFC 6648, no X- prefix). v0.3
clients still send the old X-A2A-Extensions name, so the v0.3 compat
adapters wrap the default builders with these classes to recognize both names.
- class a2a.compat.v0_3.context_builders.V03GrpcServerCallContextBuilder(inner: GrpcServerCallContextBuilder)¶
Bases:
objectWraps a GrpcServerCallContextBuilder to also accept the legacy metadata.
Recognizes the v0.3
X-A2A-ExtensionsgRPC metadata key in addition to the specA2A-Extensions.- build(context: grpc.aio.ServicerContext) ServerCallContext¶
Builds a ServerCallContext, merging legacy extension metadata.
- class a2a.compat.v0_3.context_builders.V03ServerCallContextBuilder(inner: ServerCallContextBuilder)¶
Bases:
objectWraps a ServerCallContextBuilder to also accept the legacy header.
Recognizes the v0.3
X-A2A-ExtensionsHTTP header in addition to the specA2A-Extensions.- build(request: Request) ServerCallContext¶
Builds a ServerCallContext, merging legacy extension headers.