wcgw 3.0.6__tar.gz → 3.0.7__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 (123) hide show
  1. {wcgw-3.0.6 → wcgw-3.0.7}/Dockerfile +20 -4
  2. {wcgw-3.0.6 → wcgw-3.0.7}/PKG-INFO +28 -1
  3. {wcgw-3.0.6 → wcgw-3.0.7}/README.md +27 -0
  4. {wcgw-3.0.6 → wcgw-3.0.7}/pyproject.toml +1 -1
  5. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/tools.py +22 -10
  6. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/relay/serve.py +2 -1
  7. {wcgw-3.0.6 → wcgw-3.0.7}/tests/test_edit.py +1 -1
  8. {wcgw-3.0.6 → wcgw-3.0.7}/uv.lock +1 -1
  9. {wcgw-3.0.6 → wcgw-3.0.7}/.github/workflows/python-publish.yml +0 -0
  10. {wcgw-3.0.6 → wcgw-3.0.7}/.github/workflows/python-tests.yml +0 -0
  11. {wcgw-3.0.6 → wcgw-3.0.7}/.github/workflows/python-types.yml +0 -0
  12. {wcgw-3.0.6 → wcgw-3.0.7}/.gitignore +0 -0
  13. {wcgw-3.0.6 → wcgw-3.0.7}/.gitmodules +0 -0
  14. {wcgw-3.0.6 → wcgw-3.0.7}/.python-version +0 -0
  15. {wcgw-3.0.6 → wcgw-3.0.7}/.vscode/settings.json +0 -0
  16. {wcgw-3.0.6 → wcgw-3.0.7}/LICENSE +0 -0
  17. {wcgw-3.0.6 → wcgw-3.0.7}/gpt_action_json_schema.json +0 -0
  18. {wcgw-3.0.6 → wcgw-3.0.7}/gpt_instructions.txt +0 -0
  19. {wcgw-3.0.6 → wcgw-3.0.7}/openai.md +0 -0
  20. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.git +0 -0
  21. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  22. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  23. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.github/workflows/main-checks.yml +0 -0
  24. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.github/workflows/publish-pypi.yml +0 -0
  25. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.github/workflows/pull-request-checks.yml +0 -0
  26. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.github/workflows/shared.yml +0 -0
  27. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.gitignore +0 -0
  28. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/.python-version +0 -0
  29. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/CODE_OF_CONDUCT.md +0 -0
  30. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/CONTRIBUTING.md +0 -0
  31. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/LICENSE +0 -0
  32. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/README.md +0 -0
  33. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/RELEASE.md +0 -0
  34. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/SECURITY.md +0 -0
  35. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/README.md +0 -0
  36. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-prompt/.python-version +0 -0
  37. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-prompt/README.md +0 -0
  38. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-prompt/mcp_simple_prompt/__init__.py +0 -0
  39. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-prompt/mcp_simple_prompt/__main__.py +0 -0
  40. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-prompt/mcp_simple_prompt/server.py +0 -0
  41. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-prompt/pyproject.toml +0 -0
  42. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-resource/.python-version +0 -0
  43. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-resource/README.md +0 -0
  44. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-resource/mcp_simple_resource/__init__.py +0 -0
  45. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-resource/mcp_simple_resource/__main__.py +0 -0
  46. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-resource/mcp_simple_resource/server.py +0 -0
  47. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-resource/pyproject.toml +0 -0
  48. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-tool/.python-version +0 -0
  49. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-tool/README.md +0 -0
  50. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-tool/mcp_simple_tool/__init__.py +0 -0
  51. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-tool/mcp_simple_tool/__main__.py +0 -0
  52. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-tool/mcp_simple_tool/server.py +0 -0
  53. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/examples/servers/simple-tool/pyproject.toml +0 -0
  54. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/pyproject.toml +0 -0
  55. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/__init__.py +0 -0
  56. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/client/__init__.py +0 -0
  57. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/client/__main__.py +0 -0
  58. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/client/session.py +0 -0
  59. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/client/sse.py +0 -0
  60. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/client/stdio.py +0 -0
  61. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/py.typed +0 -0
  62. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/server/__init__.py +0 -0
  63. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/server/__main__.py +0 -0
  64. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/server/models.py +0 -0
  65. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/server/session.py +0 -0
  66. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/server/sse.py +0 -0
  67. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/server/stdio.py +0 -0
  68. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/server/websocket.py +0 -0
  69. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/shared/__init__.py +0 -0
  70. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/shared/context.py +0 -0
  71. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/shared/exceptions.py +0 -0
  72. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/shared/memory.py +0 -0
  73. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/shared/progress.py +0 -0
  74. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/shared/session.py +0 -0
  75. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/shared/version.py +0 -0
  76. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/src/mcp_wcgw/types.py +0 -0
  77. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/__init__.py +0 -0
  78. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/client/__init__.py +0 -0
  79. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/client/test_session.py +0 -0
  80. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/client/test_stdio.py +0 -0
  81. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/conftest.py +0 -0
  82. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/server/__init__.py +0 -0
  83. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/server/test_session.py +0 -0
  84. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/server/test_stdio.py +0 -0
  85. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/shared/test_memory.py +0 -0
  86. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/tests/test_types.py +0 -0
  87. {wcgw-3.0.6 → wcgw-3.0.7}/src/mcp_wcgw_fork/uv.lock +0 -0
  88. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/__init__.py +0 -0
  89. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/__init__.py +0 -0
  90. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/bash_state/bash_state.py +0 -0
  91. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/common.py +0 -0
  92. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/diff-instructions.txt +0 -0
  93. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/encoder/__init__.py +0 -0
  94. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/file_ops/diff_edit.py +0 -0
  95. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/file_ops/search_replace.py +0 -0
  96. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/mcp_server/Readme.md +0 -0
  97. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/mcp_server/__init__.py +0 -0
  98. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/mcp_server/server.py +0 -0
  99. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/memory.py +0 -0
  100. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/modes.py +0 -0
  101. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/repo_ops/display_tree.py +0 -0
  102. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/repo_ops/path_prob.py +0 -0
  103. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/repo_ops/paths_model.vocab +0 -0
  104. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/repo_ops/paths_tokens.model +0 -0
  105. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/repo_ops/repo_context.py +0 -0
  106. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/client/tool_prompts.py +0 -0
  107. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/py.typed +0 -0
  108. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/relay/client.py +0 -0
  109. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/relay/static/privacy.txt +0 -0
  110. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw/types_.py +0 -0
  111. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw_cli/__init__.py +0 -0
  112. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw_cli/__main__.py +0 -0
  113. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw_cli/anthropic_client.py +0 -0
  114. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw_cli/cli.py +0 -0
  115. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw_cli/openai_client.py +0 -0
  116. {wcgw-3.0.6 → wcgw-3.0.7}/src/wcgw_cli/openai_utils.py +0 -0
  117. {wcgw-3.0.6 → wcgw-3.0.7}/static/claude-ss.jpg +0 -0
  118. {wcgw-3.0.6 → wcgw-3.0.7}/static/computer-use.jpg +0 -0
  119. {wcgw-3.0.6 → wcgw-3.0.7}/static/example.jpg +0 -0
  120. {wcgw-3.0.6 → wcgw-3.0.7}/static/rocket-icon.png +0 -0
  121. {wcgw-3.0.6 → wcgw-3.0.7}/static/ss1.png +0 -0
  122. {wcgw-3.0.6 → wcgw-3.0.7}/tests/test_mcp_server.py +0 -0
  123. {wcgw-3.0.6 → wcgw-3.0.7}/tests/test_tools.py +0 -0
@@ -8,17 +8,30 @@ WORKDIR /app
8
8
  # Copy the project's pyproject.toml and lock file for dependency installation
9
9
  COPY pyproject.toml /app/
10
10
  COPY uv.lock /app/
11
+ COPY README.md /app/
11
12
 
12
13
  # Enable bytecode compilation and set link mode to copy for dependencies
13
14
  ENV UV_COMPILE_BYTECODE=1
14
15
  ENV UV_LINK_MODE=copy
15
16
 
17
+ # Install dependencies including git
18
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
19
+
16
20
  # Install dependencies
17
21
  RUN --mount=type=cache,target=/root/.cache/uv \
18
22
  uv sync --frozen --no-install-project --no-dev --no-editable
19
23
 
20
24
  # Copy the entire project into the container
21
- COPY . /app
25
+ COPY src /app/src
26
+
27
+ # Check if src/mcp_wcgw_fork is empty and clone the repository if needed
28
+ RUN if [ ! -d "/app/src/mcp_wcgw_fork" ] || [ -z "$(ls -A /app/src/mcp_wcgw_fork)" ]; then \
29
+ mkdir -p /app/src/mcp_wcgw_fork && \
30
+ git clone https://github.com/rusiaaman/python-sdk.git /app/src/mcp_wcgw_fork && \
31
+ echo "Repository cloned successfully"; \
32
+ else \
33
+ echo "src/mcp_wcgw_fork already exists and is not empty"; \
34
+ fi
22
35
 
23
36
  # Install the project
24
37
  RUN --mount=type=cache,target=/root/.cache/uv \
@@ -27,15 +40,18 @@ RUN --mount=type=cache,target=/root/.cache/uv \
27
40
  # Use a smaller image to run the application
28
41
  FROM python:3.12-slim-bookworm
29
42
 
43
+ RUN apt-get update && apt-get install -y screen && rm -rf /var/lib/apt/lists/*
44
+
30
45
  # Set the working directory in the container
31
- WORKDIR /app
46
+ WORKDIR /workspace
32
47
 
33
48
  # Copy the installed application from the previous stage
34
- COPY --from=uv /root/.local /root/.local
35
49
  COPY --from=uv --chown=app:app /app/.venv /app/.venv
50
+ # Copy the cloned repository if it exists
51
+ COPY --from=uv --chown=app:app /app/src/mcp_wcgw_fork /app/src/mcp_wcgw_fork
36
52
 
37
53
  # Add the virtual environment to the PATH
38
54
  ENV PATH="/app/.venv/bin:$PATH"
39
55
 
40
56
  # Specify the command to run on container start
41
- ENTRYPOINT ["wcgw_mcp"]
57
+ ENTRYPOINT ["wcgw_mcp"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wcgw
3
- Version: 3.0.6
3
+ Version: 3.0.7
4
4
  Summary: Shell and coding agent on claude and chatgpt
5
5
  Project-URL: Homepage, https://github.com/rusiaaman/wcgw
6
6
  Author-email: Aman Rusia <gapypi@arcfu.com>
@@ -204,6 +204,32 @@ Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md
204
204
 
205
205
  ![example](https://github.com/rusiaaman/wcgw/blob/main/static/example.jpg?raw=true)
206
206
 
207
+
208
+ ## Using mcp server over docker
209
+
210
+ First build the docker image `docker build -t wcgw https://github.com/rusiaaman/wcgw.git`
211
+
212
+ Then you can update `/Users/username/Library/Application Support/Claude/claude_desktop_config.json` to have
213
+ ```
214
+ {
215
+ "mcpServers": {
216
+ "filesystem": {
217
+ "command": "docker",
218
+ "args": [
219
+ "run",
220
+ "-i",
221
+ "--rm",
222
+ "--mount",
223
+ "type=bind,src=/Users/username/Desktop,dst=/workspace/Desktop",
224
+ "wcgw",
225
+ ]
226
+ }
227
+ }
228
+ }
229
+ ```
230
+
231
+
232
+
207
233
  ## [Optional] Local shell access with openai API key or anthropic API key
208
234
 
209
235
  ### Openai
@@ -255,3 +281,4 @@ The server provides the following MCP tools:
255
281
  - Parameters: `id` (string), `project_root_path` (string), `description` (string), `relevant_file_globs` (string[])
256
282
 
257
283
  All tools support absolute paths and include built-in protections against common errors. See the [MCP specification](https://modelcontextprotocol.io/) for detailed protocol information.
284
+
@@ -176,6 +176,32 @@ Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md
176
176
 
177
177
  ![example](https://github.com/rusiaaman/wcgw/blob/main/static/example.jpg?raw=true)
178
178
 
179
+
180
+ ## Using mcp server over docker
181
+
182
+ First build the docker image `docker build -t wcgw https://github.com/rusiaaman/wcgw.git`
183
+
184
+ Then you can update `/Users/username/Library/Application Support/Claude/claude_desktop_config.json` to have
185
+ ```
186
+ {
187
+ "mcpServers": {
188
+ "filesystem": {
189
+ "command": "docker",
190
+ "args": [
191
+ "run",
192
+ "-i",
193
+ "--rm",
194
+ "--mount",
195
+ "type=bind,src=/Users/username/Desktop,dst=/workspace/Desktop",
196
+ "wcgw",
197
+ ]
198
+ }
199
+ }
200
+ }
201
+ ```
202
+
203
+
204
+
179
205
  ## [Optional] Local shell access with openai API key or anthropic API key
180
206
 
181
207
  ### Openai
@@ -227,3 +253,4 @@ The server provides the following MCP tools:
227
253
  - Parameters: `id` (string), `project_root_path` (string), `description` (string), `relevant_file_globs` (string[])
228
254
 
229
255
  All tools support absolute paths and include built-in protections against common errors. See the [MCP specification](https://modelcontextprotocol.io/) for detailed protocol information.
256
+
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  authors = [{ name = "Aman Rusia", email = "gapypi@arcfu.com" }]
3
3
  name = "wcgw"
4
- version = "3.0.6"
4
+ version = "3.0.7"
5
5
  description = "Shell and coding agent on claude and chatgpt"
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.11"
@@ -197,7 +197,10 @@ def initialize(
197
197
  if read_files_:
198
198
  if folder_to_start:
199
199
  read_files_ = [
200
- os.path.join(folder_to_start, f) if not os.path.isabs(f) else f
200
+ # Expand the path before checking if it's absolute
201
+ os.path.join(folder_to_start, f)
202
+ if not os.path.isabs(expand_user(f))
203
+ else expand_user(f)
201
204
  for f in read_files_
202
205
  ]
203
206
  initial_files = read_files(read_files_, max_tokens, context)
@@ -364,9 +367,10 @@ def truncate_if_over(content: str, max_tokens: Optional[int]) -> str:
364
367
 
365
368
 
366
369
  def read_image_from_shell(file_path: str, context: Context) -> ImageData:
367
- # Expand the path
370
+ # Expand the path before checking if it's absolute
368
371
  file_path = expand_user(file_path)
369
372
 
373
+ # If not absolute after expansion, join with current working directory
370
374
  if not os.path.isabs(file_path):
371
375
  file_path = os.path.join(context.bash_state.cwd, file_path)
372
376
 
@@ -402,10 +406,10 @@ def write_file(
402
406
  max_tokens: Optional[int],
403
407
  context: Context,
404
408
  ) -> str:
405
- if not os.path.isabs(writefile.file_path):
409
+ # Expand the path before checking if it's absolute
410
+ path_ = expand_user(writefile.file_path)
411
+ if not os.path.isabs(path_):
406
412
  return f"Failure: file_path should be absolute path, current working directory is {context.bash_state.cwd}"
407
- else:
408
- path_ = expand_user(writefile.file_path)
409
413
 
410
414
  error_on_exist_ = (
411
415
  error_on_exist and path_ not in context.bash_state.whitelist_for_overwrite
@@ -454,6 +458,9 @@ def write_file(
454
458
  syntax_errors = check.description
455
459
 
456
460
  if syntax_errors:
461
+ if extension in {"tsx", "ts"}:
462
+ syntax_errors += "\nNote: Ignore if 'tagged template literals' are used, they may raise false positive errors in tree-sitter."
463
+
457
464
  context_for_errors = get_context_for_errors(
458
465
  check.errors, writefile.file_content, max_tokens
459
466
  )
@@ -504,12 +511,12 @@ def do_diff_edit(fedit: FileEdit, max_tokens: Optional[int], context: Context) -
504
511
  def _do_diff_edit(fedit: FileEdit, max_tokens: Optional[int], context: Context) -> str:
505
512
  context.console.log(f"Editing file: {fedit.file_path}")
506
513
 
507
- if not os.path.isabs(fedit.file_path):
514
+ # Expand the path before checking if it's absolute
515
+ path_ = expand_user(fedit.file_path)
516
+ if not os.path.isabs(path_):
508
517
  raise Exception(
509
518
  f"Failure: file_path should be absolute path, current working directory is {context.bash_state.cwd}"
510
519
  )
511
- else:
512
- path_ = expand_user(fedit.file_path)
513
520
 
514
521
  # Validate using file_edit_mode
515
522
  allowed_globs = context.bash_state.file_edit_mode.allowed_globs
@@ -550,11 +557,13 @@ def _do_diff_edit(fedit: FileEdit, max_tokens: Optional[int], context: Context)
550
557
  context_for_errors = get_context_for_errors(
551
558
  check.errors, apply_diff_to, max_tokens
552
559
  )
560
+ if extension in {"tsx", "ts"}:
561
+ syntax_errors += "\nNote: Ignore if 'tagged template literals' are used, they may raise false positive errors in tree-sitter."
553
562
 
554
563
  context.console.print(f"W: Syntax errors encountered: {syntax_errors}")
555
564
  return f"""{comments}
556
565
  ---
557
- Tree-sitter reported syntax errors, please re-read the file and fix if there are any errors.
566
+ Warning: tree-sitter reported syntax errors, please re-read the file and fix if there are any errors.
558
567
  Syntax errors:
559
568
  {syntax_errors}
560
569
 
@@ -700,9 +709,12 @@ def get_tool_output(
700
709
  context.console.print("Calling task memory tool")
701
710
  relevant_files = []
702
711
  warnings = ""
712
+ # Expand user in project root path
703
713
  arg.project_root_path = os.path.expanduser(arg.project_root_path)
704
714
  for fglob in arg.relevant_file_globs:
715
+ # Expand user in glob pattern before checking if it's absolute
705
716
  fglob = expand_user(fglob)
717
+ # If not absolute after expansion, join with project root path
706
718
  if not os.path.isabs(fglob) and arg.project_root_path:
707
719
  fglob = os.path.join(arg.project_root_path, fglob)
708
720
  globs = glob.glob(fglob, recursive=True)
@@ -796,7 +808,7 @@ def read_file(
796
808
  rest = save_out_of_context(
797
809
  default_enc.decoder(tokens[max_tokens:]), Path(file_path).suffix
798
810
  )
799
- content += f"\n(...truncated)\n---\nI've saved the continuation in a new file. Please read: `{rest}`"
811
+ content += f"\n(...truncated)\n---\nI've saved the continuation in a new file. You may want to read: `{rest}`"
800
812
  truncated = True
801
813
  return content, truncated, tokens_counts
802
814
 
@@ -1,4 +1,5 @@
1
1
  import asyncio
2
+ import os
2
3
  import threading
3
4
  import time
4
5
  from importlib import metadata
@@ -281,7 +282,7 @@ async def context_save(context_save_data: ContextSaveWithUUID) -> str:
281
282
  raise fastapi.HTTPException(status_code=500, detail="Timeout error")
282
283
 
283
284
 
284
- app.mount("/static", StaticFiles(directory="static"), name="static")
285
+ app.mount("/static", StaticFiles(directory=os.path.join(os.path.dirname(__file__), "static")), name="static")
285
286
 
286
287
 
287
288
  def run() -> None:
@@ -165,7 +165,7 @@ def hello():
165
165
  )
166
166
 
167
167
  assert len(outputs) == 1
168
- assert "Tree-sitter reported syntax errors" in outputs[0]
168
+ assert "Warning: tree-sitter reported syntax errors" in outputs[0]
169
169
 
170
170
  # Verify the change
171
171
  with open(test_file) as f:
@@ -1179,7 +1179,7 @@ wheels = [
1179
1179
 
1180
1180
  [[package]]
1181
1181
  name = "wcgw"
1182
- version = "3.0.6"
1182
+ version = "3.0.7"
1183
1183
  source = { editable = "." }
1184
1184
  dependencies = [
1185
1185
  { name = "anthropic" },
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