wcgw 1.5.2__tar.gz → 1.5.3__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 (39) hide show
  1. {wcgw-1.5.2 → wcgw-1.5.3}/PKG-INFO +1 -1
  2. {wcgw-1.5.2 → wcgw-1.5.3}/pyproject.toml +1 -1
  3. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/anthropic_client.py +10 -0
  4. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/computer_use.py +5 -0
  5. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/mcp_server/server.py +25 -26
  6. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/types_.py +1 -0
  7. {wcgw-1.5.2 → wcgw-1.5.3}/uv.lock +1 -1
  8. wcgw-1.5.2/claude_desktop_config.json +0 -15
  9. {wcgw-1.5.2 → wcgw-1.5.3}/.github/workflows/python-publish.yml +0 -0
  10. {wcgw-1.5.2 → wcgw-1.5.3}/.github/workflows/python-tests.yml +0 -0
  11. {wcgw-1.5.2 → wcgw-1.5.3}/.gitignore +0 -0
  12. {wcgw-1.5.2 → wcgw-1.5.3}/.python-version +0 -0
  13. {wcgw-1.5.2 → wcgw-1.5.3}/.vscode/settings.json +0 -0
  14. {wcgw-1.5.2 → wcgw-1.5.3}/README.md +0 -0
  15. {wcgw-1.5.2 → wcgw-1.5.3}/add.py +0 -0
  16. {wcgw-1.5.2 → wcgw-1.5.3}/gpt_action_json_schema.json +0 -0
  17. {wcgw-1.5.2 → wcgw-1.5.3}/gpt_instructions.txt +0 -0
  18. {wcgw-1.5.2 → wcgw-1.5.3}/src/__init__.py +0 -0
  19. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/__init__.py +0 -0
  20. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/__init__.py +0 -0
  21. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/__main__.py +0 -0
  22. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/cli.py +0 -0
  23. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/common.py +0 -0
  24. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/diff-instructions.txt +0 -0
  25. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/mcp_server/Readme.md +0 -0
  26. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/mcp_server/__init__.py +0 -0
  27. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/openai_client.py +0 -0
  28. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/openai_utils.py +0 -0
  29. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/sys_utils.py +0 -0
  30. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/client/tools.py +0 -0
  31. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/relay/serve.py +0 -0
  32. {wcgw-1.5.2 → wcgw-1.5.3}/src/wcgw/relay/static/privacy.txt +0 -0
  33. {wcgw-1.5.2 → wcgw-1.5.3}/static/claude-ss.jpg +0 -0
  34. {wcgw-1.5.2 → wcgw-1.5.3}/static/computer-use.jpg +0 -0
  35. {wcgw-1.5.2 → wcgw-1.5.3}/static/example.jpg +0 -0
  36. {wcgw-1.5.2 → wcgw-1.5.3}/static/rocket-icon.png +0 -0
  37. {wcgw-1.5.2 → wcgw-1.5.3}/static/ss1.png +0 -0
  38. {wcgw-1.5.2 → wcgw-1.5.3}/tests/test_basic.py +0 -0
  39. {wcgw-1.5.2 → wcgw-1.5.3}/tests/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wcgw
3
- Version: 1.5.2
3
+ Version: 1.5.3
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.5.2"
4
+ version = "1.5.3"
5
5
  description = "What could go wrong giving full shell access to chatgpt?"
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.11, <3.13"
@@ -182,6 +182,9 @@ def loop(
182
182
  - Send text input to the running program.
183
183
  - Send send_specials=["Enter"] to recheck status of a running program.
184
184
  - Only one of send_text, send_specials, send_ascii should be provided.
185
+ - This returns within 5 seconds, for heavy programs keep checking status for upto 10 turns before asking user to continue checking again.
186
+ - 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 usign ["Enter"].
187
+
185
188
  """,
186
189
  ),
187
190
  ToolParam(
@@ -236,6 +239,12 @@ def loop(
236
239
  name="ScreenShot",
237
240
  description="""
238
241
  - Capture screenshot of the linux os on docker.
242
+ - All actions on UI using mouse and keyboard return within 0.5 seconds.
243
+ * So if you're doing something that takes longer for UI to update like heavy page loading, keep checking UI for update usign ScreenShot upto 10 turns.
244
+ * Notice for smallest of the loading icons to check if your action worked.
245
+ * After 10 turns of no change, ask user for permission to keep checking.
246
+ * If you don't notice even slightest of the change, it's likely you clicked on the wrong place.
247
+
239
248
  """,
240
249
  ),
241
250
  ToolParam(
@@ -244,6 +253,7 @@ def loop(
244
253
  description="""
245
254
  - Interact with the linux os on docker using mouse.
246
255
  - Uses xdotool
256
+ - About left_click_drag: the current mouse position will be used as the starting point, click and drag to the given x, y coordinates. Useful in things like sliders, moving things around, etc.
247
257
  """,
248
258
  ),
249
259
  ToolParam(
@@ -26,6 +26,7 @@ from ..types_ import (
26
26
  OUTPUT_DIR = "/tmp/outputs"
27
27
  TYPING_DELAY_MS = 12
28
28
  TYPING_GROUP_SIZE = 50
29
+ SLEEP_TIME_MAX_S = 3
29
30
 
30
31
  Action = Literal[
31
32
  "key",
@@ -187,12 +188,15 @@ class ComputerTool:
187
188
  text: str | None = None,
188
189
  coordinate: tuple[int, int] | None = None,
189
190
  do_left_click_on_move: bool | None = None,
191
+ take_after_delay_seconds: int | None = None,
190
192
  **kwargs: Any,
191
193
  ) -> ToolResult:
192
194
  if action == "get_screen_info":
193
195
  assert docker_image_id is not None
194
196
  self.docker_image_id = docker_image_id
195
197
  self.get_screen_info()
198
+ if take_after_delay_seconds is not None:
199
+ time.sleep(min(take_after_delay_seconds, SLEEP_TIME_MAX_S))
196
200
  screenshot_res = self.screenshot()
197
201
  return ToolResult(
198
202
  output=f"width: {self.width}, height: {self.height}, display_num: {self.display_num}",
@@ -396,6 +400,7 @@ def run_computer_tool(
396
400
  elif isinstance(action, ScreenShot):
397
401
  result = Computer(
398
402
  action="screenshot",
403
+ screenshot_delay=action.take_after_delay_seconds,
399
404
  )
400
405
  elif isinstance(action, Keyboard):
401
406
  result = Computer(
@@ -28,9 +28,9 @@ from ...types_ import (
28
28
  ScreenShot,
29
29
  GetScreenInfo,
30
30
  )
31
- from ..computer_use import Computer
31
+ from ..computer_use import SLEEP_TIME_MAX_S
32
32
 
33
- tools.TIMEOUT = 3
33
+ tools.TIMEOUT = SLEEP_TIME_MAX_S
34
34
 
35
35
  server = Server("wcgw")
36
36
 
@@ -102,6 +102,8 @@ async def handle_list_tools() -> list[types.Tool]:
102
102
  - Send text input to the running program.
103
103
  - Send send_specials=["Enter"] to recheck status of a running program.
104
104
  - Only one of send_text, send_specials, send_ascii should be provided.
105
+ - This returns within 3 seconds, for heavy programs keep checking status for upto 10 turns before asking user to continue checking again.
106
+ - 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 usign ["Enter"].
105
107
  """,
106
108
  ),
107
109
  ToolParam(
@@ -164,6 +166,11 @@ async def handle_list_tools() -> list[types.Tool]:
164
166
  name="ScreenShot",
165
167
  description="""
166
168
  - Capture screenshot of the linux os on docker.
169
+ - All actions on UI using mouse and keyboard return within 0.5 seconds.
170
+ * So if you're doing something that takes longer for UI to update like heavy page loading, keep checking UI for update usign ScreenShot upto 10 turns.
171
+ * Notice for smallest of the loading icons to check if your action worked.
172
+ * After 10 turns of no change, ask user for permission to keep checking.
173
+ * If you don't notice even slightest of the change, it's likely you clicked on the wrong place.
167
174
  """,
168
175
  ),
169
176
  ToolParam(
@@ -172,6 +179,7 @@ async def handle_list_tools() -> list[types.Tool]:
172
179
  description="""
173
180
  - Interact with the linux os on docker using mouse.
174
181
  - Uses xdotool
182
+ - About left_click_drag: the current mouse position will be used as the starting point, click and drag to the given x, y coordinates. Useful in things like sliders, moving things around, etc.
175
183
  """,
176
184
  ),
177
185
  ToolParam(
@@ -257,27 +265,18 @@ async def handle_call_tool(
257
265
 
258
266
  async def main() -> None:
259
267
  version = importlib.metadata.version("wcgw")
260
- while True:
261
- try:
262
- # Run the server using stdin/stdout streams
263
- async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
264
- await server.run(
265
- read_stream,
266
- write_stream,
267
- InitializationOptions(
268
- server_name="wcgw",
269
- server_version=version,
270
- capabilities=server.get_capabilities(
271
- notification_options=NotificationOptions(),
272
- experimental_capabilities={},
273
- ),
274
- ),
275
- raise_exceptions=False,
276
- )
277
- except BaseException as e:
278
- print(f"Server encountered an error: {e}", file=sys.stderr)
279
- print("Stack trace:", file=sys.stderr)
280
- traceback.print_exc(file=sys.stderr)
281
- print("Restarting server in 5 seconds...", file=sys.stderr)
282
- await asyncio.sleep(5)
283
- continue
268
+ # Run the server using stdin/stdout streams
269
+ async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
270
+ await server.run(
271
+ read_stream,
272
+ write_stream,
273
+ InitializationOptions(
274
+ server_name="wcgw",
275
+ server_version=version,
276
+ capabilities=server.get_capabilities(
277
+ notification_options=NotificationOptions(),
278
+ experimental_capabilities={},
279
+ ),
280
+ ),
281
+ raise_exceptions=False,
282
+ )
@@ -60,6 +60,7 @@ class GetScreenInfo(BaseModel):
60
60
 
61
61
  class ScreenShot(BaseModel):
62
62
  type: Literal["ScreenShot"]
63
+ take_after_delay_seconds: int
63
64
 
64
65
 
65
66
  class MouseMove(BaseModel):
@@ -860,7 +860,7 @@ wheels = [
860
860
 
861
861
  [[package]]
862
862
  name = "wcgw"
863
- version = "1.5.1"
863
+ version = "1.5.2"
864
864
  source = { editable = "." }
865
865
  dependencies = [
866
866
  { name = "anthropic" },
@@ -1,15 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "wcgw": {
4
- "command": "uvx",
5
- "args": [
6
- "--from",
7
- "wcgw",
8
- "wcgw_mcp"
9
- ],
10
- "protocol": "mcp",
11
- "defaultModel": "claude-3-sonnet",
12
- "maxTokens": 4096
13
- }
14
- }
15
- }
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