bohr-agent-sdk 0.1.23__py3-none-any.whl → 0.1.100__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bohr-agent-sdk
3
- Version: 0.1.23
3
+ Version: 0.1.100
4
4
  Summary: SDK for scientific agents
5
5
  Home-page: https://github.com/dptech-corp/bohr-agent-sdk/
6
6
  Author: DP Technology
@@ -20,21 +20,21 @@ dp/agent/device/device/__init__.py,sha256=w7_1S16S1vWUq0RGl0GFgjq2vFkc5oNvy8cQTn
20
20
  dp/agent/device/device/device.py,sha256=9ZRIJth-4qMO-i-u_b_cO3d6a4eTbTQjPaxFsV_zEkc,9643
21
21
  dp/agent/device/device/types.py,sha256=JuxB-hjf1CjjvfBxCLwRAXVFlYS-nPEdiJpBWLFVCzo,1924
22
22
  dp/agent/server/__init__.py,sha256=rckaYd8pbYyB4ENEhgjXKeGMXjdnrgcJpdM1gu5u1Wc,508
23
- dp/agent/server/calculation_mcp_server.py,sha256=oumU2xtqrrgp8BKiuF9YsqMNevXba2JACyYsvNy4nQo,11008
23
+ dp/agent/server/calculation_mcp_server.py,sha256=eClRP7A-t5hMGyTh81KC3GAKjSPNJIylOrOKyzqwo8o,11459
24
24
  dp/agent/server/preprocessor.py,sha256=XUWu7QOwo_sIDMYS2b1OTrM33EXEVH_73vk-ju1Ok8A,1264
25
25
  dp/agent/server/utils.py,sha256=8jgYZEW4XBp86AF2Km6QkwHltBmrnS-soTpHov7ZEJw,4501
26
26
  dp/agent/server/executor/__init__.py,sha256=s95M5qKQk39Yi9qaVJZhk_nfj54quSf7EDghR3OCFUA,248
27
27
  dp/agent/server/executor/base_executor.py,sha256=EFJBsYVYAvuRbiLAbLOwLTw3h7ScjN025xnSP4uJHrQ,2052
28
28
  dp/agent/server/executor/dispatcher_executor.py,sha256=urpzmKH_tBOgblBdJEa3y8eEhXqUDrdcdWCnUdJpfZk,9420
29
- dp/agent/server/executor/local_executor.py,sha256=70bpN-clqdyn7ucN15csqTJKkKGS_ZuwOs2bwLEf30U,5869
29
+ dp/agent/server/executor/local_executor.py,sha256=wYCclNZFkLb3v7KpW1nCnupO8piBES-esYlDAuz86zk,6120
30
30
  dp/agent/server/storage/__init__.py,sha256=Sgsyp5hb0_hhIGugAPfQFzBHt_854rS_MuMuE3sn8Gs,389
31
31
  dp/agent/server/storage/base_storage.py,sha256=728-oNG6N8isV95gZVnyi4vTznJPJhSjxw9Gl5Y_y5o,2356
32
32
  dp/agent/server/storage/bohrium_storage.py,sha256=EsKX4dWWvZTn2TEhZv4zsvihfDK0mmPFecrln-Ytk40,10488
33
33
  dp/agent/server/storage/http_storage.py,sha256=KiySq7g9-iJr12XQCKKyJLn8wJoDnSRpQAR5_qPJ1ZU,1471
34
34
  dp/agent/server/storage/local_storage.py,sha256=t1wfjByjXew9ws3PuUxWxmZQ0-Wt1a6t4wmj3fW62GI,1352
35
35
  dp/agent/server/storage/oss_storage.py,sha256=pgjmi7Gir3Y5wkMDCvU4fvSls15fXT7Ax-h9MYHFPK0,3359
36
- bohr_agent_sdk-0.1.23.dist-info/METADATA,sha256=hYmtg8e5KnKboHSo9N-HaSF4q63hlORPQlsnVOqi6WQ,6329
37
- bohr_agent_sdk-0.1.23.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- bohr_agent_sdk-0.1.23.dist-info/entry_points.txt,sha256=5n5kneF5IbDQtoQ2WfF-QuBjDtsimJte9Rv9baSGgc0,86
39
- bohr_agent_sdk-0.1.23.dist-info/top_level.txt,sha256=87xLUDhu_1nQHoGLwlhJ6XlO7OsjILh6i1nX6ljFzDo,3
40
- bohr_agent_sdk-0.1.23.dist-info/RECORD,,
36
+ bohr_agent_sdk-0.1.100.dist-info/METADATA,sha256=4RK2olS-y4lUKzViG_1qWyIXYnRYk56o-b5FQ98O-ws,6330
37
+ bohr_agent_sdk-0.1.100.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ bohr_agent_sdk-0.1.100.dist-info/entry_points.txt,sha256=5n5kneF5IbDQtoQ2WfF-QuBjDtsimJte9Rv9baSGgc0,86
39
+ bohr_agent_sdk-0.1.100.dist-info/top_level.txt,sha256=87xLUDhu_1nQHoGLwlhJ6XlO7OsjILh6i1nX6ljFzDo,3
40
+ bohr_agent_sdk-0.1.100.dist-info/RECORD,,
@@ -11,6 +11,8 @@ from typing import Literal, Optional, get_origin
11
11
  from mcp.server.fastmcp import FastMCP
12
12
  from mcp.server.fastmcp.server import Context
13
13
  from mcp.server.fastmcp.utilities.func_metadata import _get_typed_signature
14
+ from starlette.responses import JSONResponse
15
+ from starlette.routing import Route
14
16
 
15
17
  from .executor import executor_dict
16
18
  from .storage import storage_dict
@@ -282,4 +284,16 @@ class CalculationMCPServer:
282
284
  def run(self, **kwargs):
283
285
  if os.environ.get("DP_AGENT_RUNNING_MODE") in ["1", "true"]:
284
286
  return
287
+ async def health_check(request) :
288
+ return JSONResponse({"status": "ok"})
289
+
290
+ self.mcp._custom_starlette_routes.append(
291
+ Route(
292
+ "/health",
293
+ endpoint=health_check,
294
+ methods=["GET"],
295
+ name="health_check",
296
+ include_in_schema=True,
297
+ )
298
+ )
285
299
  self.mcp.run(**kwargs)
@@ -130,7 +130,12 @@ class LocalExecutor(BaseExecutor):
130
130
  extra_info["workflow_link"] = wf_link
131
131
  break
132
132
  if not alive:
133
- break
133
+ if os.path.isfile("err"):
134
+ with open("err", "r") as f:
135
+ err_msg = f.read()
136
+ else:
137
+ err_msg = "No workflow submitted"
138
+ raise RuntimeError(err_msg)
134
139
  logger.info("Waiting workflow to be submitted")
135
140
  time.sleep(1)
136
141
  self.recover_env(old_env)