Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update src/a2a/server/apps/jsonrpc/jsonrpc_app.py
Co-authored-by: Holt Skinner <[email protected]>
  • Loading branch information
maeste and holtskinner authored Aug 20, 2025
commit cb42f61d04e1e1da7b64f6cc3a7ecc1eae429a42
20 changes: 10 additions & 10 deletions src/a2a/server/apps/jsonrpc/jsonrpc_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,47 +171,47 @@
)

METHOD_TO_MODEL: dict[str, type[A2ARequestModel]] = {
'message/send': SendMessageRequest,
'message/stream': SendStreamingMessageRequest,
'tasks/get': GetTaskRequest,
'tasks/cancel': CancelTaskRequest,
'tasks/pushNotificationConfig/set': SetTaskPushNotificationConfigRequest,
'tasks/pushNotificationConfig/get': GetTaskPushNotificationConfigRequest,
'tasks/pushNotificationConfig/list': ListTaskPushNotificationConfigRequest,
'tasks/pushNotificationConfig/delete': DeleteTaskPushNotificationConfigRequest,
'tasks/resubscribe': TaskResubscriptionRequest,
'agent/getAuthenticatedExtendedCard': GetAuthenticatedExtendedCardRequest,
SendMessageRequest.method: SendMessageRequest,
SendStreamingMessageRequest.method: SendStreamingMessageRequest,
GetTaskRequest.method: GetTaskRequest,
CancelTaskRequest.method: CancelTaskRequest,
SetTaskPushNotificationConfigRequest.method: SetTaskPushNotificationConfigRequest,
GetTaskPushNotificationConfigRequest.method: GetTaskPushNotificationConfigRequest,
ListTaskPushNotificationConfigRequest.method: ListTaskPushNotificationConfigRequest,
DeleteTaskPushNotificationConfigRequest.method: DeleteTaskPushNotificationConfigRequest,
TaskResubscriptionRequest.method: TaskResubscriptionRequest,
GetAuthenticatedExtendedCardRequest.method: GetAuthenticatedExtendedCardRequest,
}
Comment thread
maeste marked this conversation as resolved.

def __init__( # noqa: PLR0913
self,
agent_card: AgentCard,
http_handler: RequestHandler,
extended_agent_card: AgentCard | None = None,
context_builder: CallContextBuilder | None = None,
card_modifier: Callable[[AgentCard], AgentCard] | None = None,
extended_card_modifier: Callable[
[AgentCard, ServerCallContext], AgentCard
]
| None = None,
) -> None:
"""Initializes the JSONRPCApplication.

Args:
agent_card: The AgentCard describing the agent's capabilities.
http_handler: The handler instance responsible for processing A2A
requests via http.
extended_agent_card: An optional, distinct AgentCard to be served
at the authenticated extended card endpoint.
context_builder: The CallContextBuilder used to construct the
ServerCallContext passed to the http_handler. If None, no
ServerCallContext is passed.
card_modifier: An optional callback to dynamically modify the public
agent card before it is served.
extended_card_modifier: An optional callback to dynamically modify
the extended agent card before it is served. It receives the
call context.
"""

Check notice on line 214 in src/a2a/server/apps/jsonrpc/jsonrpc_app.py

View workflow job for this annotation

GitHub Actions / Lint Code Base

Copy/pasted code

see src/a2a/server/apps/rest/rest_adapter.py (55-79)
if not _package_starlette_installed:
raise ImportError(
'Packages `starlette` and `sse-starlette` are required to use the'
Expand Down
Loading