wcgw 2.3.0__tar.gz → 2.3.1__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.
- {wcgw-2.3.0 → wcgw-2.3.1}/PKG-INFO +1 -1
- {wcgw-2.3.0 → wcgw-2.3.1}/pyproject.toml +1 -1
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/mcp_server/server.py +5 -2
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/tools.py +16 -5
- {wcgw-2.3.0 → wcgw-2.3.1}/.github/workflows/python-publish.yml +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/.github/workflows/python-tests.yml +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/.github/workflows/python-types.yml +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/.gitignore +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/.python-version +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/.vscode/settings.json +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/README.md +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/gpt_action_json_schema.json +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/gpt_instructions.txt +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/openai.md +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/__init__.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/__init__.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/__init__.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/__main__.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/anthropic_client.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/cli.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/common.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/computer_use.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/diff-instructions.txt +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/mcp_server/Readme.md +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/mcp_server/__init__.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/openai_client.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/openai_utils.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/client/sys_utils.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/relay/serve.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/relay/static/privacy.txt +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/src/wcgw/types_.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/static/claude-ss.jpg +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/static/computer-use.jpg +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/static/example.jpg +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/static/rocket-icon.png +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/static/ss1.png +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/tests/test_basic.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/tests/test_tools.py +0 -0
- {wcgw-2.3.0 → wcgw-2.3.1}/uv.lock +0 -0
|
@@ -30,8 +30,6 @@ from ...types_ import (
|
|
|
30
30
|
)
|
|
31
31
|
from ..computer_use import SLEEP_TIME_MAX_S
|
|
32
32
|
|
|
33
|
-
tools.TIMEOUT = SLEEP_TIME_MAX_S
|
|
34
|
-
|
|
35
33
|
COMPUTER_USE_ON_DOCKER_ENABLED = False
|
|
36
34
|
|
|
37
35
|
server = Server("wcgw")
|
|
@@ -275,6 +273,11 @@ async def handle_call_tool(
|
|
|
275
273
|
|
|
276
274
|
async def main(computer_use: bool) -> None:
|
|
277
275
|
global COMPUTER_USE_ON_DOCKER_ENABLED
|
|
276
|
+
|
|
277
|
+
tools.TIMEOUT = SLEEP_TIME_MAX_S
|
|
278
|
+
|
|
279
|
+
tools.console = tools.DisableConsole()
|
|
280
|
+
|
|
278
281
|
if computer_use:
|
|
279
282
|
COMPUTER_USE_ON_DOCKER_ENABLED = True
|
|
280
283
|
|
|
@@ -72,7 +72,18 @@ from .common import CostData, Models, discard_input
|
|
|
72
72
|
from .sys_utils import command_run
|
|
73
73
|
from .openai_utils import get_input_cost, get_output_cost
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
|
|
76
|
+
class DisableConsole:
|
|
77
|
+
def print(self, *args, **kwargs): # type: ignore
|
|
78
|
+
pass
|
|
79
|
+
|
|
80
|
+
def log(self, *args, **kwargs): # type: ignore
|
|
81
|
+
pass
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
console: rich.console.Console | DisableConsole = rich.console.Console(
|
|
85
|
+
style="magenta", highlight=False, markup=False
|
|
86
|
+
)
|
|
76
87
|
|
|
77
88
|
TIMEOUT = 5
|
|
78
89
|
|
|
@@ -159,7 +170,7 @@ def _get_exit_code(shell: pexpect.spawn) -> int: # type: ignore
|
|
|
159
170
|
try:
|
|
160
171
|
shell.expect(PROMPT, timeout=0.2)
|
|
161
172
|
except pexpect.TIMEOUT:
|
|
162
|
-
print(f"Couldn't get exit code, before: {before}")
|
|
173
|
+
console.print(f"Couldn't get exit code, before: {before}")
|
|
163
174
|
raise
|
|
164
175
|
assert isinstance(shell.before, str)
|
|
165
176
|
# Render because there could be some anscii escape sequences still set like in google colab env
|
|
@@ -283,12 +294,12 @@ def update_repl_prompt(command: str) -> bool:
|
|
|
283
294
|
PROMPT = before.split("\n")[-1].strip()
|
|
284
295
|
# Escape all regex
|
|
285
296
|
PROMPT = re.escape(PROMPT)
|
|
286
|
-
print(f"Trying to update prompt to: {PROMPT.encode()!r}")
|
|
297
|
+
console.print(f"Trying to update prompt to: {PROMPT.encode()!r}")
|
|
287
298
|
index = 0
|
|
288
299
|
while index == 0:
|
|
289
300
|
# Consume all REPL prompts till now
|
|
290
301
|
index = BASH_STATE.shell.expect([PROMPT, pexpect.TIMEOUT], timeout=0.2)
|
|
291
|
-
print(f"Prompt updated to: {PROMPT}")
|
|
302
|
+
console.print(f"Prompt updated to: {PROMPT}")
|
|
292
303
|
return True
|
|
293
304
|
return False
|
|
294
305
|
|
|
@@ -508,7 +519,7 @@ def serve_image_in_bg(file_path: str, client_uuid: str, name: str) -> None:
|
|
|
508
519
|
try:
|
|
509
520
|
websocket.send(json.dumps(uu))
|
|
510
521
|
except websockets.ConnectionClosed:
|
|
511
|
-
print(f"Connection closed for UUID: {client_uuid}, retrying")
|
|
522
|
+
console.print(f"Connection closed for UUID: {client_uuid}, retrying")
|
|
512
523
|
serve_image_in_bg(file_path, client_uuid, name)
|
|
513
524
|
|
|
514
525
|
|
|
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
|
|
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
|