wcgw 5.4.2__py3-none-any.whl → 5.4.3__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.

@@ -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:
wcgw/client/tools.py CHANGED
@@ -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
@@ -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>
@@ -8,8 +8,8 @@ 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/schema_generator.py,sha256=mEIy6BgHlfJeAjJtwY_VwoIDmu-Fax2H9bVtj7IMuEo,2282
10
10
  wcgw/client/tool_prompts.py,sha256=1EFQZeXlebOvrDb9t4g63FyzRWCnTwDzwrqwPHg-7sE,4757
11
- wcgw/client/tools.py,sha256=78H5JeRpagoUJpwfe7-eoUxafdbGIU0S94XB4AqhBLI,49341
12
- wcgw/client/bash_state/bash_state.py,sha256=U-h9uqEcJbZGIVle6vZKYmlLHNO91zvqaUe6zlvLMl4,41876
11
+ wcgw/client/tools.py,sha256=GrJ9bXAkayd4bgKFdRXJ1wtdUmeE5dD7l2ef-dMOjZQ,49877
12
+ wcgw/client/bash_state/bash_state.py,sha256=bd5RtLbaRzCtrmeDTl3JKZwzmIR-8iAMQpl7Fqyt56M,41918
13
13
  wcgw/client/bash_state/parser/__init__.py,sha256=AnlNSmoQTSoqqlLOLX4P1uXfzc5VGeCGJsGgtisq2zE,207
14
14
  wcgw/client/bash_state/parser/bash_statement_parser.py,sha256=9a8vPO1r3_tXmaAcubTQ5UY-NseWlalgm8LZA17LXuY,6058
15
15
  wcgw/client/encoder/__init__.py,sha256=Y-8f43I6gMssUCWpX5rLYiAFv3D-JPRs4uNEejPlke8,1514
@@ -31,8 +31,8 @@ wcgw_cli/anthropic_client.py,sha256=8bjDY59-aioyTJgpB-NBHZNhZaq6rqcTJcOf81kzCyA,
31
31
  wcgw_cli/cli.py,sha256=-7FBe_lahKyUOhf65iurTA1M1gXXXAiT0OVKQVcZKKo,948
32
32
  wcgw_cli/openai_client.py,sha256=GOqoSFazTV-cFjpdZGPM0DIwec8Up2TEcKUbsN40AGY,15990
33
33
  wcgw_cli/openai_utils.py,sha256=xGOb3W5ALrIozV7oszfGYztpj0FnXdD7jAxm5lEIVKY,2439
34
- wcgw-5.4.2.dist-info/METADATA,sha256=yBhrBPY5ybnrPY88zUaFBhs2byAYsjW7S80JSsHOc1k,15679
35
- wcgw-5.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
36
- wcgw-5.4.2.dist-info/entry_points.txt,sha256=UnjK-MAH4Qssh0tGJDMeij1oi-oRKokItkknP_BwShE,94
37
- wcgw-5.4.2.dist-info/licenses/LICENSE,sha256=BvY8xqjOfc3X2qZpGpX3MZEmF-4Dp0LqgKBbT6L_8oI,11142
38
- wcgw-5.4.2.dist-info/RECORD,,
34
+ wcgw-5.4.3.dist-info/METADATA,sha256=fNaQqNspbdo8tWK0-dVsYeaFr6i3kPdNffHoHn-JYss,15679
35
+ wcgw-5.4.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
36
+ wcgw-5.4.3.dist-info/entry_points.txt,sha256=UnjK-MAH4Qssh0tGJDMeij1oi-oRKokItkknP_BwShE,94
37
+ wcgw-5.4.3.dist-info/licenses/LICENSE,sha256=BvY8xqjOfc3X2qZpGpX3MZEmF-4Dp0LqgKBbT6L_8oI,11142
38
+ wcgw-5.4.3.dist-info/RECORD,,
File without changes