java-codebase-rag 0.11.2__py3-none-any.whl → 0.12.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.
Files changed (73) hide show
  1. java_codebase_rag-0.12.1.dist-info/METADATA +35 -0
  2. java_codebase_rag-0.12.1.dist-info/RECORD +4 -0
  3. {java_codebase_rag-0.11.2.dist-info → java_codebase_rag-0.12.1.dist-info}/WHEEL +1 -1
  4. java_codebase_rag/_fdlimit.py +0 -56
  5. java_codebase_rag/_stdio.py +0 -32
  6. java_codebase_rag/_version.py +0 -35
  7. java_codebase_rag/absence/__init__.py +0 -0
  8. java_codebase_rag/absence/absence_diagnosis.py +0 -700
  9. java_codebase_rag/absence/absence_types.py +0 -124
  10. java_codebase_rag/absence/absence_vocab.py +0 -460
  11. java_codebase_rag/analysis/__init__.py +0 -0
  12. java_codebase_rag/analysis/pr_analysis.py +0 -563
  13. java_codebase_rag/analysis/resolve_service.py +0 -740
  14. java_codebase_rag/ast/__init__.py +0 -0
  15. java_codebase_rag/ast/ast_java.py +0 -2825
  16. java_codebase_rag/ast/brownfield_events.py +0 -58
  17. java_codebase_rag/ast/chunk_heuristics.py +0 -62
  18. java_codebase_rag/cli.py +0 -1215
  19. java_codebase_rag/cli_format.py +0 -85
  20. java_codebase_rag/cli_progress.py +0 -94
  21. java_codebase_rag/config.py +0 -833
  22. java_codebase_rag/eval/__init__.py +0 -1
  23. java_codebase_rag/eval/ground_truth.py +0 -100
  24. java_codebase_rag/eval/metrics.py +0 -107
  25. java_codebase_rag/eval/runner.py +0 -556
  26. java_codebase_rag/graph/__init__.py +0 -0
  27. java_codebase_rag/graph/build_ast_graph.py +0 -4471
  28. java_codebase_rag/graph/graph_enrich.py +0 -1937
  29. java_codebase_rag/graph/graph_types.py +0 -224
  30. java_codebase_rag/graph/java_ontology.py +0 -465
  31. java_codebase_rag/graph/ladybug_queries.py +0 -2213
  32. java_codebase_rag/graph/path_filtering.py +0 -477
  33. java_codebase_rag/index/__init__.py +0 -0
  34. java_codebase_rag/index/java_index_flow_lancedb.py +0 -734
  35. java_codebase_rag/index/java_index_v1_common.py +0 -33
  36. java_codebase_rag/install_data/__init__.py +0 -0
  37. java_codebase_rag/install_data/agents/explorer-rag-cli.md +0 -108
  38. java_codebase_rag/install_data/agents/explorer-rag-enhanced.md +0 -152
  39. java_codebase_rag/install_data/skills/explore-codebase/SKILL.md +0 -165
  40. java_codebase_rag/install_data/skills/explore-codebase-cli/SKILL.md +0 -107
  41. java_codebase_rag/installer.py +0 -2188
  42. java_codebase_rag/jrag.py +0 -4531
  43. java_codebase_rag/jrag_envelope.py +0 -1107
  44. java_codebase_rag/jrag_hints.py +0 -204
  45. java_codebase_rag/jrag_render.py +0 -926
  46. java_codebase_rag/lance_optimize.py +0 -264
  47. java_codebase_rag/mcp/__init__.py +0 -0
  48. java_codebase_rag/mcp/mcp_hints.py +0 -932
  49. java_codebase_rag/mcp/mcp_v2.py +0 -1916
  50. java_codebase_rag/mcp/server.py +0 -884
  51. java_codebase_rag/pipeline.py +0 -531
  52. java_codebase_rag/progress.py +0 -570
  53. java_codebase_rag/read_payloads.py +0 -781
  54. java_codebase_rag/search/__init__.py +0 -0
  55. java_codebase_rag/search/index_common.py +0 -10
  56. java_codebase_rag/search/search_lancedb.py +0 -1296
  57. java_codebase_rag/search/search_lexical.py +0 -449
  58. java_codebase_rag/search/search_scoring.py +0 -523
  59. java_codebase_rag/watch/__init__.py +0 -0
  60. java_codebase_rag/watch/client.py +0 -230
  61. java_codebase_rag/watch/daemon.py +0 -396
  62. java_codebase_rag/watch/lock.py +0 -201
  63. java_codebase_rag/watch/paths.py +0 -76
  64. java_codebase_rag/watch/protocol.py +0 -122
  65. java_codebase_rag/watch/server.py +0 -273
  66. java_codebase_rag/watch/warm.py +0 -105
  67. java_codebase_rag/watch/watcher.py +0 -370
  68. java_codebase_rag-0.11.2.dist-info/METADATA +0 -331
  69. java_codebase_rag-0.11.2.dist-info/RECORD +0 -71
  70. java_codebase_rag-0.11.2.dist-info/entry_points.txt +0 -4
  71. java_codebase_rag-0.11.2.dist-info/licenses/LICENSE +0 -21
  72. java_codebase_rag-0.11.2.dist-info/top_level.txt +0 -1
  73. /java_codebase_rag/__init__.py → /java_codebase_rag-0.12.1.dist-info/top_level.txt +0 -0
@@ -1,85 +0,0 @@
1
- """TTY-aware ANSI formatting for CLI stderr progress."""
2
- from __future__ import annotations
3
-
4
- import sys
5
-
6
- _RESET = "\033[0m"
7
- _BOLD = "\033[1m"
8
- _DIM = "\033[2m"
9
- _GREEN = "\033[32m"
10
- _RED = "\033[31m"
11
- _CYAN = "\033[36m"
12
-
13
- CHECK = "✓"
14
- CROSS = "✗"
15
-
16
- _NOISE_CONTAINS: tuple[bytes, ...] = (
17
- b"lance::",
18
- b"FutureWarning",
19
- b"Loading weights:",
20
- b'"event": "brownfield-',
21
- b"unknown producer source strategy",
22
- b"unknown client source strategy",
23
- # Builder verbose heartbeats / pass banners: in default mode the renderer's
24
- # bar subsumes these, so they must NOT also appear as raw lines above the
25
- # Live region. --verbose raw-relay bypasses this filter and still shows them.
26
- b"[graph] pass ",
27
- b"[graph] scoped write ",
28
- b"[graph] writing ",
29
- b"[graph] done ",
30
- b"[increment] ",
31
- )
32
-
33
-
34
- def is_noise_line(line: bytes) -> bool:
35
- return any(p in line for p in _NOISE_CONTAINS)
36
-
37
-
38
- def stderr_is_tty() -> bool:
39
- return hasattr(sys.stderr, "isatty") and sys.stderr.isatty()
40
-
41
-
42
- def _styled(text: str, *codes: str) -> str:
43
- if not stderr_is_tty():
44
- return text
45
- return "".join(codes) + text + _RESET
46
-
47
-
48
- def bold(text: str) -> str:
49
- return _styled(text, _BOLD)
50
-
51
-
52
- def dim(text: str) -> str:
53
- return _styled(text, _DIM)
54
-
55
-
56
- def green(text: str) -> str:
57
- return _styled(text, _GREEN)
58
-
59
-
60
- def red(text: str) -> str:
61
- return _styled(text, _RED)
62
-
63
-
64
- def cyan(text: str) -> str:
65
- return _styled(text, _CYAN)
66
-
67
-
68
- def bold_green(text: str) -> str:
69
- return _styled(text, _BOLD, _GREEN)
70
-
71
-
72
- def bold_red(text: str) -> str:
73
- return _styled(text, _BOLD, _RED)
74
-
75
-
76
- def bold_cyan(text: str) -> str:
77
- return _styled(text, _BOLD, _CYAN)
78
-
79
-
80
- def styled_check() -> str:
81
- return green(CHECK) if stderr_is_tty() else CHECK
82
-
83
-
84
- def styled_cross() -> str:
85
- return red(CROSS) if stderr_is_tty() else CROSS
@@ -1,94 +0,0 @@
1
- """CLI-owned stderr progress lines (shared by server reprocess path and pipeline helpers)."""
2
- from __future__ import annotations
3
-
4
- import asyncio
5
- import sys
6
- from typing import Callable
7
-
8
- from java_codebase_rag.cli_format import is_noise_line
9
- from java_codebase_rag.progress import ProgressEvent, make_relay
10
-
11
-
12
- class _AsyncLineFilter:
13
- """Buffers byte chunks and relays only non-noise lines to stderr (async drain path)."""
14
-
15
- def __init__(self) -> None:
16
- self._buf = bytearray()
17
- self._suppress_next = False
18
-
19
- def feed(self, chunk: bytes) -> None:
20
- self._buf.extend(chunk)
21
- while b"\n" in self._buf:
22
- line, self._buf = self._buf.split(b"\n", 1)
23
- line += b"\n"
24
- noise = is_noise_line(line)
25
- if noise:
26
- self._suppress_next = True
27
- continue
28
- if self._suppress_next and line[:1] in (b" ", b"\t"):
29
- continue
30
- self._suppress_next = False
31
- sys.stderr.buffer.write(line)
32
- sys.stderr.buffer.flush()
33
-
34
- def flush(self) -> None:
35
- if self._buf:
36
- if not is_noise_line(self._buf):
37
- sys.stderr.buffer.write(bytes(self._buf))
38
- sys.stderr.buffer.flush()
39
- self._buf.clear()
40
- self._suppress_next = False
41
-
42
-
43
- async def accumulate_and_relay_subprocess_streams(
44
- proc: asyncio.subprocess.Process,
45
- *,
46
- relay: bool,
47
- verbose: bool = True,
48
- on_progress: Callable[[ProgressEvent], None] | None = None,
49
- on_progress_console: object | None = None,
50
- ) -> tuple[bytes, bytes]:
51
- """Read stdout and stderr until EOF; optionally copy non-noise stderr chunks to stderr.
52
-
53
- When ``on_progress`` is set, stderr is drained through a :class:`ProgressRelay`
54
- so ``JCIRAG_PROGRESS`` lines are parsed and routed to ``on_progress`` (and
55
- suppressed from the relay), matching the sync ``pipeline._popen_capturing_stderr``.
56
- """
57
- stdout = proc.stdout
58
- stderr = proc.stderr
59
- if stdout is None or stderr is None:
60
- raise RuntimeError("subprocess must be created with stdout=PIPE and stderr=PIPE")
61
-
62
- out_buf = bytearray()
63
- err_buf = bytearray()
64
- if on_progress is not None:
65
- filt = make_relay(on_progress, console=on_progress_console, verbose=verbose)
66
- elif relay and not verbose:
67
- filt = _AsyncLineFilter()
68
- else:
69
- filt = None
70
-
71
- async def drain_stdout(reader: asyncio.StreamReader, target: bytearray) -> None:
72
- while True:
73
- chunk = await reader.read(65536)
74
- if not chunk:
75
- break
76
- target.extend(chunk)
77
-
78
- async def drain_stderr(reader: asyncio.StreamReader, target: bytearray) -> None:
79
- while True:
80
- chunk = await reader.read(65536)
81
- if not chunk:
82
- break
83
- target.extend(chunk)
84
- if filt is not None:
85
- filt.feed(chunk)
86
- elif relay:
87
- sys.stderr.buffer.write(chunk)
88
- sys.stderr.buffer.flush()
89
-
90
- await asyncio.gather(drain_stdout(stdout, out_buf), drain_stderr(stderr, err_buf))
91
- await proc.wait()
92
- if filt is not None:
93
- filt.flush()
94
- return bytes(out_buf), bytes(err_buf)