smarta2a 0.4.24__py3-none-any.whl → 0.4.26__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/server/state_manager.py +2 -4
- smarta2a/server/webhook_request_processor.py +13 -0
- {smarta2a-0.4.24.dist-info → smarta2a-0.4.26.dist-info}/METADATA +1 -1
- {smarta2a-0.4.24.dist-info → smarta2a-0.4.26.dist-info}/RECORD +6 -6
- {smarta2a-0.4.24.dist-info → smarta2a-0.4.26.dist-info}/WHEEL +0 -0
- {smarta2a-0.4.24.dist-info → smarta2a-0.4.26.dist-info}/licenses/LICENSE +0 -0
smarta2a/server/state_manager.py
CHANGED
@@ -112,7 +112,7 @@ class StateManager:
|
|
112
112
|
for artifact in result.artifacts or []:
|
113
113
|
if artifact.parts:
|
114
114
|
artifact_message = Message(
|
115
|
-
role="
|
115
|
+
role="agent",
|
116
116
|
parts=artifact.parts,
|
117
117
|
metadata=artifact.metadata
|
118
118
|
)
|
@@ -132,9 +132,7 @@ class StateManager:
|
|
132
132
|
|
133
133
|
# Merge artifacts
|
134
134
|
if result.artifacts:
|
135
|
-
|
136
|
-
updated_state.task.artifacts = []
|
137
|
-
updated_state.task.artifacts.extend(result.artifacts)
|
135
|
+
updated_state.task.artifacts = result.artifacts.copy()
|
138
136
|
|
139
137
|
# Merge metadata
|
140
138
|
if result.metadata:
|
@@ -59,6 +59,10 @@ class WebhookRequestProcessor:
|
|
59
59
|
# Call webhook_fn with request
|
60
60
|
raw_result = await self.webhook_fn(request)
|
61
61
|
|
62
|
+
print("--- raw_result ---")
|
63
|
+
print(raw_result)
|
64
|
+
print("--- end of raw_result ---")
|
65
|
+
|
62
66
|
# Handle direct WebhookResponse returns
|
63
67
|
if isinstance(raw_result, WebhookResponse):
|
64
68
|
return raw_result
|
@@ -95,6 +99,12 @@ class WebhookRequestProcessor:
|
|
95
99
|
new_messages=messages
|
96
100
|
)
|
97
101
|
|
102
|
+
print("--- task_history ---")
|
103
|
+
print(task_history)
|
104
|
+
print("--- end of task_history ---")
|
105
|
+
print("--- context_history ---")
|
106
|
+
print(context_history)
|
107
|
+
print("--- end of context_history ---")
|
98
108
|
# Update task with final state
|
99
109
|
updated_task.history = task_history
|
100
110
|
|
@@ -125,6 +135,9 @@ class WebhookRequestProcessor:
|
|
125
135
|
)
|
126
136
|
|
127
137
|
except Exception as e:
|
138
|
+
print("--- EXCEPTION CAUGHT ---")
|
139
|
+
print(e)
|
140
|
+
print("--- END OF EXCEPTION CAUGHT ---")
|
128
141
|
# Handle exceptions
|
129
142
|
return WebhookResponse(
|
130
143
|
id=request.id,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: smarta2a
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.26
|
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
|
@@ -24,8 +24,8 @@ smarta2a/server/nats_client.py,sha256=K97e8awvAxsqgs3BxsTZU_mB3JPPZ0yjLX1LnZZjfX
|
|
24
24
|
smarta2a/server/request_handler.py,sha256=tUAoxkrJtOnLPJxdUDMThGPFAxYnNFFofS3QD80g_8M,26184
|
25
25
|
smarta2a/server/send_task_handler.py,sha256=fiBeCCHCu9c2H4EJOUc0t3EZgpHVFJy4B_6qZOC140s,6336
|
26
26
|
smarta2a/server/server.py,sha256=L0vh1i-s8bAQKarTPkqzZRdZuqFUjoqeGOCfo8wUvgU,6782
|
27
|
-
smarta2a/server/state_manager.py,sha256=
|
28
|
-
smarta2a/server/webhook_request_processor.py,sha256=
|
27
|
+
smarta2a/server/state_manager.py,sha256=SKXK02g0o5-r3lYOJdCQaciYUnFTMGtB5MFdfgTc_ug,7962
|
28
|
+
smarta2a/server/webhook_request_processor.py,sha256=EVIU6J6gd5eCl-QJER-dDxd8dSczFfXN7o_qA-fD5sc,6387
|
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.
|
40
|
-
smarta2a-0.4.
|
41
|
-
smarta2a-0.4.
|
42
|
-
smarta2a-0.4.
|
39
|
+
smarta2a-0.4.26.dist-info/METADATA,sha256=iZsYh0J38iorZ7XeHEMJuStHsHbYRrAT5ujtdoSjcf0,13051
|
40
|
+
smarta2a-0.4.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
41
|
+
smarta2a-0.4.26.dist-info/licenses/LICENSE,sha256=lDbqrxVnzDMY5KJ8JS1WhvkWE8TJaw-O-CHDy-ecsJA,2095
|
42
|
+
smarta2a-0.4.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|