Jarvis-Brain 0.1.11.2__py3-none-any.whl → 0.1.11.3__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: Jarvis_Brain
3
- Version: 0.1.11.2
3
+ Version: 0.1.11.3
4
4
  Summary: Jarvis brain mcp
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: beautifulsoup4
@@ -1,11 +1,11 @@
1
1
  mcp_tools/__init__.py,sha256=_ZzedxbxmVkdRH00ONOjQR31pZW-B8WPn5P2qE6T-Iw,3012
2
- mcp_tools/dp_tools.py,sha256=YTl2DEe02UI3qDRfVWxpqVjir6vq9SGw3wY9JFY3DV4,18370
2
+ mcp_tools/dp_tools.py,sha256=o5c1iDhE0vlMsDVW_eLkTdXa9rTLsvJyCPafOOhqIkw,18406
3
3
  mcp_tools/main.py,sha256=Fgq2PPuc7XCCwXCSVsyoADB0z1vI_gZ07lnLChcrjjg,1167
4
4
  tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  tools/browser_manager.py,sha256=zeYcWuzxoohMdnYUoZbRH7axFC_VtV8MsncfN8y0yw0,2023
6
6
  tools/browser_proxy.py,sha256=v3pEOf-xLmNPr5Hz5ZPyTKn8JBL_N3_H2ZJCezHisyg,9380
7
7
  tools/tools.py,sha256=dcxtuv1rKIrqqJud8e7sC8z-hJM8nx1WUUoeQYBIhiY,11098
8
- jarvis_brain-0.1.11.2.dist-info/METADATA,sha256=HgsIG8R8uWW7Y4Vjua280xQxROnB3-dnLg5_elgGu1g,264
9
- jarvis_brain-0.1.11.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
10
- jarvis_brain-0.1.11.2.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
11
- jarvis_brain-0.1.11.2.dist-info/RECORD,,
8
+ jarvis_brain-0.1.11.3.dist-info/METADATA,sha256=eyRsnKnrM2j23d3gS1byGoPiFnn-w9PyIgh15Dp7JPs,264
9
+ jarvis_brain-0.1.11.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
10
+ jarvis_brain-0.1.11.3.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
11
+ jarvis_brain-0.1.11.3.dist-info/RECORD,,
mcp_tools/dp_tools.py CHANGED
@@ -308,13 +308,15 @@ def register_scroll_action(mcp: FastMCP, browser_manager):
308
308
 
309
309
 
310
310
  def register_get_screenshot(mcp: FastMCP, browser_manager):
311
- @mcp.tool(name="get_tab_screenshot", description="尝试对传入tab页进行截图,并将截图压缩为1M大小png图片,会返回截图保存路径")
311
+ @mcp.tool(name="get_tab_screenshot",
312
+ description="尝试对传入tab页进行截图,并将截图压缩为1M大小png图片,会返回截图保存路径")
312
313
  async def get_tab_screenshot(browser_port: int, tab_id: str) -> dict[str, Any]:
313
314
  _browser = browser_manager.get_browser(browser_port)
314
315
  target_tab = _browser.get_tab(tab_id)
315
316
  if not os.path.exists(html_source_code_local_save_path):
316
317
  os.makedirs(html_source_code_local_save_path)
317
318
  timestamp = int(time.time() * 1000)
319
+ time.sleep(3)
318
320
  origin_png = target_tab.get_screenshot(as_bytes="png")
319
321
  compress_png = compress_image_bytes(origin_png)
320
322
  image_path = os.path.join(html_source_code_local_save_path, f"{browser_port}_{tab_id}_{timestamp}.png")