diff --git a/src/A2A.Client.Abstractions/A2A.Client.Abstractions.csproj b/src/A2A.Client.Abstractions/A2A.Client.Abstractions.csproj
index 40ddea1..9dca3ab 100644
--- a/src/A2A.Client.Abstractions/A2A.Client.Abstractions.csproj
+++ b/src/A2A.Client.Abstractions/A2A.Client.Abstractions.csproj
@@ -5,7 +5,7 @@
enable
enable
A2A.Client
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Client.Transports.Grpc/A2A.Client.Transports.Grpc.csproj b/src/A2A.Client.Transports.Grpc/A2A.Client.Transports.Grpc.csproj
index c8ef900..e27d9d0 100644
--- a/src/A2A.Client.Transports.Grpc/A2A.Client.Transports.Grpc.csproj
+++ b/src/A2A.Client.Transports.Grpc/A2A.Client.Transports.Grpc.csproj
@@ -5,7 +5,7 @@
enable
enable
A2A.Client.Transports
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Client.Transports.Http/A2A.Client.Transports.Http.csproj b/src/A2A.Client.Transports.Http/A2A.Client.Transports.Http.csproj
index 99d5e0f..89a2d25 100644
--- a/src/A2A.Client.Transports.Http/A2A.Client.Transports.Http.csproj
+++ b/src/A2A.Client.Transports.Http/A2A.Client.Transports.Http.csproj
@@ -5,7 +5,7 @@
enable
enable
A2A.Client.Transports
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Client.Transports.Http/Extensions/A2AClientBuilderExtensions.cs b/src/A2A.Client.Transports.Http/Extensions/A2AClientBuilderExtensions.cs
index 32ec572..78e9cda 100644
--- a/src/A2A.Client.Transports.Http/Extensions/A2AClientBuilderExtensions.cs
+++ b/src/A2A.Client.Transports.Http/Extensions/A2AClientBuilderExtensions.cs
@@ -26,17 +26,36 @@ public static class A2AClientBuilderExtensions
/// Configures the to use the HTTP transport.
///
/// The to configure.
- /// The based address of the server to connect to.
+ /// An used to configure the underlying .
+ /// An , if any, used to configure the used to build the underlying .
/// The configured .
- public static IA2AClientBuilder UseHttpTransport(this IA2AClientBuilder builder, Uri baseAddress)
+ public static IA2AClientBuilder UseHttpTransport(this IA2AClientBuilder builder, Action configureClient, Action? configureClientBuilder = null)
{
- builder.Services.AddHttpClient(httpClient =>
+ var httpClientBuilder = builder.Services.AddHttpClient((provider, httpClient) =>
{
- httpClient.BaseAddress = baseAddress;
httpClient.DefaultRequestHeaders.Add("A2A-Version", A2AProtocolVersion.Latest);
+ configureClient(provider, httpClient);
});
- builder.Services.AddSingleton(provider => provider.GetRequiredService());
+ configureClientBuilder?.Invoke(httpClientBuilder);
return builder.UseTransport();
}
+ ///
+ /// Configures the to use the HTTP transport.
+ ///
+ /// The to configure.
+ /// An used to configure the underlying .
+ /// An , if any, used to configure the used to build the underlying .
+ /// The configured .
+ public static IA2AClientBuilder UseHttpTransport(this IA2AClientBuilder builder, Action configureClient, Action? configureClientBuilder = null) => UseHttpTransport(builder, (_, httpClient) => configureClient(httpClient), configureClientBuilder);
+
+ ///
+ /// Configures the to use the HTTP transport.
+ ///
+ /// The to configure.
+ /// The based address of the server to connect to.
+ /// An , if any, used to configure the used to build the underlying .
+ /// The configured .
+ public static IA2AClientBuilder UseHttpTransport(this IA2AClientBuilder builder, Uri baseAddress, Action? configureClientBuilder = null) => UseHttpTransport(builder, httpClient => httpClient.BaseAddress = baseAddress, configureClientBuilder);
+
}
diff --git a/src/A2A.Client.Transports.JsonRpc/A2A.Client.Transports.JsonRpc.csproj b/src/A2A.Client.Transports.JsonRpc/A2A.Client.Transports.JsonRpc.csproj
index caedf45..0016e2a 100644
--- a/src/A2A.Client.Transports.JsonRpc/A2A.Client.Transports.JsonRpc.csproj
+++ b/src/A2A.Client.Transports.JsonRpc/A2A.Client.Transports.JsonRpc.csproj
@@ -5,7 +5,7 @@
enable
enable
A2A.Client.Transports
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Client.Transports.JsonRpc/Extensions/A2AClientBuilderExtensions.cs b/src/A2A.Client.Transports.JsonRpc/Extensions/A2AClientBuilderExtensions.cs
index ade663f..cc538d6 100644
--- a/src/A2A.Client.Transports.JsonRpc/Extensions/A2AClientBuilderExtensions.cs
+++ b/src/A2A.Client.Transports.JsonRpc/Extensions/A2AClientBuilderExtensions.cs
@@ -26,17 +26,36 @@ public static class A2AClientBuilderExtensions
/// Configures the to use the JSON-RPC transport.
///
/// The to configure.
- /// The based address of the server to connect to.
+ /// An used to configure the underlying .
+ /// An , if any, used to configure the used to build the underlying .
/// The configured .
- public static IA2AClientBuilder UseJsonRpcTransport(this IA2AClientBuilder builder, Uri baseAddress)
+ public static IA2AClientBuilder UseJsonRpcTransport(this IA2AClientBuilder builder, Action configureClient, Action? configureClientBuilder = null)
{
- builder.Services.AddHttpClient(httpClient =>
+ var httpClientBuilder = builder.Services.AddHttpClient((provider, httpClient) =>
{
- httpClient.BaseAddress = baseAddress;
httpClient.DefaultRequestHeaders.Add("A2A-Version", A2AProtocolVersion.Latest);
+ configureClient(provider, httpClient);
});
- builder.Services.AddSingleton(provider => provider.GetRequiredService());
+ configureClientBuilder?.Invoke(httpClientBuilder);
return builder.UseTransport();
}
+ ///
+ /// Configures the to use the JSON-RPC transport.
+ ///
+ /// The to configure.
+ /// An used to configure the underlying .
+ /// An , if any, used to configure the used to build the underlying .
+ /// The configured .
+ public static IA2AClientBuilder UseJsonRpcTransport(this IA2AClientBuilder builder, Action configureClient, Action? configureClientBuilder = null) => UseJsonRpcTransport(builder, (_, httpClient) => configureClient(httpClient), configureClientBuilder);
+
+ ///
+ /// Configures the to use the JSON-RPC transport.
+ ///
+ /// The to configure.
+ /// The based address of the server to connect to.
+ /// An , if any, used to configure the used to build the underlying .
+ /// The configured .
+ public static IA2AClientBuilder UseJsonRpcTransport(this IA2AClientBuilder builder, Uri baseAddress, Action? configureClientBuilder = null) => UseJsonRpcTransport(builder, httpClient => httpClient.BaseAddress = baseAddress, configureClientBuilder);
+
}
diff --git a/src/A2A.Client/A2A.Client.csproj b/src/A2A.Client/A2A.Client.csproj
index 48591fc..4d1952c 100644
--- a/src/A2A.Client/A2A.Client.csproj
+++ b/src/A2A.Client/A2A.Client.csproj
@@ -5,7 +5,7 @@
enable
enable
A2A.Client
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Core.JsonRpc/A2A.Core.JsonRpc.csproj b/src/A2A.Core.JsonRpc/A2A.Core.JsonRpc.csproj
index 18f13c1..03cdc44 100644
--- a/src/A2A.Core.JsonRpc/A2A.Core.JsonRpc.csproj
+++ b/src/A2A.Core.JsonRpc/A2A.Core.JsonRpc.csproj
@@ -5,7 +5,7 @@
enable
enable
A2A
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Core/A2A.Core.csproj b/src/A2A.Core/A2A.Core.csproj
index 7fdca5e..3039a0a 100644
--- a/src/A2A.Core/A2A.Core.csproj
+++ b/src/A2A.Core/A2A.Core.csproj
@@ -5,7 +5,7 @@
enable
enable
A2A
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Extensions.A2UI/A2A.Extensions.A2UI.csproj b/src/A2A.Extensions.A2UI/A2A.Extensions.A2UI.csproj
index f82462b..c5c1fff 100644
--- a/src/A2A.Extensions.A2UI/A2A.Extensions.A2UI.csproj
+++ b/src/A2A.Extensions.A2UI/A2A.Extensions.A2UI.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Extensions
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.Abstractions/A2A.Server.Abstractions.csproj b/src/A2A.Server.Abstractions/A2A.Server.Abstractions.csproj
index 676efbf..6d0f902 100644
--- a/src/A2A.Server.Abstractions/A2A.Server.Abstractions.csproj
+++ b/src/A2A.Server.Abstractions/A2A.Server.Abstractions.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.AspNetCore/A2A.Server.csproj b/src/A2A.Server.AspNetCore/A2A.Server.csproj
index 51b9db4..986b7de 100644
--- a/src/A2A.Server.AspNetCore/A2A.Server.csproj
+++ b/src/A2A.Server.AspNetCore/A2A.Server.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.Persistence.Memory/A2A.Server.Persistence.Memory.csproj b/src/A2A.Server.Persistence.Memory/A2A.Server.Persistence.Memory.csproj
index 40efccc..e0bb0c2 100644
--- a/src/A2A.Server.Persistence.Memory/A2A.Server.Persistence.Memory.csproj
+++ b/src/A2A.Server.Persistence.Memory/A2A.Server.Persistence.Memory.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.Persistence.Redis/A2A.Server.Persistence.Redis.csproj b/src/A2A.Server.Persistence.Redis/A2A.Server.Persistence.Redis.csproj
index d4044dd..d19640f 100644
--- a/src/A2A.Server.Persistence.Redis/A2A.Server.Persistence.Redis.csproj
+++ b/src/A2A.Server.Persistence.Redis/A2A.Server.Persistence.Redis.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.Scheduling.Memory/A2A.Server.Scheduling.Memory.csproj b/src/A2A.Server.Scheduling.Memory/A2A.Server.Scheduling.Memory.csproj
index b70c978..dcee92d 100644
--- a/src/A2A.Server.Scheduling.Memory/A2A.Server.Scheduling.Memory.csproj
+++ b/src/A2A.Server.Scheduling.Memory/A2A.Server.Scheduling.Memory.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.Scheduling.Quartz/A2A.Server.Scheduling.Quartz.csproj b/src/A2A.Server.Scheduling.Quartz/A2A.Server.Scheduling.Quartz.csproj
index 00d6c25..e04c8e8 100644
--- a/src/A2A.Server.Scheduling.Quartz/A2A.Server.Scheduling.Quartz.csproj
+++ b/src/A2A.Server.Scheduling.Quartz/A2A.Server.Scheduling.Quartz.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.Transports.Grpc/A2A.Server.Transports.Grpc.csproj b/src/A2A.Server.Transports.Grpc/A2A.Server.Transports.Grpc.csproj
index bb3adc8..f42364c 100644
--- a/src/A2A.Server.Transports.Grpc/A2A.Server.Transports.Grpc.csproj
+++ b/src/A2A.Server.Transports.Grpc/A2A.Server.Transports.Grpc.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server.Transports
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.Transports.Http/A2A.Server.Transports.Http.csproj b/src/A2A.Server.Transports.Http/A2A.Server.Transports.Http.csproj
index 760cf13..2b3f78f 100644
--- a/src/A2A.Server.Transports.Http/A2A.Server.Transports.Http.csproj
+++ b/src/A2A.Server.Transports.Http/A2A.Server.Transports.Http.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server.Transports
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en
diff --git a/src/A2A.Server.Transports.JsonRpc/A2A.Server.Transports.JsonRpc.csproj b/src/A2A.Server.Transports.JsonRpc/A2A.Server.Transports.JsonRpc.csproj
index e19c89a..e249768 100644
--- a/src/A2A.Server.Transports.JsonRpc/A2A.Server.Transports.JsonRpc.csproj
+++ b/src/A2A.Server.Transports.JsonRpc/A2A.Server.Transports.JsonRpc.csproj
@@ -6,7 +6,7 @@
enable
enable
A2A.Server.Transports
- 0.17.0
+ 0.18.0
$(VersionPrefix)
$(VersionPrefix)
en