aixtools 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aixtools might be problematic. Click here for more details.

aixtools/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.3.2'
32
- __version_tuple__ = version_tuple = (0, 3, 2)
31
+ __version__ = version = '0.3.3'
32
+ __version_tuple__ = version_tuple = (0, 3, 3)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -63,7 +63,7 @@ class RemoteAgentConnection:
63
63
  self,
64
64
  message: Message,
65
65
  *,
66
- sleep_time: float = 0.2,
66
+ sleep_time: float = 2.0,
67
67
  max_iter=1000,
68
68
  on_task_submitted: Callable[[str], None] | None = None,
69
69
  ) -> Task | Message:
@@ -5,7 +5,7 @@ import asyncio
5
5
  import httpx
6
6
  from a2a.client import A2ACardResolver, ClientConfig, ClientFactory
7
7
  from a2a.server.agent_execution import RequestContext
8
- from a2a.types import AgentCard
8
+ from a2a.types import AgentCard, PushNotificationConfig
9
9
  from a2a.utils import AGENT_CARD_WELL_KNOWN_PATH, PREV_AGENT_CARD_WELL_KNOWN_PATH
10
10
 
11
11
  from aixtools.a2a.google_sdk.remote_agent_connection import RemoteAgentConnection
@@ -42,9 +42,15 @@ async def get_agent_card(client: httpx.AsyncClient, address: str) -> AgentCard:
42
42
  class _AgentCardResolver:
43
43
  """Helper class to resolve and manage agent cards and their connections."""
44
44
 
45
- def __init__(self, client: httpx.AsyncClient):
45
+ def __init__(
46
+ self, client: httpx.AsyncClient, push_notification_configs: list[PushNotificationConfig] | None = None
47
+ ):
46
48
  self._httpx_client = client
47
- self._a2a_client_factory = ClientFactory(ClientConfig(httpx_client=self._httpx_client, polling=True))
49
+ self._a2a_client_factory = ClientFactory(
50
+ ClientConfig(
51
+ httpx_client=self._httpx_client, polling=True, push_notification_configs=push_notification_configs or []
52
+ )
53
+ )
48
54
  self.clients: dict[str, RemoteAgentConnection] = {}
49
55
 
50
56
  def register_agent_card(self, card: AgentCard):
@@ -72,13 +78,20 @@ async def get_a2a_clients(
72
78
  agent_hosts: list[str],
73
79
  session_id_tuple: SessionIdTuple,
74
80
  auth_token: str = None,
81
+ push_notification_config_url: str | None = None,
75
82
  *,
76
83
  timeout: float = DEFAULT_A2A_TIMEOUT,
77
84
  ) -> dict[str, RemoteAgentConnection]:
78
85
  """Get A2A clients for all agents defined in the configuration."""
86
+ push_notification_configs = (
87
+ [PushNotificationConfig(url=push_notification_config_url)] if push_notification_config_url else None
88
+ )
89
+
79
90
  headers = create_session_headers(session_id_tuple, auth_token)
80
91
  httpx_client = httpx.AsyncClient(headers=headers, timeout=timeout, follow_redirects=True)
81
- clients = await _AgentCardResolver(httpx_client).get_a2a_clients(agent_hosts)
92
+ clients = await _AgentCardResolver(
93
+ httpx_client, push_notification_configs=push_notification_configs
94
+ ).get_a2a_clients(agent_hosts)
82
95
  for client in clients.values():
83
96
  logger.info("Using A2A server at: %s", client.get_agent_card().url)
84
97
  return clients
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aixtools
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Tools for AI exploration and debugging
5
5
  Requires-Python: >=3.11.2
6
6
  Description-Content-Type: text/markdown
@@ -1,5 +1,5 @@
1
1
  aixtools/__init__.py,sha256=9NGHm7LjsQmsvjTZvw6QFJexSvAU4bCoN_KBk9SCa00,260
2
- aixtools/_version.py,sha256=e8NqPtZ8fggRgk3GPrqZ_U_BDV8aSULw1u_Gn9NNbnk,704
2
+ aixtools/_version.py,sha256=lemL_4Kl75FgrO6lVuFrrtw6-Dcf9wtXBalKkXuzkO4,704
3
3
  aixtools/app.py,sha256=JzQ0nrv_bjDQokllIlGHOV0HEb-V8N6k_nGQH-TEsVU,5227
4
4
  aixtools/chainlit.md,sha256=yC37Ly57vjKyiIvK4oUvf4DYxZCwH7iocTlx7bLeGLU,761
5
5
  aixtools/context.py,sha256=I_MD40ZnvRm5WPKAKqBUAdXIf8YaurkYUUHSVVy-QvU,598
@@ -20,8 +20,8 @@ aixtools/.chainlit/translations/zh-CN.json,sha256=EWxhT2_6CW9z0F6SI2llr3RsaL2omH
20
20
  aixtools/a2a/app.py,sha256=p18G7fAInl9dcNYq6RStBjv1C3aD6oilQq3WXtBuk30,5069
21
21
  aixtools/a2a/utils.py,sha256=EHr3IyyBJn23ni-JcfAf6i3VpQmPs0g1TSnAZazvY_8,4039
22
22
  aixtools/a2a/google_sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- aixtools/a2a/google_sdk/remote_agent_connection.py,sha256=gFsIja_nIQsAzxElv3A7_hG9GpDI5pkV-B_KDlcYlnc,3329
24
- aixtools/a2a/google_sdk/utils.py,sha256=k5VtTr4XLxsSKQDqly9QtWcZ5xfm03VbPpQ8OwoXtiQ,4369
23
+ aixtools/a2a/google_sdk/remote_agent_connection.py,sha256=wJXIHD76yL3nlI4b9IA7FQlpKRxrFDsSh78TIm1Fy4E,3329
24
+ aixtools/a2a/google_sdk/utils.py,sha256=eEjYBeSYS7U8RsRxC-rTiw0VXo25CIR9VyRoqdvzGY4,4859
25
25
  aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py,sha256=xamLIKl-FeB8PElVKgiIKR-MhFKmPjywHmC_ow-fGAA,9904
26
26
  aixtools/a2a/google_sdk/pydantic_ai_adapter/storage.py,sha256=nGoVL7MPoZJW7iVR71laqpUYP308yFKZIifJtvUgpiU,878
27
27
  aixtools/agents/__init__.py,sha256=MAW196S2_G7uGqv-VNjvlOETRfuV44WlU1leO7SiR0A,282
@@ -95,8 +95,8 @@ aixtools/utils/chainlit/cl_agent_show.py,sha256=vaRuowp4BRvhxEr5hw0zHEJ7iaSF_5bo
95
95
  aixtools/utils/chainlit/cl_utils.py,sha256=fxaxdkcZg6uHdM8uztxdPowg3a2f7VR7B26VPY4t-3c,5738
96
96
  aixtools/vault/__init__.py,sha256=fsr_NuX3GZ9WZ7dGfe0gp_5-z3URxAfwVRXw7Xyc0dU,141
97
97
  aixtools/vault/vault.py,sha256=9dZLWdZQk9qN_Q9Djkofw9LUKnJqnrX5H0fGusVLBhA,6037
98
- aixtools-0.3.2.dist-info/METADATA,sha256=FnBXFfGny-BUh1L6fkR_JUZy7OjZPbjRhhoDIgfg5jM,28014
99
- aixtools-0.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
- aixtools-0.3.2.dist-info/entry_points.txt,sha256=q8412TG4T0S8K0SKeWp2vkVPIDYQs0jNoHqcQ7qxOiA,155
101
- aixtools-0.3.2.dist-info/top_level.txt,sha256=wBn-rw9bCtxrR4AYEYgjilNCUVmKY0LWby9Zan2PRJM,9
102
- aixtools-0.3.2.dist-info/RECORD,,
98
+ aixtools-0.3.3.dist-info/METADATA,sha256=7DYSkk-wIir2no9izjOLxApYnkpzxa99JZ_-kI7npuY,28014
99
+ aixtools-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
+ aixtools-0.3.3.dist-info/entry_points.txt,sha256=q8412TG4T0S8K0SKeWp2vkVPIDYQs0jNoHqcQ7qxOiA,155
101
+ aixtools-0.3.3.dist-info/top_level.txt,sha256=wBn-rw9bCtxrR4AYEYgjilNCUVmKY0LWby9Zan2PRJM,9
102
+ aixtools-0.3.3.dist-info/RECORD,,