smarta2a 0.4.13__py3-none-any.whl → 0.4.15__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.
- smarta2a/agent/a2a_human.py +1 -3
- smarta2a/server/request_handler.py +1 -0
- smarta2a/server/state_manager.py +3 -3
- smarta2a/server/webhook_request_processor.py +2 -0
- {smarta2a-0.4.13.dist-info → smarta2a-0.4.15.dist-info}/METADATA +1 -1
- {smarta2a-0.4.13.dist-info → smarta2a-0.4.15.dist-info}/RECORD +8 -8
- {smarta2a-0.4.13.dist-info → smarta2a-0.4.15.dist-info}/WHEEL +0 -0
- {smarta2a-0.4.13.dist-info → smarta2a-0.4.15.dist-info}/licenses/LICENSE +0 -0
smarta2a/agent/a2a_human.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# TODO: Implement a human agent that can be used to interact with the A2A server
|
2
|
-
|
3
1
|
# Library imports
|
4
2
|
from fastapi import Query
|
5
3
|
from fastapi.responses import JSONResponse
|
@@ -33,7 +31,7 @@ class A2AHuman:
|
|
33
31
|
|
34
32
|
@self.app.app.get("/tasks")
|
35
33
|
async def get_tasks(fields: Optional[str] = Query(None)):
|
36
|
-
state_store = self.
|
34
|
+
state_store = self.state_manager.get_store()
|
37
35
|
tasks_data = state_store.get_all_tasks(fields)
|
38
36
|
return JSONResponse(content=tasks_data)
|
39
37
|
|
@@ -157,6 +157,7 @@ class RequestHandler:
|
|
157
157
|
# If push_notification_config is set send the task to the push notification url
|
158
158
|
if push_notification_config and forward_to_webhook:
|
159
159
|
try:
|
160
|
+
print("call to send_to_webhook")
|
160
161
|
self.a2a_aclient.send_to_webhook(webhook_url=push_notification_config.url,id=task_id,task=task.model_dump())
|
161
162
|
except Exception as e:
|
162
163
|
print(f"Error sending task to webhook: {e}")
|
smarta2a/server/state_manager.py
CHANGED
@@ -152,6 +152,9 @@ class StateManager:
|
|
152
152
|
|
153
153
|
# Publish update through NATS client
|
154
154
|
payload = self._prepare_update_payload(state_data)
|
155
|
+
print("--- NATS payload ---")
|
156
|
+
print(payload)
|
157
|
+
print("--- NATS payload end ---")
|
155
158
|
await self.nats_client.publish("state.updates", payload)
|
156
159
|
|
157
160
|
def get_store(self) -> Optional[BaseStateStore]:
|
@@ -172,9 +175,6 @@ class StateManager:
|
|
172
175
|
|
173
176
|
def _prepare_update_payload(self, state: StateData) -> Dict[str, Any]:
|
174
177
|
"""Prepare NATS message payload from state data"""
|
175
|
-
print("--- state.task ---")
|
176
|
-
print(state.task)
|
177
|
-
print("--- end of state.task ---")
|
178
178
|
return {
|
179
179
|
"taskId": state.task_id,
|
180
180
|
"taskName": state.task.metadata.get("taskName", ""),
|
@@ -55,6 +55,7 @@ class WebhookRequestProcessor:
|
|
55
55
|
)
|
56
56
|
|
57
57
|
# Persist state
|
58
|
+
print("call to update state - before webhook function")
|
58
59
|
await self.state_manager.update_state(state_data)
|
59
60
|
|
60
61
|
# --- Step 2: Call Webhook Function ---
|
@@ -81,6 +82,7 @@ class WebhookRequestProcessor:
|
|
81
82
|
new_messages=updated_messages
|
82
83
|
)
|
83
84
|
|
85
|
+
print("call to update state - after webhook function")
|
84
86
|
await self.state_manager.update_state(state_data)
|
85
87
|
|
86
88
|
# --- Step 4: Push Notification ---
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: smarta2a
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.15
|
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=
|
3
|
+
smarta2a/agent/a2a_human.py,sha256=3Zco6cQfNtPRV7f-Qe68Kui2ZvagJdFPY6RTI9SCJik,1642
|
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
|
@@ -21,11 +21,11 @@ smarta2a/server/__init__.py,sha256=f2X454Ll4vJc02V4JLJHTN-h8u0TBm4d_FkiO4t686U,5
|
|
21
21
|
smarta2a/server/handler_registry.py,sha256=OVRG5dTvxB7qUNXgsqWxVNxIyRljUShSYxb1gtbi5XM,820
|
22
22
|
smarta2a/server/json_rpc_request_processor.py,sha256=qRB3sfj_n9ImkIOCdaUKMsDmKcO7CiMhaZ4VdQS7Mb4,6993
|
23
23
|
smarta2a/server/nats_client.py,sha256=akyNg1hLd9XYoLSH_qQVs8uoiTQerztgvqu_3TifSgE,1617
|
24
|
-
smarta2a/server/request_handler.py,sha256=
|
24
|
+
smarta2a/server/request_handler.py,sha256=lptvOvptJR7zDNNUFsGmYYGyDIvrjAWCBbikqsRsL7U,26427
|
25
25
|
smarta2a/server/send_task_handler.py,sha256=fiBeCCHCu9c2H4EJOUc0t3EZgpHVFJy4B_6qZOC140s,6336
|
26
26
|
smarta2a/server/server.py,sha256=RKkQM8jpSndt_nOuUB0kswOqLdm7JfvjZA1O424sYdY,6722
|
27
|
-
smarta2a/server/state_manager.py,sha256=
|
28
|
-
smarta2a/server/webhook_request_processor.py,sha256=
|
27
|
+
smarta2a/server/state_manager.py,sha256=mFh0r002sUAzgASkQKEv3ffAAiMtI8kxHxtfGWwVxwA,7666
|
28
|
+
smarta2a/server/webhook_request_processor.py,sha256=npN_Qgo1SMWzGddAkPVoyxrvlOPWwB8GR1l7XH5j2kY,5453
|
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=igKYeSi0SaYzd36jUqOMPvnYd5kK55EPQ0X_pdTo5e4,4857
|
38
38
|
smarta2a/utils/types.py,sha256=kzA6Vv5xXfu1sJuxhEXrglI9e9S6eZVIljMnsrQVyN0,13650
|
39
|
-
smarta2a-0.4.
|
40
|
-
smarta2a-0.4.
|
41
|
-
smarta2a-0.4.
|
42
|
-
smarta2a-0.4.
|
39
|
+
smarta2a-0.4.15.dist-info/METADATA,sha256=GZoLBzVClEavtgmqXeZG05V_CmVn5kz-3YBVFG8OvHc,13051
|
40
|
+
smarta2a-0.4.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
41
|
+
smarta2a-0.4.15.dist-info/licenses/LICENSE,sha256=lDbqrxVnzDMY5KJ8JS1WhvkWE8TJaw-O-CHDy-ecsJA,2095
|
42
|
+
smarta2a-0.4.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|