wcgw 0.1.1__py3-none-any.whl → 0.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/tools.py
CHANGED
|
@@ -114,7 +114,8 @@ def _get_exit_code() -> int:
|
|
|
114
114
|
while not _is_int(before): # Consume all previous output
|
|
115
115
|
SHELL.expect("#@@")
|
|
116
116
|
assert isinstance(SHELL.before, str)
|
|
117
|
-
|
|
117
|
+
# Render because there could be some anscii escape sequences still set like in google colab env
|
|
118
|
+
before = render_terminal_output(SHELL.before).strip()
|
|
118
119
|
|
|
119
120
|
try:
|
|
120
121
|
return int((before))
|
|
@@ -285,7 +286,7 @@ def read_image_from_shell(file_path: str) -> ImageData:
|
|
|
285
286
|
SHELL.sendline("pwd")
|
|
286
287
|
SHELL.expect("#@@")
|
|
287
288
|
assert isinstance(SHELL.before, str)
|
|
288
|
-
current_dir = SHELL.before.strip()
|
|
289
|
+
current_dir = render_terminal_output(SHELL.before).strip()
|
|
289
290
|
file_path = os.path.join(current_dir, file_path)
|
|
290
291
|
|
|
291
292
|
if not os.path.exists(file_path):
|
|
@@ -304,7 +305,7 @@ def write_file(writefile: Writefile) -> str:
|
|
|
304
305
|
SHELL.sendline("pwd")
|
|
305
306
|
SHELL.expect("#@@")
|
|
306
307
|
assert isinstance(SHELL.before, str)
|
|
307
|
-
current_dir = SHELL.before.strip()
|
|
308
|
+
current_dir = render_terminal_output(SHELL.before).strip()
|
|
308
309
|
return f"Failure: Use absolute path only. FYI current working directory is '{current_dir}'"
|
|
309
310
|
os.makedirs(os.path.dirname(writefile.file_path), exist_ok=True)
|
|
310
311
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: wcgw
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: What could go wrong giving full shell access to chatgpt?
|
|
5
5
|
Project-URL: Homepage, https://github.com/rusiaaman/wcgw
|
|
6
6
|
Author-email: Aman Rusia <gapypi@arcfu.com>
|
|
@@ -71,9 +71,9 @@ NOTE: you can resume a broken connection
|
|
|
71
71
|
`wcgw --client-uuid $previous_uuid`
|
|
72
72
|
|
|
73
73
|
# How it works
|
|
74
|
-
Your commands are relayed through a server I've hosted at https://wcgw.arcfu.com
|
|
74
|
+
Your commands are relayed through a server to the terminal client. [You could host the server on your own](https://github.com/rusiaaman/wcgw?tab=readme-ov-file#creating-your-own-custom-gpt-and-the-relay-server). For public convenience I've hosted one at https://wcgw.arcfu.com thanks to the gcloud free tier plan.
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
Chatgpt sends a request to the relay server using the user id that you share with it. The relay server holds a websocket with the terminal client against the user id and acts as a proxy to pass the request.
|
|
77
77
|
|
|
78
78
|
It's secure in both the directions. Either a malicious actor or a malicious Chatgpt has to correctly guess your UUID for any security breach.
|
|
79
79
|
|
|
@@ -5,8 +5,8 @@ wcgw/claude.py,sha256=Bp45-UMBIJd-4tzX618nu-SpRbVtkTb1Es6c_gW6xy0,14861
|
|
|
5
5
|
wcgw/common.py,sha256=grH-yV_4tnTQZ29xExn4YicGLxEq98z-HkEZwH0ReSg,1410
|
|
6
6
|
wcgw/openai_adapters.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
wcgw/openai_utils.py,sha256=YNwCsA-Wqq7jWrxP0rfQmBTb1dI0s7dWXzQqyTzOZT4,2629
|
|
8
|
-
wcgw/tools.py,sha256=
|
|
9
|
-
wcgw-0.1.
|
|
10
|
-
wcgw-0.1.
|
|
11
|
-
wcgw-0.1.
|
|
12
|
-
wcgw-0.1.
|
|
8
|
+
wcgw/tools.py,sha256=PDfSd6hcL60kaY947txztECWSDoGJrX_DBTz-bTfocY,16811
|
|
9
|
+
wcgw-0.1.2.dist-info/METADATA,sha256=ramx2gvuo6NimIPSyN-vQPTAAXneklziWeBDNl9kXAA,5076
|
|
10
|
+
wcgw-0.1.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
11
|
+
wcgw-0.1.2.dist-info/entry_points.txt,sha256=T-IH7w6Vc650hr8xksC8kJfbJR4uwN8HDudejwDwrNM,59
|
|
12
|
+
wcgw-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|