Skip to content
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .github/actions/spelling/allow.txt
Copy link
Member

Choose a reason for hiding this comment

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

Why make changes to this file? It appears that entires were in an alphabetical order here.

Copy link
Author

Choose a reason for hiding this comment

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

unclear. i think this came directly from the github action when updating readme. i can revert

Copy link
Author

Choose a reason for hiding this comment

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

in fact I think this may have come from the Format script which must have a bug for capitalization

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

reran with ^ and applied. removed postres dup

Copy link
Member

Choose a reason for hiding this comment

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

Can we leave it as it was? I'm not entirely familiar with how this file is used and I worry that dependents may be case-sensitive.

Copy link
Member

Choose a reason for hiding this comment

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

This was intentionally left case-sensitive, because the case-insensitive sort wasn't always consistent.

Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
AAgent
ACMRTUXB
ACard
AClient
ACMRTUXB
aconnect
adk
AError
AFast
agentic
AGrpc
aio
aiomysql
amannn
aproject
ARequest
ARun
AServer
AServers
AService
AStarlette
AUser
DSNs
EUR
GBP
GVsb
INR
JPY
JSONRPCt
JWS
Llm
POSTGRES
RUF
SLF
Tful
aconnect
adk
agentic
aio
aiomysql
amannn
aproject
autouse
backticks
cla
Expand All @@ -29,32 +42,23 @@ coro
datamodel
deepwiki
drivername
DSNs
dunders
euo
EUR
excinfo
fernet
fetchrow
fetchval
GBP
genai
getkwargs
gle
GVsb
ietf
initdb
inmemory
INR
isready
JPY
JSONRPCt
JWS
kwarg
langgraph
lifecycles
linting
Llm
lstrips
mikeas
mockurl
Expand All @@ -64,7 +68,6 @@ oidc
opensource
otherurl
postgres
POSTGRES
postgresql
protoc
pyi
Expand All @@ -74,14 +77,11 @@ pyversions
redef
respx
resub
RUF
SLF
socio
sse
tagwords
taskupdate
testuuid
Tful
tiangolo
typeerror
vulnz
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Install the core SDK and any desired extras using your preferred package manager
| ------------------------ | ------------------------------------------ | -------------------------------------------- |
| **Core SDK** | `uv add a2a-sdk` | `pip install a2a-sdk` |
| **All Extras** | `uv add "a2a-sdk[all]"` | `pip install "a2a-sdk[all]"` |
| **HTTP Server** | `uv add "a2a-sdk[http-server]"` | `pip install "a2a-sdk[http-server]"` |
| **JSON-RPC Server** | `uv add "a2a-sdk[jsonrpc-server]"` | `pip install "a2a-sdk[jsonrpc-server]"` |
| **HTTP (REST) Server** | `uv add "a2a-sdk[http-server]"` | `pip install "a2a-sdk[http-server]"` |
Copy link
Member

Choose a reason for hiding this comment

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

Let's copy the terminology from the spec documentation: HTTP+JSON/REST Server

| **gRPC Support** | `uv add "a2a-sdk[grpc]"` | `pip install "a2a-sdk[grpc]"` |
| **OpenTelemetry Tracing**| `uv add "a2a-sdk[telemetry]"` | `pip install "a2a-sdk[telemetry]"` |
| **Encryption** | `uv add "a2a-sdk[encryption]"` | `pip install "a2a-sdk[encryption]"` |
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ dependencies = [
"httpx>=0.28.1",
"httpx-sse>=0.4.0",
"pydantic>=2.11.3",
"protobuf>=5.29.5",
"google-api-core>=1.26.0",
]

classifiers = [
Expand All @@ -29,9 +27,10 @@ classifiers = [
]

[project.optional-dependencies]
http-server = ["fastapi>=0.115.2", "sse-starlette", "starlette"]
jsonrpc-server = ["fastapi>=0.115.2", "sse-starlette", "starlette"]
http-server = ["a2a-sdk[jsonrpc-server]", "protobuf>=5.29.5"]
Copy link
Member

Choose a reason for hiding this comment

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

HTTP+JSON/REST also requires these dependencies.

rest_handler.py depends on a2a_pb2:

Copy link
Author

Choose a reason for hiding this comment

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

This is already encompassed here. a2a.grpc.a2a_pb2 has no grpcio dependencies. Just protobuf. This is encapsulated in the PR already.

Any concerns here?

Copy link
Member

Choose a reason for hiding this comment

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

a2a_pb2 seems to depend on google-api-core:

from google.api import client_pb2 as google_dot_api_dot_client__pb2

I think we need to include it here as well.

Copy link
Author

Choose a reason for hiding this comment

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

You're right. I'll add some tests that do the individual extras plus tests accordingly. I'm going to move this PR to draft because it looks like 1.0 is going to require some changes that depend directly on the proto rather than the a2a spec json even in jsonrpc. In doing so this split may not be directly possible in the way I'd like.

encryption = ["cryptography>=43.0.0"]
grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio_reflection>=1.7.0"]
grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio_reflection>=1.7.0", "google-api-core>=1.26.0", "protobuf>=5.29.5"]
telemetry = ["opentelemetry-api>=1.33.0", "opentelemetry-sdk>=1.33.0"]
postgresql = ["sqlalchemy[asyncio,postgresql-asyncpg]>=2.0.0"]
mysql = ["sqlalchemy[asyncio,aiomysql]>=2.0.0"]
Expand Down
8 changes: 7 additions & 1 deletion src/a2a/utils/proto_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@

from typing import Any

from google.protobuf import json_format, struct_pb2

try:
from google.protobuf import json_format, struct_pb2
except ImportError as e:
raise ImportError(
'proto-utils requires protobuf. Install with "pip install a2a-sdk[grpc] or a2a-sdk[http-server] depending on need"'
) from e

from a2a import types
from a2a.grpc import a2a_pb2
Expand Down
Loading