kl-mcp-client 2.1.4__py3-none-any.whl → 2.1.8__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 +1 @@
1
- __VERSION__ = "1.0.0"
1
+ __VERSION__ = "2.1.8"
@@ -319,3 +319,35 @@ class MCPTools:
319
319
  "key": key,
320
320
  },
321
321
  )
322
+
323
+ # ======================================================
324
+ # BROWSER RUNTIME (NO SESSION)
325
+ # ======================================================
326
+
327
+ async def create_browser(
328
+ self,
329
+ payload: Optional[Dict[str, Any]] = None,
330
+ ) -> Dict[str, Any]:
331
+ """
332
+ Start browser runtime (idempotent).
333
+ - KHÔNG tạo session
334
+ - Dùng cho warm-up / admin / scheduler
335
+
336
+ payload: ThirdPartyOpenRequest (optional)
337
+ """
338
+ res = await self.client.call_tool(
339
+ "create_browser",
340
+ payload or {},
341
+ )
342
+ return res.get("structuredContent", {})
343
+
344
+ async def release_browser(self) -> Dict[str, Any]:
345
+ """
346
+ Release / stop browser runtime.
347
+ - KHÔNG cần payload
348
+ """
349
+ res = await self.client.call_tool(
350
+ "release_browser",
351
+ {},
352
+ )
353
+ return res.get("structuredContent", {})
kl_mcp_client/tools.py CHANGED
@@ -559,3 +559,29 @@ class MCPTools:
559
559
  "scroll",
560
560
  args,
561
561
  ).get("structuredContent", {})
562
+ # ======================================================
563
+ # BROWSER RUNTIME (NO SESSION)
564
+ # ======================================================
565
+ @_ensure_client
566
+ def create_browser(self, payload: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
567
+ """
568
+ Start browser runtime (idempotent).
569
+ Không tạo session, chỉ đảm bảo browser đang RUNNING.
570
+
571
+ payload: map cho ThirdPartyOpenRequest
572
+ """
573
+ return self.client.call_tool(
574
+ "create_browser",
575
+ payload or {},
576
+ ).get("structuredContent", {})
577
+
578
+ @_ensure_client
579
+ def release_browser(self) -> Dict[str, Any]:
580
+ """
581
+ Release / stop browser runtime.
582
+ Không cần payload.
583
+ """
584
+ return self.client.call_tool(
585
+ "release_browser",
586
+ {},
587
+ ).get("structuredContent", {})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kl-mcp-client
3
- Version: 2.1.4
3
+ Version: 2.1.8
4
4
  Summary: MCP Client for Python
5
5
  Author-email: Kyle <hngan.it@gmail.com>
6
6
  License: MIT
@@ -0,0 +1,11 @@
1
+ kl_mcp_client/__init__.py,sha256=pdJdBcEH5HaRuHSe2B7VUyRgH5ad3u1dDc4euZMDRMY,106
2
+ kl_mcp_client/__version__.py,sha256=gijF1N5K1fcUKO93GIRamnDCwaUJ3bjN5UgukTujZ20,22
3
+ kl_mcp_client/client.py,sha256=ujhRp0zC5GJKnBYziIPMdKZqrhv8K2t6tBAuwYw7q_k,4513
4
+ kl_mcp_client/tools.py,sha256=kEkeG75SUUostCR5gRjLIjJzHg6-iWzXakjf3nvgXKk,18733
5
+ kl_mcp_client/asyncio/__init__.py,sha256=pdJdBcEH5HaRuHSe2B7VUyRgH5ad3u1dDc4euZMDRMY,106
6
+ kl_mcp_client/asyncio/client.py,sha256=5CpPf1YGOTzYfbG1mAK9s-vhKQULjdlSJnhXm3Th-1s,4413
7
+ kl_mcp_client/asyncio/tools.py,sha256=ayOqGYoiQ0q15xXz_7sKFq9UzUAqaOG0Uscy6uyvErM,11992
8
+ kl_mcp_client-2.1.8.dist-info/METADATA,sha256=rKlfrw0YCBeqCfshpQj7yHanopgJF0mxLHIJvm-Ob0A,4443
9
+ kl_mcp_client-2.1.8.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
10
+ kl_mcp_client-2.1.8.dist-info/top_level.txt,sha256=wd_HFFyGjiKavwACuj8Ny0svtVyNsrxCSVU48EkoQ7c,14
11
+ kl_mcp_client-2.1.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,11 +0,0 @@
1
- kl_mcp_client/__init__.py,sha256=pdJdBcEH5HaRuHSe2B7VUyRgH5ad3u1dDc4euZMDRMY,106
2
- kl_mcp_client/__version__.py,sha256=CCYQUt19bi0kfo0Q8q8snnwgw_c9F3s6FFxTMsX1yDE,22
3
- kl_mcp_client/client.py,sha256=ujhRp0zC5GJKnBYziIPMdKZqrhv8K2t6tBAuwYw7q_k,4513
4
- kl_mcp_client/tools.py,sha256=pSHl5Cp9YHUfFY-ZaKxDw3jWT7kBw7K1jbXmN-wQOgY,17852
5
- kl_mcp_client/asyncio/__init__.py,sha256=pdJdBcEH5HaRuHSe2B7VUyRgH5ad3u1dDc4euZMDRMY,106
6
- kl_mcp_client/asyncio/client.py,sha256=5CpPf1YGOTzYfbG1mAK9s-vhKQULjdlSJnhXm3Th-1s,4413
7
- kl_mcp_client/asyncio/tools.py,sha256=2rXnmVVCgqRyM30ULN-7tCUARwHg9rbuTyrR-p5O4_Y,11055
8
- kl_mcp_client-2.1.4.dist-info/METADATA,sha256=E_g-le8jl88CYWK4amBVWB8zyh23CdF1F1FcNe4QRko,4443
9
- kl_mcp_client-2.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- kl_mcp_client-2.1.4.dist-info/top_level.txt,sha256=wd_HFFyGjiKavwACuj8Ny0svtVyNsrxCSVU48EkoQ7c,14
11
- kl_mcp_client-2.1.4.dist-info/RECORD,,