kl-mcp-client 2.1.7__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.
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/PKG-INFO +1 -1
- kl_mcp_client-2.1.9/kl_mcp_client/__version__.py +1 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client/asyncio/tools.py +7 -4
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client/tools.py +9 -5
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client.egg-info/PKG-INFO +1 -1
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/pyproject.toml +1 -1
- kl_mcp_client-2.1.7/kl_mcp_client/__version__.py +0 -1
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/README.md +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client/__init__.py +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client/asyncio/__init__.py +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client/asyncio/client.py +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client/client.py +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client.egg-info/SOURCES.txt +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client.egg-info/dependency_links.txt +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client.egg-info/requires.txt +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/kl_mcp_client.egg-info/top_level.txt +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/setup.cfg +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/tests/test_async_tools.py +0 -0
- {kl_mcp_client-2.1.7 → kl_mcp_client-2.1.9}/tests/test_tools.py +0 -0
|
@@ -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,
|
|
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(
|
|
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,
|
|
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 +0,0 @@
|
|
|
1
|
-
__VERSION__ = "1.0.0"
|
|
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
|