Summary
The SDK's TaskPushNotificationConfig uses a two-class nested structure inherited from v0.3, but the v1 spec defines a single flat message.
Spec definition (a2a.proto)
message TaskPushNotificationConfig {
string tenant = 1;
string id = 2;
string task_id = 3;
string url = 4 [(google.api.field_behavior) = REQUIRED];
string token = 5;
AuthenticationInfo authentication = 6;
}
One flat message - no nested PushNotificationConfig.
Current SDK structure
// Wrapper
public sealed class TaskPushNotificationConfig {
public string Id { get; set; }
public string TaskId { get; set; }
public PushNotificationConfig PushNotificationConfig { get; set; } // nested
public string? Tenant { get; set; }
}
// Nested config (not in v1 spec)
public sealed class PushNotificationConfig {
public string? Id { get; set; } // duplicated
public string Url { get; set; }
public AuthenticationInfo? Authentication { get; set; }
public string? Token { get; set; }
}
Discrepancies
| Field |
Spec |
SDK |
| Structure |
Flat message |
Two nested classes |
id |
Once, on TaskPushNotificationConfig |
Duplicated on both classes |
url |
Direct field |
Nested under PushNotificationConfig.Url |
token |
Direct field |
Nested under PushNotificationConfig.Token |
authentication |
Direct field |
Nested under PushNotificationConfig.Authentication |
Additionally, CreateTaskPushNotificationConfigRequest wraps a PushNotificationConfig Config property, but the spec's CreateTaskPushNotificationConfig RPC takes a TaskPushNotificationConfig directly as its request message.
The ListTaskPushNotificationConfigsRequest (spec) vs ListTaskPushNotificationConfigRequest (SDK) also differs in pluralization (Configs vs Config).
Proposed fix
- Flatten
TaskPushNotificationConfig to match the spec (move url, token, authentication up, remove nested PushNotificationConfig)
- Remove or deprecate the standalone
PushNotificationConfig class
- Update
CreateTaskPushNotificationConfigRequest to align with the spec's RPC signature
- Fix pluralization of
ListTaskPushNotificationConfigRequest to ListTaskPushNotificationConfigsRequest
- This is a breaking change for the push notification API surface
References
Summary
The SDK's
TaskPushNotificationConfiguses a two-class nested structure inherited from v0.3, but the v1 spec defines a single flat message.Spec definition (a2a.proto)
One flat message - no nested
PushNotificationConfig.Current SDK structure
Discrepancies
idTaskPushNotificationConfigurlPushNotificationConfig.UrltokenPushNotificationConfig.TokenauthenticationPushNotificationConfig.AuthenticationAdditionally,
CreateTaskPushNotificationConfigRequestwraps aPushNotificationConfig Configproperty, but the spec'sCreateTaskPushNotificationConfigRPC takes aTaskPushNotificationConfigdirectly as its request message.The
ListTaskPushNotificationConfigsRequest(spec) vsListTaskPushNotificationConfigRequest(SDK) also differs in pluralization (ConfigsvsConfig).Proposed fix
TaskPushNotificationConfigto match the spec (moveurl,token,authenticationup, remove nestedPushNotificationConfig)PushNotificationConfigclassCreateTaskPushNotificationConfigRequestto align with the spec's RPC signatureListTaskPushNotificationConfigRequesttoListTaskPushNotificationConfigsRequestReferences