smarta2a 0.4.22__py3-none-any.whl → 0.4.24__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.
@@ -37,7 +37,7 @@ class A2AHuman:
37
37
 
38
38
  @self.app.on_send_task(forward_to_webhook=True)
39
39
  async def on_send_task(request: SendTaskRequest, state: StateData):
40
- pass
40
+ return "I am human and will take some time to respond, please standby"
41
41
 
42
42
  @self.app.webhook()
43
43
  async def on_webhook(request: WebhookRequest, state: StateData):
smarta2a/server/server.py CHANGED
@@ -108,7 +108,7 @@ class SmartA2A:
108
108
  # <-- Accept both SSE‐style responses:
109
109
  if isinstance(response, (EventSourceResponse, StreamingResponse)):
110
110
  return response
111
- print(response)
111
+
112
112
  # <-- Everything else is a normal pydantic JSONRPCResponse
113
113
  return response.model_dump()
114
114
 
@@ -18,13 +18,19 @@ class WebhookRequestProcessor:
18
18
 
19
19
  async def process_request(self, request: WebhookRequest) -> WebhookResponse:
20
20
  if self.state_manager:
21
- state_data = self.state_manager.get_and_update_state_from_webhook(request.id, request.result)
21
+ state_data = await self.state_manager.get_and_update_state_from_webhook(request.id, request.result)
22
22
  return await self._webhook_handler(request, state_data)
23
23
  else:
24
24
  return await self._webhook_handler(request)
25
25
 
26
26
 
27
27
  async def _webhook_handler(self, request: WebhookRequest, state_data: Optional[StateData] = None) -> WebhookResponse:
28
+ print("--- _webhook_handler ---")
29
+ print(request)
30
+ print("--- end of _webhook_handler ---")
31
+ print("--- state_data ---")
32
+ print(state_data)
33
+ print("--- end of state_data ---")
28
34
  try:
29
35
  # Extract parameters from request
30
36
  task_id = request.id
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smarta2a
3
- Version: 0.4.22
3
+ Version: 0.4.24
4
4
  Summary: a Python framework that helps you build servers and AI agents that communicate using the A2A protocol
5
5
  Project-URL: Homepage, https://github.com/siddharthsma/smarta2a
6
6
  Project-URL: Bug Tracker, https://github.com/siddharthsma/smarta2a/issues
@@ -1,6 +1,6 @@
1
1
  smarta2a/__init__.py,sha256=T_EECYqWrxshix0FbgUv22zlKRX22HFU-HKXcYTOb3w,175
2
2
  smarta2a/agent/a2a_agent.py,sha256=EurcxpV14e3OPWCMutYL0EXMHb5ZKQqAHEGZZF6pNgg,1892
3
- smarta2a/agent/a2a_human.py,sha256=fJITpCDgUWwe4qCTQtKK3BfxsK0v3R4_yzML3p7xLmE,1579
3
+ smarta2a/agent/a2a_human.py,sha256=Bz4M9rhEwQEtIdDnV7VTL2n14nTT2wACyPBhDMph4FQ,1645
4
4
  smarta2a/agent/a2a_mcp_server.py,sha256=X_mxkgYgCA_dSNtCvs0rSlOoWYc-8d3Qyxv0e-a7NKY,1015
5
5
  smarta2a/archive/smart_mcp_client.py,sha256=0s2OWFKWSv-_UF7rb9fOrsh1OIYsYOsGukkXXp_E1cU,4158
6
6
  smarta2a/archive/subscription_service.py,sha256=vftmZD94HbdjPFa_1UBvsBm-WkW-s3ZCVq60fF7OCgA,4109
@@ -23,9 +23,9 @@ smarta2a/server/json_rpc_request_processor.py,sha256=qRB3sfj_n9ImkIOCdaUKMsDmKcO
23
23
  smarta2a/server/nats_client.py,sha256=K97e8awvAxsqgs3BxsTZU_mB3JPPZ0yjLX1LnZZjfXE,1450
24
24
  smarta2a/server/request_handler.py,sha256=tUAoxkrJtOnLPJxdUDMThGPFAxYnNFFofS3QD80g_8M,26184
25
25
  smarta2a/server/send_task_handler.py,sha256=fiBeCCHCu9c2H4EJOUc0t3EZgpHVFJy4B_6qZOC140s,6336
26
- smarta2a/server/server.py,sha256=E58tvOjAvHf_gYjST76sPEC5piaNyrHePa9k-fSadZA,6797
26
+ smarta2a/server/server.py,sha256=L0vh1i-s8bAQKarTPkqzZRdZuqFUjoqeGOCfo8wUvgU,6782
27
27
  smarta2a/server/state_manager.py,sha256=jFxf9cDxLqjIo87tv_Ynh2dH1vCTFLrVSLPuVg6YWnA,8063
28
- smarta2a/server/webhook_request_processor.py,sha256=41GiBn0Arc56xzWV9T6dtHlCtmBnf2JBE4g7iRyR3Tw,5657
28
+ smarta2a/server/webhook_request_processor.py,sha256=svdTuYLj6Nj5fr-GBWy5I6ebrnh_GnHERBBiuWNcabo,5882
29
29
  smarta2a/state_stores/__init__.py,sha256=vafxAqpwvag_cYFH2XKGk3DPmJIWJr4Ioey30yLFkVQ,220
30
30
  smarta2a/state_stores/base_state_store.py,sha256=_3LInM-qepKwwdypJTDNs9-DozBNrKVycwPwUm7bYdU,512
31
31
  smarta2a/state_stores/inmemory_state_store.py,sha256=nEBBUiiqhEluP2MYJjFUImcjIwLJEvL8BWwMbLCb8Fw,1268
@@ -36,7 +36,7 @@ smarta2a/utils/task_builder.py,sha256=wqSyfVHNTaXuGESu09dhlaDi7D007gcN3-8tH-nPQ4
36
36
  smarta2a/utils/task_request_builder.py,sha256=6cOGOqj2Rg43xWM03GRJQzlIZHBptsMCJRp7oD-TDAQ,3362
37
37
  smarta2a/utils/tools_manager.py,sha256=oR5cbwzPZ36hQAsWAgb-c6wFv5BthmCPraD7DSv-Bv8,4332
38
38
  smarta2a/utils/types.py,sha256=kzA6Vv5xXfu1sJuxhEXrglI9e9S6eZVIljMnsrQVyN0,13650
39
- smarta2a-0.4.22.dist-info/METADATA,sha256=b3qwPx7azGKhLPRY9lgToJeHlXBdp-zAlsyNs_QP2E4,13051
40
- smarta2a-0.4.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
- smarta2a-0.4.22.dist-info/licenses/LICENSE,sha256=lDbqrxVnzDMY5KJ8JS1WhvkWE8TJaw-O-CHDy-ecsJA,2095
42
- smarta2a-0.4.22.dist-info/RECORD,,
39
+ smarta2a-0.4.24.dist-info/METADATA,sha256=8LWPDwc8HvhX51dANGWhn1MX4oTAJm4ljO2dzSs-NFQ,13051
40
+ smarta2a-0.4.24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
+ smarta2a-0.4.24.dist-info/licenses/LICENSE,sha256=lDbqrxVnzDMY5KJ8JS1WhvkWE8TJaw-O-CHDy-ecsJA,2095
42
+ smarta2a-0.4.24.dist-info/RECORD,,