wcgw 5.1.3__tar.gz → 5.2.0__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 (59) hide show
  1. {wcgw-5.1.3 → wcgw-5.2.0}/PKG-INFO +27 -2
  2. {wcgw-5.1.3 → wcgw-5.2.0}/README.md +25 -0
  3. {wcgw-5.1.3 → wcgw-5.2.0}/pyproject.toml +2 -2
  4. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/file_ops/search_replace.py +1 -1
  5. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/tools.py +10 -2
  6. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/types_.py +4 -0
  7. {wcgw-5.1.3 → wcgw-5.2.0}/uv.lock +255 -217
  8. {wcgw-5.1.3 → wcgw-5.2.0}/.github/workflows/python-publish.yml +0 -0
  9. {wcgw-5.1.3 → wcgw-5.2.0}/.github/workflows/python-tests.yml +0 -0
  10. {wcgw-5.1.3 → wcgw-5.2.0}/.github/workflows/python-types.yml +0 -0
  11. {wcgw-5.1.3 → wcgw-5.2.0}/.gitignore +0 -0
  12. {wcgw-5.1.3 → wcgw-5.2.0}/.gitmodules +0 -0
  13. {wcgw-5.1.3 → wcgw-5.2.0}/.python-version +0 -0
  14. {wcgw-5.1.3 → wcgw-5.2.0}/.vscode/settings.json +0 -0
  15. {wcgw-5.1.3 → wcgw-5.2.0}/CLAUDE.md +0 -0
  16. {wcgw-5.1.3 → wcgw-5.2.0}/Dockerfile +0 -0
  17. {wcgw-5.1.3 → wcgw-5.2.0}/LICENSE +0 -0
  18. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/__init__.py +0 -0
  19. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/__init__.py +0 -0
  20. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/bash_state/bash_state.py +0 -0
  21. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/bash_state/parser/__init__.py +0 -0
  22. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/bash_state/parser/bash_statement_parser.py +0 -0
  23. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/common.py +0 -0
  24. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/diff-instructions.txt +0 -0
  25. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/encoder/__init__.py +0 -0
  26. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/file_ops/diff_edit.py +0 -0
  27. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/file_ops/extensions.py +0 -0
  28. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/mcp_server/Readme.md +0 -0
  29. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/mcp_server/__init__.py +0 -0
  30. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/mcp_server/server.py +0 -0
  31. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/memory.py +0 -0
  32. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/modes.py +0 -0
  33. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/repo_ops/display_tree.py +0 -0
  34. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/repo_ops/file_stats.py +0 -0
  35. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/repo_ops/path_prob.py +0 -0
  36. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/repo_ops/paths_model.vocab +0 -0
  37. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/repo_ops/paths_tokens.model +0 -0
  38. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/repo_ops/repo_context.py +0 -0
  39. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/client/tool_prompts.py +0 -0
  40. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw/py.typed +0 -0
  41. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw_cli/__init__.py +0 -0
  42. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw_cli/__main__.py +0 -0
  43. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw_cli/anthropic_client.py +0 -0
  44. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw_cli/cli.py +0 -0
  45. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw_cli/openai_client.py +0 -0
  46. {wcgw-5.1.3 → wcgw-5.2.0}/src/wcgw_cli/openai_utils.py +0 -0
  47. {wcgw-5.1.3 → wcgw-5.2.0}/static/claude-ss.jpg +0 -0
  48. {wcgw-5.1.3 → wcgw-5.2.0}/static/computer-use.jpg +0 -0
  49. {wcgw-5.1.3 → wcgw-5.2.0}/static/example.jpg +0 -0
  50. {wcgw-5.1.3 → wcgw-5.2.0}/static/rocket-icon.png +0 -0
  51. {wcgw-5.1.3 → wcgw-5.2.0}/static/ss1.png +0 -0
  52. {wcgw-5.1.3 → wcgw-5.2.0}/static/workflow-demo.gif +0 -0
  53. {wcgw-5.1.3 → wcgw-5.2.0}/tests/test_bash_parser.py +0 -0
  54. {wcgw-5.1.3 → wcgw-5.2.0}/tests/test_bash_parser_complex.py +0 -0
  55. {wcgw-5.1.3 → wcgw-5.2.0}/tests/test_edit.py +0 -0
  56. {wcgw-5.1.3 → wcgw-5.2.0}/tests/test_file_range_tracking.py +0 -0
  57. {wcgw-5.1.3 → wcgw-5.2.0}/tests/test_mcp_server.py +0 -0
  58. {wcgw-5.1.3 → wcgw-5.2.0}/tests/test_readfiles.py +0 -0
  59. {wcgw-5.1.3 → wcgw-5.2.0}/tests/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wcgw
3
- Version: 5.1.3
3
+ Version: 5.2.0
4
4
  Summary: Shell and coding agent for Claude and other mcp clients
5
5
  Project-URL: Homepage, https://github.com/rusiaaman/wcgw
6
6
  Author-email: Aman Rusia <gapypi@arcfu.com>
@@ -19,7 +19,7 @@ Requires-Dist: pyte>=0.8.2
19
19
  Requires-Dist: python-dotenv>=1.0.1
20
20
  Requires-Dist: rich>=13.8.1
21
21
  Requires-Dist: semantic-version>=2.10.0
22
- Requires-Dist: syntax-checker>=0.3.0
22
+ Requires-Dist: syntax-checker==0.4.0b4
23
23
  Requires-Dist: tokenizers>=0.21.0
24
24
  Requires-Dist: toml>=0.10.2
25
25
  Requires-Dist: tree-sitter-bash>=0.23.3
@@ -152,6 +152,31 @@ Then add or update the claude config file `%APPDATA%\Claude\claude_desktop_confi
152
152
  }
153
153
  }
154
154
  ```
155
+ When you encounter an error, execute the command wsl uv --python 3.12 wcgw@latest in command prompt. If you get the `error /bin/bash: line 1: uv: command not found`, it means uv was not installed globally and you need to point to the correct path of uv.
156
+ 1. Find where uv is installed:
157
+ ```bash
158
+ whereis uv
159
+ ```
160
+ Example output:
161
+ ```uv: /home/mywsl/.local/bin/uv```
162
+
163
+ 2. Test the full path works:
164
+ ```
165
+ wsl /home/mywsl/.local/bin/uv tool run --python 3.12 wcgw@latest
166
+ ```
167
+
168
+ 3. Update the config with the full path:
169
+ ```
170
+ {
171
+ "mcpServers": {
172
+ "wcgw": {
173
+ "command": "wsl.exe",
174
+ "args": ["/home/mywsl/.local/bin/uv", "tool", "run", "--python", "3.12", "wcgw@latest"]
175
+ }
176
+ }
177
+ }
178
+ ```
179
+ Replace `/home/mywsl/.local/bin/uv` with your actual uv path from step 1.
155
180
 
156
181
  ### Usage
157
182
 
@@ -121,6 +121,31 @@ Then add or update the claude config file `%APPDATA%\Claude\claude_desktop_confi
121
121
  }
122
122
  }
123
123
  ```
124
+ When you encounter an error, execute the command wsl uv --python 3.12 wcgw@latest in command prompt. If you get the `error /bin/bash: line 1: uv: command not found`, it means uv was not installed globally and you need to point to the correct path of uv.
125
+ 1. Find where uv is installed:
126
+ ```bash
127
+ whereis uv
128
+ ```
129
+ Example output:
130
+ ```uv: /home/mywsl/.local/bin/uv```
131
+
132
+ 2. Test the full path works:
133
+ ```
134
+ wsl /home/mywsl/.local/bin/uv tool run --python 3.12 wcgw@latest
135
+ ```
136
+
137
+ 3. Update the config with the full path:
138
+ ```
139
+ {
140
+ "mcpServers": {
141
+ "wcgw": {
142
+ "command": "wsl.exe",
143
+ "args": ["/home/mywsl/.local/bin/uv", "tool", "run", "--python", "3.12", "wcgw@latest"]
144
+ }
145
+ }
146
+ }
147
+ ```
148
+ Replace `/home/mywsl/.local/bin/uv` with your actual uv path from step 1.
124
149
 
125
150
  ### Usage
126
151
 
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  authors = [{ name = "Aman Rusia", email = "gapypi@arcfu.com" }]
3
3
  name = "wcgw"
4
- version = "5.1.3"
4
+ version = "5.2.0"
5
5
  description = "Shell and coding agent for Claude and other mcp clients"
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.11"
@@ -22,7 +22,7 @@ dependencies = [
22
22
  "anthropic>=0.39.0",
23
23
  "tokenizers>=0.21.0",
24
24
  "pygit2>=1.16.0",
25
- "syntax-checker>=0.3.0",
25
+ "syntax-checker==0.4.0b4",
26
26
  "psutil>=7.0.0",
27
27
  "tree-sitter>=0.24.0",
28
28
  "tree-sitter-bash>=0.23.3",
@@ -4,7 +4,7 @@ from typing import Callable, Optional
4
4
  from .diff_edit import FileEditInput, FileEditOutput, SearchReplaceMatchError
5
5
 
6
6
  # Global regex patterns
7
- SEARCH_MARKER = re.compile(r"^<<<<<<+\s*SEARCH\s*$")
7
+ SEARCH_MARKER = re.compile(r"^<<<<<<+\s*SEARCH>?\s*$")
8
8
  DIVIDER_MARKER = re.compile(r"^======*\s*$")
9
9
  REPLACE_MARKER = re.compile(r"^>>>>>>+\s*REPLACE\s*$")
10
10
 
@@ -26,7 +26,8 @@ from openai.types.chat import (
26
26
  ChatCompletionMessageParam,
27
27
  )
28
28
  from pydantic import BaseModel, TypeAdapter, ValidationError
29
- from syntax_checker import check_syntax
29
+ from syntax_checker import Output as SCOutput
30
+ from syntax_checker import check_syntax as raw_check_syntax
30
31
 
31
32
  from ..client.bash_state.bash_state import (
32
33
  BashState,
@@ -78,6 +79,13 @@ class Context:
78
79
  console: Console
79
80
 
80
81
 
82
+ def check_syntax(ext: str, content: str) -> SCOutput:
83
+ if ext == "html":
84
+ # Ignore due to prevelance of templating, causing issues
85
+ return raw_check_syntax("html", "")
86
+ return raw_check_syntax(ext, content)
87
+
88
+
81
89
  def get_mode_prompt(context: Context) -> str:
82
90
  mode_prompt = ""
83
91
  if context.bash_state.mode == "code_writer":
@@ -509,7 +517,7 @@ def write_file(
509
517
  error_on_exist_ = (
510
518
  error_on_exist and path_ not in context.bash_state.whitelist_for_overwrite
511
519
  )
512
-
520
+ curr_hash = ""
513
521
  if error_on_exist and path_ in context.bash_state.whitelist_for_overwrite:
514
522
  # Ensure hash has not changed
515
523
  if os.path.exists(path_):
@@ -63,6 +63,10 @@ class Initialize(BaseModel):
63
63
  assert self.code_writer_config is not None, (
64
64
  "code_writer_config can't be null when the mode is code_writer"
65
65
  )
66
+ if self.type != "first_call" and not self.thread_id:
67
+ raise ValueError(
68
+ "Thread id should be provided if type != 'first_call', including when resetting"
69
+ )
66
70
  return super().model_post_init(__context)
67
71
 
68
72
  @property