smarta2a 0.4.2__py3-none-any.whl → 0.4.4__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/client/mcp_client.py +14 -11
- smarta2a/server/server.py +0 -11
- smarta2a/server/state_manager.py +1 -0
- {smarta2a-0.4.2.dist-info → smarta2a-0.4.4.dist-info}/METADATA +1 -1
- {smarta2a-0.4.2.dist-info → smarta2a-0.4.4.dist-info}/RECORD +7 -7
- {smarta2a-0.4.2.dist-info → smarta2a-0.4.4.dist-info}/WHEEL +0 -0
- {smarta2a-0.4.2.dist-info → smarta2a-0.4.4.dist-info}/licenses/LICENSE +0 -0
smarta2a/client/mcp_client.py
CHANGED
@@ -37,27 +37,30 @@ class MCPClient:
|
|
37
37
|
command = None
|
38
38
|
args = [server_script_path]
|
39
39
|
|
40
|
-
#
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
command =
|
40
|
+
# Split the path to check for package manager commands
|
41
|
+
split_args = shlex.split(server_script_path)
|
42
|
+
if split_args and split_args[0] in ("npm", "npx", "uv", "uvx"):
|
43
|
+
# Handle package manager command
|
44
|
+
is_javascript = True # Assuming uv/uvx are JS-related tools
|
45
|
+
command = split_args[0]
|
46
|
+
args = split_args[1:] if len(split_args) > 1 else []
|
46
47
|
else:
|
47
|
-
#
|
48
|
+
# Check file extensions
|
48
49
|
is_python = server_script_path.endswith(".py")
|
49
50
|
is_javascript = server_script_path.endswith(".js")
|
50
51
|
if not (is_python or is_javascript):
|
51
|
-
raise ValueError(
|
52
|
-
|
53
|
-
|
52
|
+
raise ValueError(
|
53
|
+
"Server script must be a .py, .js file, or a npm/npx/uv/uvx command."
|
54
|
+
)
|
54
55
|
|
56
|
+
command = "python" if is_python else "node"
|
57
|
+
args = [server_script_path]
|
58
|
+
|
55
59
|
server_params = StdioServerParameters(
|
56
60
|
command=command,
|
57
61
|
args=args,
|
58
62
|
env=None
|
59
63
|
)
|
60
|
-
print(server_params)
|
61
64
|
|
62
65
|
# Start the server
|
63
66
|
stdio_transport = await self.exit_stack.enter_async_context(stdio_client(server_params))
|
smarta2a/server/server.py
CHANGED
@@ -134,17 +134,6 @@ class SmartA2A:
|
|
134
134
|
|
135
135
|
return response.model_dump()
|
136
136
|
|
137
|
-
|
138
|
-
'''
|
139
|
-
|
140
|
-
if self.has_frontend:
|
141
|
-
if not os.path.exists("frontend/index.html"):
|
142
|
-
raise FileNotFoundError("frontend/index.html does not exist")
|
143
|
-
|
144
|
-
@self.app.get("/")
|
145
|
-
async def get_frontend():
|
146
|
-
return FileResponse("frontend/index.html")
|
147
|
-
'''
|
148
137
|
|
149
138
|
'''
|
150
139
|
Setup the decorators for the various A2A methods.
|
smarta2a/server/state_manager.py
CHANGED
@@ -168,6 +168,7 @@ class StateManager:
|
|
168
168
|
"""Prepare NATS message payload from state data"""
|
169
169
|
return {
|
170
170
|
"taskId": state.task_id,
|
171
|
+
"taskName": state.task.metadata.get("taskName", ""),
|
171
172
|
"parts": self._extract_artifact_parts(state.task),
|
172
173
|
"complete": state.task.status.state == TaskState.COMPLETED
|
173
174
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: smarta2a
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.4
|
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
|
@@ -7,7 +7,7 @@ smarta2a/archive/subscription_service.py,sha256=vftmZD94HbdjPFa_1UBvsBm-WkW-s3ZC
|
|
7
7
|
smarta2a/archive/task_service.py,sha256=ptf-oMHy98Rw4XSxyK1-lpqc1JtkCkEEHTmwAaunet4,8199
|
8
8
|
smarta2a/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
smarta2a/client/a2a_client.py,sha256=apDkKFtq61T79LpkbkzVTKWA0mSjR_eTNdGPUYozyvk,12100
|
10
|
-
smarta2a/client/mcp_client.py,sha256=
|
10
|
+
smarta2a/client/mcp_client.py,sha256=JeXhBqxM9TYAArpExLRtEr3lZeQZMcnTmGFl6XKsdu8,3797
|
11
11
|
smarta2a/history_update_strategies/__init__.py,sha256=x5WtiE9rG5ze8d8hA6E6wJOciBhWHa_ZgGgoIAZcXEQ,213
|
12
12
|
smarta2a/history_update_strategies/append_strategy.py,sha256=j7Qbhs69Wwr-HBLB8GJ3-mEPaBSHiBV2xz9ZZi86k2w,312
|
13
13
|
smarta2a/history_update_strategies/history_update_strategy.py,sha256=n2sfIGu8ztKI7gJTwRX26m4tZr28B8Xdhrk6RlBFlI8,373
|
@@ -21,8 +21,8 @@ smarta2a/server/json_rpc_request_processor.py,sha256=qRB3sfj_n9ImkIOCdaUKMsDmKcO
|
|
21
21
|
smarta2a/server/nats_client.py,sha256=akyNg1hLd9XYoLSH_qQVs8uoiTQerztgvqu_3TifSgE,1617
|
22
22
|
smarta2a/server/request_handler.py,sha256=5KMtfpHQX6bOgk1DJbhs1fUCQ5tSvMYXWzheT3IW2Bo,26374
|
23
23
|
smarta2a/server/send_task_handler.py,sha256=fiBeCCHCu9c2H4EJOUc0t3EZgpHVFJy4B_6qZOC140s,6336
|
24
|
-
smarta2a/server/server.py,sha256=
|
25
|
-
smarta2a/server/state_manager.py,sha256=
|
24
|
+
smarta2a/server/server.py,sha256=A0AC5hhgYv9xwpO3s6K1M8ETQztrurWD9UP1_xUT8Z4,6741
|
25
|
+
smarta2a/server/state_manager.py,sha256=FX_tlw3nPeuL7pFt-qzJQfsJbmgeYl2B71ZCvN-4BSE,6702
|
26
26
|
smarta2a/server/webhook_request_processor.py,sha256=_0XoUDmueSl9CvFQE-1zgKRSts-EW8QxbmolPTfFER8,5306
|
27
27
|
smarta2a/state_stores/__init__.py,sha256=vafxAqpwvag_cYFH2XKGk3DPmJIWJr4Ioey30yLFkVQ,220
|
28
28
|
smarta2a/state_stores/base_state_store.py,sha256=_3LInM-qepKwwdypJTDNs9-DozBNrKVycwPwUm7bYdU,512
|
@@ -34,7 +34,7 @@ smarta2a/utils/task_builder.py,sha256=wqSyfVHNTaXuGESu09dhlaDi7D007gcN3-8tH-nPQ4
|
|
34
34
|
smarta2a/utils/task_request_builder.py,sha256=6cOGOqj2Rg43xWM03GRJQzlIZHBptsMCJRp7oD-TDAQ,3362
|
35
35
|
smarta2a/utils/tools_manager.py,sha256=yOiJ6tyxfKDJDM2C0FoVuqh3nNNee75iRw_M7LmZdzA,4319
|
36
36
|
smarta2a/utils/types.py,sha256=kzA6Vv5xXfu1sJuxhEXrglI9e9S6eZVIljMnsrQVyN0,13650
|
37
|
-
smarta2a-0.4.
|
38
|
-
smarta2a-0.4.
|
39
|
-
smarta2a-0.4.
|
40
|
-
smarta2a-0.4.
|
37
|
+
smarta2a-0.4.4.dist-info/METADATA,sha256=KkXbGgZdhoeQ7Jexs-yv9fTEazis64dhLPSnjR_iAWQ,12987
|
38
|
+
smarta2a-0.4.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
39
|
+
smarta2a-0.4.4.dist-info/licenses/LICENSE,sha256=lDbqrxVnzDMY5KJ8JS1WhvkWE8TJaw-O-CHDy-ecsJA,2095
|
40
|
+
smarta2a-0.4.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|