Skip to content

TaskPushNotificationConfig model doesn't match v1 spec's flat structure #416

Description

@darrelmiller

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions