code-graph-rag 0.0.246__tar.gz → 0.0.421__tar.gz

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 (244) hide show
  1. {code_graph_rag-0.0.246/code_graph_rag.egg-info → code_graph_rag-0.0.421}/PKG-INFO +35 -4
  2. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/PYPI_README.md +23 -2
  3. code_graph_rag-0.0.421/README.md +189 -0
  4. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421/code_graph_rag.egg-info}/PKG-INFO +35 -4
  5. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/SOURCES.txt +74 -1
  6. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/requires.txt +13 -1
  7. code_graph_rag-0.0.421/codebase_rag/analyzers/__init__.py +4 -0
  8. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_analyzer.py +201 -0
  9. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/patterns/javascript.yaml +28 -0
  10. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/patterns/python.yaml +49 -0
  11. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/patterns/tsx.yaml +28 -0
  12. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/patterns/typescript.yaml +28 -0
  13. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/security/javascript.yaml +35 -0
  14. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/security/python.yaml +71 -0
  15. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/security/tsx.yaml +35 -0
  16. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/security/typescript.yaml +35 -0
  17. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/smells/javascript.yaml +22 -0
  18. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/smells/python.yaml +33 -0
  19. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/smells/tsx.yaml +22 -0
  20. code_graph_rag-0.0.421/codebase_rag/analyzers/ast_grep_rules/smells/typescript.yaml +22 -0
  21. code_graph_rag-0.0.421/codebase_rag/capture.py +137 -0
  22. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/cli.py +219 -46
  23. code_graph_rag-0.0.421/codebase_rag/cli_help.py +238 -0
  24. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/config.py +63 -15
  25. code_graph_rag-0.0.421/codebase_rag/constants/__init__.py +30 -0
  26. code_graph_rag-0.0.421/codebase_rag/constants/ast_cpp.py +255 -0
  27. code_graph_rag-0.0.421/codebase_rag/constants/ast_csharp.py +317 -0
  28. code_graph_rag-0.0.421/codebase_rag/constants/ast_dart.py +142 -0
  29. code_graph_rag-0.0.421/codebase_rag/constants/ast_go.py +83 -0
  30. code_graph_rag-0.0.421/codebase_rag/constants/ast_java.py +240 -0
  31. code_graph_rag-0.0.421/codebase_rag/constants/ast_js.py +291 -0
  32. code_graph_rag-0.0.421/codebase_rag/constants/ast_lua.py +31 -0
  33. code_graph_rag-0.0.421/codebase_rag/constants/ast_nodes.py +283 -0
  34. code_graph_rag-0.0.421/codebase_rag/constants/ast_php.py +36 -0
  35. code_graph_rag-0.0.421/codebase_rag/constants/ast_python.py +139 -0
  36. code_graph_rag-0.0.421/codebase_rag/constants/ast_rust.py +182 -0
  37. code_graph_rag-0.0.421/codebase_rag/constants/ast_scala.py +18 -0
  38. code_graph_rag-0.0.421/codebase_rag/constants/build.py +70 -0
  39. code_graph_rag-0.0.421/codebase_rag/constants/cli.py +410 -0
  40. code_graph_rag-0.0.421/codebase_rag/constants/core.py +177 -0
  41. code_graph_rag-0.0.421/codebase_rag/constants/deadcode_roots.py +217 -0
  42. code_graph_rag-0.0.421/codebase_rag/constants/deps.py +79 -0
  43. code_graph_rag-0.0.421/codebase_rag/constants/fqn_specs.py +642 -0
  44. code_graph_rag-0.0.421/codebase_rag/constants/graph.py +443 -0
  45. code_graph_rag-0.0.421/codebase_rag/constants/health.py +62 -0
  46. code_graph_rag-0.0.421/codebase_rag/constants/lang_tooling.py +166 -0
  47. code_graph_rag-0.0.421/codebase_rag/constants/languages.py +361 -0
  48. code_graph_rag-0.0.421/codebase_rag/constants/mcp.py +111 -0
  49. code_graph_rag-0.0.421/codebase_rag/constants/providers.py +135 -0
  50. code_graph_rag-0.0.421/codebase_rag/constants/security.py +177 -0
  51. code_graph_rag-0.0.421/codebase_rag/constants/stdlib_types.py +398 -0
  52. code_graph_rag-0.0.421/codebase_rag/constants/structural.py +69 -0
  53. code_graph_rag-0.0.421/codebase_rag/cypher_queries.py +254 -0
  54. code_graph_rag-0.0.421/codebase_rag/dead_code.py +460 -0
  55. code_graph_rag-0.0.421/codebase_rag/embedder.py +329 -0
  56. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/exceptions.py +28 -9
  57. code_graph_rag-0.0.421/codebase_rag/graph_audit.py +281 -0
  58. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/graph_updater.py +676 -109
  59. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/language_spec.py +140 -10
  60. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/logs.py +144 -61
  61. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/main.py +48 -4
  62. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/mcp/server.py +73 -4
  63. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/mcp/tools.py +93 -3
  64. code_graph_rag-0.0.421/codebase_rag/parser_fingerprint.py +71 -0
  65. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parser_loader.py +197 -39
  66. code_graph_rag-0.0.421/codebase_rag/parsers/ast_grep_patterns/ruby.yaml +21 -0
  67. code_graph_rag-0.0.421/codebase_rag/parsers/ast_grep_tier.py +275 -0
  68. code_graph_rag-0.0.421/codebase_rag/parsers/call_processor.py +4739 -0
  69. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/call_resolver.py +682 -304
  70. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/cpp_modules.py +23 -7
  71. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/identity.py +3 -3
  72. code_graph_rag-0.0.421/codebase_rag/parsers/class_ingest/method_override.py +301 -0
  73. code_graph_rag-0.0.421/codebase_rag/parsers/class_ingest/mixin.py +1410 -0
  74. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/parent_extraction.py +209 -28
  75. code_graph_rag-0.0.421/codebase_rag/parsers/class_ingest/relationships.py +186 -0
  76. code_graph_rag-0.0.421/codebase_rag/parsers/class_ingest/utils.py +27 -0
  77. code_graph_rag-0.0.421/codebase_rag/parsers/cpp/preproc_recovery.py +262 -0
  78. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp/type_inference.py +123 -81
  79. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp/utils.py +150 -22
  80. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp_frontend/__init__.py +2 -0
  81. code_graph_rag-0.0.421/codebase_rag/parsers/cpp_frontend/constants.py +44 -0
  82. code_graph_rag-0.0.421/codebase_rag/parsers/cpp_frontend/frontend.py +830 -0
  83. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp_frontend/qn.py +25 -20
  84. code_graph_rag-0.0.421/codebase_rag/parsers/csharp/__init__.py +1 -0
  85. code_graph_rag-0.0.421/codebase_rag/parsers/csharp/type_inference.py +1364 -0
  86. code_graph_rag-0.0.421/codebase_rag/parsers/csharp/utils.py +273 -0
  87. code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/__init__.py +23 -0
  88. code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/frontend.py +391 -0
  89. code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.cs +583 -0
  90. code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.csproj +36 -0
  91. code_graph_rag-0.0.421/codebase_rag/parsers/csharp_frontend/roslyn/Program.cs +22 -0
  92. code_graph_rag-0.0.421/codebase_rag/parsers/dart/__init__.py +23 -0
  93. code_graph_rag-0.0.421/codebase_rag/parsers/dart/type_inference.py +263 -0
  94. code_graph_rag-0.0.421/codebase_rag/parsers/dart/utils.py +272 -0
  95. code_graph_rag-0.0.421/codebase_rag/parsers/definition_processor.py +425 -0
  96. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/dependency_parser.py +45 -0
  97. code_graph_rag-0.0.421/codebase_rag/parsers/export_detection.py +342 -0
  98. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/factory.py +21 -1
  99. code_graph_rag-0.0.421/codebase_rag/parsers/flow_access/__init__.py +9 -0
  100. code_graph_rag-0.0.421/codebase_rag/parsers/flow_access/constants.py +17 -0
  101. code_graph_rag-0.0.421/codebase_rag/parsers/flow_access/processor.py +2061 -0
  102. code_graph_rag-0.0.421/codebase_rag/parsers/function_ingest.py +1880 -0
  103. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/go/__init__.py +2 -0
  104. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/go/module_paths.py +12 -12
  105. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/go/type_inference.py +31 -25
  106. code_graph_rag-0.0.421/codebase_rag/parsers/go/utils.py +93 -0
  107. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/import_processor.py +540 -175
  108. code_graph_rag-0.0.421/codebase_rag/parsers/io_access/__init__.py +72 -0
  109. code_graph_rag-0.0.421/codebase_rag/parsers/io_access/constants.py +72 -0
  110. code_graph_rag-0.0.421/codebase_rag/parsers/io_access/descriptor.py +392 -0
  111. code_graph_rag-0.0.421/codebase_rag/parsers/io_access/extract.py +427 -0
  112. code_graph_rag-0.0.421/codebase_rag/parsers/io_access/models.py +67 -0
  113. code_graph_rag-0.0.421/codebase_rag/parsers/io_access/processor.py +1664 -0
  114. code_graph_rag-0.0.421/codebase_rag/parsers/io_access/registry.py +974 -0
  115. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/method_resolver.py +307 -51
  116. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/type_inference.py +14 -9
  117. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/type_resolver.py +30 -12
  118. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/utils.py +63 -10
  119. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/variable_analyzer.py +17 -17
  120. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/ingest.py +211 -50
  121. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/module_system.py +61 -39
  122. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/type_inference.py +4 -4
  123. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/utils.py +2 -1
  124. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/__init__.py +2 -1
  125. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/ast_analyzer.py +136 -30
  126. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/expression_analyzer.py +90 -17
  127. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/type_inference.py +10 -5
  128. code_graph_rag-0.0.421/codebase_rag/parsers/py/utils.py +96 -0
  129. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/py/variable_analyzer.py +24 -24
  130. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/python_source_roots.py +25 -25
  131. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/rs/type_inference.py +90 -74
  132. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/rs/utils.py +24 -9
  133. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/stdlib_extractor.py +29 -0
  134. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/structure_processor.py +7 -3
  135. code_graph_rag-0.0.421/codebase_rag/parsers/type_inference.py +634 -0
  136. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/utils.py +395 -107
  137. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/prompts.py +16 -4
  138. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/providers/base.py +44 -7
  139. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/providers/litellm.py +1 -2
  140. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/readme_sections.py +29 -0
  141. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/__init__.py +5 -0
  142. code_graph_rag-0.0.421/codebase_rag/services/filtering.py +50 -0
  143. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/graph_service.py +35 -11
  144. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/protobuf_service.py +1 -0
  145. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/cli.py +11 -6
  146. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tool_errors.py +9 -9
  147. code_graph_rag-0.0.421/codebase_rag/tools/ast_grep_service.py +218 -0
  148. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/health_checker.py +59 -0
  149. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/language.py +18 -5
  150. code_graph_rag-0.0.421/codebase_rag/tools/structural_editor.py +58 -0
  151. code_graph_rag-0.0.421/codebase_rag/tools/structural_search.py +46 -0
  152. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/tool_descriptions.py +48 -2
  153. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/types_defs.py +320 -28
  154. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/unixcoder.py +17 -12
  155. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/dependencies.py +28 -1
  156. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/path_utils.py +29 -16
  157. code_graph_rag-0.0.421/codebase_rag/vector_store.py +496 -0
  158. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/cli.py +20 -7
  159. code_graph_rag-0.0.421/codec/schema_pb2.py +77 -0
  160. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/pyproject.toml +38 -3
  161. code_graph_rag-0.0.246/README.md +0 -1001
  162. code_graph_rag-0.0.246/codebase_rag/cli_help.py +0 -239
  163. code_graph_rag-0.0.246/codebase_rag/constants.py +0 -3696
  164. code_graph_rag-0.0.246/codebase_rag/cypher_queries.py +0 -333
  165. code_graph_rag-0.0.246/codebase_rag/embedder.py +0 -193
  166. code_graph_rag-0.0.246/codebase_rag/parsers/call_processor.py +0 -3165
  167. code_graph_rag-0.0.246/codebase_rag/parsers/class_ingest/method_override.py +0 -79
  168. code_graph_rag-0.0.246/codebase_rag/parsers/class_ingest/mixin.py +0 -679
  169. code_graph_rag-0.0.246/codebase_rag/parsers/class_ingest/relationships.py +0 -114
  170. code_graph_rag-0.0.246/codebase_rag/parsers/class_ingest/utils.py +0 -13
  171. code_graph_rag-0.0.246/codebase_rag/parsers/cpp_frontend/constants.py +0 -39
  172. code_graph_rag-0.0.246/codebase_rag/parsers/cpp_frontend/frontend.py +0 -381
  173. code_graph_rag-0.0.246/codebase_rag/parsers/definition_processor.py +0 -290
  174. code_graph_rag-0.0.246/codebase_rag/parsers/export_detection.py +0 -160
  175. code_graph_rag-0.0.246/codebase_rag/parsers/function_ingest.py +0 -809
  176. code_graph_rag-0.0.246/codebase_rag/parsers/go/utils.py +0 -63
  177. code_graph_rag-0.0.246/codebase_rag/parsers/py/utils.py +0 -38
  178. code_graph_rag-0.0.246/codebase_rag/parsers/type_inference.py +0 -410
  179. code_graph_rag-0.0.246/codebase_rag/vector_store.py +0 -180
  180. code_graph_rag-0.0.246/codec/schema_pb2.py +0 -75
  181. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/LICENSE +0 -0
  182. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/cgr/__init__.py +0 -0
  183. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/dependency_links.txt +0 -0
  184. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/entry_points.txt +0 -0
  185. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/code_graph_rag.egg-info/top_level.txt +0 -0
  186. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/__init__.py +0 -0
  187. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/cgr_state.py +0 -0
  188. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/decorators.py +0 -0
  189. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/docker-compose.yaml +0 -0
  190. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/graph_loader.py +0 -0
  191. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/mcp/__init__.py +0 -0
  192. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/mcp/client.py +0 -0
  193. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/models.py +0 -0
  194. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/__init__.py +0 -0
  195. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/__init__.py +0 -0
  196. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/class_ingest/node_type.py +0 -0
  197. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/cpp/__init__.py +0 -0
  198. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/__init__.py +0 -0
  199. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/base.py +0 -0
  200. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/cpp.py +0 -0
  201. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/java.py +0 -0
  202. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/js_ts.py +0 -0
  203. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/lua.py +0 -0
  204. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/php.py +0 -0
  205. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/protocol.py +0 -0
  206. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/python.py +0 -0
  207. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/registry.py +0 -0
  208. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/handlers/rust.py +0 -0
  209. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/java/__init__.py +0 -0
  210. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/js_ts/__init__.py +0 -0
  211. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/lua/__init__.py +0 -0
  212. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/lua/type_inference.py +0 -0
  213. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/lua/utils.py +0 -0
  214. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/parsers/rs/__init__.py +0 -0
  215. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/providers/__init__.py +0 -0
  216. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/schema_builder.py +0 -0
  217. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/schemas.py +0 -0
  218. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/anthropic_token_counter.py +0 -0
  219. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/services/llm.py +0 -0
  220. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/__init__.py +0 -0
  221. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/constants.py +0 -0
  222. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/health.py +0 -0
  223. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/stack/manager.py +0 -0
  224. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/__init__.py +0 -0
  225. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/code_retrieval.py +0 -0
  226. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/codebase_query.py +0 -0
  227. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/directory_lister.py +0 -0
  228. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/file_editor.py +0 -0
  229. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/file_reader.py +0 -0
  230. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/file_writer.py +0 -0
  231. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/semantic_search.py +0 -0
  232. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/tools/shell_command.py +0 -0
  233. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/__init__.py +0 -0
  234. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/fqn_resolver.py +0 -0
  235. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/rich_markdown.py +0 -0
  236. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/source_extraction.py +0 -0
  237. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/utils/token_utils.py +0 -0
  238. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/__init__.py +0 -0
  239. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/constants.py +0 -0
  240. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/models.py +0 -0
  241. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codebase_rag/workspaces/storage.py +0 -0
  242. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codec/__init__.py +0 -0
  243. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/codec/schema_pb2.pyi +0 -0
  244. {code_graph_rag-0.0.246 → code_graph_rag-0.0.421}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-graph-rag
3
- Version: 0.0.246
3
+ Version: 0.0.421
4
4
  Summary: The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
5
5
  License-Expression: MIT
6
6
  Keywords: rag,retrieval-augmented-generation,knowledge-graph,code-analysis,tree-sitter,mcp,mcp-server,llm,graph-database,semantic-search,codebase,memgraph,developer-tools,monorepo
@@ -19,7 +19,7 @@ Requires-Python: >=3.12
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: loguru>=0.7.3
22
- Requires-Dist: mcp>=1.25.0
22
+ Requires-Dist: mcp>=1.28.1
23
23
  Requires-Dist: pydantic-ai>=1.102.0
24
24
  Requires-Dist: pydantic-settings>=2.12.0
25
25
  Requires-Dist: pymgclient>=1.5.1
@@ -46,6 +46,9 @@ Requires-Dist: pytest-cov>=4.0.0; extra == "test"
46
46
  Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
47
47
  Requires-Dist: testcontainers>=4.9.0; extra == "test"
48
48
  Requires-Dist: libclang>=18.1.1; extra == "test"
49
+ Requires-Dist: filelock>=3.12; extra == "test"
50
+ Requires-Dist: ast-grep-py>=0.44.0; extra == "test"
51
+ Requires-Dist: pyyaml>=6.0; extra == "test"
49
52
  Provides-Extra: treesitter-full
50
53
  Requires-Dist: tree-sitter-python>=0.23.6; extra == "treesitter-full"
51
54
  Requires-Dist: tree-sitter-javascript>=0.23.1; extra == "treesitter-full"
@@ -58,15 +61,22 @@ Requires-Dist: tree-sitter-c>=0.24.1; extra == "treesitter-full"
58
61
  Requires-Dist: tree-sitter-cpp>=0.23.0; extra == "treesitter-full"
59
62
  Requires-Dist: tree-sitter-lua>=0.0.19; extra == "treesitter-full"
60
63
  Requires-Dist: tree-sitter-php>=0.24.1; extra == "treesitter-full"
64
+ Requires-Dist: tree-sitter-c-sharp>=0.23.5; extra == "treesitter-full"
65
+ Requires-Dist: tree-sitter-dart>=0.1.0; extra == "treesitter-full"
61
66
  Provides-Extra: semantic
62
67
  Requires-Dist: qdrant-client>=1.9.0; extra == "semantic"
63
68
  Requires-Dist: torch>=2.6.0; extra == "semantic"
64
69
  Requires-Dist: transformers>=4.0.0; extra == "semantic"
70
+ Provides-Extra: milvus
71
+ Requires-Dist: pymilvus[milvus-lite]>=3.0.0; extra == "milvus"
72
+ Provides-Extra: ast-grep
73
+ Requires-Dist: ast-grep-py>=0.44.0; extra == "ast-grep"
74
+ Requires-Dist: pyyaml>=6.0; extra == "ast-grep"
65
75
  Dynamic: license-file
66
76
 
67
77
  # Code-Graph-RAG
68
78
 
69
- A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimization.
79
+ A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimisation.
70
80
 
71
81
  ## Install
72
82
 
@@ -86,6 +96,16 @@ With semantic code search (UniXcoder embeddings):
86
96
  pip install 'code-graph-rag[semantic]'
87
97
  ```
88
98
 
99
+ Qdrant is the default vector store for semantic search. To use Milvus Lite,
100
+ install `code-graph-rag[semantic,milvus]`, then set
101
+ `CGR_VECTOR_STORE_BACKEND=milvus` and `MILVUS_URI=./.milvus_code_embeddings.db`
102
+ before indexing.
103
+
104
+ To compute embeddings on an OpenAI-compatible endpoint (OpenAI, Ollama, vLLM)
105
+ instead of locally, set `CGR_EMBEDDING_PROVIDER=openai` with
106
+ `OPENAI_EMBEDDING_BASE_URL` and `OPENAI_EMBEDDING_MODEL`; torch and
107
+ transformers are then not required locally.
108
+
89
109
  ### Prerequisites
90
110
 
91
111
  - Python 3.12+
@@ -117,12 +137,23 @@ cgr index -o ./index-output --repo-path ./my-project
117
137
  cgr export -o graph.json
118
138
  ```
119
139
 
120
- **AI-guided optimization:**
140
+ **AI-guided optimisation:**
121
141
 
122
142
  ```bash
123
143
  cgr optimize python --repo-path ./my-project
124
144
  ```
125
145
 
146
+ **Find dead code (functions unreachable from any entry point):**
147
+
148
+ ```bash
149
+ cgr dead-code # scan the indexed project
150
+ cgr dead-code -e main --exclude '*.gen.*' # add roots, skip generated code
151
+ cgr dead-code --format json --fail-on-found # CI-friendly report
152
+ ```
153
+
154
+ Results are candidates for review, not a guaranteed delete list. See the
155
+ [Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
156
+
126
157
  **Run as an MCP server (for Claude Code):**
127
158
 
128
159
  ```bash
@@ -1,6 +1,6 @@
1
1
  # Code-Graph-RAG
2
2
 
3
- A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimization.
3
+ A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimisation.
4
4
 
5
5
  ## Install
6
6
 
@@ -20,6 +20,16 @@ With semantic code search (UniXcoder embeddings):
20
20
  pip install 'code-graph-rag[semantic]'
21
21
  ```
22
22
 
23
+ Qdrant is the default vector store for semantic search. To use Milvus Lite,
24
+ install `code-graph-rag[semantic,milvus]`, then set
25
+ `CGR_VECTOR_STORE_BACKEND=milvus` and `MILVUS_URI=./.milvus_code_embeddings.db`
26
+ before indexing.
27
+
28
+ To compute embeddings on an OpenAI-compatible endpoint (OpenAI, Ollama, vLLM)
29
+ instead of locally, set `CGR_EMBEDDING_PROVIDER=openai` with
30
+ `OPENAI_EMBEDDING_BASE_URL` and `OPENAI_EMBEDDING_MODEL`; torch and
31
+ transformers are then not required locally.
32
+
23
33
  ### Prerequisites
24
34
 
25
35
  - Python 3.12+
@@ -51,12 +61,23 @@ cgr index -o ./index-output --repo-path ./my-project
51
61
  cgr export -o graph.json
52
62
  ```
53
63
 
54
- **AI-guided optimization:**
64
+ **AI-guided optimisation:**
55
65
 
56
66
  ```bash
57
67
  cgr optimize python --repo-path ./my-project
58
68
  ```
59
69
 
70
+ **Find dead code (functions unreachable from any entry point):**
71
+
72
+ ```bash
73
+ cgr dead-code # scan the indexed project
74
+ cgr dead-code -e main --exclude '*.gen.*' # add roots, skip generated code
75
+ cgr dead-code --format json --fail-on-found # CI-friendly report
76
+ ```
77
+
78
+ Results are candidates for review, not a guaranteed delete list. See the
79
+ [Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
80
+
60
81
  **Run as an MCP server (for Claude Code):**
61
82
 
62
83
  ```bash
@@ -0,0 +1,189 @@
1
+ <div align="center">
2
+ <!-- Bitbucket strips <picture>/<source> tags, so we use a single light-mode <img>. Restore the theme-aware <picture> block below when the GitHub account is reinstated:
3
+ <picture>
4
+ <source srcset="assets/logo-dark-any.png" media="(prefers-color-scheme: dark)">
5
+ <source srcset="assets/logo-light-any.png" media="(prefers-color-scheme: light)">
6
+ <img src="assets/logo-dark-any.png" alt="Code-Graph-RAG Logo" width="480">
7
+ </picture>
8
+ -->
9
+ <img src="assets/logo-light-any.png" alt="Code-Graph-RAG Logo" width="480">
10
+
11
+ <p>
12
+ <!-- Badges below are commented out while the GitHub account is suspended. Restore them when the account is reinstated.
13
+ Stars/Forks: shields.io hits GitHub's API (returns "repo not found" for suspended accounts).
14
+ gitcgr: indexes from GitHub (shows "not indexed" while unavailable).
15
+ MseeP.ai: badge PNG ignores inline height on Bitbucket and renders as a full-size tile.
16
+ <a href="https://github.com/vitali87/code-graph-rag/stargazers">
17
+ <img src="https://img.shields.io/github/stars/vitali87/code-graph-rag?style=social" alt="GitHub stars" />
18
+ </a>
19
+ <a href="https://github.com/vitali87/code-graph-rag/network/members">
20
+ <img src="https://img.shields.io/github/forks/vitali87/code-graph-rag?style=social" alt="GitHub forks" />
21
+ </a>
22
+ -->
23
+ <!-- Codecov, SonarCloud, and OpenSSF Scorecard badges are fed by GitHub-side CI. Uncomment once that CI is confirmed to publish to these services again.
24
+ <a href="https://codecov.io/gh/vitali87/code-graph-rag">
25
+ <img src="https://codecov.io/gh/vitali87/code-graph-rag/graph/badge.svg" alt="Codecov" />
26
+ </a>
27
+ <a href="https://sonarcloud.io/summary/overall?id=vitali87_code-graph-rag">
28
+ <img src="https://sonarcloud.io/api/project_badges/measure?project=vitali87_code-graph-rag&metric=alert_status" alt="Quality Gate Status" />
29
+ </a>
30
+ -->
31
+ <!--
32
+ <a href="https://mseep.ai/app/vitali87-code-graph-rag">
33
+ <img src="https://mseep.net/pr/vitali87-code-graph-rag-badge.png" alt="MseeP.ai Security Assessment" height="20" />
34
+ </a>
35
+ -->
36
+ <a href="https://code-graph-rag.com">
37
+ <img src="https://img.shields.io/badge/Enterprise-Support%20%26%20Services-6366f1" alt="Enterprise Support" />
38
+ </a>
39
+ <a href="https://pepy.tech/projects/code-graph-rag">
40
+ <img src="https://static.pepy.tech/personalized-badge/code-graph-rag?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads" alt="PyPI Downloads" />
41
+ </a>
42
+ <!-- OpenSSF Scorecard only tracks GitHub-hosted repos. Uncomment once the Scorecard workflow is confirmed running on the authoritative GitHub repo.
43
+ <a href="https://scorecard.dev/viewer/?uri=github.com/vitali87/code-graph-rag">
44
+ <img src="https://api.scorecard.dev/projects/github.com/vitali87/code-graph-rag/badge" alt="OpenSSF Scorecard" />
45
+ </a>
46
+ -->
47
+ <!--
48
+ <a href="https://gitcgr.com/vitali87/code-graph-rag">
49
+ <img src="https://gitcgr.com/badge/vitali87/code-graph-rag.svg" alt="gitcgr" />
50
+ </a>
51
+ -->
52
+ </p>
53
+ </div>
54
+
55
+ # Code-Graph-RAG
56
+
57
+ Code-Graph-RAG parses a multi-language codebase with Tree-sitter, builds a knowledge graph of its structure in Memgraph, and lets you query, edit, and optimise that code in plain English. It works across a monorepo of mixed languages under one unified graph schema.
58
+
59
+ <p align="center">
60
+ <img src="./assets/demo.gif" alt="demo">
61
+ </p>
62
+
63
+ ## Latest News 🔥
64
+
65
+ <!-- SECTION:latest_news -->
66
+ - **Ruby Support**: Ruby joins the graph through a new pluggable ast-grep tier that adds a language from a single YAML pattern file, emitting `Module`, `Function`, and `Class` nodes plus import edges without a hand-written parser.
67
+ - **Structural Search & Replace**: Find and rewrite code by AST pattern with ast-grep, exposed as agent tools so you can match and transform structure across the whole codebase instead of relying on text or regex.
68
+ - **Data-Flow Tracing**: New `FLOWS_TO` taint edges follow values through assignments, function calls, and I/O sinks, with coverage across C#, Java, C, and Go.
69
+ <!-- /SECTION:latest_news -->
70
+
71
+ See [NEWS.md](NEWS.md) for the full history.
72
+
73
+ ## What It Does
74
+
75
+ Point Code-Graph-RAG at a repository and it reads every source file, extracts functions, classes, methods, modules, and the relationships between them, and stores the result as an interconnected graph. Once the graph exists you can:
76
+
77
+ - Ask questions about the codebase in natural language and get answers grounded in the real structure.
78
+ - Retrieve the actual source of any function, class, or method by name or by intent.
79
+ - Edit code through the agent with AST-based surgical patching and a diff preview before anything changes.
80
+ - Optimise code against language best practices or your own coding standards.
81
+ - Find dead code by walking call and reference edges from entry points.
82
+ - Search and rewrite structurally by AST pattern with ast-grep.
83
+
84
+ ## How It Works
85
+
86
+ The system has two components:
87
+
88
+ 1. **Multi-language parser.** A Tree-sitter based parser reads the codebase and ingests functions, classes, methods, modules, and their relationships into Memgraph under a single language-agnostic schema.
89
+ 2. **RAG system** (`codebase_rag/`). An interactive CLI that turns natural language into Cypher queries, retrieves matching code, and drives AI-powered editing and optimisation.
90
+
91
+ ```
92
+ Source Code -> Tree-sitter Parser -> AST Analysis -> Memgraph Knowledge Graph
93
+ |
94
+ User Query -> AI Model (Cypher Gen) -> Cypher Query -> Graph Results -> Response
95
+ ```
96
+
97
+ See the [Architecture Overview](docs/architecture/overview.md) and [Graph Schema](docs/architecture/graph-schema.md) for the full picture.
98
+
99
+ ## Supported Languages
100
+
101
+ Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, and Dart are fully supported. Scala is in development. See the [Language Support](docs/architecture/language-support.md) matrix for per-language capabilities.
102
+
103
+ ## Installation
104
+
105
+ `cgr` is published to PyPI. Install it system-wide with the `treesitter-full` (all languages) and `semantic` (vector search) extras:
106
+
107
+ ```bash
108
+ # with uv (recommended)
109
+ uv tool install "code-graph-rag[treesitter-full,semantic]"
110
+
111
+ # or with pipx
112
+ pipx install "code-graph-rag[treesitter-full,semantic]"
113
+ ```
114
+
115
+ You also need Docker (for Memgraph), `cmake`, and `ripgrep`. Full prerequisites, source installs, and environment setup are in the [Installation](docs/getting-started/installation.md) guide.
116
+
117
+ ## Quick Start
118
+
119
+ ```bash
120
+ # Start the packaged Memgraph + Qdrant stack (no compose file needed)
121
+ cgr daemon up
122
+
123
+ # Parse a repository into the graph, then query it
124
+ cgr start --repo-path /path/to/repo --update-graph --clean
125
+ cgr start --repo-path /path/to/repo
126
+ ```
127
+
128
+ The [Quick Start](docs/getting-started/quickstart.md) guide walks through parsing, querying, and exporting in five minutes.
129
+
130
+ ## MCP Server
131
+
132
+ Code-Graph-RAG runs as an [MCP](https://modelcontextprotocol.io) server so Claude Code and other MCP clients can query and edit your codebase directly. See the [MCP Server](docs/guide/mcp-server.md) guide for setup.
133
+
134
+ ## Documentation
135
+
136
+ **Getting Started**
137
+ - [Installation](docs/getting-started/installation.md)
138
+ - [Quick Start](docs/getting-started/quickstart.md)
139
+ - [Configuration](docs/getting-started/configuration.md)
140
+
141
+ **User Guide**
142
+ - [CLI Reference](docs/guide/cli-reference.md)
143
+ - [Interactive Querying](docs/guide/interactive-querying.md)
144
+ - [Code Optimisation](docs/guide/code-optimization.md)
145
+ - [Dead Code Detection](docs/guide/dead-code.md)
146
+ - [Graph Export](docs/guide/graph-export.md)
147
+ - [Real-Time Updates](docs/guide/realtime-updates.md)
148
+ - [MCP Server](docs/guide/mcp-server.md)
149
+
150
+ **Architecture**
151
+ - [Overview](docs/architecture/overview.md)
152
+ - [Graph Schema](docs/architecture/graph-schema.md)
153
+ - [Language Support](docs/architecture/language-support.md)
154
+ - [Data-Flow Edges](docs/architecture/data-flow-edges.md)
155
+
156
+ **Python SDK**
157
+ - [Overview](docs/sdk/overview.md)
158
+ - [Graph Loader](docs/sdk/graph-loader.md)
159
+ - [Cypher Generator](docs/sdk/cypher-generator.md)
160
+ - [Semantic Search](docs/sdk/semantic-search.md)
161
+
162
+ **Advanced**
163
+ - [Adding Languages](docs/advanced/adding-languages.md)
164
+ - [Ignore Patterns](docs/advanced/ignore-patterns.md)
165
+ - [Building Binaries](docs/advanced/building-binaries.md)
166
+ - [Troubleshooting](docs/advanced/troubleshooting.md)
167
+
168
+ ## Enterprise Services
169
+
170
+ Code-Graph-RAG is open source and free to use. For organisations that need more, we offer **fully managed cloud-hosted solutions** and **on-premise deployments**:
171
+
172
+ - **Cloud-Hosted Deployment**: Managed cloud infrastructure for both the graph database and the AI agent connection. Zero infrastructure overhead, so we handle scaling, updates, and availability while your team focuses on building.
173
+ - **On-Premise & Air-Gapped Deployment**: Deploy Code-Graph-RAG entirely within your own environment, including air-gapped networks. Full data sovereignty for regulated industries and security-sensitive organisations.
174
+
175
+ We also offer custom development, integration consulting, technical support contracts, and team training.
176
+
177
+ **[View plans & pricing at code-graph-rag.com](https://code-graph-rag.com/enterprise)**
178
+
179
+ ## Contributing
180
+
181
+ Please see [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines. Good first PRs come from the TODO issues.
182
+
183
+ ## Support
184
+
185
+ For issues or questions, check the [Troubleshooting](docs/advanced/troubleshooting.md) guide first, then open an issue.
186
+
187
+ ## License
188
+
189
+ MIT. See [LICENSE](LICENSE).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-graph-rag
3
- Version: 0.0.246
3
+ Version: 0.0.421
4
4
  Summary: The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
5
5
  License-Expression: MIT
6
6
  Keywords: rag,retrieval-augmented-generation,knowledge-graph,code-analysis,tree-sitter,mcp,mcp-server,llm,graph-database,semantic-search,codebase,memgraph,developer-tools,monorepo
@@ -19,7 +19,7 @@ Requires-Python: >=3.12
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: loguru>=0.7.3
22
- Requires-Dist: mcp>=1.25.0
22
+ Requires-Dist: mcp>=1.28.1
23
23
  Requires-Dist: pydantic-ai>=1.102.0
24
24
  Requires-Dist: pydantic-settings>=2.12.0
25
25
  Requires-Dist: pymgclient>=1.5.1
@@ -46,6 +46,9 @@ Requires-Dist: pytest-cov>=4.0.0; extra == "test"
46
46
  Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
47
47
  Requires-Dist: testcontainers>=4.9.0; extra == "test"
48
48
  Requires-Dist: libclang>=18.1.1; extra == "test"
49
+ Requires-Dist: filelock>=3.12; extra == "test"
50
+ Requires-Dist: ast-grep-py>=0.44.0; extra == "test"
51
+ Requires-Dist: pyyaml>=6.0; extra == "test"
49
52
  Provides-Extra: treesitter-full
50
53
  Requires-Dist: tree-sitter-python>=0.23.6; extra == "treesitter-full"
51
54
  Requires-Dist: tree-sitter-javascript>=0.23.1; extra == "treesitter-full"
@@ -58,15 +61,22 @@ Requires-Dist: tree-sitter-c>=0.24.1; extra == "treesitter-full"
58
61
  Requires-Dist: tree-sitter-cpp>=0.23.0; extra == "treesitter-full"
59
62
  Requires-Dist: tree-sitter-lua>=0.0.19; extra == "treesitter-full"
60
63
  Requires-Dist: tree-sitter-php>=0.24.1; extra == "treesitter-full"
64
+ Requires-Dist: tree-sitter-c-sharp>=0.23.5; extra == "treesitter-full"
65
+ Requires-Dist: tree-sitter-dart>=0.1.0; extra == "treesitter-full"
61
66
  Provides-Extra: semantic
62
67
  Requires-Dist: qdrant-client>=1.9.0; extra == "semantic"
63
68
  Requires-Dist: torch>=2.6.0; extra == "semantic"
64
69
  Requires-Dist: transformers>=4.0.0; extra == "semantic"
70
+ Provides-Extra: milvus
71
+ Requires-Dist: pymilvus[milvus-lite]>=3.0.0; extra == "milvus"
72
+ Provides-Extra: ast-grep
73
+ Requires-Dist: ast-grep-py>=0.44.0; extra == "ast-grep"
74
+ Requires-Dist: pyyaml>=6.0; extra == "ast-grep"
65
75
  Dynamic: license-file
66
76
 
67
77
  # Code-Graph-RAG
68
78
 
69
- A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimization.
79
+ A graph-based RAG system that parses multi-language codebases with Tree-sitter, builds knowledge graphs in Memgraph, and enables natural language querying, editing, and optimisation.
70
80
 
71
81
  ## Install
72
82
 
@@ -86,6 +96,16 @@ With semantic code search (UniXcoder embeddings):
86
96
  pip install 'code-graph-rag[semantic]'
87
97
  ```
88
98
 
99
+ Qdrant is the default vector store for semantic search. To use Milvus Lite,
100
+ install `code-graph-rag[semantic,milvus]`, then set
101
+ `CGR_VECTOR_STORE_BACKEND=milvus` and `MILVUS_URI=./.milvus_code_embeddings.db`
102
+ before indexing.
103
+
104
+ To compute embeddings on an OpenAI-compatible endpoint (OpenAI, Ollama, vLLM)
105
+ instead of locally, set `CGR_EMBEDDING_PROVIDER=openai` with
106
+ `OPENAI_EMBEDDING_BASE_URL` and `OPENAI_EMBEDDING_MODEL`; torch and
107
+ transformers are then not required locally.
108
+
89
109
  ### Prerequisites
90
110
 
91
111
  - Python 3.12+
@@ -117,12 +137,23 @@ cgr index -o ./index-output --repo-path ./my-project
117
137
  cgr export -o graph.json
118
138
  ```
119
139
 
120
- **AI-guided optimization:**
140
+ **AI-guided optimisation:**
121
141
 
122
142
  ```bash
123
143
  cgr optimize python --repo-path ./my-project
124
144
  ```
125
145
 
146
+ **Find dead code (functions unreachable from any entry point):**
147
+
148
+ ```bash
149
+ cgr dead-code # scan the indexed project
150
+ cgr dead-code -e main --exclude '*.gen.*' # add roots, skip generated code
151
+ cgr dead-code --format json --fail-on-found # CI-friendly report
152
+ ```
153
+
154
+ Results are candidates for review, not a guaranteed delete list. See the
155
+ [Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
156
+
126
157
  **Run as an MCP server (for Claude Code):**
127
158
 
128
159
  ```bash
@@ -10,22 +10,25 @@ code_graph_rag.egg-info/entry_points.txt
10
10
  code_graph_rag.egg-info/requires.txt
11
11
  code_graph_rag.egg-info/top_level.txt
12
12
  codebase_rag/__init__.py
13
+ codebase_rag/capture.py
13
14
  codebase_rag/cgr_state.py
14
15
  codebase_rag/cli.py
15
16
  codebase_rag/cli_help.py
16
17
  codebase_rag/config.py
17
- codebase_rag/constants.py
18
18
  codebase_rag/cypher_queries.py
19
+ codebase_rag/dead_code.py
19
20
  codebase_rag/decorators.py
20
21
  codebase_rag/docker-compose.yaml
21
22
  codebase_rag/embedder.py
22
23
  codebase_rag/exceptions.py
24
+ codebase_rag/graph_audit.py
23
25
  codebase_rag/graph_loader.py
24
26
  codebase_rag/graph_updater.py
25
27
  codebase_rag/language_spec.py
26
28
  codebase_rag/logs.py
27
29
  codebase_rag/main.py
28
30
  codebase_rag/models.py
31
+ codebase_rag/parser_fingerprint.py
29
32
  codebase_rag/parser_loader.py
30
33
  codebase_rag/prompts.py
31
34
  codebase_rag/readme_sections.py
@@ -35,11 +38,54 @@ codebase_rag/tool_errors.py
35
38
  codebase_rag/types_defs.py
36
39
  codebase_rag/unixcoder.py
37
40
  codebase_rag/vector_store.py
41
+ codebase_rag/analyzers/__init__.py
42
+ codebase_rag/analyzers/ast_grep_analyzer.py
43
+ codebase_rag/analyzers/ast_grep_rules/patterns/javascript.yaml
44
+ codebase_rag/analyzers/ast_grep_rules/patterns/python.yaml
45
+ codebase_rag/analyzers/ast_grep_rules/patterns/tsx.yaml
46
+ codebase_rag/analyzers/ast_grep_rules/patterns/typescript.yaml
47
+ codebase_rag/analyzers/ast_grep_rules/security/javascript.yaml
48
+ codebase_rag/analyzers/ast_grep_rules/security/python.yaml
49
+ codebase_rag/analyzers/ast_grep_rules/security/tsx.yaml
50
+ codebase_rag/analyzers/ast_grep_rules/security/typescript.yaml
51
+ codebase_rag/analyzers/ast_grep_rules/smells/javascript.yaml
52
+ codebase_rag/analyzers/ast_grep_rules/smells/python.yaml
53
+ codebase_rag/analyzers/ast_grep_rules/smells/tsx.yaml
54
+ codebase_rag/analyzers/ast_grep_rules/smells/typescript.yaml
55
+ codebase_rag/constants/__init__.py
56
+ codebase_rag/constants/ast_cpp.py
57
+ codebase_rag/constants/ast_csharp.py
58
+ codebase_rag/constants/ast_dart.py
59
+ codebase_rag/constants/ast_go.py
60
+ codebase_rag/constants/ast_java.py
61
+ codebase_rag/constants/ast_js.py
62
+ codebase_rag/constants/ast_lua.py
63
+ codebase_rag/constants/ast_nodes.py
64
+ codebase_rag/constants/ast_php.py
65
+ codebase_rag/constants/ast_python.py
66
+ codebase_rag/constants/ast_rust.py
67
+ codebase_rag/constants/ast_scala.py
68
+ codebase_rag/constants/build.py
69
+ codebase_rag/constants/cli.py
70
+ codebase_rag/constants/core.py
71
+ codebase_rag/constants/deadcode_roots.py
72
+ codebase_rag/constants/deps.py
73
+ codebase_rag/constants/fqn_specs.py
74
+ codebase_rag/constants/graph.py
75
+ codebase_rag/constants/health.py
76
+ codebase_rag/constants/lang_tooling.py
77
+ codebase_rag/constants/languages.py
78
+ codebase_rag/constants/mcp.py
79
+ codebase_rag/constants/providers.py
80
+ codebase_rag/constants/security.py
81
+ codebase_rag/constants/stdlib_types.py
82
+ codebase_rag/constants/structural.py
38
83
  codebase_rag/mcp/__init__.py
39
84
  codebase_rag/mcp/client.py
40
85
  codebase_rag/mcp/server.py
41
86
  codebase_rag/mcp/tools.py
42
87
  codebase_rag/parsers/__init__.py
88
+ codebase_rag/parsers/ast_grep_tier.py
43
89
  codebase_rag/parsers/call_processor.py
44
90
  codebase_rag/parsers/call_resolver.py
45
91
  codebase_rag/parsers/definition_processor.py
@@ -53,6 +99,7 @@ codebase_rag/parsers/stdlib_extractor.py
53
99
  codebase_rag/parsers/structure_processor.py
54
100
  codebase_rag/parsers/type_inference.py
55
101
  codebase_rag/parsers/utils.py
102
+ codebase_rag/parsers/ast_grep_patterns/ruby.yaml
56
103
  codebase_rag/parsers/class_ingest/__init__.py
57
104
  codebase_rag/parsers/class_ingest/cpp_modules.py
58
105
  codebase_rag/parsers/class_ingest/identity.py
@@ -63,12 +110,27 @@ codebase_rag/parsers/class_ingest/parent_extraction.py
63
110
  codebase_rag/parsers/class_ingest/relationships.py
64
111
  codebase_rag/parsers/class_ingest/utils.py
65
112
  codebase_rag/parsers/cpp/__init__.py
113
+ codebase_rag/parsers/cpp/preproc_recovery.py
66
114
  codebase_rag/parsers/cpp/type_inference.py
67
115
  codebase_rag/parsers/cpp/utils.py
68
116
  codebase_rag/parsers/cpp_frontend/__init__.py
69
117
  codebase_rag/parsers/cpp_frontend/constants.py
70
118
  codebase_rag/parsers/cpp_frontend/frontend.py
71
119
  codebase_rag/parsers/cpp_frontend/qn.py
120
+ codebase_rag/parsers/csharp/__init__.py
121
+ codebase_rag/parsers/csharp/type_inference.py
122
+ codebase_rag/parsers/csharp/utils.py
123
+ codebase_rag/parsers/csharp_frontend/__init__.py
124
+ codebase_rag/parsers/csharp_frontend/frontend.py
125
+ codebase_rag/parsers/csharp_frontend/roslyn/Frontend.cs
126
+ codebase_rag/parsers/csharp_frontend/roslyn/Frontend.csproj
127
+ codebase_rag/parsers/csharp_frontend/roslyn/Program.cs
128
+ codebase_rag/parsers/dart/__init__.py
129
+ codebase_rag/parsers/dart/type_inference.py
130
+ codebase_rag/parsers/dart/utils.py
131
+ codebase_rag/parsers/flow_access/__init__.py
132
+ codebase_rag/parsers/flow_access/constants.py
133
+ codebase_rag/parsers/flow_access/processor.py
72
134
  codebase_rag/parsers/go/__init__.py
73
135
  codebase_rag/parsers/go/module_paths.py
74
136
  codebase_rag/parsers/go/type_inference.py
@@ -84,6 +146,13 @@ codebase_rag/parsers/handlers/protocol.py
84
146
  codebase_rag/parsers/handlers/python.py
85
147
  codebase_rag/parsers/handlers/registry.py
86
148
  codebase_rag/parsers/handlers/rust.py
149
+ codebase_rag/parsers/io_access/__init__.py
150
+ codebase_rag/parsers/io_access/constants.py
151
+ codebase_rag/parsers/io_access/descriptor.py
152
+ codebase_rag/parsers/io_access/extract.py
153
+ codebase_rag/parsers/io_access/models.py
154
+ codebase_rag/parsers/io_access/processor.py
155
+ codebase_rag/parsers/io_access/registry.py
87
156
  codebase_rag/parsers/java/__init__.py
88
157
  codebase_rag/parsers/java/method_resolver.py
89
158
  codebase_rag/parsers/java/type_inference.py
@@ -112,6 +181,7 @@ codebase_rag/providers/base.py
112
181
  codebase_rag/providers/litellm.py
113
182
  codebase_rag/services/__init__.py
114
183
  codebase_rag/services/anthropic_token_counter.py
184
+ codebase_rag/services/filtering.py
115
185
  codebase_rag/services/graph_service.py
116
186
  codebase_rag/services/llm.py
117
187
  codebase_rag/services/protobuf_service.py
@@ -121,6 +191,7 @@ codebase_rag/stack/constants.py
121
191
  codebase_rag/stack/health.py
122
192
  codebase_rag/stack/manager.py
123
193
  codebase_rag/tools/__init__.py
194
+ codebase_rag/tools/ast_grep_service.py
124
195
  codebase_rag/tools/code_retrieval.py
125
196
  codebase_rag/tools/codebase_query.py
126
197
  codebase_rag/tools/directory_lister.py
@@ -131,6 +202,8 @@ codebase_rag/tools/health_checker.py
131
202
  codebase_rag/tools/language.py
132
203
  codebase_rag/tools/semantic_search.py
133
204
  codebase_rag/tools/shell_command.py
205
+ codebase_rag/tools/structural_editor.py
206
+ codebase_rag/tools/structural_search.py
134
207
  codebase_rag/tools/tool_descriptions.py
135
208
  codebase_rag/utils/__init__.py
136
209
  codebase_rag/utils/dependencies.py
@@ -1,5 +1,5 @@
1
1
  loguru>=0.7.3
2
- mcp>=1.25.0
2
+ mcp>=1.28.1
3
3
  pydantic-ai>=1.102.0
4
4
  pydantic-settings>=2.12.0
5
5
  pymgclient>=1.5.1
@@ -20,6 +20,13 @@ huggingface-hub[hf-xet]>=1.7.2
20
20
  griffe<2,>=1.0
21
21
  pathspec>=1.0.4
22
22
 
23
+ [ast-grep]
24
+ ast-grep-py>=0.44.0
25
+ pyyaml>=6.0
26
+
27
+ [milvus]
28
+ pymilvus[milvus-lite]>=3.0.0
29
+
23
30
  [semantic]
24
31
  qdrant-client>=1.9.0
25
32
  torch>=2.6.0
@@ -32,6 +39,9 @@ pytest-cov>=4.0.0
32
39
  pytest-xdist>=3.8.0
33
40
  testcontainers>=4.9.0
34
41
  libclang>=18.1.1
42
+ filelock>=3.12
43
+ ast-grep-py>=0.44.0
44
+ pyyaml>=6.0
35
45
 
36
46
  [treesitter-full]
37
47
  tree-sitter-python>=0.23.6
@@ -45,3 +55,5 @@ tree-sitter-c>=0.24.1
45
55
  tree-sitter-cpp>=0.23.0
46
56
  tree-sitter-lua>=0.0.19
47
57
  tree-sitter-php>=0.24.1
58
+ tree-sitter-c-sharp>=0.23.5
59
+ tree-sitter-dart>=0.1.0
@@ -0,0 +1,4 @@
1
+ # ast-grep finding analyzers (issue #413).
2
+ from .ast_grep_analyzer import FindingAnalyzer, load_finding_rules
3
+
4
+ __all__ = ["FindingAnalyzer", "load_finding_rules"]