codegraphcontext 0.4.18__tar.gz → 0.5.1__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 (179) hide show
  1. {codegraphcontext-0.4.18/src/codegraphcontext.egg-info → codegraphcontext-0.5.1}/PKG-INFO +12 -6
  2. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/README.md +5 -5
  3. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/pyproject.toml +10 -1
  4. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/api/app.py +4 -1
  5. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/api/mcp_sse.py +10 -5
  6. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/api/router.py +3 -6
  7. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/cli_helpers.py +30 -8
  8. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/config_manager.py +50 -31
  9. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/hook_manager.py +1 -1
  10. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/main.py +92 -31
  11. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/registry_commands.py +11 -4
  12. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/setup_macos.py +6 -1
  13. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/visualizer.py +25 -1
  14. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/__init__.py +71 -10
  15. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/cgc_bundle.py +1 -1
  16. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/database_falkordb.py +41 -2
  17. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/database_kuzu.py +93 -53
  18. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/database_ladybug.py +55 -23
  19. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/jobs.py +7 -2
  20. codegraphcontext-0.5.1/src/codegraphcontext/core/watcher.py +325 -0
  21. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/prompts.py +1 -1
  22. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/server.py +54 -5
  23. codegraphcontext-0.5.1/src/codegraphcontext/stdlibs.py +18 -0
  24. codegraphcontext-0.5.1/src/codegraphcontext/tool_definitions.py +389 -0
  25. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/code_finder.py +17 -0
  26. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/graph_builder.py +260 -8
  27. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/handlers/analysis_handlers.py +5 -0
  28. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/handlers/indexing_handlers.py +4 -1
  29. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/handlers/management_handlers.py +9 -10
  30. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/handlers/query_handlers.py +21 -3
  31. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/handlers/watcher_handlers.py +2 -2
  32. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/persistence/writer.py +377 -47
  33. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/pipeline.py +22 -1
  34. codegraphcontext-0.5.1/src/codegraphcontext/tools/indexing/resolution/__init__.py +19 -0
  35. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/resolution/calls.py +485 -53
  36. codegraphcontext-0.5.1/src/codegraphcontext/tools/indexing/resolution/inheritance.py +547 -0
  37. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +40 -15
  38. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/schema.py +5 -0
  39. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/schema_contract.py +7 -0
  40. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/c.py +154 -2
  41. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/cpp.py +13 -1
  42. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/csharp.py +1 -0
  43. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/css.py +13 -4
  44. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/dart.py +170 -41
  45. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/elixir.py +9 -6
  46. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/go.py +56 -16
  47. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/haskell.py +80 -8
  48. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/html.py +23 -8
  49. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/javascript.py +2 -2
  50. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/lua.py +61 -19
  51. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/perl.py +37 -4
  52. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/php.py +56 -4
  53. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/python.py +11 -3
  54. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/rust.py +70 -6
  55. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/swift.py +61 -11
  56. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/typescript.py +63 -6
  57. codegraphcontext-0.5.1/src/codegraphcontext/tools/package_resolver.py +267 -0
  58. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/system.py +8 -1
  59. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1/src/codegraphcontext.egg-info}/PKG-INFO +12 -6
  60. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext.egg-info/SOURCES.txt +1 -0
  61. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext.egg-info/requires.txt +7 -0
  62. codegraphcontext-0.4.18/src/codegraphcontext/core/watcher.py +0 -468
  63. codegraphcontext-0.4.18/src/codegraphcontext/tool_definitions.py +0 -280
  64. codegraphcontext-0.4.18/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -9
  65. codegraphcontext-0.4.18/src/codegraphcontext/tools/indexing/resolution/inheritance.py +0 -111
  66. codegraphcontext-0.4.18/src/codegraphcontext/tools/package_resolver.py +0 -472
  67. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/LICENSE +0 -0
  68. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/MANIFEST.in +0 -0
  69. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/setup.cfg +0 -0
  70. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/__init__.py +0 -0
  71. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/__main__.py +0 -0
  72. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/api/__init__.py +0 -0
  73. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/api/schemas.py +0 -0
  74. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/__init__.py +0 -0
  75. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/cli/setup_wizard.py +0 -0
  76. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/bundle_registry.py +0 -0
  77. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/cgcignore.py +0 -0
  78. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/database.py +0 -0
  79. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
  80. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/database_nornic.py +0 -0
  81. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/core/falkor_worker.py +0 -0
  82. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/__init__.py +0 -0
  83. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
  84. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
  85. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +0 -0
  86. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/datasources/mysql_ingester.py +0 -0
  87. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
  88. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
  89. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/constants.py +0 -0
  90. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
  91. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
  92. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
  93. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
  94. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/pre_scan.py +0 -0
  95. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/sanitize.py +0 -0
  96. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/scip_pipeline.py +0 -0
  97. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
  98. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/elisp.py +0 -0
  99. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/gradle.py +0 -0
  100. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/java.py +0 -0
  101. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
  102. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/maven.py +0 -0
  103. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
  104. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/ruby.py +0 -0
  105. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/scala.py +0 -0
  106. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
  107. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
  108. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
  109. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
  110. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
  111. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
  112. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
  113. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
  114. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
  115. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
  116. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
  117. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
  118. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
  119. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
  120. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
  121. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
  122. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
  123. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/report_generator.py +0 -0
  124. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/scip_indexer.py +0 -0
  125. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/scip_pb2.py +0 -0
  126. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/tree_sitter_parser.py +0 -0
  127. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/tools/type_utils.py +0 -0
  128. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/cypher_readonly.py +0 -0
  129. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/debug_log.py +0 -0
  130. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/git_utils.py +0 -0
  131. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/path_ignore.py +0 -0
  132. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/path_sandbox.py +0 -0
  133. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/repo_path.py +0 -0
  134. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/tool_limits.py +0 -0
  135. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/tree_sitter_manager.py +0 -0
  136. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/utils/visualize_graph.py +0 -0
  137. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
  138. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
  139. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
  140. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
  141. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
  142. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +0 -0
  143. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +0 -0
  144. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +0 -0
  145. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +0 -0
  146. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
  147. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
  148. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
  149. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/index.html +0 -0
  150. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/logo-icon.svg +0 -0
  151. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/logo.svg +0 -0
  152. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
  153. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
  154. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/robots.txt +0 -0
  155. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
  156. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
  157. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
  158. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
  159. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
  160. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
  161. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
  162. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
  163. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
  164. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
  165. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
  166. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
  167. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
  168. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
  169. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
  170. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
  171. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
  172. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
  173. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
  174. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
  175. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext/viz/server.py +0 -0
  176. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
  177. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
  178. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/src/codegraphcontext.egg-info/top_level.txt +0 -0
  179. {codegraphcontext-0.4.18 → codegraphcontext-0.5.1}/tests/test_issue_806_fix.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraphcontext
3
- Version: 0.4.18
3
+ Version: 0.5.1
4
4
  Summary: An MCP server that indexes local code into a graph database to provide context to AI assistants.
5
5
  Author-email: Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
6
6
  License: MIT License
@@ -81,6 +81,12 @@ Provides-Extra: dev
81
81
  Requires-Dist: pytest>=7.4.0; extra == "dev"
82
82
  Requires-Dist: black>=23.11.0; extra == "dev"
83
83
  Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
84
+ Requires-Dist: pytest-mock; extra == "dev"
85
+ Requires-Dist: ruff; extra == "dev"
86
+ Provides-Extra: datasources
87
+ Requires-Dist: pymysql; extra == "datasources"
88
+ Requires-Dist: mysql-connector-python; extra == "datasources"
89
+ Requires-Dist: cassandra-driver; extra == "datasources"
84
90
  Dynamic: license-file
85
91
 
86
92
  # 🏗️ CodeGraphContext (CGC)
@@ -185,7 +191,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
185
191
  ---
186
192
 
187
193
  ## Project Details
188
- - **Version:** 0.4.18
194
+ - **Version:** 0.5.1
189
195
  - **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
190
196
  - **License:** MIT License (See [LICENSE](LICENSE) for details)
191
197
  - **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
@@ -213,11 +219,11 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
213
219
  ## Features
214
220
  - **Code Indexing:** Analyzes code and builds a knowledge graph of its components.
215
221
  - **Relationship Analysis:** Query for callers, callees, class hierarchies, call chains and more.
216
- - **Pre-indexed Bundles:** Load famous repositories instantly with `.cgc` bundles - no indexing required! ([Learn more](docs/BUNDLES.md))
222
+ - **Pre-indexed Bundles:** Load famous repositories instantly with `.cgc` bundles - no indexing required! ([Learn more](docs/docs/guides/bundles.md))
217
223
  - **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`cgc watch`).
218
224
  - **Interactive Setup:** A user-friendly command-line wizard for easy setup.
219
225
  - **Dual Mode:** Works as a standalone **CLI toolkit** for developers and as an **MCP server** for AI agents.
220
- - **Multi-Language Support:** Full support for 22 programming languages.
226
+ - **Multi-Language Support:** Full support for 23 programming languages.
221
227
  - **Flexible Database Backend:** FalkorDB Lite (Default), KuzuDB, LadybugDB, FalkorDB Remote, Nornic DB, or Neo4j (all platforms via Docker/native).
222
228
 
223
229
 
@@ -295,8 +301,8 @@ _If you’re using CodeGraphContext in your project, feel free to open a PR and
295
301
  - `tree-sitter-language-pack>=0.6.0` (not installed on Python 3.13)
296
302
  - `pyyaml`
297
303
  - `pathspec>=0.12.1`
298
- - `falkordb>=0.1.0`
299
- - `falkordblite>=0.1.0` (Unix only)
304
+ - `falkordb>=1.0,<1.6`
305
+ - `falkordblite>=0.7,<0.10` (Unix only, Python 3.12+)
300
306
  - `kuzu` (KuzuDB engine)
301
307
  - `fastapi>=0.100.0`
302
308
  - `uvicorn>=0.22.0`
@@ -100,7 +100,7 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
100
100
  ---
101
101
 
102
102
  ## Project Details
103
- - **Version:** 0.4.18
103
+ - **Version:** 0.5.1
104
104
  - **Authors:** Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
105
105
  - **License:** MIT License (See [LICENSE](LICENSE) for details)
106
106
  - **Website:** [CodeGraphContext](http://codegraphcontext.vercel.app/)
@@ -128,11 +128,11 @@ A powerful **MCP server** and **CLI toolkit** that indexes local code into a gra
128
128
  ## Features
129
129
  - **Code Indexing:** Analyzes code and builds a knowledge graph of its components.
130
130
  - **Relationship Analysis:** Query for callers, callees, class hierarchies, call chains and more.
131
- - **Pre-indexed Bundles:** Load famous repositories instantly with `.cgc` bundles - no indexing required! ([Learn more](docs/BUNDLES.md))
131
+ - **Pre-indexed Bundles:** Load famous repositories instantly with `.cgc` bundles - no indexing required! ([Learn more](docs/docs/guides/bundles.md))
132
132
  - **Live File Watching:** Watch directories for changes and automatically update the graph in real-time (`cgc watch`).
133
133
  - **Interactive Setup:** A user-friendly command-line wizard for easy setup.
134
134
  - **Dual Mode:** Works as a standalone **CLI toolkit** for developers and as an **MCP server** for AI agents.
135
- - **Multi-Language Support:** Full support for 22 programming languages.
135
+ - **Multi-Language Support:** Full support for 23 programming languages.
136
136
  - **Flexible Database Backend:** FalkorDB Lite (Default), KuzuDB, LadybugDB, FalkorDB Remote, Nornic DB, or Neo4j (all platforms via Docker/native).
137
137
 
138
138
 
@@ -210,8 +210,8 @@ _If you’re using CodeGraphContext in your project, feel free to open a PR and
210
210
  - `tree-sitter-language-pack>=0.6.0` (not installed on Python 3.13)
211
211
  - `pyyaml`
212
212
  - `pathspec>=0.12.1`
213
- - `falkordb>=0.1.0`
214
- - `falkordblite>=0.1.0` (Unix only)
213
+ - `falkordb>=1.0,<1.6`
214
+ - `falkordblite>=0.7,<0.10` (Unix only, Python 3.12+)
215
215
  - `kuzu` (KuzuDB engine)
216
216
  - `fastapi>=0.100.0`
217
217
  - `uvicorn>=0.22.0`
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codegraphcontext"
3
- version = "0.4.18"
3
+ version = "0.5.1"
4
4
  description = "An MCP server that indexes local code into a graph database to provide context to AI assistants."
5
5
  authors = [{ name = "Shashank Shekhar Singh", email = "shashankshekharsingh1205@gmail.com" }]
6
6
  readme = "README.md"
@@ -92,6 +92,15 @@ dev = [
92
92
  "pytest>=7.4.0",
93
93
  "black>=23.11.0",
94
94
  "pytest-asyncio>=0.21.0",
95
+ "pytest-mock",
96
+ "ruff",
97
+ ]
98
+ # Optional drivers for `cgc datasource` ingestion (MySQL/Aurora, Cassandra).
99
+ # Redis ingestion uses the ``redis`` package already pinned in core deps.
100
+ datasources = [
101
+ "pymysql",
102
+ "mysql-connector-python",
103
+ "cassandra-driver",
95
104
  ]
96
105
 
97
106
  [project.urls]
@@ -17,7 +17,10 @@ def create_app() -> FastAPI:
17
17
  app.add_middleware(
18
18
  CORSMiddleware,
19
19
  allow_origins=["*"], # In production, restrict this
20
- allow_credentials=True,
20
+ # Credentials must stay disabled while origins is a wildcard; the
21
+ # combination is rejected by browsers and would leak cookie-authed
22
+ # responses to any site.
23
+ allow_credentials=False,
21
24
  allow_methods=["*"],
22
25
  allow_headers=["*"],
23
26
  )
@@ -8,16 +8,17 @@ from mcp.types import Tool, TextContent, ServerCapabilities, ToolsCapability
8
8
  from mcp.server.sse import SseServerTransport
9
9
 
10
10
  from codegraphcontext.api.router import get_server
11
- from codegraphcontext.tool_definitions import TOOLS
11
+ from codegraphcontext.server import _strip_workspace_prefix, _apply_response_token_limit
12
12
 
13
13
  # Create the MCP Server instance using the SDK
14
14
  mcp_server = Server("CodeGraphContext")
15
15
 
16
16
  @mcp_server.list_tools()
17
17
  async def handle_list_tools() -> list[Tool]:
18
- """List available tools."""
18
+ """List available tools (honors disabledTools from mcp.json)."""
19
+ server = get_server()
19
20
  tools = []
20
- for name, defn in TOOLS.items():
21
+ for name, defn in server.tools.items():
21
22
  tools.append(Tool(
22
23
  name=name,
23
24
  description=defn["description"],
@@ -33,12 +34,16 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[TextConten
33
34
 
34
35
  # Execute via the existing handler logic
35
36
  result = await server.handle_tool_call(name, args)
37
+ result = _strip_workspace_prefix(result)
36
38
 
37
39
  if "error" in result:
38
40
  return [TextContent(type="text", text=f"Error: {result['error']}")]
39
41
 
40
- # Format result as JSON string for the AI
41
- return [TextContent(type="text", text=json.dumps(result, indent=2))]
42
+ # Format result as JSON string for the AI, with the same token budget
43
+ # the stdio transport applies.
44
+ response_text = json.dumps(result, indent=2)
45
+ response_text = _apply_response_token_limit(name, response_text)
46
+ return [TextContent(type="text", text=response_text)]
42
47
 
43
48
  # Create the SSE transport.
44
49
  # The messages_url is where the client will POST JSON-RPC messages.
@@ -91,12 +91,9 @@ async def index_repository(
91
91
  background_tasks: BackgroundTasks,
92
92
  server: MCPServer = Depends(get_server)
93
93
  ):
94
- args = {
95
- "path": request.path,
96
- "repo_name": request.repo_name,
97
- "branch": request.branch,
98
- "force": request.force
99
- }
94
+ # The add_code_to_graph handler only understands "path" (and is_dependency);
95
+ # repo_name/branch/force from the request model are not supported by it.
96
+ args = {"path": request.path}
100
97
 
101
98
  try:
102
99
  result = await server.handle_tool_call(
@@ -35,6 +35,7 @@ from .config_manager import (
35
35
  register_repo_in_context,
36
36
  ensure_first_run_bootstrap,
37
37
  ContextNotFoundError,
38
+ is_db_deletion_allowed,
38
39
  )
39
40
 
40
41
  console = Console()
@@ -673,14 +674,32 @@ def reindex_helper(path: str, context: Optional[str] = None):
673
674
  db_manager.close_driver()
674
675
 
675
676
 
676
- def update_helper(path: str, context: Optional[str] = None):
677
- """Update/refresh index for a path (alias for reindex)."""
677
+ def update_helper(path: str, context: Optional[str] = None, quiet: bool = False):
678
+ """Update/refresh index for a path (alias for reindex).
679
+
680
+ When *quiet* is True (e.g. when invoked from Git hooks with --quiet),
681
+ Rich console output, including progress rendering, is suppressed.
682
+ """
683
+ if quiet:
684
+ console.quiet = True
685
+ try:
686
+ reindex_helper(path, context)
687
+ finally:
688
+ console.quiet = False
689
+ return
678
690
  console.print("[cyan]Updating repository index...[/cyan]")
679
691
  reindex_helper(path, context)
680
692
 
681
693
 
682
694
  def clean_helper(context: Optional[str] = None):
683
695
  """Remove orphaned nodes and relationships from the database."""
696
+ if not is_db_deletion_allowed():
697
+ console.print(
698
+ "[bold red]Error:[/bold red] Database cleanup is disabled. "
699
+ "Set ALLOW_DB_DELETION=true in config to enable."
700
+ )
701
+ raise typer.Exit(code=1)
702
+
684
703
  services = _initialize_services(context)
685
704
  if not all(services[:3]):
686
705
  _fail_services_init()
@@ -738,6 +757,9 @@ def stats_helper(path: str = None, context: Optional[str] = None):
738
757
  if path:
739
758
  # Stats for specific repository
740
759
  path_obj = Path(path).resolve()
760
+ # Paths are stored with forward slashes (as_posix) in the graph DB,
761
+ # so lookups must use the same normalization on Windows too.
762
+ repo_path_str = path_obj.as_posix()
741
763
  console.print(f"[cyan]📊 Statistics for: {path_obj}[/cyan]\n")
742
764
 
743
765
  with db_manager.get_driver().session() as session:
@@ -746,7 +768,7 @@ def stats_helper(path: str = None, context: Optional[str] = None):
746
768
  MATCH (r:Repository {path: $path})
747
769
  RETURN r
748
770
  """
749
- result = session.run(repo_query, path=str(path_obj))
771
+ result = session.run(repo_query, path=repo_path_str)
750
772
  if not result.single():
751
773
  console.print(f"[red]Repository not found: {path_obj}[/red]")
752
774
  return
@@ -755,20 +777,20 @@ def stats_helper(path: str = None, context: Optional[str] = None):
755
777
  # Get stats using separate queries to handle depth and avoid Cartesian products
756
778
  # 1. Files
757
779
  file_query = "MATCH (r:Repository {path: $path})-[:CONTAINS*]->(f:File) RETURN count(f) as c"
758
- file_count = session.run(file_query, path=str(path_obj)).single()["c"]
780
+ file_count = session.run(file_query, path=repo_path_str).single()["c"]
759
781
 
760
782
  # 2. Functions (including methods in classes)
761
783
  func_query = "MATCH (r:Repository {path: $path})-[:CONTAINS*]->(func:Function) RETURN count(func) as c"
762
- func_count = session.run(func_query, path=str(path_obj)).single()["c"]
784
+ func_count = session.run(func_query, path=repo_path_str).single()["c"]
763
785
 
764
786
  # 3. Classes
765
787
  class_query = "MATCH (r:Repository {path: $path})-[:CONTAINS*]->(c:Class) RETURN count(c) as c"
766
- class_count = session.run(class_query, path=str(path_obj)).single()["c"]
788
+ class_count = session.run(class_query, path=repo_path_str).single()["c"]
767
789
 
768
790
  # 4. Modules (imported) - Note: Module nodes are outside the repo structure usually, connected via IMPORTS
769
791
  # We need to traverse from files to modules
770
792
  module_query = "MATCH (r:Repository {path: $path})-[:CONTAINS*]->(f:File)-[:IMPORTS]->(m:Module) RETURN count(DISTINCT m) as c"
771
- module_count = session.run(module_query, path=str(path_obj)).single()["c"]
793
+ module_count = session.run(module_query, path=repo_path_str).single()["c"]
772
794
 
773
795
  table = Table(show_header=True, header_style="bold magenta")
774
796
  table.add_column("Metric", style="cyan")
@@ -869,7 +891,7 @@ def watch_helper(path: str, context: Optional[str] = None, use_polling: Optional
869
891
  with code_finder.driver.session() as _s:
870
892
  _r = _s.run(
871
893
  "MATCH (n:File) WHERE n.path STARTS WITH $p RETURN count(n) AS c",
872
- p=str(path_obj) + "/"
894
+ p=path_obj.as_posix() + "/"
873
895
  )
874
896
  _count = _r.single()["c"]
875
897
  if _count > 100:
@@ -15,6 +15,19 @@ import yaml
15
15
 
16
16
  console = Console()
17
17
 
18
+
19
+ def _atomic_write_text(path: Path, content: str, *, secure: bool = False) -> None:
20
+ """Write *content* to *path* atomically (temp file + replace)."""
21
+ path.parent.mkdir(parents=True, exist_ok=True)
22
+ tmp_path = path.with_suffix(path.suffix + ".tmp")
23
+ with open(tmp_path, "w", encoding="utf-8") as f:
24
+ f.write(content)
25
+ f.flush()
26
+ os.fsync(f.fileno())
27
+ os.replace(tmp_path, path)
28
+ if secure:
29
+ os.chmod(path, 0o600)
30
+
18
31
  # Configuration file location
19
32
  CONFIG_DIR = Path.home() / ".codegraphcontext"
20
33
  CONFIG_FILE = CONFIG_DIR / ".env"
@@ -385,30 +398,27 @@ def save_config(config: Dict[str, str], preserve_db_credentials: bool = True):
385
398
  credentials_to_write[key] = config[key]
386
399
 
387
400
  try:
388
- with open(CONFIG_FILE, "w", encoding="utf-8") as f:
389
- f.write("# CodeGraphContext Configuration\n")
390
- f.write(f"# Location: {CONFIG_FILE}\n\n")
391
-
392
- # Write database credentials first if they exist
393
- if credentials_to_write:
394
- f.write("# ===== Database Credentials =====\n")
395
- for key in sorted(DATABASE_CREDENTIAL_KEYS):
396
- if key in credentials_to_write:
397
- f.write(f"{key}={credentials_to_write[key]}\n")
398
- f.write("\n")
399
-
400
- # Write configuration settings
401
- f.write("# ===== Configuration Settings =====\n")
402
- for key, value in sorted(config.items()):
403
- # Skip database credentials (already written above)
404
- if key in DATABASE_CREDENTIAL_KEYS:
405
- continue
406
-
407
- description = CONFIG_DESCRIPTIONS.get(key, "")
408
- if description:
409
- f.write(f"# {description}\n")
410
- f.write(f"{key}={value}\n\n")
411
-
401
+ lines = [
402
+ "# CodeGraphContext Configuration",
403
+ f"# Location: {CONFIG_FILE}",
404
+ "",
405
+ ]
406
+ if credentials_to_write:
407
+ lines.append("# ===== Database Credentials =====")
408
+ for key in sorted(DATABASE_CREDENTIAL_KEYS):
409
+ if key in credentials_to_write:
410
+ lines.append(f"{key}={credentials_to_write[key]}")
411
+ lines.append("")
412
+ lines.append("# ===== Configuration Settings =====")
413
+ for key, value in sorted(config.items()):
414
+ if key in DATABASE_CREDENTIAL_KEYS:
415
+ continue
416
+ description = CONFIG_DESCRIPTIONS.get(key, "")
417
+ if description:
418
+ lines.append(f"# {description}")
419
+ lines.append(f"{key}={value}")
420
+ lines.append("")
421
+ _atomic_write_text(CONFIG_FILE, "\n".join(lines), secure=True)
412
422
  console.print(f"[green]✅ Configuration saved to {CONFIG_FILE}[/green]")
413
423
  except Exception as e:
414
424
  console.print(f"[red]Error saving config: {e}[/red]")
@@ -804,8 +814,10 @@ def save_context_config(cfg: ContextConfig) -> None:
804
814
  }
805
815
 
806
816
  try:
807
- with open(CONTEXT_CONFIG_FILE, "w", encoding="utf-8") as f:
808
- yaml.dump(raw, f, default_flow_style=False, sort_keys=False)
817
+ _atomic_write_text(
818
+ CONTEXT_CONFIG_FILE,
819
+ yaml.dump(raw, default_flow_style=False, sort_keys=False),
820
+ )
809
821
  except Exception as e:
810
822
  console.print(f"[red]Error saving config.yaml: {e}[/red]")
811
823
 
@@ -887,10 +899,15 @@ def resolve_context(
887
899
 
888
900
  inherited_db = load_config().get("DEFAULT_DATABASE", "falkordb")
889
901
 
890
- # Copy global .env into local context for easy per-repo tweaking
902
+ # Copy global .env into local context for easy per-repo tweaking.
903
+ # Guard against the self-copy case: when cwd is the home directory,
904
+ # local_cgc resolves to CONFIG_DIR itself, so `local_cgc / ".env"` is
905
+ # CONFIG_FILE. Copying a file onto itself raises shutil.SameFileError,
906
+ # which crashes resolve_context for any session started from home.
891
907
  import shutil
892
- if CONFIG_FILE.exists():
893
- shutil.copy2(CONFIG_FILE, local_cgc / ".env")
908
+ _target_env = local_cgc / ".env"
909
+ if CONFIG_FILE.exists() and _target_env.resolve() != CONFIG_FILE.resolve():
910
+ shutil.copy2(CONFIG_FILE, _target_env)
894
911
 
895
912
  local_yaml = local_cgc / "config.yaml"
896
913
  if not local_yaml.exists():
@@ -1172,8 +1189,10 @@ def _save_workspace_mappings(mappings: Dict[str, Dict[str, str]]) -> None:
1172
1189
  raw = {}
1173
1190
  raw["workspace_mappings"] = mappings
1174
1191
  try:
1175
- with open(CONTEXT_CONFIG_FILE, "w", encoding="utf-8") as f:
1176
- yaml.dump(raw, f, default_flow_style=False, sort_keys=False)
1192
+ _atomic_write_text(
1193
+ CONTEXT_CONFIG_FILE,
1194
+ yaml.dump(raw, default_flow_style=False, sort_keys=False),
1195
+ )
1177
1196
  except Exception as e:
1178
1197
  console.print(f"[red]Error saving workspace mappings: {e}[/red]")
1179
1198
 
@@ -73,7 +73,7 @@ def install_hooks(start: Path | str | None = None, *, force: bool = False) -> Ho
73
73
  )
74
74
  hook_path.write_text(script, encoding="utf-8")
75
75
  mode = hook_path.stat().st_mode
76
- hook_path.chmod(mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
76
+ hook_path.chmod(mode | stat.S_IXUSR | stat.S_IXGRP)
77
77
 
78
78
  _ensure_gitattributes(repo.root)
79
79
  _configure_merge_driver(repo.root)