Skip to content

feat: implement missing push notifications related methods#711

Draft
ishymko wants to merge 6 commits into1.0-devfrom
ishymko/push-notifications
Draft

feat: implement missing push notifications related methods#711
ishymko wants to merge 6 commits into1.0-devfrom
ishymko/push-notifications

Conversation

@ishymko
Copy link
Member

@ishymko ishymko commented Feb 19, 2026

Fixes #702

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ishymko, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request expands the existing push notification configuration management by adding capabilities to list all configurations for a given task and to delete specific configurations. This provides users with more granular control over their task-related push notifications, moving beyond just creation and retrieval of individual configurations. The changes span client interfaces, transport implementations, and server-side request handlers, ensuring consistent functionality across different communication protocols.

Highlights

  • New Push Notification Management APIs: Introduced new client and server-side APIs to list and delete task-specific push notification configurations, enhancing control over task notifications.
  • Multi-Protocol Support: Implemented the new list and delete functionalities across gRPC, JSON-RPC, and REST transport layers, ensuring broad compatibility.
  • Comprehensive Testing: Added unit and integration tests for the new push notification list and delete operations, covering all supported client transports and server handlers.
Changelog
  • src/a2a/client/base_client.py
    • Imported new request/response types for listing and deleting push notification configurations.
    • Added list_task_callback and delete_task_callback methods to the base client.
  • src/a2a/client/client.py
    • Imported new request/response types for listing and deleting push notification configurations.
    • Added abstract list_task_callback and delete_task_callback methods to the client interface.
  • src/a2a/client/transports/base.py
    • Imported new request/response types for listing and deleting push notification configurations.
    • Added abstract list_task_callback and delete_task_callback methods to the base transport interface.
  • src/a2a/client/transports/grpc.py
    • Imported new request/response types for listing and deleting push notification configurations.
    • Implemented list_task_callback and delete_task_callback methods using gRPC stubs.
  • src/a2a/client/transports/jsonrpc.py
    • Imported new request/response types for listing and deleting push notification configurations.
    • Implemented list_task_callback and delete_task_callback methods with JSON-RPC request/response handling.
  • src/a2a/client/transports/rest.py
    • Imported new request/response types for listing and deleting push notification configurations.
    • Added a private helper method _send_delete_request for HTTP DELETE operations.
    • Implemented list_task_callback and delete_task_callback methods with REST API call logic.
  • src/a2a/server/apps/rest/rest_adapter.py
    • Added a new DELETE route for /v1/tasks/{id}/pushNotificationConfigs/{push_id} to handle deletion requests.
  • src/a2a/server/request_handlers/grpc_handler.py
    • Imported empty_pb2 for gRPC empty responses.
    • Implemented ListTaskPushNotificationConfig and DeleteTaskPushNotificationConfig gRPC service methods.
  • src/a2a/server/request_handlers/rest_handler.py
    • Implemented delete_push_notification to process REST DELETE requests for push notification configurations.
    • Updated list_tasks and list_push_notifications to provide concrete implementations instead of raising NotImplementedError.
  • tests/client/transports/test_grpc_client.py
    • Imported new request/response types for push notification configurations.
    • Mocked the new gRPC stub methods for listing and deleting push notification configurations.
    • Added new asynchronous tests for list_task_callback and delete_task_callback in the gRPC transport.
  • tests/client/transports/test_jsonrpc_client.py
    • Imported new request/response types for push notification configurations.
    • Added new asynchronous tests for list_task_callback and delete_task_callback in the JSON-RPC transport.
  • tests/client/transports/test_rest_client.py
    • Imported new request/response types for push notification configurations.
    • Added new asynchronous tests for list_task_callback and delete_task_callback in the REST transport.
  • tests/integration/test_client_server_integration.py
    • Imported new request/response types for push notification configurations.
    • Configured mock handler responses for on_list_task_push_notification_config and on_delete_task_push_notification_config.
    • Added integration tests for list_task_callback and delete_task_callback across HTTP (JSON-RPC, REST) and gRPC transports.
Activity
  • The pull request addresses and fixes issue [Feat]: Implement remaining methods of the push notifications API #702, which likely involved the missing functionality for managing push notification configurations.
  • The author, ishymko, has implemented new features for listing and deleting task push notification configurations and provided comprehensive tests.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces functionality for listing and deleting task push notification configurations, with changes spanning the client, server, and all transport layers (gRPC, JSON-RPC, REST), complemented by new tests. The implementation is solid, but I've identified a few areas for improvement. There's significant code duplication in the new JSON-RPC transport methods that could be refactored. Additionally, I've found some minor inconsistencies in test mocks that should be corrected to better align with the production code's behavior.

@ishymko ishymko changed the title Ishymko/push notifications feat: implement missing push notifications related methods Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant