code-graph-rag 0.0.484__tar.gz → 0.0.584__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 (278) hide show
  1. {code_graph_rag-0.0.484/code_graph_rag.egg-info → code_graph_rag-0.0.584}/PKG-INFO +42 -12
  2. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/PYPI_README.md +40 -9
  3. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/README.md +7 -1
  4. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584/code_graph_rag.egg-info}/PKG-INFO +42 -12
  5. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/code_graph_rag.egg-info/SOURCES.txt +6 -0
  6. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/code_graph_rag.egg-info/requires.txt +1 -2
  7. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/cli.py +83 -0
  8. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/cli_help.py +8 -3
  9. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_go.py +4 -0
  10. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_java.py +5 -0
  11. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_js.py +68 -3
  12. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_nodes.py +22 -1
  13. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_python.py +1 -0
  14. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_rust.py +151 -0
  15. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/cli.py +16 -0
  16. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/core.py +7 -1
  17. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/deadcode_roots.py +131 -0
  18. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/deps.py +2 -0
  19. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/fqn_specs.py +21 -0
  20. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/graph.py +12 -0
  21. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/lang_tooling.py +7 -1
  22. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/languages.py +48 -0
  23. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/mcp.py +3 -0
  24. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/providers.py +2 -0
  25. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/cypher_queries.py +6 -2
  26. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/dead_code.py +413 -9
  27. code_graph_rag-0.0.584/codebase_rag/docker-compose.yaml +31 -0
  28. code_graph_rag-0.0.584/codebase_rag/flow_verdict.py +120 -0
  29. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/function_registry.py +20 -1
  30. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/graph_updater.py +158 -42
  31. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/language_spec.py +7 -0
  32. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/logs.py +13 -0
  33. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/main.py +3 -3
  34. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/mcp/server.py +11 -0
  35. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/mcp/tools.py +44 -0
  36. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/call_processor.py +2205 -118
  37. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/call_resolver.py +833 -33
  38. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/method_override.py +77 -17
  39. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/mixin.py +403 -17
  40. code_graph_rag-0.0.584/codebase_rag/parsers/contract_linking.py +256 -0
  41. code_graph_rag-0.0.584/codebase_rag/parsers/contracts.py +294 -0
  42. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/cpp_frontend/frontend.py +19 -2
  43. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/cpp_frontend/qn.py +46 -12
  44. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/csharp/utils.py +16 -0
  45. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/definition_processor.py +74 -2
  46. code_graph_rag-0.0.584/codebase_rag/parsers/dispatch_registry.py +401 -0
  47. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/endpoint_routes.py +47 -7
  48. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/endpoints.py +5 -1
  49. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/factory.py +13 -1
  50. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/function_ingest.py +152 -46
  51. code_graph_rag-0.0.584/codebase_rag/parsers/go/module_paths.py +153 -0
  52. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/go/type_inference.py +5 -5
  53. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/go/utils.py +12 -0
  54. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/rust.py +19 -10
  55. code_graph_rag-0.0.584/codebase_rag/parsers/import_processor.py +3847 -0
  56. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/io_access/__init__.py +2 -0
  57. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/io_access/constants.py +17 -0
  58. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/io_access/descriptor.py +10 -0
  59. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/io_access/extract.py +12 -6
  60. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/io_access/processor.py +169 -20
  61. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/io_access/registry.py +6 -0
  62. code_graph_rag-0.0.584/codebase_rag/parsers/js_ts/__init__.py +11 -0
  63. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/js_ts/ingest.py +15 -7
  64. code_graph_rag-0.0.584/codebase_rag/parsers/js_ts/module_paths.py +316 -0
  65. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/js_ts/module_system.py +126 -3
  66. code_graph_rag-0.0.584/codebase_rag/parsers/js_ts/type_inference.py +619 -0
  67. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/js_ts/utils.py +78 -6
  68. code_graph_rag-0.0.584/codebase_rag/parsers/rpc_exposure.py +598 -0
  69. code_graph_rag-0.0.584/codebase_rag/parsers/rs/type_inference.py +828 -0
  70. code_graph_rag-0.0.584/codebase_rag/parsers/rs/utils.py +677 -0
  71. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/type_inference.py +214 -23
  72. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/utils.py +32 -6
  73. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/providers/base.py +7 -4
  74. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/services/protobuf_service.py +30 -20
  75. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/stack/constants.py +11 -0
  76. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/stack/manager.py +77 -0
  77. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/language.py +284 -54
  78. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/tool_descriptions.py +14 -0
  79. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/types_defs.py +72 -4
  80. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/utils/dependencies.py +29 -0
  81. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/utils/path_utils.py +33 -0
  82. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codec/schema_pb2.py +29 -29
  83. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codec/schema_pb2.pyi +45 -21
  84. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/pyproject.toml +2 -8
  85. code_graph_rag-0.0.484/codebase_rag/docker-compose.yaml +0 -27
  86. code_graph_rag-0.0.484/codebase_rag/parsers/go/module_paths.py +0 -64
  87. code_graph_rag-0.0.484/codebase_rag/parsers/import_processor.py +0 -1720
  88. code_graph_rag-0.0.484/codebase_rag/parsers/js_ts/__init__.py +0 -5
  89. code_graph_rag-0.0.484/codebase_rag/parsers/js_ts/type_inference.py +0 -261
  90. code_graph_rag-0.0.484/codebase_rag/parsers/rs/type_inference.py +0 -329
  91. code_graph_rag-0.0.484/codebase_rag/parsers/rs/utils.py +0 -282
  92. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/LICENSE +0 -0
  93. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/cgr/__init__.py +0 -0
  94. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/code_graph_rag.egg-info/dependency_links.txt +0 -0
  95. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/code_graph_rag.egg-info/entry_points.txt +0 -0
  96. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/code_graph_rag.egg-info/top_level.txt +0 -0
  97. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/__init__.py +0 -0
  98. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/__init__.py +0 -0
  99. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_analyzer.py +0 -0
  100. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/c.yaml +0 -0
  101. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/cpp.yaml +0 -0
  102. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/csharp.yaml +0 -0
  103. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/dart.yaml +0 -0
  104. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/go.yaml +0 -0
  105. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/java.yaml +0 -0
  106. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/javascript.yaml +0 -0
  107. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/lua.yaml +0 -0
  108. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/php.yaml +0 -0
  109. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/python.yaml +0 -0
  110. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/ruby.yaml +0 -0
  111. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/rust.yaml +0 -0
  112. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/scala.yaml +0 -0
  113. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/tsx.yaml +0 -0
  114. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/patterns/typescript.yaml +0 -0
  115. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/c.yaml +0 -0
  116. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/cpp.yaml +0 -0
  117. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/csharp.yaml +0 -0
  118. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/dart.yaml +0 -0
  119. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/go.yaml +0 -0
  120. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/java.yaml +0 -0
  121. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/javascript.yaml +0 -0
  122. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/lua.yaml +0 -0
  123. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/php.yaml +0 -0
  124. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/python.yaml +0 -0
  125. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/ruby.yaml +0 -0
  126. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/rust.yaml +0 -0
  127. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/scala.yaml +0 -0
  128. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/tsx.yaml +0 -0
  129. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/security/typescript.yaml +0 -0
  130. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/c.yaml +0 -0
  131. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/cpp.yaml +0 -0
  132. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/csharp.yaml +0 -0
  133. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/dart.yaml +0 -0
  134. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/go.yaml +0 -0
  135. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/java.yaml +0 -0
  136. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/javascript.yaml +0 -0
  137. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/lua.yaml +0 -0
  138. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/php.yaml +0 -0
  139. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/python.yaml +0 -0
  140. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/ruby.yaml +0 -0
  141. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/rust.yaml +0 -0
  142. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/scala.yaml +0 -0
  143. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/tsx.yaml +0 -0
  144. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/analyzers/ast_grep_rules/smells/typescript.yaml +0 -0
  145. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/ast_cache.py +0 -0
  146. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/capture.py +0 -0
  147. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/cgr_state.py +0 -0
  148. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/config.py +0 -0
  149. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/__init__.py +0 -0
  150. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_cpp.py +0 -0
  151. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_csharp.py +0 -0
  152. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_dart.py +0 -0
  153. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_lua.py +0 -0
  154. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_php.py +0 -0
  155. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/ast_scala.py +0 -0
  156. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/build.py +0 -0
  157. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/health.py +0 -0
  158. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/security.py +0 -0
  159. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/stdlib_types.py +0 -0
  160. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/constants/structural.py +0 -0
  161. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/decorators.py +0 -0
  162. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/embedder.py +0 -0
  163. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/exceptions.py +0 -0
  164. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/graph_audit.py +0 -0
  165. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/graph_loader.py +0 -0
  166. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/mcp/__init__.py +0 -0
  167. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/mcp/client.py +0 -0
  168. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/models.py +0 -0
  169. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parser_fingerprint.py +0 -0
  170. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parser_loader.py +0 -0
  171. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/__init__.py +0 -0
  172. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/ast_grep_patterns/ruby.yaml +0 -0
  173. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/ast_grep_tier.py +0 -0
  174. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/__init__.py +0 -0
  175. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/cpp_modules.py +0 -0
  176. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/identity.py +0 -0
  177. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/node_type.py +0 -0
  178. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/parent_extraction.py +0 -0
  179. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/relationships.py +0 -0
  180. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/class_ingest/utils.py +0 -0
  181. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/cpp/__init__.py +0 -0
  182. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/cpp/preproc_recovery.py +0 -0
  183. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/cpp/type_inference.py +0 -0
  184. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/cpp/utils.py +0 -0
  185. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/cpp_frontend/__init__.py +0 -0
  186. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/cpp_frontend/constants.py +0 -0
  187. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/csharp/__init__.py +0 -0
  188. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/csharp/type_inference.py +0 -0
  189. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/csharp_frontend/__init__.py +0 -0
  190. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/csharp_frontend/frontend.py +0 -0
  191. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.cs +0 -0
  192. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.csproj +0 -0
  193. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/csharp_frontend/roslyn/Program.cs +0 -0
  194. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/dart/__init__.py +0 -0
  195. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/dart/type_inference.py +0 -0
  196. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/dart/utils.py +0 -0
  197. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/dependency_parser.py +0 -0
  198. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/endpoint_prefixes.py +0 -0
  199. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/export_detection.py +0 -0
  200. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/flow_access/__init__.py +0 -0
  201. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/flow_access/constants.py +0 -0
  202. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/flow_access/processor.py +0 -0
  203. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/go/__init__.py +0 -0
  204. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/__init__.py +0 -0
  205. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/base.py +0 -0
  206. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/cpp.py +0 -0
  207. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/java.py +0 -0
  208. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/js_ts.py +0 -0
  209. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/lua.py +0 -0
  210. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/php.py +0 -0
  211. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/protocol.py +0 -0
  212. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/python.py +0 -0
  213. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/handlers/registry.py +0 -0
  214. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/io_access/models.py +0 -0
  215. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/java/__init__.py +0 -0
  216. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/java/method_resolver.py +0 -0
  217. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/java/type_inference.py +0 -0
  218. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/java/type_resolver.py +0 -0
  219. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/java/utils.py +0 -0
  220. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/java/variable_analyzer.py +0 -0
  221. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/lua/__init__.py +0 -0
  222. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/lua/type_inference.py +0 -0
  223. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/lua/utils.py +0 -0
  224. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/py/__init__.py +0 -0
  225. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/py/ast_analyzer.py +0 -0
  226. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/py/expression_analyzer.py +0 -0
  227. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/py/type_inference.py +0 -0
  228. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/py/utils.py +0 -0
  229. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/py/variable_analyzer.py +0 -0
  230. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/python_source_roots.py +0 -0
  231. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/rs/__init__.py +0 -0
  232. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/stdlib_extractor.py +0 -0
  233. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/parsers/structure_processor.py +0 -0
  234. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/path_filters.py +0 -0
  235. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/prompts.py +0 -0
  236. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/providers/__init__.py +0 -0
  237. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/providers/litellm.py +0 -0
  238. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/readme_sections.py +0 -0
  239. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/schema_builder.py +0 -0
  240. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/schemas.py +0 -0
  241. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/services/__init__.py +0 -0
  242. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/services/anthropic_token_counter.py +0 -0
  243. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/services/filtering.py +0 -0
  244. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/services/graph_service.py +0 -0
  245. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/services/llm.py +0 -0
  246. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/services/resource_cleanup.py +0 -0
  247. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/services/usage_cost.py +0 -0
  248. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/stack/__init__.py +0 -0
  249. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/stack/cli.py +0 -0
  250. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/stack/health.py +0 -0
  251. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tool_errors.py +0 -0
  252. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/__init__.py +0 -0
  253. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/ast_grep_service.py +0 -0
  254. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/code_retrieval.py +0 -0
  255. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/codebase_query.py +0 -0
  256. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/directory_lister.py +0 -0
  257. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/file_editor.py +0 -0
  258. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/file_reader.py +0 -0
  259. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/file_writer.py +0 -0
  260. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/health_checker.py +0 -0
  261. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/semantic_search.py +0 -0
  262. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/shell_command.py +0 -0
  263. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/structural_editor.py +0 -0
  264. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/tools/structural_search.py +0 -0
  265. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/unixcoder.py +0 -0
  266. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/utils/__init__.py +0 -0
  267. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/utils/fqn_resolver.py +0 -0
  268. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/utils/rich_markdown.py +0 -0
  269. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/utils/source_extraction.py +0 -0
  270. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/utils/token_utils.py +0 -0
  271. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/vector_store.py +0 -0
  272. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/workspaces/__init__.py +0 -0
  273. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/workspaces/cli.py +0 -0
  274. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/workspaces/constants.py +0 -0
  275. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/workspaces/models.py +0 -0
  276. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codebase_rag/workspaces/storage.py +0 -0
  277. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/codec/__init__.py +0 -0
  278. {code_graph_rag-0.0.484 → code_graph_rag-0.0.584}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-graph-rag
3
- Version: 0.0.484
3
+ Version: 0.0.584
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
@@ -20,7 +20,7 @@ Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: loguru>=0.7.3
22
22
  Requires-Dist: mcp>=1.28.1
23
- Requires-Dist: pydantic-ai>=1.102.0
23
+ Requires-Dist: pydantic-ai>=2.0.0
24
24
  Requires-Dist: pydantic-settings>=2.12.0
25
25
  Requires-Dist: pymgclient>=1.5.1
26
26
  Requires-Dist: python-dotenv>=1.2.1
@@ -37,7 +37,6 @@ Requires-Dist: click>=8.3.1
37
37
  Requires-Dist: protobuf>=6.33.5
38
38
  Requires-Dist: defusedxml>=0.7.1
39
39
  Requires-Dist: huggingface-hub[hf-xet]>=1.7.2
40
- Requires-Dist: griffe<2,>=1.0
41
40
  Requires-Dist: pathspec>=1.0.4
42
41
  Provides-Extra: test
43
42
  Requires-Dist: pytest>=8.4.1; extra == "test"
@@ -76,7 +75,25 @@ Dynamic: license-file
76
75
 
77
76
  # Code-Graph-RAG
78
77
 
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.
78
+ 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.
79
+
80
+ ## What It Does
81
+
82
+ Point it at a repository and it reads every source file, extracts functions, classes, methods, and modules along with the relationships between them, and stores the result as an interconnected graph. Once the graph exists you can:
83
+
84
+ - Ask questions about the codebase in natural language and get answers grounded in the real structure.
85
+ - Retrieve the actual source of any function, class, or method by name or by intent.
86
+ - Edit code through the agent with AST-based surgical patching and a diff preview before anything changes.
87
+ - Search and rewrite code structurally by AST pattern with ast-grep, instead of text or regex.
88
+ - Trace data flow through assignments, calls, and I/O sinks via `FLOWS_TO` taint edges.
89
+ - Optimise code against language best practices or your own coding standards.
90
+ - Find dead code by walking call and reference edges from entry points.
91
+ - Group several repositories into a named workspace and query them as one graph.
92
+ - Trace calls between microservices: route decorators become endpoint templates, and HTTP client URLs resolve to the handlers that serve them, linking services across project boundaries.
93
+
94
+ ## Supported Languages
95
+
96
+ Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, and Dart are fully supported. Scala is in development, and Ruby has structural support (modules, functions, classes, and imports) through the pluggable ast-grep tier, which requires the `ast-grep` extra (`pip install 'code-graph-rag[ast-grep]'`).
80
97
 
81
98
  ## Install
82
99
 
@@ -154,18 +171,31 @@ cgr dead-code --format json --fail-on-found # CI-friendly report
154
171
  Results are candidates for review, not a guaranteed delete list. See the
155
172
  [Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
156
173
 
157
- **Run as an MCP server (for Claude Code):**
174
+ **Group repositories into a workspace and query them together:**
158
175
 
159
176
  ```bash
160
- cgr mcp-server
177
+ cgr workspace create my-platform
178
+ cgr workspace add-repo my-platform ./service-a
179
+ cgr workspace add-repo my-platform ./service-b
180
+ cgr start --workspace my-platform
161
181
  ```
162
182
 
163
- **Check your setup:**
183
+ **Inspect the graph and the stack:**
164
184
 
165
185
  ```bash
166
- cgr doctor
186
+ cgr stats # node and relationship counts
187
+ cgr status # stack state and last sync per project
188
+ cgr doctor # check dependencies and configuration
167
189
  ```
168
190
 
191
+ ## MCP Server
192
+
193
+ Run `cgr mcp-server` to serve the tools over stdio or HTTP for Claude Code and other MCP clients. The MCP surface registers:
194
+
195
+ - **Ask and retrieve:** `ask_agent`, `query_code_graph`, `get_code_snippet`, and `semantic_search` (needs the `semantic` extra)
196
+ - **Structural editing:** `surgical_replace_code`, plus `structural_search` and `structural_replace` (need the `ast-grep` extra)
197
+ - **Files and projects:** `read_file`, `write_file`, `list_directory`, `list_projects`, `index_repository`, `update_repository`, `delete_project`, `wipe_database`
198
+
169
199
  ## Python SDK
170
200
 
171
201
  The `cgr` package provides short imports for programmatic use.
@@ -225,8 +255,8 @@ print(f"Embedding dimension: {len(embedding)}")
225
255
  ```python
226
256
  from cgr import settings
227
257
 
228
- settings.set_orchestrator("openai", "gpt-4o", api_key="sk-...")
229
- settings.set_cypher("google", "gemini-2.5-flash", api_key="your-key")
258
+ settings.set_orchestrator("openai", "gpt-5.6-terra", api_key="sk-...")
259
+ settings.set_cypher("google", "gemini-3.5-flash-lite", api_key="your-key")
230
260
  ```
231
261
 
232
262
  ## Environment Variables
@@ -238,10 +268,10 @@ Configure via `.env` or environment variables:
238
268
  | `MEMGRAPH_HOST` | `localhost` | Memgraph hostname |
239
269
  | `MEMGRAPH_PORT` | `7687` | Memgraph port |
240
270
  | `ORCHESTRATOR_PROVIDER` | | Provider: `google`, `openai`, `anthropic`, `azure`, `ollama`, `minimax`, `litellm_proxy` |
241
- | `ORCHESTRATOR_MODEL` | | Model ID (e.g. `gpt-4o`, `gemini-2.5-pro`) |
271
+ | `ORCHESTRATOR_MODEL` | | Model ID (e.g. `gpt-5.6-terra`, `gemini-3.6-flash`, `claude-sonnet-5`, `qwen2.5-coder`) |
242
272
  | `ORCHESTRATOR_API_KEY` | | API key for the provider (not needed for `ollama`) |
243
273
  | `CYPHER_PROVIDER` | | Provider for Cypher generation |
244
- | `CYPHER_MODEL` | | Model ID for Cypher generation (e.g. `codellama`, `gpt-4o-mini`) |
274
+ | `CYPHER_MODEL` | | Model ID for Cypher generation (e.g. `qwen2.5-coder`, `gpt-5.6-luna`, `gemini-3.5-flash-lite`) |
245
275
  | `CYPHER_API_KEY` | | API key for Cypher provider (not needed for `ollama`) |
246
276
  | `TARGET_REPO_PATH` | `.` | Default repository path |
247
277
 
@@ -1,6 +1,24 @@
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 optimisation.
3
+ 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.
4
+
5
+ ## What It Does
6
+
7
+ Point it at a repository and it reads every source file, extracts functions, classes, methods, and modules along with the relationships between them, and stores the result as an interconnected graph. Once the graph exists you can:
8
+
9
+ - Ask questions about the codebase in natural language and get answers grounded in the real structure.
10
+ - Retrieve the actual source of any function, class, or method by name or by intent.
11
+ - Edit code through the agent with AST-based surgical patching and a diff preview before anything changes.
12
+ - Search and rewrite code structurally by AST pattern with ast-grep, instead of text or regex.
13
+ - Trace data flow through assignments, calls, and I/O sinks via `FLOWS_TO` taint edges.
14
+ - Optimise code against language best practices or your own coding standards.
15
+ - Find dead code by walking call and reference edges from entry points.
16
+ - Group several repositories into a named workspace and query them as one graph.
17
+ - Trace calls between microservices: route decorators become endpoint templates, and HTTP client URLs resolve to the handlers that serve them, linking services across project boundaries.
18
+
19
+ ## Supported Languages
20
+
21
+ Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, and Dart are fully supported. Scala is in development, and Ruby has structural support (modules, functions, classes, and imports) through the pluggable ast-grep tier, which requires the `ast-grep` extra (`pip install 'code-graph-rag[ast-grep]'`).
4
22
 
5
23
  ## Install
6
24
 
@@ -78,18 +96,31 @@ cgr dead-code --format json --fail-on-found # CI-friendly report
78
96
  Results are candidates for review, not a guaranteed delete list. See the
79
97
  [Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
80
98
 
81
- **Run as an MCP server (for Claude Code):**
99
+ **Group repositories into a workspace and query them together:**
82
100
 
83
101
  ```bash
84
- cgr mcp-server
102
+ cgr workspace create my-platform
103
+ cgr workspace add-repo my-platform ./service-a
104
+ cgr workspace add-repo my-platform ./service-b
105
+ cgr start --workspace my-platform
85
106
  ```
86
107
 
87
- **Check your setup:**
108
+ **Inspect the graph and the stack:**
88
109
 
89
110
  ```bash
90
- cgr doctor
111
+ cgr stats # node and relationship counts
112
+ cgr status # stack state and last sync per project
113
+ cgr doctor # check dependencies and configuration
91
114
  ```
92
115
 
116
+ ## MCP Server
117
+
118
+ Run `cgr mcp-server` to serve the tools over stdio or HTTP for Claude Code and other MCP clients. The MCP surface registers:
119
+
120
+ - **Ask and retrieve:** `ask_agent`, `query_code_graph`, `get_code_snippet`, and `semantic_search` (needs the `semantic` extra)
121
+ - **Structural editing:** `surgical_replace_code`, plus `structural_search` and `structural_replace` (need the `ast-grep` extra)
122
+ - **Files and projects:** `read_file`, `write_file`, `list_directory`, `list_projects`, `index_repository`, `update_repository`, `delete_project`, `wipe_database`
123
+
93
124
  ## Python SDK
94
125
 
95
126
  The `cgr` package provides short imports for programmatic use.
@@ -149,8 +180,8 @@ print(f"Embedding dimension: {len(embedding)}")
149
180
  ```python
150
181
  from cgr import settings
151
182
 
152
- settings.set_orchestrator("openai", "gpt-4o", api_key="sk-...")
153
- settings.set_cypher("google", "gemini-2.5-flash", api_key="your-key")
183
+ settings.set_orchestrator("openai", "gpt-5.6-terra", api_key="sk-...")
184
+ settings.set_cypher("google", "gemini-3.5-flash-lite", api_key="your-key")
154
185
  ```
155
186
 
156
187
  ## Environment Variables
@@ -162,10 +193,10 @@ Configure via `.env` or environment variables:
162
193
  | `MEMGRAPH_HOST` | `localhost` | Memgraph hostname |
163
194
  | `MEMGRAPH_PORT` | `7687` | Memgraph port |
164
195
  | `ORCHESTRATOR_PROVIDER` | | Provider: `google`, `openai`, `anthropic`, `azure`, `ollama`, `minimax`, `litellm_proxy` |
165
- | `ORCHESTRATOR_MODEL` | | Model ID (e.g. `gpt-4o`, `gemini-2.5-pro`) |
196
+ | `ORCHESTRATOR_MODEL` | | Model ID (e.g. `gpt-5.6-terra`, `gemini-3.6-flash`, `claude-sonnet-5`, `qwen2.5-coder`) |
166
197
  | `ORCHESTRATOR_API_KEY` | | API key for the provider (not needed for `ollama`) |
167
198
  | `CYPHER_PROVIDER` | | Provider for Cypher generation |
168
- | `CYPHER_MODEL` | | Model ID for Cypher generation (e.g. `codellama`, `gpt-4o-mini`) |
199
+ | `CYPHER_MODEL` | | Model ID for Cypher generation (e.g. `qwen2.5-coder`, `gpt-5.6-luna`, `gemini-3.5-flash-lite`) |
169
200
  | `CYPHER_API_KEY` | | API key for Cypher provider (not needed for `ollama`) |
170
201
  | `TARGET_REPO_PATH` | `.` | Default repository path |
171
202
 
@@ -129,10 +129,16 @@ You also need Docker (for Memgraph), `cmake`, and `ripgrep`. Full prerequisites,
129
129
  cgr daemon up
130
130
 
131
131
  # Parse a repository into the graph, then query it
132
- cgr start --repo-path /path/to/repo --update-graph --clean
132
+ cgr start --repo-path /path/to/repo --update-graph
133
133
  cgr start --repo-path /path/to/repo
134
134
  ```
135
135
 
136
+ Repeat the first command for each repository you want indexed; the graph is
137
+ shared, and syncing one project leaves the others alone. To start over from an
138
+ empty graph, add `--clean` — it deletes **every** project in the shared graph,
139
+ not just this one, and asks for confirmation first when other
140
+ projects would be destroyed.
141
+
136
142
  The [Quick Start](docs/getting-started/quickstart.md) guide walks through parsing, querying, and exporting in five minutes.
137
143
 
138
144
  ## MCP Server
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-graph-rag
3
- Version: 0.0.484
3
+ Version: 0.0.584
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
@@ -20,7 +20,7 @@ Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
21
  Requires-Dist: loguru>=0.7.3
22
22
  Requires-Dist: mcp>=1.28.1
23
- Requires-Dist: pydantic-ai>=1.102.0
23
+ Requires-Dist: pydantic-ai>=2.0.0
24
24
  Requires-Dist: pydantic-settings>=2.12.0
25
25
  Requires-Dist: pymgclient>=1.5.1
26
26
  Requires-Dist: python-dotenv>=1.2.1
@@ -37,7 +37,6 @@ Requires-Dist: click>=8.3.1
37
37
  Requires-Dist: protobuf>=6.33.5
38
38
  Requires-Dist: defusedxml>=0.7.1
39
39
  Requires-Dist: huggingface-hub[hf-xet]>=1.7.2
40
- Requires-Dist: griffe<2,>=1.0
41
40
  Requires-Dist: pathspec>=1.0.4
42
41
  Provides-Extra: test
43
42
  Requires-Dist: pytest>=8.4.1; extra == "test"
@@ -76,7 +75,25 @@ Dynamic: license-file
76
75
 
77
76
  # Code-Graph-RAG
78
77
 
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.
78
+ 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.
79
+
80
+ ## What It Does
81
+
82
+ Point it at a repository and it reads every source file, extracts functions, classes, methods, and modules along with the relationships between them, and stores the result as an interconnected graph. Once the graph exists you can:
83
+
84
+ - Ask questions about the codebase in natural language and get answers grounded in the real structure.
85
+ - Retrieve the actual source of any function, class, or method by name or by intent.
86
+ - Edit code through the agent with AST-based surgical patching and a diff preview before anything changes.
87
+ - Search and rewrite code structurally by AST pattern with ast-grep, instead of text or regex.
88
+ - Trace data flow through assignments, calls, and I/O sinks via `FLOWS_TO` taint edges.
89
+ - Optimise code against language best practices or your own coding standards.
90
+ - Find dead code by walking call and reference edges from entry points.
91
+ - Group several repositories into a named workspace and query them as one graph.
92
+ - Trace calls between microservices: route decorators become endpoint templates, and HTTP client URLs resolve to the handlers that serve them, linking services across project boundaries.
93
+
94
+ ## Supported Languages
95
+
96
+ Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, and Dart are fully supported. Scala is in development, and Ruby has structural support (modules, functions, classes, and imports) through the pluggable ast-grep tier, which requires the `ast-grep` extra (`pip install 'code-graph-rag[ast-grep]'`).
80
97
 
81
98
  ## Install
82
99
 
@@ -154,18 +171,31 @@ cgr dead-code --format json --fail-on-found # CI-friendly report
154
171
  Results are candidates for review, not a guaranteed delete list. See the
155
172
  [Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
156
173
 
157
- **Run as an MCP server (for Claude Code):**
174
+ **Group repositories into a workspace and query them together:**
158
175
 
159
176
  ```bash
160
- cgr mcp-server
177
+ cgr workspace create my-platform
178
+ cgr workspace add-repo my-platform ./service-a
179
+ cgr workspace add-repo my-platform ./service-b
180
+ cgr start --workspace my-platform
161
181
  ```
162
182
 
163
- **Check your setup:**
183
+ **Inspect the graph and the stack:**
164
184
 
165
185
  ```bash
166
- cgr doctor
186
+ cgr stats # node and relationship counts
187
+ cgr status # stack state and last sync per project
188
+ cgr doctor # check dependencies and configuration
167
189
  ```
168
190
 
191
+ ## MCP Server
192
+
193
+ Run `cgr mcp-server` to serve the tools over stdio or HTTP for Claude Code and other MCP clients. The MCP surface registers:
194
+
195
+ - **Ask and retrieve:** `ask_agent`, `query_code_graph`, `get_code_snippet`, and `semantic_search` (needs the `semantic` extra)
196
+ - **Structural editing:** `surgical_replace_code`, plus `structural_search` and `structural_replace` (need the `ast-grep` extra)
197
+ - **Files and projects:** `read_file`, `write_file`, `list_directory`, `list_projects`, `index_repository`, `update_repository`, `delete_project`, `wipe_database`
198
+
169
199
  ## Python SDK
170
200
 
171
201
  The `cgr` package provides short imports for programmatic use.
@@ -225,8 +255,8 @@ print(f"Embedding dimension: {len(embedding)}")
225
255
  ```python
226
256
  from cgr import settings
227
257
 
228
- settings.set_orchestrator("openai", "gpt-4o", api_key="sk-...")
229
- settings.set_cypher("google", "gemini-2.5-flash", api_key="your-key")
258
+ settings.set_orchestrator("openai", "gpt-5.6-terra", api_key="sk-...")
259
+ settings.set_cypher("google", "gemini-3.5-flash-lite", api_key="your-key")
230
260
  ```
231
261
 
232
262
  ## Environment Variables
@@ -238,10 +268,10 @@ Configure via `.env` or environment variables:
238
268
  | `MEMGRAPH_HOST` | `localhost` | Memgraph hostname |
239
269
  | `MEMGRAPH_PORT` | `7687` | Memgraph port |
240
270
  | `ORCHESTRATOR_PROVIDER` | | Provider: `google`, `openai`, `anthropic`, `azure`, `ollama`, `minimax`, `litellm_proxy` |
241
- | `ORCHESTRATOR_MODEL` | | Model ID (e.g. `gpt-4o`, `gemini-2.5-pro`) |
271
+ | `ORCHESTRATOR_MODEL` | | Model ID (e.g. `gpt-5.6-terra`, `gemini-3.6-flash`, `claude-sonnet-5`, `qwen2.5-coder`) |
242
272
  | `ORCHESTRATOR_API_KEY` | | API key for the provider (not needed for `ollama`) |
243
273
  | `CYPHER_PROVIDER` | | Provider for Cypher generation |
244
- | `CYPHER_MODEL` | | Model ID for Cypher generation (e.g. `codellama`, `gpt-4o-mini`) |
274
+ | `CYPHER_MODEL` | | Model ID for Cypher generation (e.g. `qwen2.5-coder`, `gpt-5.6-luna`, `gemini-3.5-flash-lite`) |
245
275
  | `CYPHER_API_KEY` | | API key for Cypher provider (not needed for `ollama`) |
246
276
  | `TARGET_REPO_PATH` | `.` | Default repository path |
247
277
 
@@ -22,6 +22,7 @@ codebase_rag/decorators.py
22
22
  codebase_rag/docker-compose.yaml
23
23
  codebase_rag/embedder.py
24
24
  codebase_rag/exceptions.py
25
+ codebase_rag/flow_verdict.py
25
26
  codebase_rag/function_registry.py
26
27
  codebase_rag/graph_audit.py
27
28
  codebase_rag/graph_loader.py
@@ -124,8 +125,11 @@ codebase_rag/parsers/__init__.py
124
125
  codebase_rag/parsers/ast_grep_tier.py
125
126
  codebase_rag/parsers/call_processor.py
126
127
  codebase_rag/parsers/call_resolver.py
128
+ codebase_rag/parsers/contract_linking.py
129
+ codebase_rag/parsers/contracts.py
127
130
  codebase_rag/parsers/definition_processor.py
128
131
  codebase_rag/parsers/dependency_parser.py
132
+ codebase_rag/parsers/dispatch_registry.py
129
133
  codebase_rag/parsers/endpoint_prefixes.py
130
134
  codebase_rag/parsers/endpoint_routes.py
131
135
  codebase_rag/parsers/endpoints.py
@@ -134,6 +138,7 @@ codebase_rag/parsers/factory.py
134
138
  codebase_rag/parsers/function_ingest.py
135
139
  codebase_rag/parsers/import_processor.py
136
140
  codebase_rag/parsers/python_source_roots.py
141
+ codebase_rag/parsers/rpc_exposure.py
137
142
  codebase_rag/parsers/stdlib_extractor.py
138
143
  codebase_rag/parsers/structure_processor.py
139
144
  codebase_rag/parsers/type_inference.py
@@ -200,6 +205,7 @@ codebase_rag/parsers/java/utils.py
200
205
  codebase_rag/parsers/java/variable_analyzer.py
201
206
  codebase_rag/parsers/js_ts/__init__.py
202
207
  codebase_rag/parsers/js_ts/ingest.py
208
+ codebase_rag/parsers/js_ts/module_paths.py
203
209
  codebase_rag/parsers/js_ts/module_system.py
204
210
  codebase_rag/parsers/js_ts/type_inference.py
205
211
  codebase_rag/parsers/js_ts/utils.py
@@ -1,6 +1,6 @@
1
1
  loguru>=0.7.3
2
2
  mcp>=1.28.1
3
- pydantic-ai>=1.102.0
3
+ pydantic-ai>=2.0.0
4
4
  pydantic-settings>=2.12.0
5
5
  pymgclient>=1.5.1
6
6
  python-dotenv>=1.2.1
@@ -17,7 +17,6 @@ click>=8.3.1
17
17
  protobuf>=6.33.5
18
18
  defusedxml>=0.7.1
19
19
  huggingface-hub[hf-xet]>=1.7.2
20
- griffe<2,>=1.0
21
20
  pathspec>=1.0.4
22
21
 
23
22
  [ast-grep]
@@ -2,6 +2,7 @@
2
2
 
3
3
  import asyncio
4
4
  import json
5
+ import sys
5
6
  import time
6
7
  from collections.abc import Callable
7
8
  from fnmatch import fnmatch
@@ -199,6 +200,78 @@ def _capture_selection(capture: list[str] | None) -> CaptureSelection:
199
200
  return resolve_capture([*split_spec(settings.CGR_CAPTURE), *(capture or [])])
200
201
 
201
202
 
203
+ def _stdin_is_interactive() -> bool:
204
+ try:
205
+ return sys.stdin.isatty()
206
+ except (AttributeError, ValueError):
207
+ return False
208
+
209
+
210
+ def _projects_in_graph(ingestor: MemgraphIngestor) -> list[str] | None:
211
+ """Every project in the graph, or None when the graph cannot be read.
212
+
213
+ None is NOT an empty graph: treating a failed enumeration as "no other
214
+ projects" would skip the confirmation and wipe every project precisely
215
+ when we cannot say what would be lost.
216
+ """
217
+ try:
218
+ return sorted(ingestor.list_projects())
219
+ except Exception as exc:
220
+ logger.warning(ls.MG_LIST_PROJECTS_FAILED.format(error=exc))
221
+ return None
222
+
223
+
224
+ def _confirm_destructive_clean(
225
+ ingestor: MemgraphIngestor, project_name: str, assume_yes: bool
226
+ ) -> None:
227
+ """Abort unless the user accepts losing every other project in the graph."""
228
+ if assume_yes:
229
+ return
230
+
231
+ # `--clean` deletes the whole graph, so the prompt counts every project in
232
+ # it. Deriving that count from `others` would understate it by one whenever
233
+ # this project has not been synced yet and so is not in the graph.
234
+ projects = _projects_in_graph(ingestor)
235
+ if projects is None:
236
+ # Fail closed: an unreadable project list cannot show what the wipe
237
+ # would destroy, so it must not be read as an empty graph.
238
+ app_context.console.print(
239
+ style(cs.CLI_ERR_CLEAN_UNKNOWN_PROJECTS, cs.Color.RED)
240
+ )
241
+ raise typer.Exit(1)
242
+
243
+ others = [name for name in projects if name != project_name]
244
+ if not others:
245
+ return
246
+
247
+ app_context.console.print(
248
+ style(
249
+ cs.CLI_WARN_CLEAN_OTHER_PROJECTS.format(
250
+ project_name=project_name,
251
+ count=len(others),
252
+ projects=", ".join(others),
253
+ ),
254
+ cs.Color.YELLOW,
255
+ )
256
+ )
257
+
258
+ if not _stdin_is_interactive():
259
+ app_context.console.print(
260
+ style(
261
+ cs.CLI_ERR_CLEAN_NEEDS_CONFIRMATION.format(project_name=project_name),
262
+ cs.Color.RED,
263
+ )
264
+ )
265
+ raise typer.Exit(1)
266
+
267
+ confirmed = typer.confirm(
268
+ cs.CLI_PROMPT_CLEAN_CONFIRM.format(count=len(projects)), default=False
269
+ )
270
+ if not confirmed:
271
+ app_context.console.print(style(cs.CLI_MSG_CLEAN_ABORTED, cs.Color.CYAN))
272
+ raise typer.Exit(1)
273
+
274
+
202
275
  def _run_graph_sync(
203
276
  repo: Path,
204
277
  project_name: str,
@@ -209,6 +282,7 @@ def _run_graph_sync(
209
282
  output: str | None = None,
210
283
  capture: list[str] | None = None,
211
284
  skip_embeddings: bool | None = None,
285
+ assume_yes: bool = False,
212
286
  ) -> None:
213
287
  cgrignore = load_ignore_patterns(repo)
214
288
  cli_excludes = frozenset(exclude) if exclude else frozenset()
@@ -222,6 +296,7 @@ def _run_graph_sync(
222
296
  elapsed = time.monotonic()
223
297
  with connect_memgraph(batch_size) as ingestor:
224
298
  if clean:
299
+ _confirm_destructive_clean(ingestor, project_name, assume_yes)
225
300
  _info(style(cs.CLI_MSG_CLEANING_DB, cs.Color.YELLOW))
226
301
  ingestor.clean_database()
227
302
  _delete_hash_cache(repo)
@@ -336,6 +411,12 @@ def start(
336
411
  "--clean",
337
412
  help=ch.HELP_CLEAN_DB,
338
413
  ),
414
+ yes: bool = typer.Option(
415
+ False,
416
+ "--yes",
417
+ "-y",
418
+ help=ch.HELP_ASSUME_YES,
419
+ ),
339
420
  output: str | None = typer.Option(
340
421
  None,
341
422
  "-o",
@@ -452,6 +533,7 @@ def start(
452
533
  if clean and not update_graph:
453
534
  repo_to_clean = Path(target_repo_path)
454
535
  with connect_memgraph(effective_batch_size) as ingestor:
536
+ _confirm_destructive_clean(ingestor, resolved_project_name, yes)
455
537
  _info(style(cs.CLI_MSG_CLEANING_DB, cs.Color.YELLOW))
456
538
  ingestor.clean_database()
457
539
 
@@ -481,6 +563,7 @@ def start(
481
563
  output=output,
482
564
  capture=capture,
483
565
  skip_embeddings=no_embeddings or None,
566
+ assume_yes=yes,
484
567
  )
485
568
  _info(style(cs.CLI_MSG_GRAPH_UPDATED, cs.Color.GREEN))
486
569
  return
@@ -124,7 +124,7 @@ HELP_MEMGRAPH_HOST = "Memgraph host."
124
124
  HELP_MEMGRAPH_PORT = "Memgraph port."
125
125
  HELP_ORCHESTRATOR = (
126
126
  "Model for the planning assistant, in provider:model form "
127
- "(for example openai:gpt-4 or ollama:llama3.2)."
127
+ "(for example openai:gpt-5.6-terra or ollama:qwen2.5-coder)."
128
128
  )
129
129
  HELP_CYPHER_MODEL = "Model used to generate Cypher, in provider:model form."
130
130
  HELP_NO_CONFIRM = "Skip edit confirmation prompts."
@@ -146,8 +146,13 @@ HELP_MAX_WAIT = (
146
146
 
147
147
  HELP_UPDATE_GRAPH = "Parse the repository and sync its graph before continuing."
148
148
  HELP_CLEAN_DB = (
149
- "Delete every project from the shared graph and clear the selected repository's "
150
- "sync cache. With --update-graph, rebuild after deletion."
149
+ "DESTRUCTIVE: Delete every project from the shared graph and clear the selected "
150
+ "repository's sync cache. With --update-graph, rebuild after deletion. Asks for "
151
+ "confirmation when other projects would be destroyed; use --yes to skip the prompt."
152
+ )
153
+ HELP_ASSUME_YES = (
154
+ "Answer yes to destructive confirmations, such as the one --clean asks before "
155
+ "deleting other projects from the shared graph."
151
156
  )
152
157
  HELP_OUTPUT_GRAPH = "Write the updated graph to PATH as JSON. Requires --update-graph."
153
158
  HELP_OUTPUT_PATH = "Write the exported graph to PATH."
@@ -1,9 +1,13 @@
1
1
  # Go tree-sitter node types.
2
2
 
3
+ TS_GO_PACKAGE_CLAUSE = "package_clause"
4
+ TS_GO_PACKAGE_IDENTIFIER = "package_identifier"
3
5
  TS_GO_TYPE_DECLARATION = "type_declaration"
4
6
  TS_GO_TYPE_SPEC = "type_spec"
5
7
  TS_GO_TYPE_ALIAS = "type_alias"
6
8
  TS_GO_STRUCT_TYPE = "struct_type"
9
+ TS_GO_METHOD_ELEM = "method_elem"
10
+ TS_GO_BLOCK = "block"
7
11
  TS_GO_SELECTOR_EXPRESSION = "selector_expression"
8
12
  TS_GO_TYPE_ASSERTION_EXPRESSION = "type_assertion_expression"
9
13
  # A Go source file ending in `_test.go` is compiled only under `go test`; its
@@ -238,3 +238,8 @@ JAVA_SRC_FOLDERS = frozenset(
238
238
  JAVA_PATH_TEST,
239
239
  }
240
240
  )
241
+
242
+ JAVA_MAVEN_SOURCE_ROOTS = (
243
+ (JAVA_PATH_SRC, JAVA_PATH_MAIN, JAVA_PATH_JAVA),
244
+ (JAVA_PATH_SRC, JAVA_PATH_TEST, JAVA_PATH_JAVA),
245
+ )