code-context-control 2.89.0__py3-none-any.whl → 2.89.1__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.
cli/c3.py CHANGED
@@ -92,7 +92,7 @@ console = Console() if HAS_RICH else None
92
92
  # Config
93
93
  CONFIG_DIR = ".c3"
94
94
  CONFIG_FILE = ".c3/config.json"
95
- __version__ = "2.89.0"
95
+ __version__ = "2.89.1"
96
96
 
97
97
 
98
98
  def _compress_file_cli(compressor, path, mode="smart", **kw):
@@ -4555,14 +4555,22 @@ def _ensure_global_session_fallbacks(server_script: str, c3_mcp_exe: str | None
4555
4555
  print(f"Warning: Could not update {antigravity_path} (global fallback skipped)")
4556
4556
 
4557
4557
 
4558
- def _uninstall_mcp_all(project_path: str):
4559
- """Remove C3 MCP server configurations from all supported IDEs."""
4558
+ def _uninstall_mcp_all(project_path: str, include_global: bool = True):
4559
+ """Remove C3 MCP server configurations from all supported IDEs.
4560
+
4561
+ ``include_global=False`` restricts removal to PROJECT-scoped config files
4562
+ (the project's .mcp.json, .codex/config.toml, settings/hooks). Home-level
4563
+ configs (~/.codex, Antigravity's mcp_config.json) are machine-wide and
4564
+ shared by every C3 project, so per-project cleanup — the merge action's
4565
+ ``cleanup='clear'`` — must never touch them; only a real machine
4566
+ uninstall (the default) may."""
4560
4567
  import shutil
4561
4568
  from pathlib import Path
4562
4569
 
4563
4570
  from core.ide import PROFILES
4564
4571
 
4565
- print("\nRemoving C3 MCP server configurations...")
4572
+ scope = "" if include_global else " (project-scoped only)"
4573
+ print(f"\nRemoving C3 MCP server configurations...{scope}")
4566
4574
  target = Path(project_path).resolve()
4567
4575
 
4568
4576
  # Remove .mcp.json if it exists (standard MCP config file)
@@ -4587,11 +4595,12 @@ def _uninstall_mcp_all(project_path: str):
4587
4595
  # MCP Config paths to check
4588
4596
  config_paths = []
4589
4597
  if profile.config_path_global:
4590
- config_paths.append(Path.home() / profile.config_path)
4598
+ if include_global:
4599
+ config_paths.append(Path.home() / profile.config_path)
4591
4600
  else:
4592
4601
  config_paths.append(target / profile.config_path)
4593
4602
  # For Codex, also check the global fallback in home dir
4594
- if ide_name == "codex":
4603
+ if ide_name == "codex" and include_global:
4595
4604
  config_paths.append(Path.home() / profile.config_path)
4596
4605
 
4597
4606
  for mcp_config_path in config_paths:
@@ -4714,8 +4723,10 @@ def _uninstall_mcp_all(project_path: str):
4714
4723
  print(f" Warning: Could not update {vscode_settings_path}: {e}")
4715
4724
 
4716
4725
  # Legacy Gemini CLI configs (profile removed in v2.52) — still strip the c3 entry.
4717
- for legacy_cfg in (target / ".gemini" / "settings.json",
4718
- Path.home() / ".gemini" / "settings.json"):
4726
+ legacy_cfgs = [target / ".gemini" / "settings.json"]
4727
+ if include_global:
4728
+ legacy_cfgs.append(Path.home() / ".gemini" / "settings.json")
4729
+ for legacy_cfg in legacy_cfgs:
4719
4730
  if not legacy_cfg.exists():
4720
4731
  continue
4721
4732
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-context-control
3
- Version: 2.89.0
3
+ Version: 2.89.1
4
4
  Summary: Local MCP code-intelligence for AI coding tools: surgical search/read/edit, agent-config version history, path-level access + masking guards, and a multi-project hub.
5
5
  Author-email: Dimitri Tselenchuk <dtselenc@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  cli/__init__.py,sha256=ec66drCZGNMRU4V6ov0zVhYZph1us12Vn8OvG_LJyRY,22
2
2
  cli/_hook_utils.py,sha256=bx8246vdJQ0eCsmDSx2nrSw19t0MI1tde76SZr0uuCo,19168
3
- cli/c3.py,sha256=sU2r6_tUnAFz4nH8tJDechT6Q9F-Xnvp5WGijNePPsw,379131
3
+ cli/c3.py,sha256=z3Hyi6q7GR7XyKtSEPGqDrEM0KNMuWsve9rKOnvqkyY,379756
4
4
  cli/docs.html,sha256=X9M7qC7LWi8pPJNF-4yEM57jhuZ3WeTESECbdDOeNaA,143172
5
5
  cli/edits.html,sha256=UjAhoCmBmQ89cklGvJqzC6eyNP2tc8H6T-e01DVkLvE,43418
6
6
  cli/hook_access_guard.py,sha256=4SIX-A4-tlXcOpzV4k5PZvyXibRvw9buqAV1-_doJpg,17200
@@ -114,7 +114,7 @@ cli/ui/components/sessions.js,sha256=FIKtil76B8tCkAmcFV7hlj6GQ_DCJK2jCzvEmdK7NBE
114
114
  cli/ui/components/settings.js,sha256=ATbAjBlVIwCNpxq7s191b49a_INQV38iwmySqtJLYwY,79066
115
115
  cli/ui/components/sidebar.js,sha256=K2ym2kUgpbyG-EBA_wBIIiqQY8qTatsiBZwzseMWuIQ,9939
116
116
  cli/ui/components/tasks.js,sha256=vyKQ3uwoppMwvdEaHlhWXW4oWcAisx4NveqzMhsYqHo,38438
117
- code_context_control-2.89.0.dist-info/licenses/LICENSE,sha256=l8Kh5QCNWNvR6kIt8L0BUZvc2LAFiHv2c-FnsGnUZf4,11301
117
+ code_context_control-2.89.1.dist-info/licenses/LICENSE,sha256=l8Kh5QCNWNvR6kIt8L0BUZvc2LAFiHv2c-FnsGnUZf4,11301
118
118
  core/__init__.py,sha256=TSDCEcM4V7gcZVM3w2ykJaqEUch4Dkon-rivV17T73s,2501
119
119
  core/config.py,sha256=YmkcZwedz_lfDM0ZuI_f4xpe98ixPLcSQFcTCHgRiRg,19206
120
120
  core/ide.py,sha256=V6VVMVsFdmmcsMyxikjQp7z9xa42CWiHKS-ya-MAcG4,6172
@@ -230,8 +230,8 @@ services/override_grants.py,sha256=ZONuzlzjJ1iljfphX27RmPKLjibxoSARQcAAjRxVUJE,2
230
230
  services/override_policy.py,sha256=fbOCgNTidNy4LuALATWHp2LcAr1KllPXm2e5pEwSOE4,16326
231
231
  services/override_requests.py,sha256=HttGRNf9DdrhhR5coORu5q8lMbmEABPqbOMyhCfe4Po,25106
232
232
  services/override_wake.py,sha256=HjSOXQTDi0irgeMyrTqngL7xLcSOOIgYsVW9yxod4ps,10363
233
- services/parser.py,sha256=peRjFQb1PkOSkl7hfNBAstDz87AYihg9Xf3qsRlIulc,56452
234
- services/project_manager.py,sha256=LaNWqBeVMx6wcB6iiOQyRWSWhS-JXzfDApJmHFmTCy8,36477
233
+ services/parser.py,sha256=txDjhUiz-qnFfXO3rn4IopnXZ_0iJtCNcDu32ywu9dA,57035
234
+ services/project_manager.py,sha256=ext0eXRkAoUuGvhE7if9Vimue5q9Ihp82xMNzf-sh98,36657
235
235
  services/project_runtime.py,sha256=yyftX48BFjq4B2KcR4KGszDAAa4xR6gn6j0SgTyro1s,11603
236
236
  services/protocol.py,sha256=XyUGjTHD9Zouw94IEqwH667pQ1TlroleLzlM3GRlEGk,12843
237
237
  services/proxy_state.py,sha256=u5rd0k6CrOsywZA8FpRu_hMLwhR0TAJhZjy5MdWbCGc,6107
@@ -277,8 +277,8 @@ tui/screens/search_view.py,sha256=MMHjVdlk3HZSuDBSvq8IGrqv_Mh5Us6YqXQ80bcWSMk,19
277
277
  tui/screens/session_view.py,sha256=eZ1eDwHTvPOck1wCCviixtOaCxIkBT_95ytNNNriGNA,5991
278
278
  tui/screens/stats.py,sha256=p81PjzdaIv7hllb8f45-rlVe4lJZwSdIMqu7e86_u5s,6223
279
279
  tui/screens/ui_view.py,sha256=1QJCgLh2YfgWIpvzRG1KOGXYEaOYX6ojN61Azjf2oX0,2125
280
- code_context_control-2.89.0.dist-info/METADATA,sha256=Xob6TgoThl4-70s3pnLbpliJiAp1H0bkndgSucjPbT4,26229
281
- code_context_control-2.89.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
282
- code_context_control-2.89.0.dist-info/entry_points.txt,sha256=7kX_WUsDCF2hbXzvbNyscyaBb9AeA-DJY5v_5hN0DlU,93
283
- code_context_control-2.89.0.dist-info/top_level.txt,sha256=wRt41zBybVF3qAiNXHz9BURbkKvUvfhmWWtKMhaw6eE,29
284
- code_context_control-2.89.0.dist-info/RECORD,,
280
+ code_context_control-2.89.1.dist-info/METADATA,sha256=sV0tlzbuyWmGAXdFcCU9a0qVD7rPku_n-On5ByfXgQU,26229
281
+ code_context_control-2.89.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
282
+ code_context_control-2.89.1.dist-info/entry_points.txt,sha256=7kX_WUsDCF2hbXzvbNyscyaBb9AeA-DJY5v_5hN0DlU,93
283
+ code_context_control-2.89.1.dist-info/top_level.txt,sha256=wRt41zBybVF3qAiNXHz9BURbkKvUvfhmWWtKMhaw6eE,29
284
+ code_context_control-2.89.1.dist-info/RECORD,,
services/parser.py CHANGED
@@ -642,6 +642,7 @@ def check_syntax_ast(content: str, ext: str) -> List[Dict[str, Any]]:
642
642
 
643
643
  # ── Native syntax checking (no tree-sitter, no AI) ──────────────────
644
644
  import os as _os
645
+ import shutil as _shutil
645
646
  import subprocess as _subprocess
646
647
  import sys as _sys
647
648
  import tempfile as _tempfile
@@ -715,6 +716,15 @@ def _result(status: str, checker: str, errors: List[Dict[str, Any]] | None = Non
715
716
 
716
717
  def _subproc_check(cmd: List[str], content: str, suffix: str, checker: str, timeout: int = 8) -> Dict[str, Any]:
717
718
  """Write content to a temp file and run a checker subprocess."""
719
+ # Resolve the checker through PATH before Popen: npm-global tools on
720
+ # Windows are .cmd batch shims (tsc.cmd, eslint.cmd) that CreateProcess
721
+ # will not find by bare name — shutil.which returns the full shim path,
722
+ # which Popen can execute. Bare-name Popen made every npm checker report
723
+ # "not installed" on Windows even when it was on PATH.
724
+ exe = _shutil.which(cmd[0])
725
+ if exe is None:
726
+ return _result("checker_unavailable", checker,
727
+ detail=f"{cmd[0]} is not installed or not on PATH.")
718
728
  fd, tmp = _tempfile.mkstemp(suffix=suffix)
719
729
  try:
720
730
  with _os.fdopen(fd, 'w', encoding='utf-8') as f:
@@ -728,7 +738,7 @@ def _subproc_check(cmd: List[str], content: str, suffix: str, checker: str, time
728
738
  # the direct child, leaving any grandchild processes (e.g. Rscript -> R)
729
739
  # running. encoding/errors avoid UnicodeDecodeError on non-UTF-8 output.
730
740
  proc = _subprocess.Popen(
731
- cmd + [tmp], stdin=_subprocess.DEVNULL,
741
+ [exe] + cmd[1:] + [tmp], stdin=_subprocess.DEVNULL,
732
742
  stdout=_subprocess.PIPE, stderr=_subprocess.PIPE,
733
743
  text=True, encoding="utf-8", errors="replace", **kwargs,
734
744
  )
@@ -819,7 +819,9 @@ class ProjectManager:
819
819
  # Lazy import to avoid services -> cli circular import at module load.
820
820
  from cli.c3 import _instruction_documents_for_project, _uninstall_mcp_all
821
821
  try:
822
- _uninstall_mcp_all(str(src))
822
+ # Project cleanup only — the machine-wide IDE registrations
823
+ # (~/.codex, Antigravity) serve every other C3 project.
824
+ _uninstall_mcp_all(str(src), include_global=False)
823
825
  except Exception as e:
824
826
  warnings.append(f"uninstall_mcp failed: {e}")
825
827
  c3_dir = src / ".c3"