Skip to content

[Bug]: Payload of resource is not compliant with 1.0 wrapped objects (using removed kind field instead) #491

Closed

Description

@jmesnil

What happened?

According to § 4.3.3. Push Notification Payload, the payload of a push notification is encapsulated in the kind of payload:

POST {webhook_url}
Authorization: {authentication_scheme} {credentials}
Content-Type: application/json

{
/* StreamResponse object - one of: /
"task": { /
Task object / },
"message": { /
Message object / },
"statusUpdate": { /
TaskStatusUpdateEvent object / },
"artifactUpdate": { /
TaskArtifactUpdateEvent object */ }
}

but at the moment, the payload is directly the content of a task:

{
  "id": "task_send_with_token",
  "contextId": "ctx456",
  "status": {
    "state": "completed",
    "timestamp": "2025-11-27T11:52:51.319262Z"
  },
  "artifacts": [],
  "history": [],
  "kind": "task"
}

instead, the payload should be encapsulated with the kind of payload. In the example above, it should be:

{
  "task": {
    "id": "task_send_with_token",
    "contextId": "ctx456",
    "status": {
      "state": "completed",
      "timestamp": "2025-11-27T11:52:51.319262Z"
    },
    "artifacts": [],
    "history": []
  }
}

I found out this issue while working on #490 which expands the kind of payload that can be pushed by notifications.

More generally, the kind discriminator is being been removed in 1.0(§ A.2.1 Breaking Change: Kind Discriminator Removed)

Additionally, the names of the kind were not compliant with the previous spec conventions. It uses status-update & artifact-update while the spec said the field names are taskUpdate & artifactUpdate.

The whole code needs to be updated to use properly wrapped object to returns task, message, text, etc. instead of the kind field.

References

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Nov 27, 2025
  2. changed the title [-][Bug]: Payload of push notifications is not properly encapsulated[/-] [+][Bug]: Payload of resource is not compliant with 0.3.0 wrapped objects (using removed kind field instead)[/+] on Dec 1, 2025
  3. changed the title [-][Bug]: Payload of resource is not compliant with 0.3.0 wrapped objects (using removed kind field instead)[/-] [+][Bug]: Payload of resource is not compliant with 1.0 wrapped objects (using removed kind field instead)[/+] on Dec 1, 2025
  4. jmesnil commented on Dec 1, 2025

    @jmesnil
    ContributorAuthor

    I'm a bit confused with the spec...
    I thought that the latest spec was pointing to 0.3.0. but it's more recent.

    So this bug is affecting upcoming spec (1.0?) and is not an issue for 0.3.0. (which still uses the kind pattern).

  5. maeste commented on Dec 1, 2025

    @maeste
    Collaborator

    Yup it's for 1.0

  6. ehsavoie commented on Dec 2, 2025

    @ehsavoie
    Collaborator

    Should be fixed in #484

  7. jmesnil commented on Dec 2, 2025

    @jmesnil
    ContributorAuthor

    Is it already fixed in #484?

    The PR still use JSON annotations to control the JSON serialization (eg https://github.com/ehsavoie/a2a-java/blob/058d607975fe02bbb2cf48d7c51b842b0cbeea7d/spec/src/main/java/io/a2a/spec/EventKind.java#L28-L33)
    And the test fixtures needs to be updated as still use the "kind" pattern (instead of wrapping the object).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions