wcgw 5.4.2__tar.gz → 5.4.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 (60) hide show
  1. {wcgw-5.4.2 → wcgw-5.4.3}/PKG-INFO +1 -1
  2. {wcgw-5.4.2 → wcgw-5.4.3}/pyproject.toml +1 -1
  3. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/bash_state/bash_state.py +3 -2
  4. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/tools.py +30 -21
  5. {wcgw-5.4.2 → wcgw-5.4.3}/uv.lock +658 -658
  6. {wcgw-5.4.2 → wcgw-5.4.3}/.github/workflows/python-publish.yml +0 -0
  7. {wcgw-5.4.2 → wcgw-5.4.3}/.github/workflows/python-tests.yml +0 -0
  8. {wcgw-5.4.2 → wcgw-5.4.3}/.github/workflows/python-types.yml +0 -0
  9. {wcgw-5.4.2 → wcgw-5.4.3}/.gitignore +0 -0
  10. {wcgw-5.4.2 → wcgw-5.4.3}/.gitmodules +0 -0
  11. {wcgw-5.4.2 → wcgw-5.4.3}/.python-version +0 -0
  12. {wcgw-5.4.2 → wcgw-5.4.3}/.vscode/settings.json +0 -0
  13. {wcgw-5.4.2 → wcgw-5.4.3}/CLAUDE.md +0 -0
  14. {wcgw-5.4.2 → wcgw-5.4.3}/Dockerfile +0 -0
  15. {wcgw-5.4.2 → wcgw-5.4.3}/LICENSE +0 -0
  16. {wcgw-5.4.2 → wcgw-5.4.3}/README.md +0 -0
  17. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/__init__.py +0 -0
  18. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/__init__.py +0 -0
  19. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/bash_state/parser/__init__.py +0 -0
  20. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/bash_state/parser/bash_statement_parser.py +0 -0
  21. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/common.py +0 -0
  22. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/diff-instructions.txt +0 -0
  23. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/encoder/__init__.py +0 -0
  24. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/file_ops/diff_edit.py +0 -0
  25. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/file_ops/extensions.py +0 -0
  26. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/file_ops/search_replace.py +0 -0
  27. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/mcp_server/Readme.md +0 -0
  28. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/mcp_server/__init__.py +0 -0
  29. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/mcp_server/server.py +0 -0
  30. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/memory.py +0 -0
  31. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/modes.py +0 -0
  32. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/repo_ops/display_tree.py +0 -0
  33. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/repo_ops/file_stats.py +0 -0
  34. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/repo_ops/path_prob.py +0 -0
  35. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/repo_ops/paths_model.vocab +0 -0
  36. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/repo_ops/paths_tokens.model +0 -0
  37. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/repo_ops/repo_context.py +0 -0
  38. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/schema_generator.py +0 -0
  39. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/client/tool_prompts.py +0 -0
  40. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/py.typed +0 -0
  41. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw/types_.py +0 -0
  42. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw_cli/__init__.py +0 -0
  43. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw_cli/__main__.py +0 -0
  44. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw_cli/anthropic_client.py +0 -0
  45. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw_cli/cli.py +0 -0
  46. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw_cli/openai_client.py +0 -0
  47. {wcgw-5.4.2 → wcgw-5.4.3}/src/wcgw_cli/openai_utils.py +0 -0
  48. {wcgw-5.4.2 → wcgw-5.4.3}/static/claude-ss.jpg +0 -0
  49. {wcgw-5.4.2 → wcgw-5.4.3}/static/computer-use.jpg +0 -0
  50. {wcgw-5.4.2 → wcgw-5.4.3}/static/example.jpg +0 -0
  51. {wcgw-5.4.2 → wcgw-5.4.3}/static/rocket-icon.png +0 -0
  52. {wcgw-5.4.2 → wcgw-5.4.3}/static/ss1.png +0 -0
  53. {wcgw-5.4.2 → wcgw-5.4.3}/static/workflow-demo.gif +0 -0
  54. {wcgw-5.4.2 → wcgw-5.4.3}/tests/test_bash_parser.py +0 -0
  55. {wcgw-5.4.2 → wcgw-5.4.3}/tests/test_bash_parser_complex.py +0 -0
  56. {wcgw-5.4.2 → wcgw-5.4.3}/tests/test_edit.py +0 -0
  57. {wcgw-5.4.2 → wcgw-5.4.3}/tests/test_file_range_tracking.py +0 -0
  58. {wcgw-5.4.2 → wcgw-5.4.3}/tests/test_mcp_server.py +0 -0
  59. {wcgw-5.4.2 → wcgw-5.4.3}/tests/test_readfiles.py +0 -0
  60. {wcgw-5.4.2 → wcgw-5.4.3}/tests/test_tools.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wcgw
3
- Version: 5.4.2
3
+ Version: 5.4.3
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>
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  authors = [{ name = "Aman Rusia", email = "gapypi@arcfu.com" }]
3
3
  name = "wcgw"
4
- version = "5.4.2"
4
+ version = "5.4.3"
5
5
  description = "Shell and coding agent for Claude and other mcp clients"
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.11"
@@ -4,6 +4,7 @@ import os
4
4
  import platform
5
5
  import random
6
6
  import subprocess
7
+ import tempfile
7
8
  import threading
8
9
  import time
9
10
  import traceback
@@ -65,7 +66,7 @@ def is_mac() -> bool:
65
66
  def get_tmpdir() -> str:
66
67
  current_tmpdir = os.environ.get("TMPDIR", "")
67
68
  if current_tmpdir or not is_mac():
68
- return current_tmpdir
69
+ return tempfile.gettempdir()
69
70
  try:
70
71
  # Fix issue while running ocrmypdf -> tesseract -> leptonica, set TMPDIR
71
72
  # https://github.com/tesseract-ocr/tesseract/issues/4333
@@ -78,7 +79,7 @@ def get_tmpdir() -> str:
78
79
  except (subprocess.CalledProcessError, FileNotFoundError):
79
80
  return "//tmp"
80
81
  except Exception:
81
- return ""
82
+ return tempfile.gettempdir()
82
83
 
83
84
 
84
85
  def check_if_screen_command_available() -> bool:
@@ -279,29 +279,38 @@ def initialize(
279
279
  except Exception:
280
280
  pass
281
281
 
282
- # First check for global CLAUDE.md in ~/.wcgw/CLAUDE.md
283
- global_alignment_file_path = os.path.join(expanduser("~"), ".wcgw", "CLAUDE.md")
284
- if os.path.exists(global_alignment_file_path):
285
- try:
286
- with open(global_alignment_file_path, "r") as f:
287
- global_alignment_content = f.read()
288
- alignment_context += f"---\n# Important guidelines from the user\n```\n{global_alignment_content}\n```\n---\n\n"
289
- except Exception:
290
- # Handle any errors when reading the global file
291
- pass
282
+ # Check for global alignment doc in ~/.wcgw: prefer CLAUDE.md, else AGENTS.md
283
+ try:
284
+ global_dir = os.path.join(expanduser("~"), ".wcgw")
285
+ for fname in ("CLAUDE.md", "AGENTS.md"):
286
+ global_alignment_file_path = os.path.join(global_dir, fname)
287
+ if os.path.exists(global_alignment_file_path):
288
+ with open(global_alignment_file_path, "r") as f:
289
+ global_alignment_content = f.read()
290
+ alignment_context += f"---\n# Important guidelines from the user\n```\n{global_alignment_content}\n```\n---\n\n"
291
+ break
292
+ except Exception as e:
293
+ # Log any errors when reading the global file
294
+ context.console.log(f"Error reading global alignment file: {e}")
292
295
 
293
- # Then check for workspace-specific CLAUDE.md
296
+ # Then check for workspace-specific alignment doc: prefer CLAUDE.md, else AGENTS.md
294
297
  if folder_to_start:
295
- alignment_file_path = os.path.join(folder_to_start, "CLAUDE.md")
296
- if os.path.exists(alignment_file_path):
297
- try:
298
- # Read the CLAUDE.md file content
299
- with open(alignment_file_path, "r") as f:
300
- alignment_content = f.read()
301
- alignment_context += f"---\n# CLAUDE.md - user shared project guidelines to follow\n```\n{alignment_content}\n```\n---\n\n"
302
- except Exception:
303
- # Handle any errors when reading the file
304
- pass
298
+ try:
299
+ base_dir = str(folder_to_start)
300
+ selected_name = ""
301
+ alignment_content = ""
302
+ for fname in ("CLAUDE.md", "AGENTS.md"):
303
+ alignment_file_path = os.path.join(base_dir, fname)
304
+ if os.path.exists(alignment_file_path):
305
+ with open(alignment_file_path, "r") as f:
306
+ alignment_content = f.read()
307
+ selected_name = fname
308
+ break
309
+ if alignment_content:
310
+ alignment_context += f"---\n# {selected_name} - user shared project guidelines to follow\n```\n{alignment_content}\n```\n---\n\n"
311
+ except Exception as e:
312
+ # Log any errors when reading the workspace file
313
+ context.console.log(f"Error reading workspace alignment file: {e}")
305
314
 
306
315
  uname_sysname = os.uname().sysname
307
316
  uname_machine = os.uname().machine