Skip to content

refactor!: clean helpers and utils folders structure#983

Merged
guglielmo-san merged 9 commits into1.0-devfrom
guglielmoc/remove_helpers
Apr 17, 2026
Merged

refactor!: clean helpers and utils folders structure#983
guglielmo-san merged 9 commits into1.0-devfrom
guglielmoc/remove_helpers

Conversation

@guglielmo-san
Copy link
Copy Markdown
Member

@guglielmo-san guglielmo-san commented Apr 17, 2026

Description

Refactors internal helpers modules so that the helpers name is used exclusively for the a2a.helpers package (customer-facing convenience functions).

  • Move a2a.client.helpers into a2a.client.card_resolver -- parse_agent_card and its backward-compat shims are implementation details of card resolution
  • Rename a2a.utils.helpers to a2a.utils.version_validator to reflect its actual content

BEGIN_COMMIT_OVERRIDE
refactor!: clean helpers and utils folders structure (#983)
END_COMMIT_OVERRIDE

Copy link
Copy Markdown
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 refactors the AgentCard parsing logic by moving it to card_resolver.py and implementing backward compatibility for legacy fields. It also reorganizes utility functions, moving version validation to a dedicated module and removing the maybe_await helper. Feedback indicates that narrowing the type hints for card modifiers to strictly Awaitable in the request handlers and routes is a breaking change that reduces API flexibility and could cause runtime errors for existing synchronous implementations.

Comment thread src/a2a/server/request_handlers/default_request_handler.py
Comment thread src/a2a/server/request_handlers/default_request_handler_v2.py
Comment thread src/a2a/server/routes/agent_card_routes.py
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 17, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/events/event_queue_v2.py 91.71% 91.19% 🔴 -0.52%
src/a2a/utils/telemetry.py 91.41% 90.63% 🔴 -0.78%
src/a2a/utils/version_validator.py (new) 92.86%
Total 92.63% 92.60% 🔴 -0.03%

Generated by coverage-comment.yml

@guglielmo-san guglielmo-san marked this pull request as ready for review April 17, 2026 12:45
@guglielmo-san guglielmo-san requested a review from a team as a code owner April 17, 2026 12:45
@guglielmo-san guglielmo-san changed the title refactor: clean up of folder structure refactor!: clean up of folder structure Apr 17, 2026
@guglielmo-san guglielmo-san enabled auto-merge (squash) April 17, 2026 13:29
@ishymko ishymko changed the title refactor!: clean up of folder structure refactor!: clean helpers and utils folders structure Apr 17, 2026
@guglielmo-san guglielmo-san merged commit c87e87c into 1.0-dev Apr 17, 2026
18 checks passed
@guglielmo-san guglielmo-san deleted the guglielmoc/remove_helpers branch April 17, 2026 13:42
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants