Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e38d44f
wip
guglielmo-san Mar 9, 2026
bba49a6
Merge remote-tracking branch 'upstream/1.0-dev' into guglielmoc/rewor…
guglielmo-san Mar 9, 2026
61b7304
feat: Implement and apply interceptors directly within BaseClient met…
guglielmo-san Mar 9, 2026
c8b2550
wip
guglielmo-san Mar 10, 2026
68db81e
add tests
guglielmo-san Mar 10, 2026
1235d9f
run ruff
guglielmo-san Mar 10, 2026
4967d97
add cast
guglielmo-san Mar 10, 2026
eaf1792
refactor: Simplify BeforeArgs initialization in send_message_streamin…
guglielmo-san Mar 10, 2026
1d5319c
refactor: Add explicit type hints to `BeforeArgs` and remove redundan…
guglielmo-san Mar 10, 2026
f379679
revert change
guglielmo-san Mar 10, 2026
8affcb3
refactor: Rename `CallInterceptor` to `ClientCallInterceptor` and sim…
guglielmo-san Mar 10, 2026
ef658ff
fix
guglielmo-san Mar 10, 2026
ab134b3
refactor: centralize stream interception and execution logic into `_e…
guglielmo-san Mar 10, 2026
92bc02f
refactor: Update stream event processing to use a task manager, adjus…
guglielmo-san Mar 10, 2026
0dad45d
refactor: Migrate authentication logic to the new interceptor pattern…
guglielmo-san Mar 10, 2026
191c970
refactor: simplify interceptor argument types by removing generic typ…
guglielmo-san Mar 10, 2026
2d21b05
Merge branch '1.0-dev' into guglielmoc/rework_client_interceptors
guglielmo-san Mar 10, 2026
afb7df9
refactor: make ClientCallInterceptor an abstract base class
guglielmo-san Mar 13, 2026
021c8b3
Merge remote-tracking branch 'refs/remotes/origin/guglielmoc/rework_c…
guglielmo-san Mar 13, 2026
b54e2ea
Merge remote-tracking branch 'upstream/1.0-dev' into guglielmoc/rewor…
guglielmo-san Mar 13, 2026
19da397
fix
guglielmo-san Mar 13, 2026
8f562e4
refactor
guglielmo-san Mar 13, 2026
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
12 changes: 9 additions & 3 deletions src/a2a/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@
)
from a2a.client.base_client import BaseClient
from a2a.client.card_resolver import A2ACardResolver
from a2a.client.client import Client, ClientConfig, ClientEvent, Consumer
from a2a.client.client import (
Client,
ClientCallContext,
ClientConfig,
ClientEvent,
Consumer,
)
from a2a.client.client_factory import ClientFactory, minimal_agent_card
from a2a.client.errors import (
A2AClientError,
A2AClientTimeoutError,
AgentCardResolutionError,
)
from a2a.client.helpers import create_text_message_object
from a2a.client.middleware import ClientCallContext, ClientCallInterceptor
from a2a.client.interceptors import ClientCallInterceptor


logger = logging.getLogger(__name__)
Expand All @@ -30,9 +36,9 @@
'AgentCardResolutionError',
'AuthInterceptor',
'BaseClient',
'CallInterceptor',

Check warning on line 39 in src/a2a/client/__init__.py

View workflow job for this annotation

GitHub Actions / Lint Code Base

"CallInterceptor" is specified in __all__ but is not present in module (reportUnsupportedDunderAll)
Comment thread
guglielmo-san marked this conversation as resolved.
Outdated
Comment thread
guglielmo-san marked this conversation as resolved.
Outdated
'Client',
'ClientCallContext',
'ClientCallInterceptor',
'ClientConfig',
'ClientEvent',
'ClientFactory',
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/client/auth/credentials.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from abc import ABC, abstractmethod

from a2a.client.middleware import ClientCallContext
from a2a.client.client import ClientCallContext


class CredentialService(ABC):
Expand Down
4 changes: 2 additions & 2 deletions src/a2a/client/auth/interceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
from typing import Any

from a2a.client.auth.credentials import CredentialService
from a2a.client.middleware import ClientCallContext, ClientCallInterceptor
from a2a.client.client import ClientCallContext
from a2a.types.a2a_pb2 import AgentCard

logger = logging.getLogger(__name__)


class AuthInterceptor(ClientCallInterceptor):
class AuthInterceptor:
Comment thread
guglielmo-san marked this conversation as resolved.
Outdated
"""An interceptor that automatically adds authentication details to requests.

Based on the agent's security schemes.
Expand Down
Loading
Loading