kl-mcp-client 2.1.8__tar.gz → 2.1.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kl-mcp-client
3
- Version: 2.1.8
3
+ Version: 2.1.9
4
4
  Summary: MCP Client for Python
5
5
  Author-email: Kyle <hngan.it@gmail.com>
6
6
  License: MIT
@@ -0,0 +1 @@
1
+ __VERSION__ = "2.1.9"
@@ -64,7 +64,8 @@ class MCPTools:
64
64
 
65
65
  async def type(self, sessionId: str, selector: str, text: str) -> Dict[str, Any]:
66
66
  res = await self.client.call_tool(
67
- "type", {"sessionId": sessionId, "selector": selector, "text": text}
67
+ "type", {"sessionId": sessionId,
68
+ "selector": selector, "text": text}
68
69
  )
69
70
  return res.get("structuredContent", {})
70
71
 
@@ -319,7 +320,7 @@ class MCPTools:
319
320
  "key": key,
320
321
  },
321
322
  )
322
-
323
+
323
324
  # ======================================================
324
325
  # BROWSER RUNTIME (NO SESSION)
325
326
  # ======================================================
@@ -341,13 +342,15 @@ class MCPTools:
341
342
  )
342
343
  return res.get("structuredContent", {})
343
344
 
344
- async def release_browser(self) -> Dict[str, Any]:
345
+ async def release_browser(self, pop_name: str) -> Dict[str, Any]:
345
346
  """
346
347
  Release / stop browser runtime.
347
348
  - KHÔNG cần payload
348
349
  """
349
350
  res = await self.client.call_tool(
350
351
  "release_browser",
351
- {},
352
+ {
353
+ "pod_name": pop_name
354
+ },
352
355
  )
353
356
  return res.get("structuredContent", {})
@@ -34,7 +34,8 @@ class MCPTools:
34
34
  # ======================================================
35
35
  def connect_mcp(self, mcpUrl: str) -> Dict[str, Any]:
36
36
  # sid = self.client.create_session(mcpUrl)
37
- self.client = MCPClient(base_url=mcpUrl, headers=None, timeout=30, retries=2)
37
+ self.client = MCPClient(
38
+ base_url=mcpUrl, headers=None, timeout=30, retries=2)
38
39
  return {"ok": True, "cdpUrl": "http://localhost:9222"}
39
40
 
40
41
  @_ensure_client
@@ -88,7 +89,8 @@ class MCPTools:
88
89
  @_ensure_client
89
90
  def type(self, sessionId: str, selector: str, text: str) -> Dict[str, Any]:
90
91
  return self.client.call_tool(
91
- "type", {"sessionId": sessionId, "selector": selector, "text": text}
92
+ "type", {"sessionId": sessionId,
93
+ "selector": selector, "text": text}
92
94
  ).get("structuredContent", {})
93
95
 
94
96
  @_ensure_client
@@ -562,6 +564,7 @@ class MCPTools:
562
564
  # ======================================================
563
565
  # BROWSER RUNTIME (NO SESSION)
564
566
  # ======================================================
567
+
565
568
  @_ensure_client
566
569
  def create_browser(self, payload: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
567
570
  """
@@ -576,12 +579,13 @@ class MCPTools:
576
579
  ).get("structuredContent", {})
577
580
 
578
581
  @_ensure_client
579
- def release_browser(self) -> Dict[str, Any]:
582
+ def release_browser(self, pop_name: str) -> Dict[str, Any]:
580
583
  """
581
584
  Release / stop browser runtime.
582
- Không cần payload.
583
585
  """
584
586
  return self.client.call_tool(
585
587
  "release_browser",
586
- {},
588
+ {
589
+ "pod_name": pop_name
590
+ },
587
591
  ).get("structuredContent", {})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kl-mcp-client
3
- Version: 2.1.8
3
+ Version: 2.1.9
4
4
  Summary: MCP Client for Python
5
5
  Author-email: Kyle <hngan.it@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kl-mcp-client"
7
- version = "2.1.8"
7
+ version = "2.1.9"
8
8
  description = "MCP Client for Python"
9
9
  dependencies = [ "requests>=2.32.5", "httpx>=0.28.1",]
10
10
  readme = "README.md"
@@ -1 +0,0 @@
1
- __VERSION__ = "2.1.8"
File without changes
File without changes