java-codebase-rag 0.6.5__py3-none-any.whl → 0.6.7__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.
java_codebase_rag/cli.py CHANGED
@@ -580,11 +580,33 @@ def _cmd_update(args: argparse.Namespace) -> int:
580
580
  )
581
581
 
582
582
 
583
+ def _rm_any(path: Path) -> None:
584
+ """Remove ``path`` whether it is a regular file, directory, or symlink.
585
+
586
+ ``code_graph.lbug`` is a single regular file in this repo, but kuzu may lay
587
+ the graph out as a directory; ``cocoindex.db`` is always a directory.
588
+ ``shutil.rmtree`` is a silent no-op on a regular file and ``Path.unlink``
589
+ raises ``IsADirectoryError`` on a directory, so a type-blind delete left
590
+ index artifacts on disk (issue #346). A symlinked directory is unlinked, not
591
+ recursed into, so the link target is never followed. Failures are warned to
592
+ stderr rather than swallowed, so erase does not report success while leaving
593
+ an artifact behind (the exact failure mode issue #346 reported).
594
+ """
595
+ try:
596
+ if path.is_dir() and not path.is_symlink():
597
+ shutil.rmtree(path)
598
+ elif path.exists() or path.is_symlink():
599
+ path.unlink(missing_ok=True)
600
+ except OSError as exc:
601
+ print(f"warning: failed to remove {path}: {exc}", file=sys.stderr)
602
+
603
+
583
604
  def _cmd_erase(args: argparse.Namespace) -> int:
584
605
  cfg = _resolved_from_ns(args)
585
606
  _startup_hints(cfg)
586
607
  cfg.apply_to_os_environ()
587
- to_describe: list[Path] = [cfg.ladybug_path, cfg.cocoindex_db]
608
+ graph_hashes_path = cfg.ladybug_path.parent / ".graph_hashes.json"
609
+ to_describe: list[Path] = [cfg.ladybug_path, cfg.cocoindex_db, graph_hashes_path]
588
610
  if cfg.index_dir.is_dir():
589
611
  try:
590
612
  import lancedb
@@ -621,13 +643,15 @@ def _cmd_erase(args: argparse.Namespace) -> int:
621
643
  )
622
644
  elif drop.returncode != 0:
623
645
  print(clip(drop.stderr, 4000), file=sys.stderr)
624
- if cfg.ladybug_path.exists():
625
- shutil.rmtree(cfg.ladybug_path, ignore_errors=True)
626
- if cfg.cocoindex_db.exists():
627
- try:
628
- cfg.cocoindex_db.unlink()
629
- except OSError:
630
- pass
646
+ # Remove the LadybugDB graph, the cocoindex state store, and the graph
647
+ # builder's content-hash store. Each is removed by type (see _rm_any):
648
+ # code_graph.lbug is a file here but may be a dir under kuzu, while
649
+ # cocoindex.db is a directory — a type-blind delete silently no-oped on
650
+ # one or the other, and .graph_hashes.json was never targeted at all
651
+ # (issue #346).
652
+ _rm_any(cfg.ladybug_path)
653
+ _rm_any(cfg.cocoindex_db)
654
+ _rm_any(graph_hashes_path)
631
655
  if cfg.index_dir.is_dir():
632
656
  try:
633
657
  import lancedb
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: java-codebase-rag
3
- Version: 0.6.5
3
+ Version: 0.6.7
4
4
  Summary: MCP server for semantic + structural search over Java codebases
5
5
  Author: HumanBean17
6
6
  License-Expression: MIT
@@ -18,7 +18,7 @@ Classifier: Topic :: Software Development :: Libraries
18
18
  Requires-Python: >=3.11
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
- Requires-Dist: cocoindex[lancedb]<2,>=1.0.0a43
21
+ Requires-Dist: cocoindex[lancedb]<2,>=1.0.7
22
22
  Requires-Dist: ladybug<0.18,>=0.17.1
23
23
  Requires-Dist: lancedb<0.31,>=0.25.3
24
24
  Requires-Dist: mcp<2,>=1.27.0
@@ -16,7 +16,7 @@ search_lancedb.py,sha256=ga_qySeCzA6hCibxUPXpCbTxW9mCjTdwirMhMhfNCz4,36801
16
16
  server.py,sha256=DcJwocSknBy0vwsUvYiC5hr-hrD_rRT-u9_DmuRTC9k,35035
17
17
  java_codebase_rag/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
18
18
  java_codebase_rag/_fdlimit.py,sha256=WroFdfSNbcriKok6q8znTf74dqlznxea_1Fd5bHl_3o,1930
19
- java_codebase_rag/cli.py,sha256=TIrKNQMxu3_dSF2LXKsRKWY5RqRnSLQMrbKAoN4uQBQ,38698
19
+ java_codebase_rag/cli.py,sha256=zMZcjVKRgfv7VpTb0h1vjGGzPXY4NT2Uqyz77uysc0c,40085
20
20
  java_codebase_rag/cli_format.py,sha256=CT7-xdwZ0bMCdP68_UOwkvm-mnLluU3LutlM-mDNk60,1839
21
21
  java_codebase_rag/cli_progress.py,sha256=q6Wh97yzLGs1B8UFk_WAKivfQu7Y5RnUUE-T2YHWkIs,3237
22
22
  java_codebase_rag/config.py,sha256=bfwYI4R8PU9YV_M4r8-03iaUZ_0TW-qN_NuhIsDXy2M,18769
@@ -26,9 +26,9 @@ java_codebase_rag/pipeline.py,sha256=ydNktEGL1YniAjJsr37yKBo_bGV4cN_LTGVTmmrsrZw
26
26
  java_codebase_rag/progress.py,sha256=2IxdMALDM0wAQCyJrrfZ975zM_85C-4BfHxf4AtYifE,23212
27
27
  java_codebase_rag/install_data/agents/explorer-rag-enhanced.md,sha256=BkdQpBEWqSdvGHgbqMdRb5CWfEiFRJK4Dgqbyal3l6s,14551
28
28
  java_codebase_rag/install_data/skills/explore-codebase/SKILL.md,sha256=YkRnrM7Wh5E8raFjAW3RrN2V9-ov8upaGC3UdpSx6U8,12346
29
- java_codebase_rag-0.6.5.dist-info/licenses/LICENSE,sha256=gxvtiHtuviR_q8ZAjWw-QTcF3DyPzg6ZY-lQrr8OPpw,1068
30
- java_codebase_rag-0.6.5.dist-info/METADATA,sha256=jbKFqnBab9XoMAtIhfX-A9n0ztxhOEPrNcuH5G9qrEM,17242
31
- java_codebase_rag-0.6.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
32
- java_codebase_rag-0.6.5.dist-info/entry_points.txt,sha256=wsPZwot0Ui4JI3TIgW8LcbN8bNtKFbwQAlHAAJXfYgQ,117
33
- java_codebase_rag-0.6.5.dist-info/top_level.txt,sha256=syQgi8XPBwY2ws_NZ1uRCxTf_s41NpshwEHNdcdnk3A,245
34
- java_codebase_rag-0.6.5.dist-info/RECORD,,
29
+ java_codebase_rag-0.6.7.dist-info/licenses/LICENSE,sha256=gxvtiHtuviR_q8ZAjWw-QTcF3DyPzg6ZY-lQrr8OPpw,1068
30
+ java_codebase_rag-0.6.7.dist-info/METADATA,sha256=Hnwc5Zpo53La7PXgldTTlVl87xRGG5KvDTky6ufxyQM,17239
31
+ java_codebase_rag-0.6.7.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
32
+ java_codebase_rag-0.6.7.dist-info/entry_points.txt,sha256=wsPZwot0Ui4JI3TIgW8LcbN8bNtKFbwQAlHAAJXfYgQ,117
33
+ java_codebase_rag-0.6.7.dist-info/top_level.txt,sha256=syQgi8XPBwY2ws_NZ1uRCxTf_s41NpshwEHNdcdnk3A,245
34
+ java_codebase_rag-0.6.7.dist-info/RECORD,,