codegraphcontext 0.6.8__tar.gz → 0.6.10__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 (191) hide show
  1. {codegraphcontext-0.6.8/src/codegraphcontext.egg-info → codegraphcontext-0.6.10}/PKG-INFO +9 -1
  2. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/README.md +8 -0
  3. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/pyproject.toml +1 -1
  4. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/cli_helpers.py +41 -45
  5. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/main.py +23 -5
  6. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/setup_wizard.py +69 -3
  7. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/cgc_bundle.py +54 -3
  8. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/cgcignore.py +41 -1
  9. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/database_embedded_kuzu.py +3 -2
  10. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tool_definitions.py +1 -1
  11. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/code_finder.py +23 -22
  12. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +119 -100
  13. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/datasources/mysql_ingester.py +143 -121
  14. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/handlers/management_handlers.py +4 -0
  15. codegraphcontext-0.6.10/src/codegraphcontext/utils/graph_shapes.py +123 -0
  16. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/visualize_graph.py +11 -3
  17. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/server.py +22 -11
  18. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10/src/codegraphcontext.egg-info}/PKG-INFO +9 -1
  19. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext.egg-info/SOURCES.txt +1 -0
  20. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/LICENSE +0 -0
  21. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/MANIFEST.in +0 -0
  22. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/setup.cfg +0 -0
  23. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/__init__.py +0 -0
  24. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/__main__.py +0 -0
  25. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/api/__init__.py +0 -0
  26. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/api/app.py +0 -0
  27. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/api/auth.py +0 -0
  28. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/api/mcp_sse.py +0 -0
  29. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/api/router.py +0 -0
  30. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/api/schemas.py +0 -0
  31. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/__init__.py +0 -0
  32. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/config_manager.py +0 -0
  33. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/hook_manager.py +0 -0
  34. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/project_config.py +0 -0
  35. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/registry_commands.py +0 -0
  36. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/setup_macos.py +0 -0
  37. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/simulator.py +0 -0
  38. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/cli/visualizer.py +0 -0
  39. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/__init__.py +0 -0
  40. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/bundle_registry.py +0 -0
  41. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/database.py +0 -0
  42. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/database_falkordb.py +0 -0
  43. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
  44. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/database_kuzu.py +0 -0
  45. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/database_ladybug.py +0 -0
  46. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/database_nornic.py +0 -0
  47. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/falkor_worker.py +0 -0
  48. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/graph_query.py +0 -0
  49. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/jobs.py +0 -0
  50. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/simulator.py +0 -0
  51. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/core/watcher.py +0 -0
  52. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/prompts.py +0 -0
  53. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/server.py +0 -0
  54. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/stdlibs.py +0 -0
  55. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/__init__.py +0 -0
  56. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
  57. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
  58. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
  59. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/graph_builder.py +0 -0
  60. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
  61. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
  62. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
  63. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
  64. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
  65. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/constants.py +0 -0
  66. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
  67. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
  68. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
  69. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
  70. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/persistence/writer.py +0 -0
  71. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/pipeline.py +0 -0
  72. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/pre_scan.py +0 -0
  73. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
  74. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/resolution/calls.py +0 -0
  75. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +0 -0
  76. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +0 -0
  77. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/sanitize.py +0 -0
  78. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/schema.py +0 -0
  79. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/schema_contract.py +0 -0
  80. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/scip_pipeline.py +0 -0
  81. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
  82. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/c.py +0 -0
  83. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/cpp.py +0 -0
  84. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/csharp.py +0 -0
  85. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/css.py +0 -0
  86. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/dart.py +0 -0
  87. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/elisp.py +0 -0
  88. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/elixir.py +0 -0
  89. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/go.py +0 -0
  90. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/gradle.py +0 -0
  91. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/haskell.py +0 -0
  92. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/html.py +0 -0
  93. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/java.py +0 -0
  94. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/javascript.py +0 -0
  95. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
  96. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/lua.py +0 -0
  97. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/maven.py +0 -0
  98. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
  99. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/perl.py +0 -0
  100. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/php.py +0 -0
  101. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/python.py +0 -0
  102. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/ruby.py +0 -0
  103. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/rust.py +0 -0
  104. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/scala.py +0 -0
  105. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/sfc_common.py +0 -0
  106. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/solidity.py +0 -0
  107. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/solidity_remappings.py +0 -0
  108. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/svelte.py +0 -0
  109. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/swift.py +0 -0
  110. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/typescript.py +0 -0
  111. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
  112. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/languages/vue.py +0 -0
  113. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/package_resolver.py +0 -0
  114. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
  115. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
  116. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
  117. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
  118. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
  119. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
  120. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
  121. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
  122. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
  123. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
  124. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
  125. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
  126. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
  127. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
  128. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/solidity_toolkit.py +0 -0
  129. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
  130. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
  131. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/report_generator.py +0 -0
  132. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/scip_indexer.py +0 -0
  133. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/scip_pb2.py +0 -0
  134. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/system.py +0 -0
  135. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/tree_sitter_parser.py +0 -0
  136. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/tools/type_utils.py +0 -0
  137. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/cypher_ddl.py +0 -0
  138. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/cypher_readonly.py +0 -0
  139. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/debug_log.py +0 -0
  140. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/gcf_encoder.py +0 -0
  141. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/git_utils.py +0 -0
  142. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/path_ignore.py +0 -0
  143. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/path_sandbox.py +0 -0
  144. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/repo_path.py +0 -0
  145. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/secret_scanner.py +0 -0
  146. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/tool_limits.py +0 -0
  147. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/utils/tree_sitter_manager.py +0 -0
  148. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
  149. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
  150. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
  151. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
  152. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
  153. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +0 -0
  154. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +0 -0
  155. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +0 -0
  156. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +0 -0
  157. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
  158. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
  159. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
  160. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/index.html +0 -0
  161. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/logo-icon.svg +0 -0
  162. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/logo.svg +0 -0
  163. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
  164. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
  165. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/robots.txt +0 -0
  166. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
  167. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
  168. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
  169. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
  170. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
  171. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
  172. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
  173. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
  174. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
  175. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
  176. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
  177. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
  178. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
  179. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
  180. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
  181. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
  182. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
  183. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
  184. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
  185. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
  186. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
  187. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
  188. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext.egg-info/requires.txt +0 -0
  189. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/src/codegraphcontext.egg-info/top_level.txt +0 -0
  190. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/tests/test_issue_806_fix.py +0 -0
  191. {codegraphcontext-0.6.8 → codegraphcontext-0.6.10}/tests/test_mcp_sse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraphcontext
3
- Version: 0.6.8
3
+ Version: 0.6.10
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
@@ -873,6 +873,14 @@ Once the server is running, you can interact with it through your AI assistant u
873
873
 
874
874
  ---
875
875
 
876
+ ## Troubleshooting
877
+
878
+ Hitting a lock error, a "never finishes indexing" loop, or a silent feature?
879
+ See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) — every entry maps a
880
+ real reported issue to its fix or workaround.
881
+
882
+ ---
883
+
876
884
  ## Contributing
877
885
 
878
886
  Contributions are welcome! 🎉
@@ -774,6 +774,14 @@ Once the server is running, you can interact with it through your AI assistant u
774
774
 
775
775
  ---
776
776
 
777
+ ## Troubleshooting
778
+
779
+ Hitting a lock error, a "never finishes indexing" loop, or a silent feature?
780
+ See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) — every entry maps a
781
+ real reported issue to its fix or workaround.
782
+
783
+ ---
784
+
777
785
  ## Contributing
778
786
 
779
787
  Contributions are welcome! 🎉
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codegraphcontext"
3
- version = "0.6.8"
3
+ version = "0.6.10"
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"
@@ -26,6 +26,7 @@ from ..core import get_database_manager
26
26
  from ..core.jobs import JobManager
27
27
  from ..tools.code_finder import CodeFinder
28
28
  from ..tools.graph_builder import GraphBuilder
29
+ from ..utils import graph_shapes
29
30
  from ..tools.package_resolver import get_local_package_path
30
31
  from ..utils.debug_log import info_logger, warning_logger
31
32
  from ..core.database import Neo4jConnectionError
@@ -227,7 +228,14 @@ def _initialize_services(
227
228
  _fail_services_init()
228
229
  else:
229
230
  console.print(f"[bold red]Database Connection Error:[/bold red] {e}")
230
- console.print("Please ensure your database is configured correctly or run 'cgc doctor'.")
231
+ if "Could not set lock on file" in str(e):
232
+ console.print(
233
+ "[yellow]Another CGC process already has this embedded database open. "
234
+ "If a CGC Gateway or watcher is running, use its MCP/HTTP interface "
235
+ "or stop it before running database-backed CLI commands.[/yellow]"
236
+ )
237
+ else:
238
+ console.print("Please ensure your database is configured correctly or run 'cgc doctor'.")
231
239
  _fail_services_init()
232
240
 
233
241
  # The GraphBuilder requires an event loop, even for synchronous-style execution
@@ -334,6 +342,21 @@ def index_helper(path: str, context: Optional[str] = None, no_progress: bool = F
334
342
  db_manager.close_driver()
335
343
  raise typer.Exit(code=1)
336
344
 
345
+ # Register the repo in its named context BEFORE the already-indexed skip
346
+ # guard below: the early return used to sit above this call, so a graph
347
+ # populated by any path that skipped registration (MCP add_code_to_graph,
348
+ # an interrupted run) could never reconcile config.yaml through the normal
349
+ # command — 'cgc context list' showed "Repos Linked: 0" forever (#1317).
350
+ # Registration is idempotent, so running it on every invocation is safe.
351
+ # The resolved context name is used so a *default* named context registers
352
+ # too, not only an explicit --context flag.
353
+ if ctx.mode == "named":
354
+ register_context_name = context or getattr(ctx, "context_name", None)
355
+ if register_context_name:
356
+ if not register_repo_in_context(register_context_name, str(path_obj), auto_create=False):
357
+ db_manager.close_driver()
358
+ raise typer.Exit(code=1)
359
+
337
360
  indexed_repos = code_finder.list_indexed_repositories()
338
361
  repo_exists = any_repo_matches_path(indexed_repos, path_obj)
339
362
 
@@ -392,11 +415,6 @@ def index_helper(path: str, context: Optional[str] = None, no_progress: bool = F
392
415
  except Exception as e:
393
416
  console.print(f"[yellow]Warning: Could not check file count: {e}. Proceeding with indexing...[/yellow]")
394
417
 
395
- if context and ctx.mode == "named":
396
- if not register_repo_in_context(context, str(path_obj), auto_create=False):
397
- db_manager.close_driver()
398
- raise typer.Exit(code=1)
399
-
400
418
  console.print(f"Starting indexing for: {path_obj}")
401
419
 
402
420
  try:
@@ -657,44 +675,13 @@ def _render_offline_visualization(
657
675
  def _ident(value) -> Optional[str]:
658
676
  return None if value is None else str(value)
659
677
 
660
- # Kùzu spells the internal record keys in lowercase (_label/_src/_dst/_id);
661
- # Ladybug returns the same fields uppercased (_LABEL/_SRC/_DST/_ID). Look
662
- # up both spellings so either backend reaches the offline renderer (#1458).
663
- def _meta(d: dict, key: str, default=None):
664
- if key in d:
665
- return d[key]
666
- return d.get(key.upper(), default)
667
-
668
- def _has_meta(d: dict, key: str) -> bool:
669
- return key in d or key.upper() in d
670
-
671
- # Neo4j returns driver objects carrying .labels / .type that support
672
- # dict()/Mapping access. FalkorDB's own driver objects also carry
673
- # .labels on nodes, but are NOT dict-convertible — their properties live
674
- # in a plain `.properties` dict, and its Edge exposes `.relation` /
675
- # `.src_node` / `.dest_node` instead of `.type` / `.start_node` /
676
- # `.end_node`. Kùzu and Ladybug return plain dicts carrying _label plus
677
- # _src/_dst. Check the driver attributes first — a driver object may
678
- # also be dict-like.
679
- def _is_relationship(value) -> bool:
680
- if hasattr(value, "labels"):
681
- return False
682
- if hasattr(value, "type"):
683
- return True
684
- if hasattr(value, "relation") and hasattr(value, "src_node"):
685
- return True
686
- return isinstance(value, dict) and _has_meta(value, "_src") and _has_meta(value, "_dst")
687
-
688
- def _is_node(value) -> bool:
689
- if hasattr(value, "labels"):
690
- return True
691
- if hasattr(value, "type"):
692
- return False
693
- if hasattr(value, "relation") and hasattr(value, "src_node"):
694
- return False
695
- # Kùzu relationships also carry _label, so _src/_dst is what
696
- # distinguishes them from nodes.
697
- return isinstance(value, dict) and _has_meta(value, "_label") and not _has_meta(value, "_src")
678
+ # Backend shape handling which driver returns what, and why each spelling
679
+ # has to be accepted lives in utils/graph_shapes, shared with the live
680
+ # web renderer in viz/server.py so the two cannot drift apart again.
681
+ _meta = graph_shapes.meta
682
+ _has_meta = graph_shapes.has_meta
683
+ _is_relationship = graph_shapes.is_relationship
684
+ _is_node = graph_shapes.is_node
698
685
 
699
686
  def _node_payload(value) -> Dict[str, Any]:
700
687
  if hasattr(value, "labels"):
@@ -709,10 +696,19 @@ def _render_offline_visualization(
709
696
  node_id = _meta(value, "_id")
710
697
  if node_id is None:
711
698
  node_id = props.get("path") or props.get("name")
699
+
700
+ name = props.get("name") or props.get("path") or ""
701
+ if name == "<module>":
702
+ _fpath = props.get("path") or props.get("file_path") or ""
703
+ if _fpath:
704
+ name = Path(_fpath).name
705
+ else:
706
+ name = "<module>"
707
+
712
708
  return {
713
709
  "id": _ident(node_id),
714
710
  "label": label,
715
- "name": props.get("name") or props.get("path") or "",
711
+ "name": name,
716
712
  "file_path": props.get("path", ""),
717
713
  "line_number": props.get("line_number"),
718
714
  }
@@ -711,6 +711,7 @@ def bundle_export(
711
711
  no_stats: bool = typer.Option(False, "--no-stats", help="Skip statistics generation"),
712
712
  sign_key: Optional[str] = typer.Option(None, "--sign-key", envvar="CGC_BUNDLE_SIGN_KEY", help="HMAC signing key (or set CGC_BUNDLE_SIGN_KEY)"),
713
713
  encrypt_password: Optional[str] = typer.Option(None, "--encrypt-password", envvar="CGC_BUNDLE_PASSWORD", help="Encrypt bundle with this password (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
714
+ exclude_labels: Optional[str] = typer.Option(None, "--exclude-labels", help="Comma-separated node labels to leave out of the bundle, with their edges (e.g. DbTable,ExternalClass) (#1323)"),
714
715
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
715
716
  ):
716
717
  """
@@ -760,6 +761,14 @@ def bundle_export(
760
761
  include_stats=not no_stats,
761
762
  sign_key=sign_key,
762
763
  encrypt_password=encrypt_password,
764
+ # bundle_export is also called programmatically (the golden
765
+ # harness does), where unpassed Typer options arrive as OptionInfo
766
+ # objects rather than their defaults — same trap the CLI meta-test
767
+ # documents for other commands.
768
+ exclude_labels=[
769
+ l for l in (exclude_labels if isinstance(exclude_labels, str) else "").split(",")
770
+ if l.strip()
771
+ ],
763
772
  )
764
773
 
765
774
  if success:
@@ -1137,6 +1146,7 @@ def export_shortcut(
1137
1146
  no_stats: bool = typer.Option(False, "--no-stats", help="Skip generating statistics in the bundle"),
1138
1147
  sign_key: Optional[str] = typer.Option(None, "--sign-key", envvar="CGC_BUNDLE_SIGN_KEY", help="HMAC signing key (or set CGC_BUNDLE_SIGN_KEY)"),
1139
1148
  encrypt_password: Optional[str] = typer.Option(None, "--encrypt-password", envvar="CGC_BUNDLE_PASSWORD", help="Encrypt bundle with this password (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
1149
+ exclude_labels: Optional[str] = typer.Option(None, "--exclude-labels", help="Comma-separated node labels to leave out of the bundle, with their edges (e.g. DbTable,ExternalClass) (#1323)"),
1140
1150
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
1141
1151
  ):
1142
1152
  """Shortcut for 'cgc bundle export'"""
@@ -1146,6 +1156,7 @@ def export_shortcut(
1146
1156
  no_stats=no_stats,
1147
1157
  sign_key=sign_key,
1148
1158
  encrypt_password=encrypt_password,
1159
+ exclude_labels=exclude_labels,
1149
1160
  context=context,
1150
1161
  )
1151
1162
 
@@ -2546,16 +2557,17 @@ def find_by_decorator_search(
2546
2557
 
2547
2558
  @find_app.command("argument")
2548
2559
  def find_by_argument_search(
2549
- argument: str = typer.Argument(..., help="Argument/parameter name to search for"),
2560
+ argument: str = typer.Argument(..., help="Argument/parameter name or type to search for"),
2550
2561
  file: Optional[str] = typer.Option(None, "--file", "-f", help="Specific file path"),
2551
2562
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
2552
2563
  ):
2553
2564
  """
2554
- Find functions that take a specific argument/parameter.
2565
+ Find functions that take a specific argument/parameter name or type.
2555
2566
 
2556
2567
  Examples:
2557
2568
  cgc find argument password
2558
2569
  cgc find argument user_id --file src/auth.py
2570
+ cgc find argument OrderFilter
2559
2571
  """
2560
2572
  _load_credentials()
2561
2573
  services = _initialize_services(context)
@@ -2571,7 +2583,7 @@ def find_by_argument_search(
2571
2583
  results = results[:req_limit]
2572
2584
 
2573
2585
  if not results:
2574
- console.print(f"[yellow]No functions found with argument '{argument}'[/yellow]")
2586
+ console.print(f"[yellow]No functions found with argument name or type '{argument}'[/yellow]")
2575
2587
  return
2576
2588
 
2577
2589
  table = Table(show_header=True, header_style="bold magenta", box=box.ROUNDED)
@@ -3635,6 +3647,8 @@ def datasource_mysql(
3635
3647
  database: str = typer.Option(..., "--database", "-d", help="Database / schema name"),
3636
3648
  name: Optional[str] = typer.Option(None, "--name", "-n", help="Logical datasource name (default: mysql-<database>)"),
3637
3649
  env: str = typer.Option("production", "--env", "-e", help="Deployment environment label"),
3650
+ ssl_verify: bool = typer.Option(False, "--ssl-verify", help="Connect over TLS and verify the server certificate (#1094)"),
3651
+ ssl_ca_certs: Optional[str] = typer.Option(None, "--ssl-ca-certs", help="CA bundle path for --ssl-verify (default: system trust store)"),
3638
3652
  context: Optional[str] = typer.Option(None, "--context", "-c", help="CGC context to use"),
3639
3653
  ):
3640
3654
  """Ingest Aurora MySQL schema (tables + columns) and write to the code graph.
@@ -3650,7 +3664,8 @@ def datasource_mysql(
3650
3664
  console.print(f"[cyan]Connecting to Aurora MySQL at {host}:{port}/{database}...[/cyan]")
3651
3665
  try:
3652
3666
  result = mysql_ingest(host=host, port=port, user=user, password=password,
3653
- database=database, name=name, env=env)
3667
+ database=database, name=name, env=env,
3668
+ ssl_verify=ssl_verify, ssl_ca_certs=ssl_ca_certs)
3654
3669
  except Exception as exc:
3655
3670
  console.print(f"[red]Failed to connect / ingest:[/red] {exc}")
3656
3671
  raise typer.Exit(1)
@@ -3672,6 +3687,8 @@ def datasource_cassandra(
3672
3687
  password: Optional[str] = typer.Option(None, "--password", "-P", help="Cassandra password", hide_input=True),
3673
3688
  name: Optional[str] = typer.Option(None, "--name", "-n", help="Logical datasource name (default: cassandra-<keyspace>)"),
3674
3689
  env: str = typer.Option("production", "--env", "-e", help="Deployment environment label"),
3690
+ ssl_verify: bool = typer.Option(False, "--ssl-verify", help="Connect over TLS and verify the server certificate (#1094)"),
3691
+ ssl_ca_certs: Optional[str] = typer.Option(None, "--ssl-ca-certs", help="CA bundle path for --ssl-verify (default: system trust store)"),
3675
3692
  context: Optional[str] = typer.Option(None, "--context", "-c", help="CGC context to use"),
3676
3693
  ):
3677
3694
  """Ingest Cassandra keyspace schema (tables + columns) and write to the code graph.
@@ -3688,7 +3705,8 @@ def datasource_cassandra(
3688
3705
  console.print(f"[cyan]Connecting to Cassandra at {hosts}/{keyspace}...[/cyan]")
3689
3706
  try:
3690
3707
  result = cassandra_ingest(hosts=hosts, port=port, keyspace=keyspace,
3691
- username=username, password=password, name=name, env=env)
3708
+ username=username, password=password, name=name, env=env,
3709
+ ssl_verify=ssl_verify, ssl_ca_certs=ssl_ca_certs)
3692
3710
  except Exception as exc:
3693
3711
  console.print(f"[red]Failed to connect / ingest:[/red] {exc}")
3694
3712
  raise typer.Exit(1)
@@ -7,6 +7,7 @@ import os
7
7
  from pathlib import Path
8
8
  import time
9
9
  import json
10
+ import re
10
11
  import sys
11
12
  import shutil
12
13
  import yaml
@@ -15,6 +16,48 @@ from codegraphcontext.cli.config_manager import normalize_config_path
15
16
 
16
17
  console = Console()
17
18
 
19
+ def _strip_jsonc(text: str) -> str:
20
+ """Drop // and /* */ comments and trailing commas from a JSONC document.
21
+
22
+ VS Code and its forks write settings.json as JSONC. json.loads rejects both,
23
+ and treating that rejection as "no settings yet" discards the user's file.
24
+ """
25
+ out = []
26
+ i, n = 0, len(text)
27
+ in_string = escaped = False
28
+ while i < n:
29
+ ch = text[i]
30
+ if in_string:
31
+ out.append(ch)
32
+ if escaped:
33
+ escaped = False
34
+ elif ch == "\\":
35
+ escaped = True
36
+ elif ch == '"':
37
+ in_string = False
38
+ i += 1
39
+ continue
40
+ if ch == '"':
41
+ in_string = True
42
+ out.append(ch)
43
+ i += 1
44
+ continue
45
+ if text.startswith("//", i):
46
+ i = text.find("\n", i)
47
+ if i == -1:
48
+ break
49
+ continue
50
+ if text.startswith("/*", i):
51
+ end = text.find("*/", i + 2)
52
+ i = n if end == -1 else end + 2
53
+ continue
54
+ out.append(ch)
55
+ i += 1
56
+ stripped = "".join(out)
57
+ # A trailing comma before } or ] is legal JSONC, not JSON.
58
+ return re.sub(r",(\s*[}\]])", r"\1", stripped)
59
+
60
+
18
61
  def _check_write_access(path: Path) -> bool:
19
62
  target = path if path.exists() else path.parent
20
63
 
@@ -483,12 +526,26 @@ def _configure_ide(mcp_config):
483
526
 
484
527
  console.print(f"Using configuration file at: {target_path}")
485
528
 
529
+ had_comments = False
486
530
  try:
487
- with open(target_path, "r") as f:
531
+ raw = target_path.read_text()
532
+ try:
533
+ settings = json.loads(raw)
534
+ except json.JSONDecodeError:
488
535
  try:
489
- settings = json.load(f)
536
+ settings = json.loads(_strip_jsonc(raw))
537
+ had_comments = True
490
538
  except json.JSONDecodeError:
491
- settings = {}
539
+ # Never fall back to {}: this file gets written back below, so
540
+ # treating an unreadable file as an empty one destroys it.
541
+ console.print(
542
+ f"[bold red]Could not parse {target_path}.[/bold red] "
543
+ "Leaving it untouched so nothing is lost."
544
+ )
545
+ console.print(
546
+ "Please add the MCP configuration manually from the `mcp.json` file generated above."
547
+ )
548
+ return
492
549
  except FileNotFoundError:
493
550
  settings = {}
494
551
 
@@ -515,6 +572,15 @@ def _configure_ide(mcp_config):
515
572
  )
516
573
  return
517
574
 
575
+ if target_path.exists():
576
+ backup_path = target_path.with_suffix(target_path.suffix + ".cgc-backup")
577
+ shutil.copy2(target_path, backup_path)
578
+ console.print(f"[dim]Backed up existing configuration to {backup_path}[/dim]")
579
+ if had_comments:
580
+ console.print(
581
+ "[yellow]Note: this file contained comments. JSON output cannot keep them, "
582
+ "so they are dropped in the rewritten file (the backup above still has them).[/yellow]"
583
+ )
518
584
  try:
519
585
  with open(target_path, "w") as f:
520
586
  json.dump(settings, f, indent=2)
@@ -199,6 +199,7 @@ class CGCBundle:
199
199
  include_stats: bool = True,
200
200
  sign_key: Optional[str] = None,
201
201
  encrypt_password: Optional[str] = None,
202
+ exclude_labels: Optional[List[str]] = None,
202
203
  ) -> Tuple[bool, str]:
203
204
  """
204
205
  Export the current graph (or a specific repository) to a .cgc bundle.
@@ -225,6 +226,12 @@ class CGCBundle:
225
226
  # Step 1: Extract metadata base
226
227
  info_logger("Extracting metadata...")
227
228
  metadata = self._extract_metadata(repo_path)
229
+ if exclude_labels:
230
+ # Recorded for transparency: a consumer can tell a bundle
231
+ # was exported without these node types (#1323).
232
+ metadata["excluded_labels"] = sorted(
233
+ {l.strip() for l in exclude_labels if l.strip()}
234
+ )
228
235
 
229
236
  # Step 2: Extract schema
230
237
  info_logger("Extracting schema...")
@@ -234,7 +241,7 @@ class CGCBundle:
234
241
 
235
242
  # Step 3: Extract nodes
236
243
  info_logger("Extracting nodes...")
237
- node_count = self._extract_nodes(temp_path / "nodes.jsonl", repo_path)
244
+ node_count = self._extract_nodes(temp_path / "nodes.jsonl", repo_path, exclude_labels=exclude_labels)
238
245
  if node_count == 0:
239
246
  return False, (
240
247
  "No nodes to export. Index the repository first or verify "
@@ -244,6 +251,7 @@ class CGCBundle:
244
251
  # Step 4: Extract edges
245
252
  info_logger("Extracting edges...")
246
253
  edge_count = self._extract_edges(temp_path / "edges.jsonl", repo_path)
254
+ # (edge filtering uses the id set _extract_nodes recorded)
247
255
 
248
256
  # Step 5: Generate statistics and assemble standardized metadata
249
257
  if include_stats:
@@ -667,10 +675,19 @@ class CGCBundle:
667
675
  """,
668
676
  ]
669
677
 
670
- def _extract_nodes(self, output_file: Path, repo_path: Optional[Path]) -> int:
671
- """Extract all nodes to JSONL format."""
678
+ def _extract_nodes(self, output_file: Path, repo_path: Optional[Path], exclude_labels: Optional[List[str]] = None) -> int:
679
+ """Extract all nodes to JSONL format.
680
+
681
+ ``exclude_labels`` drops nodes carrying any of the given labels
682
+ (#1323 — e.g. DbTable/ExternalClass datasource metadata that path
683
+ filters can never reach). Their ids are recorded so
684
+ ``_extract_edges`` drops the touching edges too, keeping the bundle
685
+ free of dangling endpoints.
686
+ """
672
687
  count = 0
673
688
  seen_nodes = set()
689
+ excluded = {l.strip() for l in (exclude_labels or []) if l.strip()}
690
+ self._excluded_node_ids = set()
674
691
 
675
692
  with self.db_manager.get_driver(self._active_graph).session() as session:
676
693
  if repo_path:
@@ -691,6 +708,12 @@ class CGCBundle:
691
708
  if node_key in seen_nodes:
692
709
  continue
693
710
  seen_nodes.add(node_key)
711
+
712
+ if excluded and any(l in excluded for l in labels):
713
+ self._excluded_node_ids.add(
714
+ self._stable_id_key(self._export_id_of(node, node_dict))
715
+ )
716
+ continue
694
717
 
695
718
  # Clean up absolute path prefix to keep it relative
696
719
  if repo_path:
@@ -718,6 +741,24 @@ class CGCBundle:
718
741
 
719
742
  return count
720
743
 
744
+ @staticmethod
745
+ def _stable_id_key(node_id) -> str:
746
+ """A hashable, backend-agnostic key for a node id (dict for Kùzu,
747
+ string for Neo4j/FalkorDB)."""
748
+ if isinstance(node_id, dict):
749
+ return json.dumps(node_id, sort_keys=True, default=str)
750
+ return str(node_id)
751
+
752
+ @staticmethod
753
+ def _export_id_of(node, node_dict):
754
+ if '_id' in node_dict:
755
+ return node_dict['_id']
756
+ if hasattr(node, 'element_id'):
757
+ return node.element_id
758
+ if hasattr(node, 'id'):
759
+ return str(node.id)
760
+ return None
761
+
721
762
  def _extract_edges(self, output_file: Path, repo_path: Optional[Path]) -> int:
722
763
  """Extract all relationships to JSONL format."""
723
764
  count = 0
@@ -779,6 +820,16 @@ class CGCBundle:
779
820
  else:
780
821
  to_id = str(id(target))
781
822
 
823
+ # Drop edges touching a label-excluded node (#1323):
824
+ # nodes.jsonl no longer carries the endpoint, and a
825
+ # dangling reference is an import failure waiting.
826
+ excluded_ids = getattr(self, "_excluded_node_ids", None)
827
+ if excluded_ids and (
828
+ self._stable_id_key(from_id) in excluded_ids
829
+ or self._stable_id_key(to_id) in excluded_ids
830
+ ):
831
+ continue
832
+
782
833
  # Clean up absolute path prefix inside edge properties
783
834
  if repo_path:
784
835
  repo_str = repo_path.resolve().as_posix()
@@ -64,6 +64,32 @@ def find_cgcignore(ignore_root: Path, explicit_path: Optional[str] = None) -> Op
64
64
  return explicit_candidate
65
65
  return None
66
66
 
67
+ def find_gitignore(ignore_root: Path) -> Optional[Path]:
68
+ """Find a repository-local .gitignore, searched the same way as .cgcignore.
69
+
70
+ Bounded to the git worktree for the same reason find_cgcignore is: an indexed
71
+ path outside a repo must not pick up something like /tmp/.gitignore.
72
+ """
73
+ git_root: Optional[Path] = None
74
+ probe = ignore_root
75
+ while True:
76
+ if (probe / ".git").exists():
77
+ git_root = probe
78
+ break
79
+ if probe.parent == probe:
80
+ break
81
+ probe = probe.parent
82
+
83
+ curr = ignore_root
84
+ while True:
85
+ candidate = curr / ".gitignore"
86
+ if candidate.is_file():
87
+ return candidate
88
+ if git_root is None or curr == git_root:
89
+ return None
90
+ curr = curr.parent
91
+
92
+
67
93
  def ensure_default_cgcignore(path: Path, default_patterns: list[str]) -> None:
68
94
  """Create a .cgcignore file with default patterns when it does not exist."""
69
95
  path.parent.mkdir(parents=True, exist_ok=True)
@@ -265,9 +291,23 @@ def build_ignore_spec(
265
291
  parse_cgcignore_lines(explicit_cgcignore_path.read_text(encoding="utf-8").splitlines())
266
292
  )
267
293
 
294
+ gitignore_patterns: list[str] = []
295
+ gitignore_path = find_gitignore(ignore_root)
296
+ if gitignore_path is not None:
297
+ try:
298
+ gitignore_patterns = parse_cgcignore_lines(
299
+ gitignore_path.read_text(encoding="utf-8").splitlines()
300
+ )
301
+ except OSError as e:
302
+ warning_logger(f"Failed to read {gitignore_path}: {e}")
303
+
268
304
  # Defaults first, user patterns last: matching is last-match-wins (see
269
305
  # CGCIgnoreMatcher.match_file), so appending the defaults would make them
270
306
  # unconditionally override the user's rules and leave `!build/` with no way
271
307
  # to re-include a directory the built-in list ignores.
272
- all_patterns = list(default_patterns) + merged_user_patterns
308
+ #
309
+ # .gitignore sits between the two for the same reason: what git ignores is
310
+ # ignored by default, while a `!pattern` in .cgcignore can still bring a
311
+ # git-ignored path back into the graph.
312
+ all_patterns = list(default_patterns) + gitignore_patterns + merged_user_patterns
273
313
  return CGCIgnoreMatcher(all_patterns, ignore_root), local_cgcignore_path
@@ -174,7 +174,7 @@ class EmbeddedGraphManager(GraphQueryInterface):
174
174
  ("Directory", "path STRING, name STRING, PRIMARY KEY (path)"),
175
175
  ("Module", "name STRING, lang STRING, full_import_name STRING, path STRING, line_number INT64, PRIMARY KEY (name)"),
176
176
  # For types with composite keys (name, path, line_number), we use a 'uid'
177
- ("Function", "uid STRING, name STRING, path STRING, line_number INT64, occurrence_index INT64, end_line INT64, source STRING, docstring STRING, lang STRING, cyclomatic_complexity INT64, context STRING, context_type STRING, class_context STRING, class_context_line INT64, module_context STRING, is_dependency BOOLEAN, decorators STRING[], args STRING[], http_method STRING, http_path STRING, embedding DOUBLE[], visibility STRING, modifiers STRING[], is_composable BOOLEAN, PRIMARY KEY (uid)"),
177
+ ("Function", "uid STRING, name STRING, path STRING, line_number INT64, occurrence_index INT64, end_line INT64, source STRING, docstring STRING, lang STRING, cyclomatic_complexity INT64, context STRING, context_type STRING, class_context STRING, class_context_line INT64, module_context STRING, is_dependency BOOLEAN, decorators STRING[], args STRING[], arg_types STRING[], http_method STRING, http_path STRING, embedding DOUBLE[], visibility STRING, modifiers STRING[], is_composable BOOLEAN, PRIMARY KEY (uid)"),
178
178
  ("Class", "uid STRING, name STRING, path STRING, line_number INT64, occurrence_index INT64, end_line INT64, source STRING, docstring STRING, lang STRING, node_type STRING, is_dependency BOOLEAN, decorators STRING[], visibility STRING, modifiers STRING[], PRIMARY KEY (uid)"),
179
179
  ("Variable", "uid STRING, name STRING, path STRING, line_number INT64, occurrence_index INT64, source STRING, docstring STRING, lang STRING, value STRING, context STRING, is_dependency BOOLEAN, PRIMARY KEY (uid)"),
180
180
  ("Trait", "uid STRING, name STRING, path STRING, line_number INT64, occurrence_index INT64, end_line INT64, source STRING, docstring STRING, lang STRING, is_dependency BOOLEAN, PRIMARY KEY (uid)"),
@@ -385,6 +385,7 @@ class EmbeddedGraphManager(GraphQueryInterface):
385
385
  ("Function", "is_composable", "BOOLEAN"),
386
386
  ("Function", "http_method", "STRING"),
387
387
  ("Function", "http_path", "STRING"),
388
+ ("Function", "arg_types", "STRING[]"),
388
389
  # Kotlin/JVM precision improvements
389
390
  ("Function", "class_context_line", "INT64"),
390
391
  ("Function", "module_context", "STRING"),
@@ -915,7 +916,7 @@ class EmbeddedSessionWrapper:
915
916
  'File': {'path', 'name', 'relative_path', 'package_name', 'language', 'is_dependency'},
916
917
  'Directory': {'path', 'name'},
917
918
  'Module': {'name', 'lang', 'full_import_name', 'path', 'line_number'},
918
- 'Function': {'uid', 'name', 'path', 'line_number', 'occurrence_index', 'end_line', 'source', 'docstring', 'lang', 'cyclomatic_complexity', 'context', 'context_type', 'class_context', 'class_context_line', 'module_context', 'is_dependency', 'decorators', 'args', 'http_method', 'http_path', 'visibility', 'modifiers', 'is_composable'},
919
+ 'Function': {'uid', 'name', 'path', 'line_number', 'occurrence_index', 'end_line', 'source', 'docstring', 'lang', 'cyclomatic_complexity', 'context', 'context_type', 'class_context', 'class_context_line', 'module_context', 'is_dependency', 'decorators', 'args', 'arg_types', 'http_method', 'http_path', 'visibility', 'modifiers', 'is_composable'},
919
920
  'Class': {'uid', 'name', 'path', 'line_number', 'occurrence_index', 'end_line', 'source', 'docstring', 'lang', 'node_type', 'is_dependency', 'decorators', 'visibility', 'modifiers'},
920
921
  'Variable': {'uid', 'name', 'path', 'line_number', 'occurrence_index', 'source', 'docstring', 'lang', 'value', 'context', 'is_dependency'},
921
922
  'Trait': {'uid', 'name', 'path', 'line_number', 'occurrence_index', 'end_line', 'source', 'docstring', 'lang', 'is_dependency'},
@@ -110,7 +110,7 @@ TOOLS = {
110
110
  },
111
111
  "target": {
112
112
  "type": "string",
113
- "description": "The primary target for the query (e.g., function name, class name, or 'start_func->end_func' for call chains)."
113
+ "description": "The primary query target (for example, a function name, class name, or 'start_func->end_func' for call chains). For find_functions_by_argument, use a parameter name or type."
114
114
  },
115
115
  "context": {
116
116
  "type": "string",