Repository navigation
feat(a2a): upgrade to a2a-sdk 1.4.0 with dual-stack v0.3/v1.0 support - #1244
Open
wujiaming-ai wants to merge 8 commits into
Open
wujiaming-ai wants to merge 8 commits into
wujiaming-ai wants to merge 8 commits into
Conversation
- depend on a2a-sdk[http-server]>=1.4.0,<1.5.0 and agentkit-sdk-python>=0.9.3 - advertise both 0.3 and 1.0 JSON-RPC interfaces and serve both card paths from VeA2AServer, init_app and to_a2a - keep v0.3 JSON-RPC compatibility via enable_v0_3_compat - add CloudMessage/CloudPart so CloudApp.message_send keeps the historical parts[0].root.text access while supporting a2a 1.x flat parts - fix CloudApp httpx client lifecycle and add aclose/close/context manager - migrate TaskStore, executor, identity auth processor, hub client and remote agents to a2a 1.x APIs - require VEADK_A2A_PUBLIC_URL in the FaaS template and enable MCP routes with the fastmcp 3.x API - add tests/a2a/test_a2a_sdk_14.py covering the migration contract
- add VeFaaS.merge_function_envs_and_release, which preserves the function's existing env vars and is idempotent - inject the public URL after a new deploy and after a code update so the AgentCard advertises a reachable endpoint instead of 0.0.0.0 - cover merge, skip and platform-env preservation with unit tests
The template validates VEADK_A2A_PUBLIC_URL at import time, but the real public URL is only known after the first release. Seed a placeholder env on function creation so the first release can boot, then replace it with the real URL and release again. This closes the chicken-and-egg gap in the two-phase FaaS deploy.
ADK 2.14.x's A2A executor calls inspect.signature on the bound runner.run_async. The interceptor wrapper exposes keyword-only parameters, which Python rejects for a bound method with 'invalid method signature'. Wrap the interceptor with a positional *args/**kwargs function so the signature is introspectable while preserving the interceptor contract.
CloudAgentEngine.update_function_code is called with the rendered `src` directory by the template's deploy.py, but _update_function_code assumed a project root and nested it under src/<name>. That broke relative requirements paths such as local wheels. Detect the rendered src layout and copy it over the template src directory instead.
The runtime, studio TOS and sidecar wheel metadata tests still asserted the historical agentkit-sdk-python>=0.8.5 floor. veadk now requires >=0.9.3 so that a2a-sdk 1.4.0 resolves, so the assertions are updated to the new floor while still proving the TOS-capable lower bound is preserved.
This branch has not been deployed
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.
Summary
Upgrade
veadk-pythonto a2a-sdk 1.4.0 with a default dual-stack (v0.3 + v1.0) compatibility layer, so existing v0.3 peers keep working without configuration changes.This PR also completes the FaaS public-URL injection flow and fixes three issues found during real cloud smoke testing.
Changes
a2a-sdk[http-server]>=1.4.0,<1.5.0andagentkit-sdk-python>=0.9.3.0.3and1.0JSON-RPC interfaces and serve both card paths fromVeA2AServer,init_appandto_a2a.enable_v0_3_compat=True.CloudMessage/CloudPartsoCloudApp.message_sendkeeps the historicalparts[0].root.textaccess while supporting a2a 1.x flat parts.httpxclient lifecycle inCloudAppand addaclose/close/async with.TaskStore, executor, identity auth processor, hub client,RemoteVeAgentand the remote Skill transport to a2a 1.x APIs.VEADK_A2A_PUBLIC_URLin the FaaS template and use the fastmcp 3.xenable(tags=..., only=True)API.srcprojects.Runner.run_asyncintrospectable for ADK 2.14.x's A2A executor.uv.lock:a2a-sdk 1.4.0,agentkit-sdk-python 0.9.3from PyPI (no local path).>=0.9.3in the runtime-dependency, Studio TOS and sidecar-wheel metadata tests.Testing
main@ea78f82b).agentkit-sdk-python 0.9.3+a2a-sdk 1.4.0: 131 passed, 16 deselected (14 network upload cases + 2 pre-existing 403 cases).CloudAppdefault/card modes,RemoteVeAgent,skill.py, MCP, andA2AHubClientall passed.pre-commitpassed (ruff, format, secret scanning, dependency policy).Compatibility notes
CloudApp.message_sendreturns aCloudMessagewrapper that supports bothparts[0].root.textandparts[0].text.VEADK_A2A_PUBLIC_URL; existing generated projects need to sync the newsrc/app.pyanddeploy.pybefore redeploying.AgentkitA2aAppcompatible with both a2a 0.3.x and 1.x.Remaining before release
Links