code-graph-rag 0.0.484__tar.gz → 0.0.534__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 (273) hide show
  1. {code_graph_rag-0.0.484/code_graph_rag.egg-info → code_graph_rag-0.0.534}/PKG-INFO +37 -6
  2. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/PYPI_README.md +36 -5
  3. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534/code_graph_rag.egg-info}/PKG-INFO +37 -6
  4. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/code_graph_rag.egg-info/SOURCES.txt +5 -0
  5. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_go.py +4 -0
  6. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_js.py +57 -3
  7. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_nodes.py +22 -1
  8. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_python.py +1 -0
  9. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_rust.py +21 -0
  10. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/core.py +3 -1
  11. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/deadcode_roots.py +108 -0
  12. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/deps.py +2 -0
  13. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/fqn_specs.py +9 -0
  14. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/graph.py +8 -0
  15. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/lang_tooling.py +7 -1
  16. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/languages.py +48 -0
  17. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/cypher_queries.py +6 -2
  18. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/dead_code.py +370 -9
  19. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/graph_updater.py +73 -14
  20. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/language_spec.py +7 -0
  21. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/logs.py +5 -0
  22. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/main.py +2 -2
  23. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/call_processor.py +2116 -96
  24. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/call_resolver.py +651 -31
  25. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/mixin.py +102 -5
  26. code_graph_rag-0.0.534/codebase_rag/parsers/contract_linking.py +256 -0
  27. code_graph_rag-0.0.534/codebase_rag/parsers/contracts.py +294 -0
  28. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/definition_processor.py +25 -0
  29. code_graph_rag-0.0.534/codebase_rag/parsers/dispatch_registry.py +401 -0
  30. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/endpoint_routes.py +47 -7
  31. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/endpoints.py +5 -1
  32. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/factory.py +4 -0
  33. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/function_ingest.py +57 -34
  34. code_graph_rag-0.0.534/codebase_rag/parsers/go/module_paths.py +153 -0
  35. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/go/type_inference.py +5 -5
  36. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/go/utils.py +12 -0
  37. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/rust.py +19 -10
  38. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/import_processor.py +1117 -25
  39. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/io_access/constants.py +17 -0
  40. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/io_access/descriptor.py +10 -0
  41. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/io_access/extract.py +12 -6
  42. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/io_access/processor.py +169 -20
  43. code_graph_rag-0.0.534/codebase_rag/parsers/js_ts/__init__.py +11 -0
  44. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/js_ts/ingest.py +10 -4
  45. code_graph_rag-0.0.534/codebase_rag/parsers/js_ts/module_paths.py +316 -0
  46. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/js_ts/module_system.py +126 -3
  47. code_graph_rag-0.0.534/codebase_rag/parsers/js_ts/type_inference.py +619 -0
  48. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/js_ts/utils.py +65 -0
  49. code_graph_rag-0.0.534/codebase_rag/parsers/rpc_exposure.py +598 -0
  50. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/rs/utils.py +157 -0
  51. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/type_inference.py +31 -14
  52. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/utils.py +21 -3
  53. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/services/protobuf_service.py +30 -20
  54. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/language.py +284 -54
  55. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/types_defs.py +8 -2
  56. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codec/schema_pb2.py +29 -29
  57. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codec/schema_pb2.pyi +43 -21
  58. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/pyproject.toml +1 -1
  59. code_graph_rag-0.0.484/codebase_rag/parsers/go/module_paths.py +0 -64
  60. code_graph_rag-0.0.484/codebase_rag/parsers/js_ts/__init__.py +0 -5
  61. code_graph_rag-0.0.484/codebase_rag/parsers/js_ts/type_inference.py +0 -261
  62. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/LICENSE +0 -0
  63. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/README.md +0 -0
  64. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/cgr/__init__.py +0 -0
  65. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/code_graph_rag.egg-info/dependency_links.txt +0 -0
  66. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/code_graph_rag.egg-info/entry_points.txt +0 -0
  67. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/code_graph_rag.egg-info/requires.txt +0 -0
  68. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/code_graph_rag.egg-info/top_level.txt +0 -0
  69. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/__init__.py +0 -0
  70. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/__init__.py +0 -0
  71. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_analyzer.py +0 -0
  72. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/c.yaml +0 -0
  73. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/cpp.yaml +0 -0
  74. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/csharp.yaml +0 -0
  75. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/dart.yaml +0 -0
  76. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/go.yaml +0 -0
  77. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/java.yaml +0 -0
  78. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/javascript.yaml +0 -0
  79. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/lua.yaml +0 -0
  80. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/php.yaml +0 -0
  81. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/python.yaml +0 -0
  82. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/ruby.yaml +0 -0
  83. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/rust.yaml +0 -0
  84. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/scala.yaml +0 -0
  85. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/tsx.yaml +0 -0
  86. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/patterns/typescript.yaml +0 -0
  87. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/c.yaml +0 -0
  88. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/cpp.yaml +0 -0
  89. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/csharp.yaml +0 -0
  90. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/dart.yaml +0 -0
  91. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/go.yaml +0 -0
  92. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/java.yaml +0 -0
  93. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/javascript.yaml +0 -0
  94. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/lua.yaml +0 -0
  95. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/php.yaml +0 -0
  96. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/python.yaml +0 -0
  97. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/ruby.yaml +0 -0
  98. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/rust.yaml +0 -0
  99. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/scala.yaml +0 -0
  100. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/tsx.yaml +0 -0
  101. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/security/typescript.yaml +0 -0
  102. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/c.yaml +0 -0
  103. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/cpp.yaml +0 -0
  104. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/csharp.yaml +0 -0
  105. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/dart.yaml +0 -0
  106. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/go.yaml +0 -0
  107. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/java.yaml +0 -0
  108. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/javascript.yaml +0 -0
  109. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/lua.yaml +0 -0
  110. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/php.yaml +0 -0
  111. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/python.yaml +0 -0
  112. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/ruby.yaml +0 -0
  113. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/rust.yaml +0 -0
  114. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/scala.yaml +0 -0
  115. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/tsx.yaml +0 -0
  116. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/analyzers/ast_grep_rules/smells/typescript.yaml +0 -0
  117. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/ast_cache.py +0 -0
  118. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/capture.py +0 -0
  119. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/cgr_state.py +0 -0
  120. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/cli.py +0 -0
  121. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/cli_help.py +0 -0
  122. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/config.py +0 -0
  123. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/__init__.py +0 -0
  124. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_cpp.py +0 -0
  125. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_csharp.py +0 -0
  126. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_dart.py +0 -0
  127. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_java.py +0 -0
  128. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_lua.py +0 -0
  129. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_php.py +0 -0
  130. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/ast_scala.py +0 -0
  131. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/build.py +0 -0
  132. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/cli.py +0 -0
  133. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/health.py +0 -0
  134. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/mcp.py +0 -0
  135. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/providers.py +0 -0
  136. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/security.py +0 -0
  137. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/stdlib_types.py +0 -0
  138. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/constants/structural.py +0 -0
  139. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/decorators.py +0 -0
  140. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/docker-compose.yaml +0 -0
  141. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/embedder.py +0 -0
  142. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/exceptions.py +0 -0
  143. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/function_registry.py +0 -0
  144. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/graph_audit.py +0 -0
  145. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/graph_loader.py +0 -0
  146. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/mcp/__init__.py +0 -0
  147. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/mcp/client.py +0 -0
  148. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/mcp/server.py +0 -0
  149. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/mcp/tools.py +0 -0
  150. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/models.py +0 -0
  151. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parser_fingerprint.py +0 -0
  152. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parser_loader.py +0 -0
  153. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/__init__.py +0 -0
  154. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/ast_grep_patterns/ruby.yaml +0 -0
  155. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/ast_grep_tier.py +0 -0
  156. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/__init__.py +0 -0
  157. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/cpp_modules.py +0 -0
  158. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/identity.py +0 -0
  159. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/method_override.py +0 -0
  160. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/node_type.py +0 -0
  161. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/parent_extraction.py +0 -0
  162. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/relationships.py +0 -0
  163. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/class_ingest/utils.py +0 -0
  164. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/cpp/__init__.py +0 -0
  165. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/cpp/preproc_recovery.py +0 -0
  166. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/cpp/type_inference.py +0 -0
  167. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/cpp/utils.py +0 -0
  168. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/cpp_frontend/__init__.py +0 -0
  169. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/cpp_frontend/constants.py +0 -0
  170. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/cpp_frontend/frontend.py +0 -0
  171. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/cpp_frontend/qn.py +0 -0
  172. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/csharp/__init__.py +0 -0
  173. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/csharp/type_inference.py +0 -0
  174. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/csharp/utils.py +0 -0
  175. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/csharp_frontend/__init__.py +0 -0
  176. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/csharp_frontend/frontend.py +0 -0
  177. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.cs +0 -0
  178. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.csproj +0 -0
  179. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/csharp_frontend/roslyn/Program.cs +0 -0
  180. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/dart/__init__.py +0 -0
  181. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/dart/type_inference.py +0 -0
  182. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/dart/utils.py +0 -0
  183. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/dependency_parser.py +0 -0
  184. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/endpoint_prefixes.py +0 -0
  185. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/export_detection.py +0 -0
  186. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/flow_access/__init__.py +0 -0
  187. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/flow_access/constants.py +0 -0
  188. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/flow_access/processor.py +0 -0
  189. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/go/__init__.py +0 -0
  190. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/__init__.py +0 -0
  191. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/base.py +0 -0
  192. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/cpp.py +0 -0
  193. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/java.py +0 -0
  194. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/js_ts.py +0 -0
  195. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/lua.py +0 -0
  196. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/php.py +0 -0
  197. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/protocol.py +0 -0
  198. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/python.py +0 -0
  199. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/handlers/registry.py +0 -0
  200. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/io_access/__init__.py +0 -0
  201. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/io_access/models.py +0 -0
  202. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/io_access/registry.py +0 -0
  203. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/java/__init__.py +0 -0
  204. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/java/method_resolver.py +0 -0
  205. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/java/type_inference.py +0 -0
  206. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/java/type_resolver.py +0 -0
  207. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/java/utils.py +0 -0
  208. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/java/variable_analyzer.py +0 -0
  209. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/lua/__init__.py +0 -0
  210. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/lua/type_inference.py +0 -0
  211. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/lua/utils.py +0 -0
  212. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/py/__init__.py +0 -0
  213. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/py/ast_analyzer.py +0 -0
  214. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/py/expression_analyzer.py +0 -0
  215. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/py/type_inference.py +0 -0
  216. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/py/utils.py +0 -0
  217. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/py/variable_analyzer.py +0 -0
  218. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/python_source_roots.py +0 -0
  219. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/rs/__init__.py +0 -0
  220. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/rs/type_inference.py +0 -0
  221. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/stdlib_extractor.py +0 -0
  222. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/parsers/structure_processor.py +0 -0
  223. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/path_filters.py +0 -0
  224. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/prompts.py +0 -0
  225. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/providers/__init__.py +0 -0
  226. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/providers/base.py +0 -0
  227. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/providers/litellm.py +0 -0
  228. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/readme_sections.py +0 -0
  229. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/schema_builder.py +0 -0
  230. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/schemas.py +0 -0
  231. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/services/__init__.py +0 -0
  232. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/services/anthropic_token_counter.py +0 -0
  233. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/services/filtering.py +0 -0
  234. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/services/graph_service.py +0 -0
  235. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/services/llm.py +0 -0
  236. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/services/resource_cleanup.py +0 -0
  237. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/services/usage_cost.py +0 -0
  238. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/stack/__init__.py +0 -0
  239. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/stack/cli.py +0 -0
  240. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/stack/constants.py +0 -0
  241. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/stack/health.py +0 -0
  242. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/stack/manager.py +0 -0
  243. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tool_errors.py +0 -0
  244. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/__init__.py +0 -0
  245. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/ast_grep_service.py +0 -0
  246. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/code_retrieval.py +0 -0
  247. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/codebase_query.py +0 -0
  248. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/directory_lister.py +0 -0
  249. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/file_editor.py +0 -0
  250. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/file_reader.py +0 -0
  251. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/file_writer.py +0 -0
  252. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/health_checker.py +0 -0
  253. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/semantic_search.py +0 -0
  254. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/shell_command.py +0 -0
  255. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/structural_editor.py +0 -0
  256. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/structural_search.py +0 -0
  257. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/tools/tool_descriptions.py +0 -0
  258. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/unixcoder.py +0 -0
  259. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/utils/__init__.py +0 -0
  260. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/utils/dependencies.py +0 -0
  261. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/utils/fqn_resolver.py +0 -0
  262. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/utils/path_utils.py +0 -0
  263. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/utils/rich_markdown.py +0 -0
  264. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/utils/source_extraction.py +0 -0
  265. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/utils/token_utils.py +0 -0
  266. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/vector_store.py +0 -0
  267. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/workspaces/__init__.py +0 -0
  268. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/workspaces/cli.py +0 -0
  269. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/workspaces/constants.py +0 -0
  270. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/workspaces/models.py +0 -0
  271. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codebase_rag/workspaces/storage.py +0 -0
  272. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/codec/__init__.py +0 -0
  273. {code_graph_rag-0.0.484 → code_graph_rag-0.0.534}/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.534
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
@@ -76,7 +76,25 @@ Dynamic: license-file
76
76
 
77
77
  # Code-Graph-RAG
78
78
 
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.
79
+ 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.
80
+
81
+ ## What It Does
82
+
83
+ 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:
84
+
85
+ - Ask questions about the codebase in natural language and get answers grounded in the real structure.
86
+ - Retrieve the actual source of any function, class, or method by name or by intent.
87
+ - Edit code through the agent with AST-based surgical patching and a diff preview before anything changes.
88
+ - Search and rewrite code structurally by AST pattern with ast-grep, instead of text or regex.
89
+ - Trace data flow through assignments, calls, and I/O sinks via `FLOWS_TO` taint edges.
90
+ - Optimise code against language best practices or your own coding standards.
91
+ - Find dead code by walking call and reference edges from entry points.
92
+ - Group several repositories into a named workspace and query them as one graph.
93
+ - 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.
94
+
95
+ ## Supported Languages
96
+
97
+ 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
98
 
81
99
  ## Install
82
100
 
@@ -154,18 +172,31 @@ cgr dead-code --format json --fail-on-found # CI-friendly report
154
172
  Results are candidates for review, not a guaranteed delete list. See the
155
173
  [Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
156
174
 
157
- **Run as an MCP server (for Claude Code):**
175
+ **Group repositories into a workspace and query them together:**
158
176
 
159
177
  ```bash
160
- cgr mcp-server
178
+ cgr workspace create my-platform
179
+ cgr workspace add-repo my-platform ./service-a
180
+ cgr workspace add-repo my-platform ./service-b
181
+ cgr start --workspace my-platform
161
182
  ```
162
183
 
163
- **Check your setup:**
184
+ **Inspect the graph and the stack:**
164
185
 
165
186
  ```bash
166
- cgr doctor
187
+ cgr stats # node and relationship counts
188
+ cgr status # stack state and last sync per project
189
+ cgr doctor # check dependencies and configuration
167
190
  ```
168
191
 
192
+ ## MCP Server
193
+
194
+ Run `cgr mcp-server` to serve the tools over stdio or HTTP for Claude Code and other MCP clients. The MCP surface registers:
195
+
196
+ - **Ask and retrieve:** `ask_agent`, `query_code_graph`, `get_code_snippet`, and `semantic_search` (needs the `semantic` extra)
197
+ - **Structural editing:** `surgical_replace_code`, plus `structural_search` and `structural_replace` (need the `ast-grep` extra)
198
+ - **Files and projects:** `read_file`, `write_file`, `list_directory`, `list_projects`, `index_repository`, `update_repository`, `delete_project`, `wipe_database`
199
+
169
200
  ## Python SDK
170
201
 
171
202
  The `cgr` package provides short imports for programmatic use.
@@ -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.
@@ -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.534
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
@@ -76,7 +76,25 @@ Dynamic: license-file
76
76
 
77
77
  # Code-Graph-RAG
78
78
 
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.
79
+ 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.
80
+
81
+ ## What It Does
82
+
83
+ 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:
84
+
85
+ - Ask questions about the codebase in natural language and get answers grounded in the real structure.
86
+ - Retrieve the actual source of any function, class, or method by name or by intent.
87
+ - Edit code through the agent with AST-based surgical patching and a diff preview before anything changes.
88
+ - Search and rewrite code structurally by AST pattern with ast-grep, instead of text or regex.
89
+ - Trace data flow through assignments, calls, and I/O sinks via `FLOWS_TO` taint edges.
90
+ - Optimise code against language best practices or your own coding standards.
91
+ - Find dead code by walking call and reference edges from entry points.
92
+ - Group several repositories into a named workspace and query them as one graph.
93
+ - 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.
94
+
95
+ ## Supported Languages
96
+
97
+ 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
98
 
81
99
  ## Install
82
100
 
@@ -154,18 +172,31 @@ cgr dead-code --format json --fail-on-found # CI-friendly report
154
172
  Results are candidates for review, not a guaranteed delete list. See the
155
173
  [Dead Code Detection guide](https://docs.code-graph-rag.com/guide/dead-code/).
156
174
 
157
- **Run as an MCP server (for Claude Code):**
175
+ **Group repositories into a workspace and query them together:**
158
176
 
159
177
  ```bash
160
- cgr mcp-server
178
+ cgr workspace create my-platform
179
+ cgr workspace add-repo my-platform ./service-a
180
+ cgr workspace add-repo my-platform ./service-b
181
+ cgr start --workspace my-platform
161
182
  ```
162
183
 
163
- **Check your setup:**
184
+ **Inspect the graph and the stack:**
164
185
 
165
186
  ```bash
166
- cgr doctor
187
+ cgr stats # node and relationship counts
188
+ cgr status # stack state and last sync per project
189
+ cgr doctor # check dependencies and configuration
167
190
  ```
168
191
 
192
+ ## MCP Server
193
+
194
+ Run `cgr mcp-server` to serve the tools over stdio or HTTP for Claude Code and other MCP clients. The MCP surface registers:
195
+
196
+ - **Ask and retrieve:** `ask_agent`, `query_code_graph`, `get_code_snippet`, and `semantic_search` (needs the `semantic` extra)
197
+ - **Structural editing:** `surgical_replace_code`, plus `structural_search` and `structural_replace` (need the `ast-grep` extra)
198
+ - **Files and projects:** `read_file`, `write_file`, `list_directory`, `list_projects`, `index_repository`, `update_repository`, `delete_project`, `wipe_database`
199
+
169
200
  ## Python SDK
170
201
 
171
202
  The `cgr` package provides short imports for programmatic use.
@@ -124,8 +124,11 @@ codebase_rag/parsers/__init__.py
124
124
  codebase_rag/parsers/ast_grep_tier.py
125
125
  codebase_rag/parsers/call_processor.py
126
126
  codebase_rag/parsers/call_resolver.py
127
+ codebase_rag/parsers/contract_linking.py
128
+ codebase_rag/parsers/contracts.py
127
129
  codebase_rag/parsers/definition_processor.py
128
130
  codebase_rag/parsers/dependency_parser.py
131
+ codebase_rag/parsers/dispatch_registry.py
129
132
  codebase_rag/parsers/endpoint_prefixes.py
130
133
  codebase_rag/parsers/endpoint_routes.py
131
134
  codebase_rag/parsers/endpoints.py
@@ -134,6 +137,7 @@ codebase_rag/parsers/factory.py
134
137
  codebase_rag/parsers/function_ingest.py
135
138
  codebase_rag/parsers/import_processor.py
136
139
  codebase_rag/parsers/python_source_roots.py
140
+ codebase_rag/parsers/rpc_exposure.py
137
141
  codebase_rag/parsers/stdlib_extractor.py
138
142
  codebase_rag/parsers/structure_processor.py
139
143
  codebase_rag/parsers/type_inference.py
@@ -200,6 +204,7 @@ codebase_rag/parsers/java/utils.py
200
204
  codebase_rag/parsers/java/variable_analyzer.py
201
205
  codebase_rag/parsers/js_ts/__init__.py
202
206
  codebase_rag/parsers/js_ts/ingest.py
207
+ codebase_rag/parsers/js_ts/module_paths.py
203
208
  codebase_rag/parsers/js_ts/module_system.py
204
209
  codebase_rag/parsers/js_ts/type_inference.py
205
210
  codebase_rag/parsers/js_ts/utils.py
@@ -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
@@ -77,11 +77,18 @@ TS_ARRAY = "array"
77
77
  # name; arrows nested under a const-bound object still take the object's name.
78
78
  JS_CALL_RESULT_VALUE_TYPES = frozenset({TS_CALL_EXPRESSION, TS_NEW_EXPRESSION})
79
79
  TS_FUNCTION_EXPRESSION = "function_expression"
80
+ # The `get` accessor keyword prefixing a getter `method_definition`
81
+ # (`get thing() {...}`); its presence marks the method as a property whose
82
+ # reads are member accesses, not invocations.
83
+ TS_GET_ACCESSOR_KEYWORD = "get"
80
84
  TS_ARROW_FUNCTION = "arrow_function"
81
85
  TS_REQUIRED_PARAMETER = "required_parameter"
82
86
  TS_OPTIONAL_PARAMETER = "optional_parameter"
83
87
  TS_ASSIGNMENT_PATTERN = "assignment_pattern"
84
88
  TS_JS_ASSIGNMENT_EXPRESSION = "assignment_expression"
89
+ # A class field holding a value (`log = noop`); `name` is the property, `value`
90
+ # is the initializer. Used to reference a NAMED function a field binds.
91
+ TS_PUBLIC_FIELD_DEFINITION = "public_field_definition"
85
92
  # `x += v` and friends: reads the old value AND writes the new one.
86
93
  TS_JS_AUGMENTED_ASSIGNMENT_EXPRESSION = "augmented_assignment_expression"
87
94
  # `x++` / `--x`: also a read-then-write; the operand is the `argument` field.
@@ -93,6 +100,16 @@ TS_MODULE = "module"
93
100
  TS_CLASS_BODY = "class_body"
94
101
 
95
102
  TS_PROPERTY_IDENTIFIER = "property_identifier"
103
+ # `[expr]` as an object-literal / class-member key.
104
+ TS_JS_COMPUTED_PROPERTY_NAME = "computed_property_name"
105
+ # The `(a, b = 1, ...rest)` parameter list of a function.
106
+ TS_JS_FORMAL_PARAMETERS = "formal_parameters"
107
+ # A class field in the JS grammar (`[k] = v` in a class body); TS spells it
108
+ # public_field_definition. Its key sits in the `property` field.
109
+ TS_JS_FIELD_DEFINITION = "field_definition"
110
+ # The Symbol global: `Symbol('x')` / `Symbol.for('x')` mint the unique keys
111
+ # that symbol-keyed member dispatch (issue #989) indexes.
112
+ JS_SYMBOL_GLOBAL = "Symbol"
96
113
 
97
114
  # JS prototype property keywords
98
115
  JS_PROTOTYPE_KEYWORD = "prototype"
@@ -134,14 +151,14 @@ JS_PROTOTYPE_METHOD_QUERY = """
134
151
  object: (identifier) @constructor_name
135
152
  property: (property_identifier) @prototype_keyword (#eq? @prototype_keyword "prototype"))
136
153
  property: (property_identifier) @method_name)
137
- right: (function_expression) @method_function)
154
+ right: [(function_expression) (generator_function)] @method_function)
138
155
  """
139
156
 
140
157
  # JS object method query
141
158
  JS_OBJECT_METHOD_QUERY = """
142
159
  (pair
143
160
  key: (property_identifier) @method_name
144
- value: (function_expression) @method_function)
161
+ value: [(function_expression) (generator_function)] @method_function)
145
162
  """
146
163
 
147
164
  # JS method definition query
@@ -170,7 +187,7 @@ JS_ASSIGNMENT_ARROW_QUERY = """
170
187
  JS_ASSIGNMENT_FUNCTION_QUERY = """
171
188
  (assignment_expression
172
189
  (member_expression) @member_expr
173
- (function_expression) @function_expr)
190
+ [(function_expression) (generator_function)] @function_expr)
174
191
  """
175
192
 
176
193
  # JS/TS control-flow node types + fields for the path-sensitive taint walk
@@ -187,17 +204,36 @@ TS_JS_SWITCH_DEFAULT = "switch_default"
187
204
  # `c ? a : b` (shared name with the Java grammar); C++ spells it
188
205
  # conditional_expression.
189
206
  TS_JS_TERNARY_EXPRESSION = "ternary_expression"
207
+ # tree-sitter-javascript parses `await (X)()` as a CALL to an identifier
208
+ # spelled `await` with X as its argument (the TS grammar does not); climbs
209
+ # treat that call as the transparent await it denotes.
210
+ JS_AWAIT_IDENTIFIER = "await"
190
211
  # Short-circuit operators whose result IS one of the operands, so a
191
212
  # bind through them unions both operands' taints.
192
213
  JS_SHORT_CIRCUIT_OPERATORS: frozenset[str] = frozenset({"||", "??", "&&"})
214
+ # The computed-name leaf prefix of a well-known-symbol class member
215
+ # (`[Symbol.iterator]`, `[Symbol.toStringTag]`) as the definition pass
216
+ # registers it; user symbol keys register without the `Symbol.` path.
217
+ JS_WELL_KNOWN_SYMBOL_NAME_PREFIX = "[Symbol."
218
+ JS_COMPUTED_NAME_SUFFIX = "]"
219
+ JS_WELL_KNOWN_SYMBOL_BRACKET_PREFIX = "[Symbol["
220
+ # `&&` alone among them cannot yield its LEFT operand as a function value.
221
+ JS_OPERATOR_LOGICAL_AND = "&&"
193
222
  TS_JS_ELSE_CLAUSE = "else_clause"
194
223
  TS_JS_WHILE_STATEMENT = "while_statement"
195
224
  TS_JS_FOR_STATEMENT = "for_statement"
196
225
  TS_JS_FOR_IN_STATEMENT = "for_in_statement"
197
226
  TS_JS_TRY_STATEMENT = "try_statement"
198
227
  TS_JS_CATCH_CLAUSE = "catch_clause"
228
+ # `(a, b)`: the comma operator; its value is the LAST operand.
229
+ TS_JS_SEQUENCE_EXPRESSION = "sequence_expression"
230
+ TS_JS_SWITCH_BODY = "switch_body"
231
+ # `for (var x of xs)` hoists x to the function; only this `kind` widens the
232
+ # loop binding's scope past the for statement itself.
233
+ TS_JS_VAR_KIND = "var"
199
234
  TS_JS_FINALLY_CLAUSE = "finally_clause"
200
235
  FIELD_ALTERNATIVE = "alternative"
236
+ FIELD_CONSEQUENCE = "consequence"
201
237
  FIELD_HANDLER = "handler"
202
238
  FIELD_FINALIZER = "finalizer"
203
239
  # The C-style `for (init; cond; increment)` update clause, which runs AFTER the
@@ -205,18 +241,25 @@ FIELD_FINALIZER = "finalizer"
205
241
  FIELD_INCREMENT = "increment"
206
242
 
207
243
  # JS/TS module system node types
244
+ TS_TYPE_ANNOTATION = "type_annotation"
245
+ TS_IMPORT_ALIAS = "import_alias"
246
+ TS_JS_WITH_STATEMENT = "with_statement"
247
+ TS_CLASS_STATIC_BLOCK = "class_static_block"
208
248
  TS_OBJECT_PATTERN = "object_pattern"
209
249
  TS_ARRAY_PATTERN = "array_pattern"
210
250
  TS_REST_PATTERN = "rest_pattern"
211
251
  TS_SHORTHAND_PROPERTY_IDENTIFIER_PATTERN = "shorthand_property_identifier_pattern"
212
252
  TS_SHORTHAND_PROPERTY_IDENTIFIER = "shorthand_property_identifier"
213
253
  TS_PAIR_PATTERN = "pair_pattern"
254
+ # `{ a = dflt }` in a destructuring pattern: `left` binds, `right` is a READ.
255
+ TS_OBJECT_ASSIGNMENT_PATTERN = "object_assignment_pattern"
214
256
  # `process.env.X` is a member_expression; `process.env['X']` a subscript, used
215
257
  # to detect environment-variable reads (issue #714 process.env follow-up).
216
258
  TS_SUBSCRIPT_EXPRESSION = "subscript_expression"
217
259
  TS_FIELD_INDEX = "index"
218
260
  TS_FUNCTION_DECLARATION = "function_declaration"
219
261
  TS_GENERATOR_FUNCTION_DECLARATION = "generator_function_declaration"
262
+ TS_GENERATOR_FUNCTION = "generator_function"
220
263
 
221
264
  # Tree-sitter field names for module system
222
265
  FIELD_FUNCTION = "function"
@@ -255,6 +298,17 @@ JS_COMMONJS_EXPORTS_FUNCTION_QUERY = """
255
298
  """
256
299
 
257
300
  # JS/TS CommonJS module.exports query
301
+ # The DIRECT form `module.exports = function (...) {...}` / arrow: the whole
302
+ # module IS one function (fastify's generated error-serializer). Two-level
303
+ # member on the left, unlike the three-level named-property form below.
304
+ JS_COMMONJS_DIRECT_EXPORT_QUERY = """
305
+ (assignment_expression
306
+ left: (member_expression
307
+ object: (identifier) @module_obj
308
+ property: (property_identifier) @exports_prop)
309
+ right: [(function_expression) (arrow_function) (call_expression)] @export_function)
310
+ """
311
+
258
312
  JS_COMMONJS_MODULE_EXPORTS_QUERY = """
259
313
  (assignment_expression
260
314
  left: (member_expression
@@ -51,11 +51,18 @@ IMPORT_NODES_INCLUDE = ("preproc_include",)
51
51
  JS_TS_FUNCTION_NODES = (
52
52
  "function_declaration",
53
53
  "generator_function_declaration",
54
+ # The generator EXPRESSION (`const g = function* () {}`) is a function
55
+ # value like function_expression; omitting it left such nodes
56
+ # unregistered and unreferencable (issue #994).
57
+ "generator_function",
54
58
  "function_expression",
55
59
  "arrow_function",
56
60
  "method_definition",
57
61
  )
58
- JS_TS_CLASS_NODES = ("class_declaration", "class")
62
+ # The anonymous class-expression node type (`const X = class {...}`); the named
63
+ # form is `class_declaration`.
64
+ TS_CLASS_EXPRESSION = "class"
65
+ JS_TS_CLASS_NODES = ("class_declaration", TS_CLASS_EXPRESSION)
59
66
  JS_TS_IMPORT_NODES = (
60
67
  "import_statement",
61
68
  "lexical_declaration",
@@ -83,6 +90,10 @@ FIELD_RETURN_TYPE = "return_type"
83
90
  FIELD_CONSTRUCTOR = "constructor"
84
91
  FIELD_DECLARATOR = "declarator"
85
92
  FIELD_PARAMETERS = "parameters"
93
+ # A JS/TS arrow with a single bare-identifier parameter (`x => ...`) carries it
94
+ # in the singular `parameter` field, with no formal_parameters wrapper.
95
+ FIELD_PARAMETER = "parameter"
96
+ FIELD_KIND = "kind"
86
97
  FIELD_RECEIVER = "receiver"
87
98
  FIELD_TYPE = "type"
88
99
  # The wrapped function/class inside a Python decorated_definition node.
@@ -162,6 +173,16 @@ TS_STRING = "string"
162
173
  # JS/TS string literals hold their text in a string_fragment child (like
163
174
  # Python's string_content), used for I/O target extraction.
164
175
  TS_STRING_FRAGMENT = "string_fragment"
176
+ # The node type for an escaped char, spelled the same in every grammar we load
177
+ # but placed differently, so check the shape before reusing this anywhere new:
178
+ # JS/TS, Go, Rust, C/C++, C# and Java make it a SIBLING that splits the
179
+ # surrounding content into separate fragments, and a reader joining content
180
+ # children alone drops it and fuses the fragments either side (issue #944);
181
+ # Python and Lua nest it inside their content node, which needs no handling;
182
+ # Dart and Scala expose the escape as the only named child, with the plain
183
+ # text in hidden tokens, so a content-plus-escape join would return the escape
184
+ # ALONE (neither has an io_access descriptor today).
185
+ TS_ESCAPE_SEQUENCE = "escape_sequence"
165
186
  # Modern Node builtin imports carry a node: scheme (`import fs from 'node:fs'`);
166
187
  # stripped when checking whether an imported name is the builtin module.
167
188
  NODE_BUILTIN_PREFIX = "node:"
@@ -5,6 +5,7 @@ TS_PY_IDENTIFIER = "identifier"
5
5
  TS_PY_TYPED_PARAMETER = "typed_parameter"
6
6
  TS_PY_TYPED_DEFAULT_PARAMETER = "typed_default_parameter"
7
7
  TS_PY_ATTRIBUTE = "attribute"
8
+ TS_PY_FIELD_ATTRIBUTE = "attribute"
8
9
  TS_PY_CALL = "call"
9
10
  TS_PY_LIST = "list"
10
11
  TS_PY_DICTIONARY = "dictionary"
@@ -20,6 +20,8 @@ TS_RS_ENUM_ITEM = "enum_item"
20
20
  TS_RS_TRAIT_ITEM = "trait_item"
21
21
  TS_RS_TYPE_ITEM = "type_item"
22
22
  TS_RS_FUNCTION_ITEM = "function_item"
23
+ TS_RS_CONST_ITEM = "const_item"
24
+ TS_RS_STATIC_ITEM = "static_item"
23
25
  TS_RS_IMPL_ITEM = "impl_item"
24
26
  TS_RS_FUNCTION_SIGNATURE_ITEM = "function_signature_item"
25
27
  TS_RS_CLOSURE_EXPRESSION = "closure_expression"
@@ -35,6 +37,12 @@ TS_RS_BLOCK_COMMENT = "block_comment"
35
37
  RS_COMMENT_TYPES = (TS_RS_LINE_COMMENT, TS_RS_BLOCK_COMMENT)
36
38
  TS_RS_ATTRIBUTE_ITEM = "attribute_item"
37
39
  TS_RS_INNER_ATTRIBUTE_ITEM = "inner_attribute_item"
40
+ # The `#[cfg(test)]` gate in whitespace-normalised form: attributes are
41
+ # token streams, so extracted text is compared after dropping ALL
42
+ # whitespace (`#[cfg( test )]` names the same gate). Recorded on a mod
43
+ # declaration's TARGET module and read by dead-code test detection
44
+ # (issue #1010).
45
+ RS_CFG_TEST_ATTRIBUTE = "#[cfg(test)]"
38
46
 
39
47
  # Rust I/O direct-sink walk node types (issue #714). call_expression keeps a
40
48
  # `function` field (a scoped_identifier like `std::fs::write`), so call_name works
@@ -170,3 +178,16 @@ RS_ENCODING_UTF8 = "utf8"
170
178
  RS_WILDCARD_PREFIX = "*"
171
179
 
172
180
  RS_FIELD_ARGUMENT = "argument"
181
+
182
+ # Cargo target layout (issue #1007 crate-root discovery). Auto-target
183
+ # directories root every .rs file directly inside them; explicit target
184
+ # `path` overrides in the manifest sections below root the named file
185
+ # wherever it sits. Entry stems never root themselves as file targets.
186
+ RS_AUTO_TARGET_DIRS = frozenset({"examples", "tests", "benches"})
187
+ RS_BIN_DIR = "bin"
188
+ RS_BUILD_STEM = "build"
189
+ RS_ENTRY_STEMS = frozenset({"lib", "main", "mod"})
190
+ RS_MANIFEST_TARGET_SECTIONS = ("bin", "lib", "example", "test", "bench")
191
+ RS_MANIFEST_PATH_KEY = "path"
192
+ RS_MANIFEST_PACKAGE_KEY = "package"
193
+ RS_MANIFEST_BUILD_KEY = "build"
@@ -90,9 +90,11 @@ TEXT_UNKNOWN = "unknown"
90
90
  TMP_EXTENSION = ".tmp"
91
91
 
92
92
  MOD_RS = "mod.rs"
93
+ LIB_RS = "lib.rs"
94
+ MAIN_RS = "main.rs"
93
95
  SEPARATOR_DOUBLE_COLON = "::"
94
96
  SEPARATOR_PROTOTYPE = ".prototype."
95
- RUST_CRATE_PREFIX = "crate::"
97
+ RUST_CRATE_KEYWORD = "crate"
96
98
  BUILTIN_PREFIX = "builtin"
97
99
  IIFE_FUNC_PREFIX = "iife_func_"
98
100
  IIFE_ARROW_PREFIX = "iife_arrow_"
@@ -67,6 +67,24 @@ GO_ROOT_FUNCTION_NAMES: frozenset[str] = frozenset({"init", "main"})
67
67
  # call site -- a reachability root (gated by .rs).
68
68
  RUST_ROOT_FUNCTION_NAMES: frozenset[str] = frozenset({"main"})
69
69
 
70
+ # Rust test attributes: the harness invokes these functions with no call site.
71
+ # Bare names match exactly; scoped runner variants (#[tokio::test],
72
+ # #[async_std::test]) match by the ::test suffix. Gated by .rs (issue #1008).
73
+ RUST_TEST_ATTRIBUTE_NAMES: frozenset[str] = frozenset({"test", "bench"})
74
+ RUST_TEST_ATTRIBUTE_SUFFIX = "::test"
75
+
76
+ # The `#[cfg(test)] mod tests` convention: a real MODULE node named
77
+ # `tests` or `test` in a .rs file marks inline test code (issue #1008).
78
+ # This is deliberately WIDER than TEST_PATH_PATTERNS (whose /tests/ and
79
+ # /test/ entries match directory segments only, never a src/test.rs file
80
+ # or an inline mod): the name is a proxy for the `#[cfg(test)]` gate the
81
+ # graph does not yet record. Measured across a 972-crate corpus, 4155
82
+ # such modules are cfg-gated test code and 41 are ungated, of which two
83
+ # ship as production API (aws-lc-rs `pub mod test`, alacritty's terminal
84
+ # test helpers), both test-support by nature; that residual silencing is
85
+ # accepted until issue #1010 replaces the name proxy with cfg awareness.
86
+ RUST_TEST_MODULE_SEGMENTS: frozenset[str] = frozenset({"tests", "test"})
87
+
70
88
  # Rust trait-impl methods the language/std dispatches implicitly (Display::fmt
71
89
  # via format!, PartialEq::eq via ==, Iterator::next via for, operator traits,
72
90
  # Drop::drop, serde, ...), never through an explicit call the graph can see.
@@ -210,6 +228,96 @@ TEST_PATH_PATTERNS: tuple[str, ...] = (
210
228
  "__tests__",
211
229
  )
212
230
 
231
+ # NestJS component decorators that mark a CLASS as instantiated and driven by
232
+ # the DI container / framework, never by a first-party `new` the graph can see:
233
+ # `@Injectable` (providers/services), `@Controller`, `@Module`, `@Catch`
234
+ # (exception filters), `@Resolver` (GraphQL), `@WebSocketGateway`. Such a class's
235
+ # constructor is invoked by the container and its framework-contract methods by
236
+ # Nest, so both are reachability roots (gated by a JS/TS extension). Names are the
237
+ # lowercased, argument-stripped form _norm_decorator produces.
238
+ NEST_ROOT_CLASS_DECORATORS: frozenset[str] = frozenset(
239
+ {
240
+ "injectable",
241
+ "controller",
242
+ "module",
243
+ "catch",
244
+ "resolver",
245
+ "websocketgateway",
246
+ }
247
+ )
248
+
249
+ # NestJS async-options factory interfaces follow the `XxxOptionsFactory` naming
250
+ # convention (`TypeOrmOptionsFactory`, `MongooseOptionsFactory`,
251
+ # `GqlOptionsFactory`, ...). A class that `implements` one has its factory method
252
+ # invoked by Nest, so its methods are roots. Matched on the interface leaf name
253
+ # so only these framework contracts root (an unrelated third-party interface
254
+ # does not), gated to an EXTERNAL interface (outside the project prefix).
255
+ NEST_OPTIONS_FACTORY_SUFFIX = "OptionsFactory"
256
+
257
+ # NestJS methods invoked by the framework through a lifecycle or interface
258
+ # contract, never by a named call the graph can see: lifecycle hooks
259
+ # (`onModuleInit`, `onApplicationBootstrap`, ...) and the single-method
260
+ # interface contracts (`NestMiddleware.use`, `NestInterceptor.intercept`,
261
+ # `NestModule.configure`, `CanActivate.canActivate`, `ExceptionFilter.catch`,
262
+ # `PipeTransform.transform`). Rooted only on a method of a NestJS component
263
+ # class (a NEST_ROOT_CLASS_DECORATORS decorator), so a same-named ordinary
264
+ # method (`use`, `transform`) on a plain class is NOT force-rooted.
265
+ NEST_FRAMEWORK_METHOD_NAMES: frozenset[str] = frozenset(
266
+ {
267
+ "onModuleInit",
268
+ "onModuleDestroy",
269
+ "onApplicationBootstrap",
270
+ "onApplicationShutdown",
271
+ "beforeApplicationShutdown",
272
+ "configure",
273
+ "use",
274
+ "intercept",
275
+ "canActivate",
276
+ "catch",
277
+ "transform",
278
+ }
279
+ )
280
+
281
+ # React component base classes: a class that `extends` one of these is a class
282
+ # component whose lifecycle methods React drives at runtime. Matched on the base
283
+ # interface/class leaf name (`React.Component`, `PureComponent`, and the rarely
284
+ # spelled-out `React.PureComponent`), so the INHERITS target's last segment
285
+ # identifies it regardless of the import alias.
286
+ REACT_COMPONENT_BASE_NAMES: frozenset[str] = frozenset({"Component", "PureComponent"})
287
+
288
+ # The module namespace React's `Component`/`PureComponent` base lives in
289
+ # (`react.Component`, `React.Component`). The base's namespace must equal this
290
+ # EXACTLY (lowercased), so a look-alike (`preact.Component`, `notreact.Component`,
291
+ # Ember/Glimmer's `@glimmer/component.Component`) is not mistaken for React.
292
+ REACT_NAMESPACE_TOKEN = "react"
293
+
294
+ # React class-component lifecycle methods the runtime invokes (mount/update/
295
+ # unmount/render/error), plus the constructor React calls when it instantiates
296
+ # the component. Never called by a first-party call the graph can see, so they
297
+ # are reachability roots on a React component class (gated by INHERITS to a
298
+ # REACT_COMPONENT_BASE_NAMES base and a JS/TS extension); the methods and
299
+ # callbacks they reach via `this.` then expand from them.
300
+ REACT_LIFECYCLE_METHOD_NAMES: frozenset[str] = frozenset(
301
+ {
302
+ "render",
303
+ "constructor",
304
+ "componentDidMount",
305
+ "componentDidUpdate",
306
+ "componentWillUnmount",
307
+ "shouldComponentUpdate",
308
+ "getSnapshotBeforeUpdate",
309
+ "componentDidCatch",
310
+ "getDerivedStateFromProps",
311
+ "getDerivedStateFromError",
312
+ "componentWillMount",
313
+ "componentWillReceiveProps",
314
+ "componentWillUpdate",
315
+ "UNSAFE_componentWillMount",
316
+ "UNSAFE_componentWillReceiveProps",
317
+ "UNSAFE_componentWillUpdate",
318
+ }
319
+ )
320
+
213
321
  # Python Enum protocol hooks: the enum machinery invokes these sunder
214
322
  # METHODS by NAME (_generate_next_value_ on auto(), _missing_ on a failed
215
323
  # value lookup), never through a call the graph can see -- runtime roots
@@ -45,6 +45,8 @@ DEP_FILE_GOMOD = "go.mod"
45
45
  # the module's packages; a same-line comment (incl. `// Deprecated:`) may
46
46
  # trail it.
47
47
  GO_KEYWORD_MODULE = "module"
48
+ GO_KEYWORD_PACKAGE = "package"
49
+ GO_PACKAGE_MAIN = "main"
48
50
  GO_MOD_COMMENT_PREFIX = "//"
49
51
  DEP_FILE_GEMFILE = "gemfile"
50
52
  DEP_FILE_COMPOSER = "composer.json"