Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
68 changes: 34 additions & 34 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -1,53 +1,29 @@
a2a
A2A
A2AFastAPI
AAgent
ACMRTUXB
ACard
AClient
ACMRTUXB
aconnect
adk
AError
AException
AFast
agentic
AGrpc
aio
aiomysql
alg
amannn
aproject
ARequest
ARun
AServer
AServers
AService
AStarlette
AUser
DSNs
ES256
EUR
FastAPI
GBP
GVsb
HS256
HS384
INR
JOSE
JPY
JSONRPC
JSONRPCt
JWS
Llm
OpenAPI
POSTGRES
Protobuf
RS256
RUF
SECP256R1
SLF
Starlette
Tful
a2a
aconnect
adk
agentic
aio
aiomysql
alg
amannn
aproject
autouse
backticks
base64url
Expand All @@ -60,46 +36,64 @@ coro
datamodel
deepwiki
drivername
DSNs
dunders
ES256
euo
EUR
excinfo
FastAPI
fernet
fetchrow
fetchval
GBP
genai
getkwargs
gle
GVsb
hazmat
HS256
HS384
ietf
importlib
initdb
inmemory
INR
isready
jku
JOSE
JPY
JSONRPC
JSONRPCt
jwk
jwks
jws
JWS
kid
kwarg
langgraph
lifecycles
linting
Llm
lstrips
middleware
mikeas
mockurl
notif
oauthoidc
oidc
OpenAPI
openapiv
openapiv2
opensource
otherurl
pb2
postgres
POSTGRES
postgresql
proto
protobuf
Protobuf
protoc
pydantic
pyi
Expand All @@ -109,13 +103,19 @@ pyversions
redef
respx
resub
RS256
RUF
SECP256R1
SLF
socio
sse
starlette
Starlette
swagger
tagwords
taskupdate
testuuid
Tful
tiangolo
typ
typeerror
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Lint Code Base
on:
pull_request:
branches: [main]
branches: [main, 1.0-a2a_proto_refactor]
permissions:
contents: read
jobs:
Expand All @@ -22,8 +22,10 @@ jobs:
- name: Add uv to PATH
run: |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Buf
uses: bufbuild/buf-setup-action@v1
- name: Install dependencies
run: uv sync --dev
run: uv sync --dev --all-extras

- name: Run Ruff Linter
id: ruff-lint
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Run Unit Tests
on:
pull_request:
branches: [main]
branches: [main, 1.0-a2a_proto_refactor]
permissions:
contents: read
jobs:
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:

strategy:
matrix:
python-version: ['3.10', '3.13']
python-version: ["3.10", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -52,6 +52,8 @@ jobs:
- name: Add uv to PATH
run: |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Buf
uses: bufbuild/buf-setup-action@v1
- name: Install dependencies
run: uv sync --dev --extra all
- name: Run tests and check coverage
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ coverage.xml
.nox
spec.json
src/a2a/types/a2a.json
docker-compose.yaml
82 changes: 0 additions & 82 deletions .pre-commit-config.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: v2
inputs:
- git_repo: https://github.com/a2aproject/A2A.git
ref: main
subdir: specification/grpc
subdir: specification
managed:
enabled: true
# Python Generation
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,10 @@ exclude = [
"**/node_modules",
"**/venv",
"**/.venv",
"src/a2a/types/a2a_pb2.py",
"src/a2a/types/a2a_pb2_grpc.py",
"src/a2a/types",
]
reportMissingImports = "none"
reportMissingModuleSource = "none"
venvPath = "."
venv = ".venv"

[tool.coverage.run]
branch = true
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ fi

# Fix imports in generated grpc file
echo "Fixing imports in src/a2a/types/a2a_pb2_grpc.py"
sed -i '' 's/import a2a_pb2 as a2a__pb2/from . import a2a_pb2 as a2a__pb2/g' src/a2a/types/a2a_pb2_grpc.py
sed 's/import a2a_pb2 as a2a__pb2/from . import a2a_pb2 as a2a__pb2/g' src/a2a/types/a2a_pb2_grpc.py > src/a2a/types/a2a_pb2_grpc.py.tmp && mv src/a2a/types/a2a_pb2_grpc.py.tmp src/a2a/types/a2a_pb2_grpc.py
4 changes: 2 additions & 2 deletions src/a2a/client/auth/interceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ async def intercept(
# We check for truthiness to see if they are non-empty.
if (
agent_card is None
or not agent_card.security
or not agent_card.security_requirements
or not agent_card.security_schemes
):
return request_payload, http_kwargs

for requirement in agent_card.security:
for requirement in agent_card.security_requirements:
for scheme_name in requirement.schemes:
credential = await self._credential_service.get_credentials(
scheme_name, context
Expand Down
4 changes: 2 additions & 2 deletions src/a2a/client/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
from a2a.types.a2a_pb2 import (
AgentCard,
CancelTaskRequest,
CreateTaskPushNotificationConfigRequest,
GetTaskPushNotificationConfigRequest,
GetTaskRequest,
Message,
SendMessageConfiguration,
SendMessageRequest,
SetTaskPushNotificationConfigRequest,
StreamResponse,
SubscribeToTaskRequest,
Task,
Expand Down Expand Up @@ -180,7 +180,7 @@ async def cancel_task(

async def set_task_callback(
self,
request: SetTaskPushNotificationConfigRequest,
request: CreateTaskPushNotificationConfigRequest,
*,
context: ClientCallContext | None = None,
extensions: list[str] | None = None,
Expand Down
4 changes: 2 additions & 2 deletions src/a2a/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
from a2a.types.a2a_pb2 import (
AgentCard,
CancelTaskRequest,
CreateTaskPushNotificationConfigRequest,
GetTaskPushNotificationConfigRequest,
GetTaskRequest,
Message,
PushNotificationConfig,
SetTaskPushNotificationConfigRequest,
StreamResponse,
SubscribeToTaskRequest,
Task,
Expand Down Expand Up @@ -147,7 +147,7 @@ async def cancel_task(
@abstractmethod
async def set_task_callback(
self,
request: SetTaskPushNotificationConfigRequest,
request: CreateTaskPushNotificationConfigRequest,
*,
context: ClientCallContext | None = None,
extensions: list[str] | None = None,
Expand Down
1 change: 0 additions & 1 deletion src/a2a/client/client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,5 +282,4 @@ def minimal_agent_card(
skills=[],
version='',
name='',
protocol_versions=['v1'],
)
2 changes: 1 addition & 1 deletion src/a2a/client/optionals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Attempt to import the optional module
try:
from grpc.aio import Channel # pyright: ignore[reportAssignmentType]
from grpc.aio import Channel # type: ignore[reportMissingModuleSource]
except ImportError:
# If grpc.aio is not available, define a stub type for type checking.
# This stub type will only be used by type checkers.
Expand Down
Loading
Loading