wcgw 1.1.1__tar.gz → 1.1.2__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.

Potentially problematic release.


This version of wcgw might be problematic. Click here for more details.

Files changed (29) hide show
  1. {wcgw-1.1.1 → wcgw-1.1.2}/PKG-INFO +1 -1
  2. {wcgw-1.1.1 → wcgw-1.1.2}/pyproject.toml +1 -1
  3. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/tools.py +15 -13
  4. {wcgw-1.1.1 → wcgw-1.1.2}/.github/workflows/python-publish.yml +0 -0
  5. {wcgw-1.1.1 → wcgw-1.1.2}/.github/workflows/python-tests.yml +0 -0
  6. {wcgw-1.1.1 → wcgw-1.1.2}/.gitignore +0 -0
  7. {wcgw-1.1.1 → wcgw-1.1.2}/.python-version +0 -0
  8. {wcgw-1.1.1 → wcgw-1.1.2}/.vscode/settings.json +0 -0
  9. {wcgw-1.1.1 → wcgw-1.1.2}/README.md +0 -0
  10. {wcgw-1.1.1 → wcgw-1.1.2}/config.toml +0 -0
  11. {wcgw-1.1.1 → wcgw-1.1.2}/gpt_action_json_schema.json +0 -0
  12. {wcgw-1.1.1 → wcgw-1.1.2}/gpt_instructions.txt +0 -0
  13. {wcgw-1.1.1 → wcgw-1.1.2}/src/__init__.py +0 -0
  14. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/__init__.py +0 -0
  15. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/__init__.py +0 -0
  16. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/__main__.py +0 -0
  17. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/anthropic_client.py +0 -0
  18. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/cli.py +0 -0
  19. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/common.py +0 -0
  20. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/diff-instructions.txt +0 -0
  21. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/openai_client.py +0 -0
  22. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/client/openai_utils.py +0 -0
  23. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/relay/serve.py +0 -0
  24. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/relay/static/privacy.txt +0 -0
  25. {wcgw-1.1.1 → wcgw-1.1.2}/src/wcgw/types_.py +0 -0
  26. {wcgw-1.1.1 → wcgw-1.1.2}/static/ss1.png +0 -0
  27. {wcgw-1.1.1 → wcgw-1.1.2}/tests/test_basic.py +0 -0
  28. {wcgw-1.1.1 → wcgw-1.1.2}/tests/test_tools.py +0 -0
  29. {wcgw-1.1.1 → wcgw-1.1.2}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wcgw
3
- Version: 1.1.1
3
+ Version: 1.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>
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  authors = [{ name = "Aman Rusia", email = "gapypi@arcfu.com" }]
3
3
  name = "wcgw"
4
- version = "1.1.1"
4
+ version = "1.1.2"
5
5
  description = "What could go wrong giving full shell access to chatgpt?"
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.10, <3.13"
@@ -9,6 +9,7 @@ import re
9
9
  import sys
10
10
  import threading
11
11
  import importlib.metadata
12
+ import time
12
13
  import traceback
13
14
  from typing import (
14
15
  Callable,
@@ -755,16 +756,16 @@ def register_client(server_url: str, client_uuid: str = "") -> None:
755
756
  client_uuid = str(uuid.uuid4())
756
757
 
757
758
  # Create the WebSocket connection
758
- with syncconnect(f"{server_url}/{client_uuid}") as websocket:
759
- server_version = str(websocket.recv())
760
- print(f"Server version: {server_version}")
761
- client_version = importlib.metadata.version("wcgw")
762
- websocket.send(client_version)
763
-
764
- print(
765
- f"Connected. Share this user id with the chatbot: {client_uuid} \nLink: https://chatgpt.com/g/g-Us0AAXkRh-wcgw-giving-shell-access"
766
- )
767
- try:
759
+ try:
760
+ with syncconnect(f"{server_url}/{client_uuid}") as websocket:
761
+ server_version = str(websocket.recv())
762
+ print(f"Server version: {server_version}")
763
+ client_version = importlib.metadata.version("wcgw")
764
+ websocket.send(client_version)
765
+
766
+ print(
767
+ f"Connected. Share this user id with the chatbot: {client_uuid} \nLink: https://chatgpt.com/g/g-Us0AAXkRh-wcgw-giving-shell-access"
768
+ )
768
769
  while True:
769
770
  # Wait to receive data from the server
770
771
  message = websocket.recv()
@@ -783,9 +784,10 @@ def register_client(server_url: str, client_uuid: str = "") -> None:
783
784
  assert isinstance(output, str)
784
785
  websocket.send(output)
785
786
 
786
- except (websockets.ConnectionClosed, ConnectionError, OSError):
787
- print(f"Connection closed for UUID: {client_uuid}, retrying")
788
- register_client(server_url, client_uuid)
787
+ except (websockets.ConnectionClosed, ConnectionError, OSError):
788
+ print(f"Connection closed for UUID: {client_uuid}, retrying")
789
+ time.sleep(0.5)
790
+ register_client(server_url, client_uuid)
789
791
 
790
792
 
791
793
  run = Typer(pretty_exceptions_show_locals=False, no_args_is_help=True)
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes