Skip to content

Commit e9fafd4

Browse files
feat: add authentication field to PushNotificationConfig
1 parent a2e6901 commit e9fafd4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/crewai/src/crewai/a2a/updates/push_notifications/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from a2a.types import PushNotificationAuthenticationInfo
56
from pydantic import AnyHttpUrl, BaseModel, Field
67

78
from crewai.a2a.updates.base import PushNotificationResultStore
@@ -14,6 +15,7 @@ class PushNotificationConfig(BaseModel):
1415
url: Callback URL where agent sends push notifications.
1516
id: Unique identifier for this config.
1617
token: Token to validate incoming notifications.
18+
authentication: Auth info for agent to use when calling webhook.
1719
timeout: Max seconds to wait for task completion.
1820
interval: Seconds between result polling attempts.
1921
result_store: Store for receiving push notification results.
@@ -22,6 +24,9 @@ class PushNotificationConfig(BaseModel):
2224
url: AnyHttpUrl = Field(description="Callback URL for push notifications")
2325
id: str | None = Field(default=None, description="Unique config identifier")
2426
token: str | None = Field(default=None, description="Validation token")
27+
authentication: PushNotificationAuthenticationInfo | None = Field(
28+
default=None, description="Auth info for agent to use when calling webhook"
29+
)
2530
timeout: float | None = Field(
2631
default=300.0, gt=0, description="Max seconds to wait for task completion"
2732
)

lib/crewai/src/crewai/a2a/updates/push_notifications/handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def _build_a2a_push_config(config: PushNotificationConfig) -> A2APushNotificatio
5353
url=str(config.url),
5454
id=config.id,
5555
token=config.token,
56+
authentication=config.authentication,
5657
)
5758

5859

0 commit comments

Comments
 (0)