Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/A2A/JsonRpc/ErrorTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public A2AClientException(string message, Exception? innerException = null)
/// <summary>
/// Exception for HTTP errors.
/// </summary>
public class A2AClientHTTPException : A2AClientException
public sealed class A2AClientHTTPException : A2AClientException
{
/// <summary>
/// The HTTP status code.
Expand Down Expand Up @@ -49,7 +49,7 @@ public A2AClientHTTPException(HttpStatusCode statusCode, string message)
/// <summary>
/// Exception for JSON parsing errors.
/// </summary>
public class A2AClientJsonException : A2AClientException
public sealed class A2AClientJsonException : A2AClientException
{
/// <summary>
/// The error message.
Expand All @@ -70,7 +70,7 @@ public A2AClientJsonException(string message)
/// <summary>
/// Exception for missing API key.
/// </summary>
public class MissingAPIKeyException : Exception
public sealed class MissingAPIKeyException : Exception
{
/// <summary>
/// Creates a new missing API key error.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/JsonRpc/JsonRpcRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace A2A;
/// <summary>
/// Represents a JSON-RPC 2.0 Request object.
/// </summary>
public class JsonRpcRequest
public sealed class JsonRpcRequest
{
/// <summary>
/// Gets or sets the version of the JSON-RPC protocol.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/JsonRpc/JsonRpcResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace A2A;
/// <summary>
/// Represents a JSON-RPC 2.0 Response object.
/// </summary>
public class JsonRpcResponse
public sealed class JsonRpcResponse
{
/// <summary>
/// Gets or sets the version of the JSON-RPC protocol. MUST be exactly "2.0".
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/JsonRpc/MethodNotFoundError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace A2A;
/// <summary>
/// Error for method not found.
/// </summary>
public class MethodNotFoundError : JsonRpcError
public sealed class MethodNotFoundError : JsonRpcError
{
/// <summary>
/// Creates a new method not found error.
Expand Down
4 changes: 2 additions & 2 deletions src/A2A/Models/A2AResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace A2A;
[JsonDerivedType(typeof(TaskArtifactUpdateEvent), "artifact-update")]
[JsonDerivedType(typeof(Message), "message")]
[JsonDerivedType(typeof(AgentTask), "task")]
public class A2AEvent
public abstract class A2AEvent
{
}

Expand All @@ -20,6 +20,6 @@ public class A2AEvent
[JsonPolymorphic(TypeDiscriminatorPropertyName = "kind")]
[JsonDerivedType(typeof(Message), "message")]
[JsonDerivedType(typeof(AgentTask), "task")]
public class A2AResponse : A2AEvent
public abstract class A2AResponse : A2AEvent
{
}
2 changes: 1 addition & 1 deletion src/A2A/Models/AgentCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Defines optional capabilities supported by an agent.
/// </summary>
public class AgentCapabilities
public sealed class AgentCapabilities
{
/// <summary>
/// Gets or sets a value indicating whether the agent supports SSE.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/AgentCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace A2A;
/// - Default modalities/content types supported by the agent.
/// - Authentication requirements.
/// </remarks>
public class AgentCard
public sealed class AgentCard
{
/// <summary>
/// Gets or sets the human readable name of the agent.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/AgentInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Provides a declaration of a combination of target URL and supported transport to interact with an agent.
/// </summary>
public class AgentInterface
public sealed class AgentInterface
{
/// <summary>
/// The transport supported by this URL.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/AgentProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Represents the service provider of an agent.
/// </summary>
public class AgentProvider
public sealed class AgentProvider
{
/// <summary>
/// Agent provider's organization name.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/AgentSkill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Represents a unit of capability that an agent can perform.
/// </summary>
public class AgentSkill
public sealed class AgentSkill
{
/// <summary>
/// Unique identifier for the agent's skill.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/AgentTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace A2A;
/// <summary>
/// Represents a task that can be processed by an agent.
/// </summary>
public class AgentTask : A2AResponse
public sealed class AgentTask : A2AResponse
{
/// <summary>
/// Unique identifier for the task.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/AgentTaskStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace A2A;
/// <remarks>
/// Contains the TaskState and accompanying message.
/// </remarks>
public class AgentTaskStatus
public sealed class AgentTaskStatus
{
/// <summary>
/// The current state of the task.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/Artifact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace A2A;
/// <summary>
/// Represents an artifact generated for a task.
/// </summary>
public class Artifact
public sealed class Artifact
{
/// <summary>
/// Unique identifier for the artifact.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/AuthenticationInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Defines authentication details for push notifications.
/// </summary>
public class AuthenticationInfo
public sealed class AuthenticationInfo
{
/// <summary>
/// Supported authentication schemes - e.g. Basic, Bearer.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/DataPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace A2A;
/// <summary>
/// Represents a structured data segment within a message part.
/// </summary>
public class DataPart : Part
public sealed class DataPart : Part
{
/// <summary>
/// Structured data content.
Expand Down
4 changes: 2 additions & 2 deletions src/A2A/Models/FileContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class FileContent
/// <summary>
/// Define the variant where 'bytes' is present and 'uri' is absent.
/// </summary>
public class FileWithBytes : FileContent
public sealed class FileWithBytes : FileContent
{
/// <summary>
/// Optional name for the file.
Expand Down Expand Up @@ -51,7 +51,7 @@ public class FileWithBytes : FileContent
/// <summary>
/// Define the variant where 'uri' is present and 'bytes' is absent.
/// </summary>
public class FileWithUri : FileContent
public sealed class FileWithUri : FileContent
{
/// <summary>
/// Optional name for the file.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/FilePart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Represents a File segment within parts.
/// </summary>
public class FilePart : Part
public sealed class FilePart : Part
{
/// <summary>
/// File content either as url or bytes.
Expand Down
4 changes: 2 additions & 2 deletions src/A2A/Models/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum MessageRole
/// <summary>
/// JSON converter for MessageRole enum.
/// </summary>
public class MessageRoleConverter : JsonConverter<MessageRole>
public sealed class MessageRoleConverter : JsonConverter<MessageRole>
{
/// <inheritdoc />
public override MessageRole Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Expand Down Expand Up @@ -52,7 +52,7 @@ public override void Write(Utf8JsonWriter writer, MessageRole value, JsonSeriali
/// <summary>
/// Represents a single message exchanged between user and agent.
/// </summary>
public class Message : A2AResponse
public sealed class Message : A2AResponse
{
/// <summary>
/// Message sender's role.
Expand Down
4 changes: 2 additions & 2 deletions src/A2A/Models/MessageSendParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace A2A;
/// <remarks>
/// Sent by the client to the agent as a request. May create, continue or restart a task.
/// </remarks>
public class MessageSendParams
public sealed class MessageSendParams
{
/// <summary>
/// The message being sent to the server.
Expand All @@ -34,7 +34,7 @@ public class MessageSendParams
/// <summary>
/// Configuration for the send message request.
/// </summary>
public class MessageSendConfiguration
public sealed class MessageSendConfiguration
{
/// <summary>
/// Accepted output modalities by the client.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/PushNotificationConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Configuration for setting up push notifications for task updates.
/// </summary>
public class PushNotificationConfig
public sealed class PushNotificationConfig
{
/// <summary>
/// URL for sending the push notifications.
Expand Down
18 changes: 9 additions & 9 deletions src/A2A/Models/SecurityScheme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SecurityScheme
/// <summary>
/// API Key security scheme.
/// </summary>
public class ApiKeySecurityScheme : SecurityScheme
public sealed class ApiKeySecurityScheme : SecurityScheme
{
/// <summary>
/// The name of the header, query or cookie parameter to be used.
Expand All @@ -39,7 +39,7 @@ public class ApiKeySecurityScheme : SecurityScheme
/// <summary>
/// HTTP Authentication security scheme.
/// </summary>
public class HttpAuthSecurityScheme : SecurityScheme
public sealed class HttpAuthSecurityScheme : SecurityScheme
{
/// <summary>
/// The name of the HTTP Authentication scheme to be used in the Authorization header as defined in RFC7235.
Expand All @@ -66,7 +66,7 @@ public class HttpAuthSecurityScheme : SecurityScheme
/// <summary>
/// OAuth2.0 security scheme configuration.
/// </summary>
public class OAuth2SecurityScheme : SecurityScheme
public sealed class OAuth2SecurityScheme : SecurityScheme
{
/// <summary>
/// An object containing configuration information for the flow types supported.
Expand All @@ -79,7 +79,7 @@ public class OAuth2SecurityScheme : SecurityScheme
/// <summary>
/// OpenID Connect security scheme configuration.
/// </summary>
public class OpenIdConnectSecurityScheme : SecurityScheme
public sealed class OpenIdConnectSecurityScheme : SecurityScheme
{
/// <summary>
/// Well-known URL to discover the [[OpenID-Connect-Discovery]] provider metadata.
Expand All @@ -92,7 +92,7 @@ public class OpenIdConnectSecurityScheme : SecurityScheme
/// <summary>
/// Allows configuration of the supported OAuth Flows.
/// </summary>
public class OAuthFlows
public sealed class OAuthFlows
{
/// <summary>
/// Configuration for the OAuth Authorization Code flow.
Expand Down Expand Up @@ -128,7 +128,7 @@ public class OAuthFlows
/// <summary>
/// Configuration details for a supported OAuth Flow.
/// </summary>
public class AuthorizationCodeOAuthFlow
public sealed class AuthorizationCodeOAuthFlow
{
/// <summary>
/// The authorization URL to be used for this flow.
Expand Down Expand Up @@ -173,7 +173,7 @@ public class AuthorizationCodeOAuthFlow
/// <summary>
/// Configuration details for a supported OAuth Flow.
/// </summary>
public class ClientCredentialsOAuthFlow
public sealed class ClientCredentialsOAuthFlow
{
/// <summary>
/// The token URL to be used for this flow.
Expand Down Expand Up @@ -204,7 +204,7 @@ public class ClientCredentialsOAuthFlow
/// <summary>
/// Configuration details for a supported OAuth Flow.
/// </summary>
public class PasswordOAuthFlow
public sealed class PasswordOAuthFlow
{
/// <summary>
/// The token URL to be used for this flow.
Expand Down Expand Up @@ -239,7 +239,7 @@ public class PasswordOAuthFlow
/// <summary>
/// Configuration details for a supported OAuth Flow.
/// </summary>
public class ImplicitOAuthFlow
public sealed class ImplicitOAuthFlow
{
/// <summary>
/// The authorization URL to be used for this flow.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/TaskArtifactUpdateEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Sent by server during sendStream or subscribe requests.
/// </summary>
public class TaskArtifactUpdateEvent : TaskUpdateEvent
public sealed class TaskArtifactUpdateEvent : TaskUpdateEvent
{
/// <summary>
/// Generated artifact.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/TaskPushNotificationConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Parameters for setting or getting push notification configuration for a task.
/// </summary>
public class TaskPushNotificationConfig
public sealed class TaskPushNotificationConfig
{
/// <summary>
/// Task id.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/TaskQueryParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Parameters for querying a task, including optional history length.
/// </summary>
public class TaskQueryParams : TaskIdParams
public sealed class TaskQueryParams : TaskIdParams
{
/// <summary>
/// Number of recent messages to be retrieved.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/TaskStatusUpdateEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Event sent by server during sendStream or subscribe requests.
/// </summary>
public class TaskStatusUpdateEvent : TaskUpdateEvent
public sealed class TaskStatusUpdateEvent : TaskUpdateEvent
{
/// <summary>
/// Gets or sets the current status of the task.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Models/TextPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Represents a text segment within parts.
/// </summary>
public class TextPart : Part
public sealed class TextPart : Part
{
/// <summary>
/// Gets or sets the text content.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Server/InMemoryTaskStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace A2A;
/// <summary>
/// In-memory implementation of task store for development and testing.
/// </summary>
public class InMemoryTaskStore : ITaskStore
public sealed class InMemoryTaskStore : ITaskStore
{
private readonly Dictionary<string, AgentTask> _taskCache = [];
private readonly Dictionary<string, TaskPushNotificationConfig> _pushNotificationCache = [];
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Server/TaskManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace A2A;
/// Helps manage a task's lifecycle during execution of a request, responsible for retrieving,
/// saving, and updating the Task object based on events received from the agent.
/// </remarks>
public class TaskManager : ITaskManager
public sealed class TaskManager : ITaskManager
{
/// <summary>
/// OpenTelemetry ActivitySource for tracing.
Expand Down
2 changes: 1 addition & 1 deletion src/A2A/Server/TaskUpdateEventEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace A2A;
/// <summary>
/// Enumerator for streaming task update events to clients.
/// </summary>
public class TaskUpdateEventEnumerator : IAsyncEnumerable<A2AEvent>
public sealed class TaskUpdateEventEnumerator : IAsyncEnumerable<A2AEvent>
{
private bool isFinal;
private readonly ConcurrentQueue<A2AEvent> _UpdateEvents = new();
Expand Down
Loading