bohr-agent-sdk 0.1.17__tar.gz → 0.1.18__tar.gz
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.
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/PKG-INFO +1 -1
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/setup.py +1 -1
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/bohr_agent_sdk.egg-info/PKG-INFO +1 -1
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/adapter/adk/utils.py +29 -25
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/README.md +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/pyproject.toml +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/setup.cfg +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/bohr_agent_sdk.egg-info/SOURCES.txt +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/bohr_agent_sdk.egg-info/dependency_links.txt +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/bohr_agent_sdk.egg-info/entry_points.txt +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/bohr_agent_sdk.egg-info/requires.txt +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/bohr_agent_sdk.egg-info/top_level.txt +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/adapter/adk/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/adapter/adk/client/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/adapter/adk/client/calculation_mcp_tool.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/adapter/camel/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/adapter/camel/client/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/adapter/camel/client/calculation_mcp_client.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/cli/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/cli/cli.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/cloud/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/cloud/main.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/cloud/mcp.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/cloud/mqtt.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/device/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/device/device/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/device/device/device.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/device/device/types.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/device/mqtt_device_twin.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/calculation_mcp_server.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/executor/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/executor/base_executor.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/executor/dispatcher_executor.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/executor/local_executor.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/preprocessor.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/storage/__init__.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/storage/base_storage.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/storage/bohrium_storage.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/storage/http_storage.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/storage/local_storage.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/storage/oss_storage.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/utils.py +0 -0
- {bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/tests/test_cli.py +0 -0
|
@@ -9,7 +9,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
9
9
|
|
|
10
10
|
setup(
|
|
11
11
|
name="bohr-agent-sdk",
|
|
12
|
-
version="0.1.
|
|
12
|
+
version="0.1.18",
|
|
13
13
|
description="SDK for science agent and mcp tools",
|
|
14
14
|
long_description=long_description,
|
|
15
15
|
long_description_content_type="text/markdown",
|
|
@@ -116,6 +116,7 @@ def search_error_in_memory_handler(toolset):
|
|
|
116
116
|
def extract_job_info(events: List[Event]) -> dict:
|
|
117
117
|
jobs = {}
|
|
118
118
|
artifacts = {}
|
|
119
|
+
events.sort(key=lambda event: event.timestamp)
|
|
119
120
|
for event in events:
|
|
120
121
|
if event.content and event.content.parts:
|
|
121
122
|
for part in event.content.parts:
|
|
@@ -135,39 +136,42 @@ def extract_job_info(events: List[Event]) -> dict:
|
|
|
135
136
|
}
|
|
136
137
|
job = jobs[resp.id]
|
|
137
138
|
job["timestamp"] = event.timestamp
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
res = resp.response.get("result")
|
|
140
|
+
if isinstance(res, dict) and "content" in res \
|
|
141
|
+
and "isError" in res:
|
|
142
|
+
res = types.CallToolResult(
|
|
143
|
+
content=res["content"], isError=res["isError"])
|
|
144
|
+
if isinstance(res, types.CallToolResult):
|
|
141
145
|
if res.isError:
|
|
142
146
|
err_msg = res.content[0].text
|
|
143
147
|
if err_msg.startswith("Error executing tool"):
|
|
144
148
|
err_msg = err_msg[err_msg.find(":")+2:]
|
|
145
149
|
job["err_msg"] = err_msg
|
|
146
|
-
|
|
150
|
+
elif hasattr(res.content[0], "text"):
|
|
147
151
|
result = jsonpickle.loads(res.content[0].text)
|
|
148
152
|
if "job_id" not in result:
|
|
149
153
|
job["result"] = result
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
154
|
+
if hasattr(res.content[0], "job_info"):
|
|
155
|
+
job_info = res.content[0].job_info
|
|
156
|
+
job.update(job_info)
|
|
157
|
+
for name, art in job_info.get(
|
|
158
|
+
"input_artifacts", {}).items():
|
|
159
|
+
if art["uri"] not in artifacts:
|
|
160
|
+
artifacts[art["uri"]] = {
|
|
161
|
+
"type": "input",
|
|
162
|
+
"name": name,
|
|
163
|
+
"job_id": job_info["job_id"],
|
|
164
|
+
**art,
|
|
165
|
+
}
|
|
166
|
+
for name, art in job_info.get(
|
|
167
|
+
"output_artifacts", {}).items():
|
|
168
|
+
if art["uri"] not in artifacts:
|
|
169
|
+
artifacts[art["uri"]] = {
|
|
170
|
+
"type": "output",
|
|
171
|
+
"name": name,
|
|
172
|
+
"job_id": job_info["job_id"],
|
|
173
|
+
**art,
|
|
174
|
+
}
|
|
171
175
|
return {
|
|
172
176
|
"jobs": list(jobs.values()),
|
|
173
177
|
"artifacts": list(artifacts.values()),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/bohr_agent_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/bohr_agent_sdk.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/adapter/camel/client/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/calculation_mcp_server.py
RENAMED
|
File without changes
|
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/executor/base_executor.py
RENAMED
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/executor/dispatcher_executor.py
RENAMED
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/executor/local_executor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/storage/bohrium_storage.py
RENAMED
|
File without changes
|
|
File without changes
|
{bohr_agent_sdk-0.1.17 → bohr_agent_sdk-0.1.18}/src/dp/agent/server/storage/local_storage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|