wcgw 5.1.3__py3-none-any.whl → 5.2.0__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/client/file_ops/search_replace.py +1 -1
- wcgw/client/tools.py +10 -2
- wcgw/types_.py +4 -0
- {wcgw-5.1.3.dist-info → wcgw-5.2.0.dist-info}/METADATA +27 -2
- {wcgw-5.1.3.dist-info → wcgw-5.2.0.dist-info}/RECORD +8 -8
- {wcgw-5.1.3.dist-info → wcgw-5.2.0.dist-info}/WHEEL +0 -0
- {wcgw-5.1.3.dist-info → wcgw-5.2.0.dist-info}/entry_points.txt +0 -0
- {wcgw-5.1.3.dist-info → wcgw-5.2.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -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
|
|
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
|
|
wcgw/client/tools.py
CHANGED
|
@@ -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
|
|
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_):
|
wcgw/types_.py
CHANGED
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wcgw
|
|
3
|
-
Version: 5.
|
|
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
|
|
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
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
wcgw/__init__.py,sha256=JgAY25VsA208v8E7QTIU0E50nsk-TCJ4FWTEHmnssYU,127
|
|
2
2
|
wcgw/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
wcgw/types_.py,sha256=
|
|
3
|
+
wcgw/types_.py,sha256=nTj0Lr_ytBDHoeQ94ebO0mzuhsluBG6GmtT9eszIjuI,8141
|
|
4
4
|
wcgw/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
wcgw/client/common.py,sha256=OCH7Tx64jojz3M3iONUrGMadE07W21DiZs5sOxWX1Qc,1456
|
|
6
6
|
wcgw/client/diff-instructions.txt,sha256=eKRFA86yXWIGwNxIDaegTgTzIrFIBDWWiN1yP8Hf3i4,1685
|
|
7
7
|
wcgw/client/memory.py,sha256=U2Nw2si3Zg7n_RhNAuaYcmrrDtZ_Mooi-kfAOKflT-I,3079
|
|
8
8
|
wcgw/client/modes.py,sha256=roH6SPBokJMr5IzAlccdI-vJyvyS5vqSMMyth7TE86A,10315
|
|
9
9
|
wcgw/client/tool_prompts.py,sha256=0hfYmCzCo6kh_IC8RGJRfQ6hkB333GZvs_g3o_cvc2w,4662
|
|
10
|
-
wcgw/client/tools.py,sha256=
|
|
10
|
+
wcgw/client/tools.py,sha256=Xo1lOLfzuDNZljESpkSOXlPUKG_4WJGAFaZ7K7ilV8s,48788
|
|
11
11
|
wcgw/client/bash_state/bash_state.py,sha256=b-Zo6pO3psfxu9TA0uw1ZZAa6bLmDPxbl7277fZfmrM,41862
|
|
12
12
|
wcgw/client/bash_state/parser/__init__.py,sha256=AnlNSmoQTSoqqlLOLX4P1uXfzc5VGeCGJsGgtisq2zE,207
|
|
13
13
|
wcgw/client/bash_state/parser/bash_statement_parser.py,sha256=9a8vPO1r3_tXmaAcubTQ5UY-NseWlalgm8LZA17LXuY,6058
|
|
14
14
|
wcgw/client/encoder/__init__.py,sha256=Y-8f43I6gMssUCWpX5rLYiAFv3D-JPRs4uNEejPlke8,1514
|
|
15
15
|
wcgw/client/file_ops/diff_edit.py,sha256=AwLq6-pY7czv1y-JA5O2Q4rgbvn82YmSL9jD8XB3Vo4,19019
|
|
16
16
|
wcgw/client/file_ops/extensions.py,sha256=CmfD7ON6SY24Prh2tRZdV9KbhuOrWqqk8qL1VtshzB8,3608
|
|
17
|
-
wcgw/client/file_ops/search_replace.py,sha256=
|
|
17
|
+
wcgw/client/file_ops/search_replace.py,sha256=5LFg-_U_ijnNrkYei4SWCPGKPGgDzJs49EDsIBzLmuY,6822
|
|
18
18
|
wcgw/client/mcp_server/Readme.md,sha256=2Z88jj1mf9daYGW1CWaldcJ0moy8owDumhR2glBY3A8,109
|
|
19
19
|
wcgw/client/mcp_server/__init__.py,sha256=mm7xhBIPwJpRT3u-Qsj4cKVMpVyucJoKRlbMP_gRRB0,343
|
|
20
20
|
wcgw/client/mcp_server/server.py,sha256=jjwrmZZ8X0tXD0rsPZ9fKjEpdXpXCfdhEsN3Ho_tC8I,4989
|
|
@@ -30,8 +30,8 @@ wcgw_cli/anthropic_client.py,sha256=8bjDY59-aioyTJgpB-NBHZNhZaq6rqcTJcOf81kzCyA,
|
|
|
30
30
|
wcgw_cli/cli.py,sha256=-7FBe_lahKyUOhf65iurTA1M1gXXXAiT0OVKQVcZKKo,948
|
|
31
31
|
wcgw_cli/openai_client.py,sha256=GOqoSFazTV-cFjpdZGPM0DIwec8Up2TEcKUbsN40AGY,15990
|
|
32
32
|
wcgw_cli/openai_utils.py,sha256=xGOb3W5ALrIozV7oszfGYztpj0FnXdD7jAxm5lEIVKY,2439
|
|
33
|
-
wcgw-5.
|
|
34
|
-
wcgw-5.
|
|
35
|
-
wcgw-5.
|
|
36
|
-
wcgw-5.
|
|
37
|
-
wcgw-5.
|
|
33
|
+
wcgw-5.2.0.dist-info/METADATA,sha256=EW_fVplOiHFH1b8033vhslBodxghzY4Qw-03iugwuDg,15512
|
|
34
|
+
wcgw-5.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
35
|
+
wcgw-5.2.0.dist-info/entry_points.txt,sha256=UnjK-MAH4Qssh0tGJDMeij1oi-oRKokItkknP_BwShE,94
|
|
36
|
+
wcgw-5.2.0.dist-info/licenses/LICENSE,sha256=BvY8xqjOfc3X2qZpGpX3MZEmF-4Dp0LqgKBbT6L_8oI,11142
|
|
37
|
+
wcgw-5.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|