codegraphcontext 0.5.3__tar.gz → 0.5.5__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 (189) hide show
  1. {codegraphcontext-0.5.3/src/codegraphcontext.egg-info → codegraphcontext-0.5.5}/PKG-INFO +29 -3
  2. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/README.md +27 -1
  3. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/pyproject.toml +8 -2
  4. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/api/app.py +19 -5
  5. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/api/mcp_sse.py +49 -2
  6. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/cli_helpers.py +123 -69
  7. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/config_manager.py +3 -0
  8. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/main.py +10 -5
  9. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/setup_wizard.py +5 -0
  10. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/__init__.py +70 -48
  11. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/cgc_bundle.py +28 -3
  12. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/database_embedded_kuzu.py +12 -1
  13. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/database_falkordb.py +37 -10
  14. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/falkor_worker.py +16 -3
  15. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/watcher.py +10 -3
  16. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/server.py +1 -1
  17. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tool_definitions.py +12 -2
  18. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/advanced_language_query_tool.py +2 -0
  19. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/code_finder.py +16 -13
  20. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/graph_builder.py +11 -4
  21. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/persistence/writer.py +32 -4
  22. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/pipeline.py +41 -7
  23. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/pre_scan.py +6 -0
  24. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/resolution/calls.py +31 -7
  25. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +16 -2
  26. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +13 -4
  27. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/scip_pipeline.py +31 -0
  28. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/go.py +23 -1
  29. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/php.py +80 -30
  30. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/python.py +14 -3
  31. codegraphcontext-0.5.5/src/codegraphcontext/tools/languages/sfc_common.py +240 -0
  32. codegraphcontext-0.5.5/src/codegraphcontext/tools/languages/solidity.py +1069 -0
  33. codegraphcontext-0.5.5/src/codegraphcontext/tools/languages/solidity_remappings.py +157 -0
  34. codegraphcontext-0.5.5/src/codegraphcontext/tools/languages/svelte.py +38 -0
  35. codegraphcontext-0.5.5/src/codegraphcontext/tools/languages/vue.py +38 -0
  36. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +1 -1
  37. codegraphcontext-0.5.5/src/codegraphcontext/tools/query_tool_languages/solidity_toolkit.py +70 -0
  38. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/tree_sitter_parser.py +3 -0
  39. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/cypher_readonly.py +27 -6
  40. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/gcf_encoder.py +7 -1
  41. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/path_sandbox.py +6 -5
  42. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/tree_sitter_manager.py +7 -0
  43. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +1 -0
  44. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
  45. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
  46. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
  47. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
  48. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +5587 -0
  49. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +1 -0
  50. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +370 -0
  51. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +233 -0
  52. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
  53. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
  54. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/favicon.ico +0 -0
  55. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/index.html +32 -0
  56. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/logo-icon.svg +85 -0
  57. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/logo.svg +100 -0
  58. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/placeholder.svg +1 -0
  59. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/preview-image.png +0 -0
  60. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/robots.txt +14 -0
  61. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
  62. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
  63. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +1 -0
  64. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
  65. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
  66. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
  67. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
  68. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
  69. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
  70. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +1 -0
  71. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
  72. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
  73. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
  74. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
  75. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
  76. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
  77. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
  78. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
  79. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +4007 -0
  80. codegraphcontext-0.5.5/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
  81. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/viz/server.py +34 -9
  82. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5/src/codegraphcontext.egg-info}/PKG-INFO +29 -3
  83. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext.egg-info/SOURCES.txt +44 -0
  84. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext.egg-info/requires.txt +1 -1
  85. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/LICENSE +0 -0
  86. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/MANIFEST.in +0 -0
  87. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/setup.cfg +0 -0
  88. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/__init__.py +0 -0
  89. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/__main__.py +0 -0
  90. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/api/__init__.py +0 -0
  91. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/api/auth.py +0 -0
  92. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/api/router.py +0 -0
  93. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/api/schemas.py +0 -0
  94. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/__init__.py +0 -0
  95. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/hook_manager.py +0 -0
  96. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/project_config.py +0 -0
  97. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/registry_commands.py +0 -0
  98. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/setup_macos.py +0 -0
  99. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/simulator.py +0 -0
  100. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/cli/visualizer.py +0 -0
  101. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/bundle_registry.py +0 -0
  102. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/cgcignore.py +0 -0
  103. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/database.py +0 -0
  104. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
  105. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/database_kuzu.py +0 -0
  106. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/database_ladybug.py +0 -0
  107. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/database_nornic.py +0 -0
  108. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/graph_query.py +0 -0
  109. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/jobs.py +0 -0
  110. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/core/simulator.py +0 -0
  111. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/prompts.py +0 -0
  112. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/stdlibs.py +0 -0
  113. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/__init__.py +0 -0
  114. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
  115. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +0 -0
  116. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/datasources/mysql_ingester.py +0 -0
  117. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
  118. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
  119. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
  120. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/handlers/management_handlers.py +0 -0
  121. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
  122. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
  123. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
  124. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/constants.py +0 -0
  125. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
  126. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
  127. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
  128. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
  129. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
  130. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/sanitize.py +0 -0
  131. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/schema.py +0 -0
  132. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/schema_contract.py +0 -0
  133. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
  134. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/c.py +0 -0
  135. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/cpp.py +0 -0
  136. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/csharp.py +0 -0
  137. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/css.py +0 -0
  138. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/dart.py +0 -0
  139. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/elisp.py +0 -0
  140. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/elixir.py +0 -0
  141. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/gradle.py +0 -0
  142. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/haskell.py +0 -0
  143. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/html.py +0 -0
  144. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/java.py +0 -0
  145. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/javascript.py +0 -0
  146. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
  147. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/lua.py +0 -0
  148. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/maven.py +0 -0
  149. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
  150. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/perl.py +0 -0
  151. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/ruby.py +0 -0
  152. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/rust.py +0 -0
  153. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/scala.py +0 -0
  154. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/swift.py +0 -0
  155. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/typescript.py +0 -0
  156. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
  157. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/package_resolver.py +0 -0
  158. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
  159. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
  160. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
  161. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
  162. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
  163. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
  164. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
  165. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
  166. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
  167. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
  168. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
  169. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
  170. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
  171. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
  172. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
  173. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/report_generator.py +0 -0
  174. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/scip_indexer.py +0 -0
  175. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/scip_pb2.py +0 -0
  176. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/system.py +0 -0
  177. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/tools/type_utils.py +0 -0
  178. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/cypher_ddl.py +0 -0
  179. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/debug_log.py +0 -0
  180. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/git_utils.py +0 -0
  181. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/path_ignore.py +0 -0
  182. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/repo_path.py +0 -0
  183. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/tool_limits.py +0 -0
  184. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext/utils/visualize_graph.py +0 -0
  185. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
  186. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
  187. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/src/codegraphcontext.egg-info/top_level.txt +0 -0
  188. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/tests/test_issue_806_fix.py +0 -0
  189. {codegraphcontext-0.5.3 → codegraphcontext-0.5.5}/tests/test_mcp_sse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraphcontext
3
- Version: 0.5.3
3
+ Version: 0.5.5
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
@@ -62,7 +62,7 @@ Requires-Dist: requests>=2.28.0
62
62
  Requires-Dist: protobuf<3.21,>=3.20
63
63
  Requires-Dist: kuzu; python_version < "3.14" or sys_platform == "linux"
64
64
  Requires-Dist: ladybug; sys_platform == "win32" or (sys_platform != "win32" and python_version >= "3.10")
65
- Requires-Dist: mcp>=1.0.0
65
+ Requires-Dist: mcp<2,>=1.0.0
66
66
  Requires-Dist: fastapi>=0.100.0
67
67
  Requires-Dist: uvicorn>=0.22.0
68
68
  Provides-Extra: parsing
@@ -107,6 +107,7 @@ Dynamic: license-file
107
107
  - 🇺🇦 [Українська](docs/translations/README.uk.md)
108
108
  - 🇷🇺 [Русский](docs/translations/README.ru-RU.md)
109
109
  - 🇯🇵 [日本語](docs/translations/README.ja.md)
110
+ - 🇮🇳 [தமிழ்](docs/translations/README.ta.md)
110
111
  - 🇪🇸 Español (Soon)
111
112
 
112
113
  🌍 **Help translate CodeGraphContext to your language by raising an issue & PR on [GitHub Issues](https://github.com/CodeGraphContext/CodeGraphContext/issues)!**
@@ -316,6 +317,29 @@ flowchart TD
316
317
 
317
318
  ---
318
319
 
320
+ ## 🏗️ Architecture & Workflow
321
+
322
+ CodeGraphContext parses your source code and builds a comprehensive knowledge graph. This graph can be queried directly via the CLI toolkit or exposed to AI assistants through the MCP server.
323
+
324
+ ```mermaid
325
+ flowchart TD
326
+ A[Code Repository] -->|Parsed by| B[Tree-sitter / SCIP Indexing]
327
+ B -->|Generates| C[Knowledge Graph]
328
+ C -->|Stored in| D[(Graph Database)]
329
+ D -->|Queried via| E[CLI Toolkit]
330
+ D -->|Served by| F[MCP Server]
331
+ F -->|Provides context to| G[🤖 AI Assistant]
332
+
333
+ classDef default fill:#1f2937,stroke:#8b5cf6,stroke-width:2px,color:#fff;
334
+ classDef db fill:#0f172a,stroke:#3b82f6,stroke-width:2px,color:#fff;
335
+ classDef ai fill:#312e81,stroke:#a855f7,stroke-width:2px,color:#fff;
336
+
337
+ D:::db
338
+ G:::ai
339
+ ```
340
+
341
+ ---
342
+
319
343
  ## Supported Programming Languages
320
344
 
321
345
  CodeGraphContext provides comprehensive parsing and analysis for the following languages:
@@ -329,10 +353,12 @@ CodeGraphContext provides comprehensive parsing and analysis for the following l
329
353
  | 🎨 | **Kotlin** | 🎯 | **Dart** | 🐪 | **Perl** |
330
354
  | 🌙 | **Lua** | 🚀 | **Scala** | λ | **Haskell** |
331
355
  | 💧 | **Elixir** | 📜 | **Emacs Lisp (elisp)** | 🌐 | **HTML** |
332
- | 🎨 | **CSS** | ⚛️ | **TSX** | | |
356
+ | 🎨 | **CSS** | ⚛️ | **TSX** | ⛓️ | **Solidity** |
333
357
 
334
358
  Each language parser extracts functions, classes, methods, parameters, inheritance relationships, function calls, and imports to build a comprehensive code graph.
335
359
 
360
+ **Solidity notes:** `.sol` uses Tree-sitter via `tree-sitter-language-pack` (no SCIP). Supports Foundry remappings, modifier invocations, `using Lib for T`, and `emit` / custom-error `revert` as CALLS. See `docs/docs/contributing_languages.md` § Solidity.
361
+
336
362
  ---
337
363
 
338
364
  ## Database Options
@@ -9,6 +9,7 @@
9
9
  - 🇺🇦 [Українська](docs/translations/README.uk.md)
10
10
  - 🇷🇺 [Русский](docs/translations/README.ru-RU.md)
11
11
  - 🇯🇵 [日本語](docs/translations/README.ja.md)
12
+ - 🇮🇳 [தமிழ்](docs/translations/README.ta.md)
12
13
  - 🇪🇸 Español (Soon)
13
14
 
14
15
  🌍 **Help translate CodeGraphContext to your language by raising an issue & PR on [GitHub Issues](https://github.com/CodeGraphContext/CodeGraphContext/issues)!**
@@ -218,6 +219,29 @@ flowchart TD
218
219
 
219
220
  ---
220
221
 
222
+ ## 🏗️ Architecture & Workflow
223
+
224
+ CodeGraphContext parses your source code and builds a comprehensive knowledge graph. This graph can be queried directly via the CLI toolkit or exposed to AI assistants through the MCP server.
225
+
226
+ ```mermaid
227
+ flowchart TD
228
+ A[Code Repository] -->|Parsed by| B[Tree-sitter / SCIP Indexing]
229
+ B -->|Generates| C[Knowledge Graph]
230
+ C -->|Stored in| D[(Graph Database)]
231
+ D -->|Queried via| E[CLI Toolkit]
232
+ D -->|Served by| F[MCP Server]
233
+ F -->|Provides context to| G[🤖 AI Assistant]
234
+
235
+ classDef default fill:#1f2937,stroke:#8b5cf6,stroke-width:2px,color:#fff;
236
+ classDef db fill:#0f172a,stroke:#3b82f6,stroke-width:2px,color:#fff;
237
+ classDef ai fill:#312e81,stroke:#a855f7,stroke-width:2px,color:#fff;
238
+
239
+ D:::db
240
+ G:::ai
241
+ ```
242
+
243
+ ---
244
+
221
245
  ## Supported Programming Languages
222
246
 
223
247
  CodeGraphContext provides comprehensive parsing and analysis for the following languages:
@@ -231,10 +255,12 @@ CodeGraphContext provides comprehensive parsing and analysis for the following l
231
255
  | 🎨 | **Kotlin** | 🎯 | **Dart** | 🐪 | **Perl** |
232
256
  | 🌙 | **Lua** | 🚀 | **Scala** | λ | **Haskell** |
233
257
  | 💧 | **Elixir** | 📜 | **Emacs Lisp (elisp)** | 🌐 | **HTML** |
234
- | 🎨 | **CSS** | ⚛️ | **TSX** | | |
258
+ | 🎨 | **CSS** | ⚛️ | **TSX** | ⛓️ | **Solidity** |
235
259
 
236
260
  Each language parser extracts functions, classes, methods, parameters, inheritance relationships, function calls, and imports to build a comprehensive code graph.
237
261
 
262
+ **Solidity notes:** `.sol` uses Tree-sitter via `tree-sitter-language-pack` (no SCIP). Supports Foundry remappings, modifier invocations, `using Lib for T`, and `emit` / custom-error `revert` as CALLS. See `docs/docs/contributing_languages.md` § Solidity.
263
+
238
264
  ---
239
265
 
240
266
  ## Database Options
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codegraphcontext"
3
- version = "0.5.3"
3
+ version = "0.5.5"
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"
@@ -73,7 +73,13 @@ dependencies = [
73
73
  # ------------------------------------------------------------------
74
74
  "kuzu; python_version < '3.14' or sys_platform == 'linux'",
75
75
  "ladybug; sys_platform == 'win32' or (sys_platform != 'win32' and python_version >= '3.10')",
76
- "mcp>=1.0.0",
76
+ # Cap below 2.0: the low-level `mcp.server.Server` dropped its `list_tools`
77
+ # and `call_tool` decorators in 2.0.0, which api/mcp_sse.py registers its
78
+ # handlers with. With an unbounded pin, CI resolved 2.0.0 on release day and
79
+ # every job failed at import with
80
+ # "AttributeError: 'Server' object has no attribute 'list_tools'".
81
+ # Lift this once mcp_sse.py is ported to the 2.x server API.
82
+ "mcp>=1.0.0,<2",
77
83
  "fastapi>=0.100.0",
78
84
  "uvicorn>=0.22.0"
79
85
  ]
@@ -1,10 +1,10 @@
1
1
  # src/codegraphcontext/api/app.py
2
2
  import os
3
- from fastapi import FastAPI
3
+ from fastapi import Depends, FastAPI
4
4
  from fastapi.responses import HTMLResponse
5
5
  from fastapi.middleware.cors import CORSMiddleware
6
6
  from .router import router
7
- from .auth import log_auth_status
7
+ from .auth import log_auth_status, require_api_key
8
8
  from .mcp_sse import handle_sse, handle_messages
9
9
 
10
10
  def create_app() -> FastAPI:
@@ -37,9 +37,23 @@ def create_app() -> FastAPI:
37
37
  """Liveness probe for load balancers and k8s."""
38
38
  return {"status": "ok"}
39
39
 
40
- # MCP-over-SSE Endpoints
41
- app.add_api_route("/api/v1/mcp/sse", handle_sse, methods=["GET"])
42
- app.add_api_route("/api/v1/mcp/messages", handle_messages, methods=["POST"])
40
+ # MCP-over-SSE Endpoints. These dispatch to the same tools as the REST
41
+ # router (execute_cypher_query, add_code_to_graph, delete_repository), so
42
+ # they need the same API-key dependency the router applies — without it,
43
+ # setting CGC_API_KEY left the SSE transport as an unauthenticated path to
44
+ # every tool.
45
+ app.add_api_route(
46
+ "/api/v1/mcp/sse",
47
+ handle_sse,
48
+ methods=["GET"],
49
+ dependencies=[Depends(require_api_key)],
50
+ )
51
+ app.add_api_route(
52
+ "/api/v1/mcp/messages",
53
+ handle_messages,
54
+ methods=["POST"],
55
+ dependencies=[Depends(require_api_key)],
56
+ )
43
57
 
44
58
  @app.get("/", response_class=HTMLResponse)
45
59
  async def root():
@@ -48,11 +48,41 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[TextConten
48
48
  # Create the SSE transport.
49
49
  sse = SseServerTransport("/api/v1/mcp/messages")
50
50
 
51
+
52
+ class _AlreadySentResponse(Response):
53
+ """Placeholder for a response the MCP transport wrote itself.
54
+
55
+ Both handlers below hand the raw ASGI ``send`` to the SDK, which emits the
56
+ complete response. FastAPI still does ``await endpoint(request)`` followed
57
+ by ``await response(...)``, so returning ``None`` raises ``TypeError:
58
+ 'NoneType' object is not callable`` and returning a real ``Response`` starts
59
+ a second response on a finished ASGI cycle. This satisfies FastAPI while
60
+ putting nothing on the wire.
61
+ """
62
+
63
+ async def __call__(self, scope, receive, send) -> None:
64
+ return
65
+
66
+
67
+ class _SendTracker:
68
+ """ASGI ``send`` wrapper that records whether a response was started."""
69
+
70
+ def __init__(self, send):
71
+ self._send = send
72
+ self.response_started = False
73
+
74
+ async def __call__(self, message) -> None:
75
+ if message.get("type") == "http.response.start":
76
+ self.response_started = True
77
+ await self._send(message)
78
+
79
+
51
80
  async def handle_sse(request: Request):
52
81
  """Entry point for the SSE connection."""
53
82
  logger.info("SSE client connected")
83
+ sender = _SendTracker(request._send)
54
84
  try:
55
- async with sse.connect_sse(request.scope, request.receive, request._send) as (read_stream, write_stream):
85
+ async with sse.connect_sse(request.scope, request.receive, sender) as (read_stream, write_stream):
56
86
  await mcp_server.run(
57
87
  read_stream,
58
88
  write_stream,
@@ -70,6 +100,10 @@ async def handle_sse(request: Request):
70
100
  logger.debug("SSE connection closed: %s", type(exc).__name__)
71
101
  finally:
72
102
  logger.info("SSE client disconnected — handler exited, resources freed")
103
+ if sender.response_started:
104
+ return _AlreadySentResponse()
105
+ # connect_sse bailed out before writing anything (e.g. rejected origin).
106
+ return Response(status_code=500, content="SSE connection could not be established")
73
107
 
74
108
 
75
109
  async def handle_messages(request: Request):
@@ -99,7 +133,20 @@ async def handle_messages(request: Request):
99
133
  media_type="application/json"
100
134
  )
101
135
 
136
+ # `handle_post_message` builds its own Request and awaits `.body()` again.
137
+ # Starlette caches a body on the Request instance, not in the scope, so
138
+ # handing it the raw `receive` would make it wait for a body that has
139
+ # already been drained above — the POST hangs until the client gives up and
140
+ # the message never reaches the session. Replay the buffered bytes instead.
141
+ async def replay_receive() -> dict:
142
+ return {"type": "http.request", "body": raw_body, "more_body": False}
143
+
144
+ sender = _SendTracker(request._send)
102
145
  try:
103
- await sse.handle_post_message(request.scope, request.receive, request._send)
146
+ await sse.handle_post_message(request.scope, replay_receive, sender)
104
147
  except Exception as exc:
105
148
  logger.debug("Message handler closed: %s", type(exc).__name__)
149
+
150
+ if sender.response_started:
151
+ return _AlreadySentResponse()
152
+ return Response(status_code=202, content="Accepted")
@@ -239,65 +239,78 @@ def _initialize_services(
239
239
  return db_manager, graph_builder, code_finder, ctx
240
240
 
241
241
 
242
- async def _run_index_with_progress(graph_builder: GraphBuilder, path_obj: Path, is_dependency: bool = False, cgcignore_path: str = None):
242
+ async def _run_index_with_progress(graph_builder: GraphBuilder, path_obj: Path, is_dependency: bool = False, cgcignore_path: str = None, disable_progress: bool = False):
243
243
  """Internal helper to run indexing with a Live progress bar."""
244
244
  job_id = graph_builder.job_manager.create_job(str(path_obj), is_dependency=is_dependency)
245
245
 
246
- # Create the progress bar
247
- with Progress(
248
- SpinnerColumn(),
249
- TextColumn("[progress.description]{task.description}"),
250
- BarColumn(),
251
- TaskProgressColumn(),
252
- MofNCompleteColumn(),
253
- TimeRemainingColumn(),
254
- TextColumn("[dim]{task.fields[filename]}"),
255
- console=console,
256
- transient=True,
257
- ) as progress:
258
-
259
- task_id = progress.add_task(
260
- "Indexing...",
261
- total=None, # Will be updated once file discovery is done
262
- filename=""
263
- )
246
+ disable_progress = (
247
+ disable_progress
248
+ or not console.is_terminal
249
+ or os.environ.get("CI", "").lower() == "true"
250
+ )
264
251
 
265
- indexing_task = asyncio.create_task(
266
- graph_builder.build_graph_from_path_async(path_obj, is_dependency=is_dependency, job_id=job_id, cgcignore_path=cgcignore_path)
267
- )
252
+ if not disable_progress:
253
+ os.environ["CGC_ACTIVE_PROGRESS_BAR"] = "1"
268
254
 
269
- from ..core.jobs import JobStatus
255
+ try:
256
+ # Create the progress bar
257
+ with Progress(
258
+ SpinnerColumn(),
259
+ TextColumn("[progress.description]{task.description}"),
260
+ BarColumn(),
261
+ TaskProgressColumn(),
262
+ MofNCompleteColumn(),
263
+ TimeRemainingColumn(),
264
+ TextColumn("[dim]{task.fields[filename]}"),
265
+ console=console,
266
+ transient=True,
267
+ disable=disable_progress,
268
+ ) as progress:
270
269
 
271
- # Poll for updates
272
- while not indexing_task.done():
273
- job = graph_builder.job_manager.get_job(job_id)
274
- if job:
275
- if job.total_files > 0:
276
- progress.update(task_id, total=job.total_files, completed=job.processed_files)
277
-
278
- # Prefer post-processing status over the last parsed file path
279
- current_file = job.status_message or job.current_file or ""
280
- if len(current_file) > 40:
281
- current_file = "..." + current_file[-37:]
282
- progress.update(task_id, filename=current_file)
270
+ task_id = progress.add_task(
271
+ "Indexing...",
272
+ total=None, # Will be updated once file discovery is done
273
+ filename=""
274
+ )
283
275
 
284
- if job.status in [JobStatus.COMPLETED, JobStatus.FAILED, JobStatus.CANCELLED]:
285
- break
276
+ indexing_task = asyncio.create_task(
277
+ graph_builder.build_graph_from_path_async(path_obj, is_dependency=is_dependency, job_id=job_id, cgcignore_path=cgcignore_path)
278
+ )
279
+
280
+ from ..core.jobs import JobStatus
286
281
 
287
- await asyncio.sleep(0.1)
282
+ # Poll for updates
283
+ while not indexing_task.done():
284
+ job = graph_builder.job_manager.get_job(job_id)
285
+ if job:
286
+ if job.total_files > 0:
287
+ progress.update(task_id, total=job.total_files, completed=job.processed_files)
288
+
289
+ # Prefer post-processing status over the last parsed file path
290
+ current_file = job.status_message or job.current_file or ""
291
+ if len(current_file) > 40:
292
+ current_file = "..." + current_file[-37:]
293
+ progress.update(task_id, filename=current_file)
294
+
295
+ if job.status in [JobStatus.COMPLETED, JobStatus.FAILED, JobStatus.CANCELLED]:
296
+ break
297
+
298
+ await asyncio.sleep(0.1)
288
299
 
289
- # Wait for actual completion and handle final state
290
- try:
291
- await indexing_task
292
- job = graph_builder.job_manager.get_job(job_id)
293
- if job and job.status == JobStatus.FAILED:
294
- error_msg = job.errors[0] if job.errors else "Unknown error"
295
- raise RuntimeError(error_msg)
296
- except Exception as e:
297
- raise e
300
+ # Wait for actual completion and handle final state
301
+ try:
302
+ await indexing_task
303
+ job = graph_builder.job_manager.get_job(job_id)
304
+ if job and job.status == JobStatus.FAILED:
305
+ error_msg = job.errors[0] if job.errors else "Unknown error"
306
+ raise RuntimeError(error_msg)
307
+ except Exception as e:
308
+ raise e
309
+ finally:
310
+ os.environ.pop("CGC_ACTIVE_PROGRESS_BAR", None)
298
311
 
299
312
 
300
- def index_helper(path: str, context: Optional[str] = None):
313
+ def index_helper(path: str, context: Optional[str] = None, no_progress: bool = False):
301
314
  """Synchronously indexes a repository in a given context."""
302
315
  time_start = time.time()
303
316
  path_obj = Path(path).resolve()
@@ -334,10 +347,16 @@ def index_helper(path: str, context: Optional[str] = None):
334
347
  file_count = record["file_count"] if record else 0
335
348
 
336
349
  if file_count > 0:
337
- console.print(f"[yellow]Repository '{path}' is already indexed with {file_count} files. Skipping.[/yellow]")
338
- console.print("[dim]💡 Tip: Use 'cgc index --force' to re-index[/dim]")
339
- db_manager.close_driver()
340
- return
350
+ expected = graph_builder.estimate_processing_time(path_obj) if path_obj.is_dir() else None
351
+ expected_file_count = expected[0] if expected else None
352
+ if expected_file_count is None or file_count >= expected_file_count:
353
+ console.print(f"[yellow]Repository '{path}' is already indexed with {file_count} files. Skipping.[/yellow]")
354
+ console.print("[dim]💡 Tip: Use 'cgc index --force' to re-index[/dim]")
355
+ db_manager.close_driver()
356
+ return
357
+ console.print(
358
+ f"[yellow]Repository '{path}' has only {file_count} of {expected_file_count} files indexed. Continuing.[/yellow]"
359
+ )
341
360
  else:
342
361
  console.print(f"[yellow]Repository '{path}' exists but has no files (likely interrupted). Re-indexing...[/yellow]")
343
362
  except Exception as e:
@@ -351,7 +370,7 @@ def index_helper(path: str, context: Optional[str] = None):
351
370
  console.print(f"Starting indexing for: {path_obj}")
352
371
 
353
372
  try:
354
- asyncio.run(_run_index_with_progress(graph_builder, path_obj, is_dependency=False, cgcignore_path=ctx.cgcignore_path))
373
+ asyncio.run(_run_index_with_progress(graph_builder, path_obj, is_dependency=False, cgcignore_path=ctx.cgcignore_path, disable_progress=no_progress))
355
374
  time_end = time.time()
356
375
  elapsed = time_end - time_start
357
376
  _print_call_resolution_diagnostics(graph_builder)
@@ -608,34 +627,56 @@ def _render_offline_visualization(
608
627
  def _ident(value) -> Optional[str]:
609
628
  return None if value is None else str(value)
610
629
 
611
- # Neo4j/Falkor return driver objects carrying .labels / .type; Kùzu and
612
- # Ladybug return plain dicts carrying _label plus _src/_dst. Check the
613
- # driver attributes first a driver object may also be dict-like.
630
+ # Kùzu spells the internal record keys in lowercase (_label/_src/_dst/_id);
631
+ # Ladybug returns the same fields uppercased (_LABEL/_SRC/_DST/_ID). Look
632
+ # up both spellings so either backend reaches the offline renderer (#1458).
633
+ def _meta(d: dict, key: str, default=None):
634
+ if key in d:
635
+ return d[key]
636
+ return d.get(key.upper(), default)
637
+
638
+ def _has_meta(d: dict, key: str) -> bool:
639
+ return key in d or key.upper() in d
640
+
641
+ # Neo4j returns driver objects carrying .labels / .type that support
642
+ # dict()/Mapping access. FalkorDB's own driver objects also carry
643
+ # .labels on nodes, but are NOT dict-convertible — their properties live
644
+ # in a plain `.properties` dict, and its Edge exposes `.relation` /
645
+ # `.src_node` / `.dest_node` instead of `.type` / `.start_node` /
646
+ # `.end_node`. Kùzu and Ladybug return plain dicts carrying _label plus
647
+ # _src/_dst. Check the driver attributes first — a driver object may
648
+ # also be dict-like.
614
649
  def _is_relationship(value) -> bool:
615
650
  if hasattr(value, "labels"):
616
651
  return False
617
652
  if hasattr(value, "type"):
618
653
  return True
619
- return isinstance(value, dict) and "_src" in value and "_dst" in value
654
+ if hasattr(value, "relation") and hasattr(value, "src_node"):
655
+ return True
656
+ return isinstance(value, dict) and _has_meta(value, "_src") and _has_meta(value, "_dst")
620
657
 
621
658
  def _is_node(value) -> bool:
622
659
  if hasattr(value, "labels"):
623
660
  return True
624
661
  if hasattr(value, "type"):
625
662
  return False
663
+ if hasattr(value, "relation") and hasattr(value, "src_node"):
664
+ return False
626
665
  # Kùzu relationships also carry _label, so _src/_dst is what
627
666
  # distinguishes them from nodes.
628
- return isinstance(value, dict) and "_label" in value and "_src" not in value
667
+ return isinstance(value, dict) and _has_meta(value, "_label") and not _has_meta(value, "_src")
629
668
 
630
669
  def _node_payload(value) -> Dict[str, Any]:
631
670
  if hasattr(value, "labels"):
632
- props = dict(value)
671
+ # FalkorDB's Node keeps properties in `.properties` and is not
672
+ # itself iterable; Neo4j's Node supports dict() via Mapping.
673
+ props = dict(value.properties) if hasattr(value, "properties") else dict(value)
633
674
  labels = list(getattr(value, "labels", []) or [])
634
675
  label = labels[0] if labels else "Node"
635
676
  node_id = getattr(value, "element_id", None) or getattr(value, "id", None)
636
677
  else:
637
- props, label = dict(value), value.get("_label", "Node")
638
- node_id = value.get("_id")
678
+ props, label = dict(value), _meta(value, "_label", "Node")
679
+ node_id = _meta(value, "_id")
639
680
  if node_id is None:
640
681
  node_id = props.get("path") or props.get("name")
641
682
  return {
@@ -646,20 +687,33 @@ def _render_offline_visualization(
646
687
  "line_number": props.get("line_number"),
647
688
  }
648
689
 
690
+ def _node_ref_id(ref) -> Any:
691
+ # Neo4j's start_node/end_node are full Node objects; FalkorDB's
692
+ # src_node/dest_node are already the bare node id (an int).
693
+ if isinstance(ref, (int, str)):
694
+ return ref
695
+ return getattr(ref, "element_id", None) or getattr(ref, "id", None)
696
+
649
697
  def _edge_payload(value) -> Optional[Dict[str, Any]]:
698
+ # Neo4j: .start_node/.end_node/.type. FalkorDB: .src_node/.dest_node/
699
+ # .relation.
650
700
  start = getattr(value, "start_node", None)
701
+ if start is None:
702
+ start = getattr(value, "src_node", None)
651
703
  end = getattr(value, "end_node", None)
704
+ if end is None:
705
+ end = getattr(value, "dest_node", None)
652
706
  if start is not None and end is not None:
653
707
  return {
654
- "source": _ident(getattr(start, "element_id", None) or getattr(start, "id", None)),
655
- "target": _ident(getattr(end, "element_id", None) or getattr(end, "id", None)),
656
- "type": getattr(value, "type", "RELATED"),
708
+ "source": _ident(_node_ref_id(start)),
709
+ "target": _ident(_node_ref_id(end)),
710
+ "type": getattr(value, "type", None) or getattr(value, "relation", "RELATED"),
657
711
  }
658
712
  if isinstance(value, dict):
659
713
  return {
660
- "source": _ident(value.get("_src")),
661
- "target": _ident(value.get("_dst")),
662
- "type": value.get("_label", "RELATED"),
714
+ "source": _ident(_meta(value, "_src")),
715
+ "target": _ident(_meta(value, "_dst")),
716
+ "type": _meta(value, "_label", "RELATED"),
663
717
  }
664
718
  return None
665
719
 
@@ -803,7 +857,7 @@ def visualize_helper(
803
857
  db_manager.close_driver()
804
858
 
805
859
 
806
- def reindex_helper(path: str, context: Optional[str] = None):
860
+ def reindex_helper(path: str, context: Optional[str] = None, no_progress: bool = False):
807
861
  """Force re-index by deleting and rebuilding the repository."""
808
862
  time_start = time.time()
809
863
  path_obj = Path(path).resolve()
@@ -836,7 +890,7 @@ def reindex_helper(path: str, context: Optional[str] = None):
836
890
  console.print(f"[cyan]Re-indexing: {path_obj}[/cyan]")
837
891
 
838
892
  try:
839
- asyncio.run(_run_index_with_progress(graph_builder, path_obj, is_dependency=False, cgcignore_path=ctx.cgcignore_path))
893
+ asyncio.run(_run_index_with_progress(graph_builder, path_obj, is_dependency=False, cgcignore_path=ctx.cgcignore_path, disable_progress=no_progress))
840
894
  time_end = time.time()
841
895
  elapsed = time_end - time_start
842
896
  _print_call_resolution_diagnostics(graph_builder)
@@ -87,6 +87,8 @@ DEFAULT_CONFIG = {
87
87
  "DEFAULT_DATABASE": "falkordb",
88
88
  "FALKORDB_PATH": str(CONFIG_DIR / "global" / "db" / "falkordb"),
89
89
  "FALKORDB_SOCKET_PATH": str(CONFIG_DIR / "global" / "db" / "falkordb.sock"),
90
+ # Empty selects a deterministic port derived from each embedded DB socket.
91
+ "FALKORDB_PORT": "",
90
92
  "LADYBUGDB_PATH": str(CONFIG_DIR / "global" / "db" / "ladybugdb"),
91
93
  "KUZUDB_PATH": str(CONFIG_DIR / "global" / "db" / "kuzudb"),
92
94
  "INDEX_VARIABLES": "true",
@@ -142,6 +144,7 @@ CONFIG_DESCRIPTIONS = {
142
144
  "DEFAULT_DATABASE": "Default database backend (neo4j|falkordb|falkordb-remote|kuzudb|nornic|ladybugdb)",
143
145
  "FALKORDB_PATH": "Path to FalkorDB database file",
144
146
  "FALKORDB_SOCKET_PATH": "Path to FalkorDB Unix socket",
147
+ "FALKORDB_PORT": "Optional FalkorDB port override (empty = per-database port)",
145
148
  "LADYBUGDB_PATH": "Path to LadybugDB database directory",
146
149
  "KUZUDB_PATH": "Path to KuzuDB database directory",
147
150
  "INDEX_VARIABLES": "Index variable nodes in the graph (lighter graph if false)",
@@ -1440,6 +1440,7 @@ def index(
1440
1440
  force: bool = typer.Option(False, "--force", "-f", help="Force re-index (delete existing and rebuild)"),
1441
1441
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use (overrides mode/default)"),
1442
1442
  summarize: bool = typer.Option(False, "--summarize", "-s", help="Show a summary of the indexed codebase after indexing"),
1443
+ no_progress: bool = typer.Option(False, "--no-progress", help="Disable live progress rendering during indexing."),
1443
1444
  ):
1444
1445
  """
1445
1446
  Indexes a directory or file by adding it to the code graph.
@@ -1455,9 +1456,9 @@ def index(
1455
1456
  try:
1456
1457
  if force:
1457
1458
  console.print("[yellow]Force re-indexing (--force flag detected)[/yellow]")
1458
- reindex_helper(path, context)
1459
+ reindex_helper(path, context, no_progress=no_progress)
1459
1460
  else:
1460
- index_helper(path, context)
1461
+ index_helper(path, context, no_progress=no_progress)
1461
1462
  except typer.Exit:
1462
1463
  # typer.Exit subclasses RuntimeError and str() is empty, so the handler
1463
1464
  # below caught it, printed nothing, and returned 0 — every helper that
@@ -3050,12 +3051,13 @@ def index_abbrev(
3050
3051
  path: Optional[str] = typer.Argument(None, help="Path to index"),
3051
3052
  force: bool = typer.Option(False, "--force", "-f", help="Force re-index (delete existing and rebuild)"),
3052
3053
  summarize: bool = typer.Option(False, "--summarize", "-s", help="Display a codebase summary after indexing"),
3053
- context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use")
3054
+ context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
3055
+ no_progress: bool = typer.Option(False, "--no-progress", help="Disable live progress rendering during indexing.")
3054
3056
  ):
3055
3057
  """Shortcut for 'cgc index'"""
3056
3058
  # `summarize` must be passed explicitly: omitted, it keeps its OptionInfo
3057
3059
  # sentinel, which is truthy — so `cgc i` always printed the summary.
3058
- index(path, force=force, summarize=summarize, context=context)
3060
+ index(path, force=force, summarize=summarize, context=context, no_progress=no_progress)
3059
3061
 
3060
3062
  @app.command("ls", rich_help_panel="Shortcuts")
3061
3063
  def list_abbrev(
@@ -3084,7 +3086,10 @@ def visualize_abbrev(
3084
3086
  ):
3085
3087
  """Shortcut for 'cgc visualize'"""
3086
3088
  _load_credentials()
3087
- visualize_helper(repo, port, context=context)
3089
+ # `port` must be passed by keyword: visualize_helper's second positional
3090
+ # parameter is `host`, so the int landed there and the server tried to bind
3091
+ # to host=8000 while ignoring --port entirely.
3092
+ visualize_helper(repo, port=port, context=context)
3088
3093
 
3089
3094
  @app.command("w", rich_help_panel="Shortcuts")
3090
3095
  def watch_abbrev(
@@ -184,6 +184,11 @@ def find_jetbrains_mcp_config():
184
184
  configs.append(mcp_file)
185
185
  print(mcp_file)
186
186
  return configs
187
+ # Always return a list: callers store this directly in the config_paths
188
+ # mapping and iterate it, so returning None (no JetBrains install, or no
189
+ # mcpServer.xml yet) raised a TypeError instead of falling through to the
190
+ # "configure manually" path.
191
+ return configs
187
192
 
188
193
 
189
194
  def convert_mcp_json_to_yaml():