refactor!: extract developer helpers in helpers folder#978
Merged
guglielmo-san merged 12 commits into1.0-devfrom Apr 17, 2026
Merged
refactor!: extract developer helpers in helpers folder#978guglielmo-san merged 12 commits into1.0-devfrom
guglielmo-san merged 12 commits into1.0-devfrom
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/tasks/task_manager.py | 98.32% | 98.68% | 🟢 +0.36% |
| src/a2a/utils/helpers.py | 96.73% | 93.51% | 🔴 -3.23% |
| src/a2a/utils/signing.py | 93.18% | 95.38% | 🟢 +2.20% |
| src/a2a/utils/task.py | 96.63% | 95.16% | 🔴 -1.47% |
| src/a2a/helpers/agent_card.py (new) | — | 100.00% | — |
| src/a2a/helpers/proto_helpers.py (new) | — | 94.12% | — |
| Total | 92.59% | 92.54% | 🔴 -0.05% |
Generated by coverage-comment.yml
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the A2A Python SDK by consolidating and unifying helper functions for managing A2A types—including Messages, Artifacts, Tasks, and Events—into a new a2a.helpers package. The changes involve moving utility functions from a2a.utils, updating references across the client and server implementations, and relocating append_artifact_to_task to the TaskManager. Feedback identifies a bug in new_text_artifact_update_event regarding artifact_id generation for appended chunks, a missing role validation check in new_task_from_user_message, and a redundant dictionary conversion during metadata updates.
ishymko
approved these changes
Apr 17, 2026
ishymko
pushed a commit
that referenced
this pull request
Apr 17, 2026
🤖 I have created a release *beep* *boop* --- ## [1.0.0-alpha.2](v1.0.0-alpha.1...v1.0.0-alpha.2) (2026-04-17) ### ⚠ BREAKING CHANGES * clean helpers and utils folders structure ([#983](#983)) * Raise errors on invalid AgentExecutor behavior. ([#979](#979)) * extract developer helpers in helpers folder ([#978](#978)) ### Features * Raise errors on invalid AgentExecutor behavior. ([#979](#979)) ([f4a0bcd](f4a0bcd)) * **utils:** add `display_agent_card()` utility for human-readable AgentCard inspection ([#972](#972)) ([3468180](3468180)) ### Bug Fixes * Don't generate empty metadata change events in VertexTaskStore ([#974](#974)) ([b58b03e](b58b03e)), closes [#802](#802) * **extensions:** support both header names and remove "activation" concept ([#984](#984)) ([b8df210](b8df210)) ### Documentation * AgentExecutor interface documentation ([#976](#976)) ([d667e4f](d667e4f)) * move `ai_learnings.md` to local-only and update `GEMINI.md` ([#982](#982)) ([f6610fa](f6610fa)) ### Code Refactoring * clean helpers and utils folders structure ([#983](#983)) ([c87e87c](c87e87c)) * extract developer helpers in helpers folder ([#978](#978)) ([5f3ea29](5f3ea29)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Extracts developer-facing helper functions from a2a.utils into a dedicated a2a.helpers package.
What changed
Motivation
This is the first in a series of PRs to simplify the a2a.utils structure. The goal is to stop mixing developer-facing convenience helpers with internal SDK machinery.