wcgw 2.1.0__py3-none-any.whl → 2.1.2__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.
Potentially problematic release.
This version of wcgw might be problematic. Click here for more details.
- wcgw/client/anthropic_client.py +4 -3
- wcgw/client/mcp_server/server.py +4 -3
- wcgw/client/openai_client.py +2 -1
- wcgw/client/tools.py +14 -6
- {wcgw-2.1.0.dist-info → wcgw-2.1.2.dist-info}/METADATA +1 -1
- {wcgw-2.1.0.dist-info → wcgw-2.1.2.dist-info}/RECORD +8 -8
- {wcgw-2.1.0.dist-info → wcgw-2.1.2.dist-info}/WHEEL +0 -0
- {wcgw-2.1.0.dist-info → wcgw-2.1.2.dist-info}/entry_points.txt +0 -0
wcgw/client/anthropic_client.py
CHANGED
|
@@ -185,7 +185,7 @@ def loop(
|
|
|
185
185
|
- Send send_specials=["Enter"] to recheck status of a running program.
|
|
186
186
|
- Only one of send_text, send_specials, send_ascii should be provided.
|
|
187
187
|
- This returns within 5 seconds, for heavy programs keep checking status for upto 10 turns before asking user to continue checking again.
|
|
188
|
-
- Programs don't hang easily, so most likely explanation for no output is usually that the program is still running, and you need to check status again
|
|
188
|
+
- Programs don't hang easily, so most likely explanation for no output is usually that the program is still running, and you need to check status again using ["Enter"].
|
|
189
189
|
|
|
190
190
|
""",
|
|
191
191
|
),
|
|
@@ -246,7 +246,7 @@ def loop(
|
|
|
246
246
|
description="""
|
|
247
247
|
- Capture screenshot of the linux os on docker.
|
|
248
248
|
- All actions on UI using mouse and keyboard return within 0.5 seconds.
|
|
249
|
-
* So if you're doing something that takes longer for UI to update like heavy page loading, keep checking UI for update
|
|
249
|
+
* So if you're doing something that takes longer for UI to update like heavy page loading, keep checking UI for update using ScreenShot upto 10 turns.
|
|
250
250
|
* Notice for smallest of the loading icons to check if your action worked.
|
|
251
251
|
* After 10 turns of no change, ask user for permission to keep checking.
|
|
252
252
|
* If you don't notice even slightest of the change, it's likely you clicked on the wrong place.
|
|
@@ -287,7 +287,8 @@ Instructions:
|
|
|
287
287
|
- You should use the provided bash execution, reading and writing file tools to complete objective.
|
|
288
288
|
- First understand about the project by getting the folder structure (ignoring .git, node_modules, venv, etc.)
|
|
289
289
|
- Always read relevant files before editing.
|
|
290
|
-
- Do not provide code snippets unless asked by the user, instead directly edit the code.
|
|
290
|
+
- Do not provide code snippets unless asked by the user, instead directly add/edit the code.
|
|
291
|
+
- Do not install new tools/packages before ensuring no such tools/package or an alternative already exists.
|
|
291
292
|
|
|
292
293
|
System information:
|
|
293
294
|
- System: {uname_sysname}
|
wcgw/client/mcp_server/server.py
CHANGED
|
@@ -105,7 +105,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
|
105
105
|
- Send send_specials=["Enter"] to recheck status of a running program.
|
|
106
106
|
- Only one of send_text, send_specials, send_ascii should be provided.
|
|
107
107
|
- This returns within 3 seconds, for heavy programs keep checking status for upto 10 turns before asking user to continue checking again.
|
|
108
|
-
- Programs don't hang easily, so most likely explanation for no output is usually that the program is still running, and you need to check status again
|
|
108
|
+
- Programs don't hang easily, so most likely explanation for no output is usually that the program is still running, and you need to check status again using ["Enter"].
|
|
109
109
|
""",
|
|
110
110
|
),
|
|
111
111
|
ToolParam(
|
|
@@ -165,7 +165,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
|
165
165
|
description="""
|
|
166
166
|
- Capture screenshot of the linux os on docker.
|
|
167
167
|
- All actions on UI using mouse and keyboard return within 0.5 seconds.
|
|
168
|
-
* So if you're doing something that takes longer for UI to update like heavy page loading, keep checking UI for update
|
|
168
|
+
* So if you're doing something that takes longer for UI to update like heavy page loading, keep checking UI for update using ScreenShot upto 10 turns.
|
|
169
169
|
* Notice for smallest of the loading icons to check if your action worked.
|
|
170
170
|
* After 10 turns of no change, ask user for permission to keep checking.
|
|
171
171
|
* If you don't notice even slightest of the change, it's likely you clicked on the wrong place.
|
|
@@ -243,7 +243,8 @@ async def handle_call_tool(
|
|
|
243
243
|
- You should use the provided bash execution, reading and writing file tools to complete objective.
|
|
244
244
|
- First understand about the project by getting the folder structure (ignoring .git, node_modules, venv, etc.)
|
|
245
245
|
- Always read relevant files before editing.
|
|
246
|
-
- Do not provide code snippets unless asked by the user, instead directly edit the code.
|
|
246
|
+
- Do not provide code snippets unless asked by the user, instead directly add/edit the code.
|
|
247
|
+
- Do not install new tools/packages before ensuring no such tools/package or an alternative already exists.
|
|
247
248
|
|
|
248
249
|
|
|
249
250
|
Additional instructions:
|
wcgw/client/openai_client.py
CHANGED
|
@@ -228,7 +228,8 @@ Instructions:
|
|
|
228
228
|
- You should use the provided bash execution, reading and writing file tools to complete objective.
|
|
229
229
|
- First understand about the project by getting the folder structure (ignoring .git, node_modules, venv, etc.)
|
|
230
230
|
- Always read relevant files before editing.
|
|
231
|
-
- Do not provide code snippets unless asked by the user, instead directly edit the code.
|
|
231
|
+
- Do not provide code snippets unless asked by the user, instead directly add/edit the code.
|
|
232
|
+
- Do not install new tools/packages before ensuring no such tools/package or an alternative already exists.
|
|
232
233
|
|
|
233
234
|
System information:
|
|
234
235
|
- System: {uname_sysname}
|
wcgw/client/tools.py
CHANGED
|
@@ -7,6 +7,7 @@ import json
|
|
|
7
7
|
import mimetypes
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
import re
|
|
10
|
+
import shlex
|
|
10
11
|
import sys
|
|
11
12
|
import threading
|
|
12
13
|
import importlib.metadata
|
|
@@ -518,7 +519,7 @@ def read_image_from_shell(file_path: str) -> ImageData:
|
|
|
518
519
|
else:
|
|
519
520
|
with TemporaryDirectory() as tmpdir:
|
|
520
521
|
rcode = os.system(
|
|
521
|
-
f"docker cp {BASH_STATE.is_in_docker}:{file_path} {tmpdir}"
|
|
522
|
+
f"docker cp {BASH_STATE.is_in_docker}:{shlex.quote(file_path)} {tmpdir}"
|
|
522
523
|
)
|
|
523
524
|
if rcode != 0:
|
|
524
525
|
raise Exception(f"Error: Read failed with code {rcode}")
|
|
@@ -553,7 +554,7 @@ def write_file(writefile: CreateFileNew, error_on_exist: bool) -> str:
|
|
|
553
554
|
else:
|
|
554
555
|
if error_on_exist:
|
|
555
556
|
# Check if it exists using os.system
|
|
556
|
-
cmd = f"test -f {path_}"
|
|
557
|
+
cmd = f"test -f {shlex.quote(path_)}"
|
|
557
558
|
status = os.system(f'docker exec {BASH_STATE.is_in_docker} bash -c "{cmd}"')
|
|
558
559
|
if status == 0:
|
|
559
560
|
return f"Error: can't write to existing file {path_}, use other functions to edit the file"
|
|
@@ -570,7 +571,9 @@ def write_file(writefile: CreateFileNew, error_on_exist: bool) -> str:
|
|
|
570
571
|
if rcode != 0:
|
|
571
572
|
return f"Error: Write failed with code while creating dirs {rcode}"
|
|
572
573
|
|
|
573
|
-
rcode = os.system(
|
|
574
|
+
rcode = os.system(
|
|
575
|
+
f"docker cp {shlex.quote(tmppath)} {BASH_STATE.is_in_docker}:{shlex.quote(path_)}"
|
|
576
|
+
)
|
|
574
577
|
if rcode != 0:
|
|
575
578
|
return f"Error: Write failed with code {rcode}"
|
|
576
579
|
|
|
@@ -661,7 +664,9 @@ def do_diff_edit(fedit: FileEdit) -> str:
|
|
|
661
664
|
else:
|
|
662
665
|
# Copy from docker
|
|
663
666
|
with TemporaryDirectory() as tmpdir:
|
|
664
|
-
rcode = os.system(
|
|
667
|
+
rcode = os.system(
|
|
668
|
+
f"docker cp {BASH_STATE.is_in_docker}:{shlex.quote(path_)} {tmpdir}"
|
|
669
|
+
)
|
|
665
670
|
if rcode != 0:
|
|
666
671
|
raise Exception(f"Error: Read failed with code {rcode}")
|
|
667
672
|
path_tmp = os.path.join(tmpdir, os.path.basename(path_))
|
|
@@ -724,7 +729,9 @@ def do_diff_edit(fedit: FileEdit) -> str:
|
|
|
724
729
|
f.write(apply_diff_to)
|
|
725
730
|
os.chmod(path_tmp, 0o777)
|
|
726
731
|
# Copy to docker using docker cp
|
|
727
|
-
rcode = os.system(
|
|
732
|
+
rcode = os.system(
|
|
733
|
+
f"docker cp {shlex.quote(path_tmp)} {BASH_STATE.is_in_docker}:{shlex.quote(path_)}"
|
|
734
|
+
)
|
|
728
735
|
if rcode != 0:
|
|
729
736
|
raise Exception(f"Error: Write failed with code {rcode}")
|
|
730
737
|
|
|
@@ -1061,7 +1068,8 @@ def read_file(readfile: ReadFile, max_tokens: Optional[int]) -> str:
|
|
|
1061
1068
|
|
|
1062
1069
|
else:
|
|
1063
1070
|
return_code, content, stderr = command_run(
|
|
1064
|
-
f"cat {readfile.file_path}",
|
|
1071
|
+
f"docker exec {BASH_STATE.is_in_docker} cat {shlex.quote(readfile.file_path)}",
|
|
1072
|
+
timeout=TIMEOUT,
|
|
1065
1073
|
)
|
|
1066
1074
|
if return_code != 0:
|
|
1067
1075
|
raise Exception(
|
|
@@ -2,21 +2,21 @@ wcgw/__init__.py,sha256=9K2QW7QuSLhMTVbKbBYd9UUp-ZyrfBrxcjuD_xk458k,118
|
|
|
2
2
|
wcgw/types_.py,sha256=rDz4olJS2zvYC13jzeOppA2tci-tVDyWAqeA5BesAaU,1773
|
|
3
3
|
wcgw/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
wcgw/client/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
|
|
5
|
-
wcgw/client/anthropic_client.py,sha256=
|
|
5
|
+
wcgw/client/anthropic_client.py,sha256=xhJdQps422d0R6YaQX6tpoJdYp4dgX0dgEtODx3WmEM,20381
|
|
6
6
|
wcgw/client/cli.py,sha256=-z0kpDAW3mzfQrQeZfaVJhBCAQY3HXnt9GdgQ8s-u0Y,1003
|
|
7
7
|
wcgw/client/common.py,sha256=grH-yV_4tnTQZ29xExn4YicGLxEq98z-HkEZwH0ReSg,1410
|
|
8
8
|
wcgw/client/computer_use.py,sha256=35NKAlMrxwD0TBlMMRnbCwz4g8TBRGOlcy-cmS-yJ_A,15247
|
|
9
9
|
wcgw/client/diff-instructions.txt,sha256=s5AJKG23JsjwRYhFZFQVvwDpF67vElawrmdXwvukR1A,1683
|
|
10
|
-
wcgw/client/openai_client.py,sha256=
|
|
10
|
+
wcgw/client/openai_client.py,sha256=u2YQrAswfNil_j6bMxOA4rxscT0TWA-wCgEKbr5rwrE,17868
|
|
11
11
|
wcgw/client/openai_utils.py,sha256=YNwCsA-Wqq7jWrxP0rfQmBTb1dI0s7dWXzQqyTzOZT4,2629
|
|
12
12
|
wcgw/client/sys_utils.py,sha256=GajPntKhaTUMn6EOmopENWZNR2G_BJyuVbuot0x6veI,1376
|
|
13
|
-
wcgw/client/tools.py,sha256=
|
|
13
|
+
wcgw/client/tools.py,sha256=kokbgxxBikIK39moSeg5uGvtBUzLXHnP5-d4jywZYRQ,35762
|
|
14
14
|
wcgw/client/mcp_server/Readme.md,sha256=I8N4dHkTUVGNQ63BQkBMBhCCBTgqGOSF_pUR6iOEiUk,2495
|
|
15
15
|
wcgw/client/mcp_server/__init__.py,sha256=hyPPwO9cabAJsOMWhKyat9yl7OlSmIobaoAZKHu3DMc,381
|
|
16
|
-
wcgw/client/mcp_server/server.py,sha256=
|
|
16
|
+
wcgw/client/mcp_server/server.py,sha256=_pzphHJxPyqpLP0YtyddYyaCh83K_OyHKkTuWeSVRHw,10935
|
|
17
17
|
wcgw/relay/serve.py,sha256=RUcUeyL4Xt0EEo12Ul6VQjb4tRle4uIdsa85v7XXxEw,8771
|
|
18
18
|
wcgw/relay/static/privacy.txt,sha256=s9qBdbx2SexCpC_z33sg16TptmAwDEehMCLz4L50JLc,529
|
|
19
|
-
wcgw-2.1.
|
|
20
|
-
wcgw-2.1.
|
|
21
|
-
wcgw-2.1.
|
|
22
|
-
wcgw-2.1.
|
|
19
|
+
wcgw-2.1.2.dist-info/METADATA,sha256=i7GFT8uKfejFukjIHWRGMCBDEQXdfAPw_kI8hb_ZRrI,7421
|
|
20
|
+
wcgw-2.1.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
21
|
+
wcgw-2.1.2.dist-info/entry_points.txt,sha256=eKo1omwbAggWlQ0l7GKoR7uV1-j16nk9tK0BhC2Oz_E,120
|
|
22
|
+
wcgw-2.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|