code-context-control 2.158.0__py3-none-any.whl → 2.158.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 +1 -1
- {code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/METADATA +1 -1
- {code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/RECORD +10 -10
- {code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/WHEEL +1 -1
- services/agents.py +7 -4
- services/file_memory.py +32 -12
- services/watcher.py +4 -0
- {code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/entry_points.txt +0 -0
- {code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/licenses/LICENSE +0 -0
- {code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/top_level.txt +0 -0
cli/c3.py
CHANGED
|
@@ -91,7 +91,7 @@ console = Console() if HAS_RICH else None
|
|
|
91
91
|
# Config
|
|
92
92
|
CONFIG_DIR = ".c3"
|
|
93
93
|
CONFIG_FILE = ".c3/config.json"
|
|
94
|
-
__version__ = "2.158.
|
|
94
|
+
__version__ = "2.158.1"
|
|
95
95
|
|
|
96
96
|
# The PreToolUse matcher for native subagent calls (installer and hub migration).
|
|
97
97
|
AGENT_MATCHER = "Agent|Task"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-context-control
|
|
3
|
-
Version: 2.158.
|
|
3
|
+
Version: 2.158.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,7 +1,7 @@
|
|
|
1
1
|
cli/__init__.py,sha256=ec66drCZGNMRU4V6ov0zVhYZph1us12Vn8OvG_LJyRY,22
|
|
2
2
|
cli/_hook_utils.py,sha256=RhfS2WS5VMSi2w2Jxcts1wg5WC-UFp89JOQvcO5Jjb8,23002
|
|
3
3
|
cli/_shell_writes.py,sha256=iBbzK0v0d29rhrYgF3zKJIJbb1WSZhQjD_6w8-nOUec,7348
|
|
4
|
-
cli/c3.py,sha256=
|
|
4
|
+
cli/c3.py,sha256=6agvF-nCfFikswqKOFgUa0zcKoTIQnmiJ-AwDpqLwAE,439372
|
|
5
5
|
cli/docs.html,sha256=pPxcP5ieY0DcfEDvegwIcRxbz1woLZoKLVSF-4JVy0Q,146784
|
|
6
6
|
cli/edits.html,sha256=UjAhoCmBmQ89cklGvJqzC6eyNP2tc8H6T-e01DVkLvE,43418
|
|
7
7
|
cli/hook_access_guard.py,sha256=4UF2YHp5_vISH7Gvolc_Bz3ppSye2lGpGx38egRLj1g,32116
|
|
@@ -135,7 +135,7 @@ cli/ui/components/sessions.js,sha256=FIKtil76B8tCkAmcFV7hlj6GQ_DCJK2jCzvEmdK7NBE
|
|
|
135
135
|
cli/ui/components/settings.js,sha256=FXcn-UQE2mXC6HFsLeEas-wAUFKt0OJaLySroZQMhGA,84095
|
|
136
136
|
cli/ui/components/sidebar.js,sha256=K2ym2kUgpbyG-EBA_wBIIiqQY8qTatsiBZwzseMWuIQ,9939
|
|
137
137
|
cli/ui/components/tasks.js,sha256=vyKQ3uwoppMwvdEaHlhWXW4oWcAisx4NveqzMhsYqHo,38438
|
|
138
|
-
code_context_control-2.158.
|
|
138
|
+
code_context_control-2.158.1.dist-info/licenses/LICENSE,sha256=l8Kh5QCNWNvR6kIt8L0BUZvc2LAFiHv2c-FnsGnUZf4,11301
|
|
139
139
|
core/__init__.py,sha256=TSDCEcM4V7gcZVM3w2ykJaqEUch4Dkon-rivV17T73s,2501
|
|
140
140
|
core/codex_patch.py,sha256=CxvT_rQIwPNTRJZj9EHJmx0ZdOeSLxjiixuLI3Z7lPc,2107
|
|
141
141
|
core/config.py,sha256=wCjrZKXRywUbR6WRcO7optyOirAQ2DeRNdPCU0X5zIY,23762
|
|
@@ -201,7 +201,7 @@ services/activity_log.py,sha256=c_jTOsR-d1d5B3u67eg8mRA7LZhtP6H1-6leeGa0Go4,7990
|
|
|
201
201
|
services/agent_base.py,sha256=a-gdSd_jtZtbjXo1WS8CnWCagXgKaGZd5ShcG6s0kT4,4809
|
|
202
202
|
services/agent_downshift.py,sha256=hGFg-knqa6NUqmZUijyTDV82Fz88ieh1YjN_mG5tz8U,8444
|
|
203
203
|
services/agent_locks.py,sha256=iaS3Wz6iCS3iTkMi1zoGXlSnze9dphEOH_1am4V_4M8,23670
|
|
204
|
-
services/agents.py,sha256=
|
|
204
|
+
services/agents.py,sha256=ZMwsrPaSWmWMXIRAxPIInjlKsV0tfaJiTxlGnDhOzS0,83775
|
|
205
205
|
services/agents_workflow.py,sha256=ttve887E6SIY2twHx_OxwFBEtLUcuok72_8g3ZkOAkE,502
|
|
206
206
|
services/artifact_defs.py,sha256=4bJAcg2maJCtMhY3ub_IxZg49bVg1mD_B5Z4Bn5NF0o,9805
|
|
207
207
|
services/artifact_store.py,sha256=vCHpOzOcZmR5VF_BxcvIh6G0rPMl07c1W6Wdu2OkVVA,31098
|
|
@@ -247,7 +247,7 @@ services/embedding_index.py,sha256=-d6Gatqq5OCrneGbvDTGrWyzbVx7562SrwABOFBRhjY,4
|
|
|
247
247
|
services/enforcement_policy.py,sha256=znjABRB-8TSl0ELazY2ALzux2YJ5nWf8TvxLRhDsL2w,18905
|
|
248
248
|
services/error_reporting.py,sha256=HZ3ru8i5RLf8nq2R4iRnTs5sm1blUxknSbv5hdxuxs0,4139
|
|
249
249
|
services/file_map.py,sha256=j37DTR-UE_PMNj7vG2HiHucpwpJNaKgiD94UNUU-UXE,17091
|
|
250
|
-
services/file_memory.py,sha256=
|
|
250
|
+
services/file_memory.py,sha256=cFEUsf-_aD3uJZiNEkhEIOPB7GzyQmhL2Nj4P8JtmZg,41532
|
|
251
251
|
services/fleet_overview.py,sha256=npWzUHoHVlgCafTE79GS7AUYYilMr5yuujuAns4fpLQ,19544
|
|
252
252
|
services/git_context.py,sha256=FFdA8Y46op4DYsUnZsXLTqxIjgxb0q_d-hkFTbosC8Q,9518
|
|
253
253
|
services/grok_integration.py,sha256=aiWVmG9e-0-9_MjrJ_p0dsbTSdAYFkLfsUMI7onmz0A,8299
|
|
@@ -321,7 +321,7 @@ services/transcript_index.py,sha256=VQhvgkSyLVEYamXi_YIbiIhBnd0mqFHZlWG2HQu_1EA,
|
|
|
321
321
|
services/ui_registry.py,sha256=K_wzK0x_-jvJFdl28HCBpKow3td_BKhg3vPuei8vU7E,9121
|
|
322
322
|
services/validation_cache.py,sha256=skFYR7CkSGvFb2gq6dfxOnvjQzz5Boa3jJWT7UfaIhY,5587
|
|
323
323
|
services/vector_store.py,sha256=satc4MJanC1Wsu_iveMCUXG6K2fd0Ke87JSyy2BMikw,13041
|
|
324
|
-
services/watcher.py,sha256=
|
|
324
|
+
services/watcher.py,sha256=Irmk7QJurQon30SJFYtjijRBKtpcGB4Fwv1A1XiZxlo,10995
|
|
325
325
|
services/win_subprocess.py,sha256=nt8Uwc2PrqsRW3-jcViEsoKj56GudW8TV3CQwryx8y4,4271
|
|
326
326
|
services/bench/__init__.py,sha256=WLEJIWJeaUj6FnH2nDO1qWugJDKfOKeM6WvKLSreYjI,231
|
|
327
327
|
services/bench/delegate_eval.py,sha256=gi_cG8yYlYqBr_yOfyTibdeUJujYYFVyjcVqeIMXlUo,26072
|
|
@@ -350,8 +350,8 @@ tui/screens/search_view.py,sha256=MMHjVdlk3HZSuDBSvq8IGrqv_Mh5Us6YqXQ80bcWSMk,19
|
|
|
350
350
|
tui/screens/session_view.py,sha256=eZ1eDwHTvPOck1wCCviixtOaCxIkBT_95ytNNNriGNA,5991
|
|
351
351
|
tui/screens/stats.py,sha256=p81PjzdaIv7hllb8f45-rlVe4lJZwSdIMqu7e86_u5s,6223
|
|
352
352
|
tui/screens/ui_view.py,sha256=1QJCgLh2YfgWIpvzRG1KOGXYEaOYX6ojN61Azjf2oX0,2125
|
|
353
|
-
code_context_control-2.158.
|
|
354
|
-
code_context_control-2.158.
|
|
355
|
-
code_context_control-2.158.
|
|
356
|
-
code_context_control-2.158.
|
|
357
|
-
code_context_control-2.158.
|
|
353
|
+
code_context_control-2.158.1.dist-info/METADATA,sha256=pWtneuTKsufUjhIrPCC1W-NBwPDTt9s43Pqraf4XrBY,29355
|
|
354
|
+
code_context_control-2.158.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
355
|
+
code_context_control-2.158.1.dist-info/entry_points.txt,sha256=7kX_WUsDCF2hbXzvbNyscyaBb9AeA-DJY5v_5hN0DlU,93
|
|
356
|
+
code_context_control-2.158.1.dist-info/top_level.txt,sha256=wRt41zBybVF3qAiNXHz9BURbkKvUvfhmWWtKMhaw6eE,29
|
|
357
|
+
code_context_control-2.158.1.dist-info/RECORD,,
|
services/agents.py
CHANGED
|
@@ -903,8 +903,12 @@ class FileMemoryAgent(BackgroundAgent):
|
|
|
903
903
|
change_count = self.watcher._handler.change_count
|
|
904
904
|
if change_count != self._last_change_count:
|
|
905
905
|
self._last_change_count = change_count
|
|
906
|
-
# Check tracked files for staleness
|
|
906
|
+
# Check tracked files for staleness. The watcher never reports a
|
|
907
|
+
# change inside a nested checkout, so records there are skipped.
|
|
908
|
+
handler = self.watcher._handler
|
|
907
909
|
for rel_path in self.file_memory.list_tracked():
|
|
910
|
+
if handler.under_nested_checkout(rel_path):
|
|
911
|
+
continue
|
|
908
912
|
if self.file_memory.needs_update(rel_path):
|
|
909
913
|
files_to_process.append(rel_path)
|
|
910
914
|
|
|
@@ -1007,11 +1011,10 @@ class BranchWatchAgent(BackgroundAgent):
|
|
|
1007
1011
|
"""
|
|
1008
1012
|
if not paths:
|
|
1009
1013
|
return 0
|
|
1010
|
-
tracked = {t.replace("\\", "/"): t for t in self.file_memory.list_tracked()}
|
|
1011
1014
|
queued = 0
|
|
1012
1015
|
for p in paths:
|
|
1013
|
-
canonical =
|
|
1014
|
-
if canonical
|
|
1016
|
+
canonical = p.replace("\\", "/")
|
|
1017
|
+
if not self.file_memory.is_tracked(canonical):
|
|
1015
1018
|
continue
|
|
1016
1019
|
try:
|
|
1017
1020
|
if not self.file_memory.needs_update(canonical):
|
services/file_memory.py
CHANGED
|
@@ -8,6 +8,7 @@ Storage: .c3/file_memory/ directory, one JSON file per source file.
|
|
|
8
8
|
"""
|
|
9
9
|
import hashlib
|
|
10
10
|
import json
|
|
11
|
+
import os
|
|
11
12
|
import re
|
|
12
13
|
import threading
|
|
13
14
|
import time
|
|
@@ -56,6 +57,10 @@ class FileMemoryStore:
|
|
|
56
57
|
# update()'s add_or_update on the shared TextIndex. Reentrant so
|
|
57
58
|
# search() may hold it across _ensure_search_index() + the query.
|
|
58
59
|
self._search_lock = threading.RLock()
|
|
60
|
+
# list_tracked(): record filename -> stored path. A filename is the
|
|
61
|
+
# md5 of its path, so a name already read never maps to another path.
|
|
62
|
+
self._tracked_paths: dict[str, str] = {}
|
|
63
|
+
self._tracked_lock = threading.Lock()
|
|
59
64
|
# One-time cleanup of pre-2.121.0 generated summaries (marker-gated).
|
|
60
65
|
try:
|
|
61
66
|
self.purge_summaries()
|
|
@@ -101,6 +106,10 @@ class FileMemoryStore:
|
|
|
101
106
|
pass
|
|
102
107
|
return rewritten
|
|
103
108
|
|
|
109
|
+
def is_tracked(self, rel_path: str) -> bool:
|
|
110
|
+
"""True if a record exists for ``rel_path``, without reading it."""
|
|
111
|
+
return self._store_path(str(rel_path).replace("\\", "/")).exists()
|
|
112
|
+
|
|
104
113
|
def get(self, rel_path: str) -> Optional[dict]:
|
|
105
114
|
"""Load a file's memory record, or None if not tracked."""
|
|
106
115
|
rel_path = str(rel_path).replace("\\", "/")
|
|
@@ -391,18 +400,29 @@ class FileMemoryStore:
|
|
|
391
400
|
return unique_ranges
|
|
392
401
|
|
|
393
402
|
def list_tracked(self) -> list:
|
|
394
|
-
"""Return relative paths of all tracked files.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
403
|
+
"""Return relative paths of all tracked files.
|
|
404
|
+
|
|
405
|
+
Lists the store directory on every call but reads only records whose
|
|
406
|
+
filename it has not seen before; removed records drop out.
|
|
407
|
+
"""
|
|
408
|
+
try:
|
|
409
|
+
names = {e.name for e in os.scandir(self.store_dir)
|
|
410
|
+
if e.name.endswith(".json") and not e.name.startswith("_")}
|
|
411
|
+
except OSError:
|
|
412
|
+
return []
|
|
413
|
+
with self._tracked_lock:
|
|
414
|
+
known = self._tracked_paths
|
|
415
|
+
for gone in known.keys() - names:
|
|
416
|
+
del known[gone]
|
|
417
|
+
for name in names - known.keys():
|
|
418
|
+
try:
|
|
419
|
+
with open(self.store_dir / name, encoding="utf-8") as fh:
|
|
420
|
+
path = json.load(fh).get("path", "")
|
|
421
|
+
except (OSError, ValueError, AttributeError):
|
|
422
|
+
continue
|
|
423
|
+
if path:
|
|
424
|
+
known[name] = path
|
|
425
|
+
return list(known.values())
|
|
406
426
|
|
|
407
427
|
def prune_stale(self) -> list[str]:
|
|
408
428
|
"""Remove records whose source file no longer exists on disk.
|
services/watcher.py
CHANGED
|
@@ -90,6 +90,10 @@ class _ChangeHandler(FileSystemEventHandler):
|
|
|
90
90
|
return True
|
|
91
91
|
return False
|
|
92
92
|
|
|
93
|
+
def under_nested_checkout(self, rel_path: str) -> bool:
|
|
94
|
+
"""True if ``rel_path`` (relative to the root) sits in a nested checkout."""
|
|
95
|
+
return self._under_nested_checkout(Path(rel_path).parts[:-1])
|
|
96
|
+
|
|
93
97
|
def _should_track(self, path: str) -> bool:
|
|
94
98
|
p = Path(path)
|
|
95
99
|
if p.suffix.lower() not in CODE_EXTENSIONS:
|
{code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{code_context_control-2.158.0.dist-info → code_context_control-2.158.1.dist-info}/top_level.txt
RENAMED
|
File without changes
|