codegraphcontext 0.6.8__tar.gz → 0.6.9__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.9}/PKG-INFO +1 -1
  2. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/pyproject.toml +1 -1
  3. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/cli_helpers.py +26 -40
  4. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/main.py +12 -5
  5. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/setup_wizard.py +69 -3
  6. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/cgcignore.py +41 -1
  7. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_embedded_kuzu.py +3 -2
  8. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tool_definitions.py +1 -1
  9. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/code_finder.py +23 -22
  10. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +119 -100
  11. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/datasources/mysql_ingester.py +143 -121
  12. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/management_handlers.py +4 -0
  13. codegraphcontext-0.6.9/src/codegraphcontext/utils/graph_shapes.py +123 -0
  14. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/visualize_graph.py +11 -3
  15. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/server.py +22 -11
  16. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9/src/codegraphcontext.egg-info}/PKG-INFO +1 -1
  17. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/SOURCES.txt +1 -0
  18. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/LICENSE +0 -0
  19. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/MANIFEST.in +0 -0
  20. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/README.md +0 -0
  21. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/setup.cfg +0 -0
  22. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/__init__.py +0 -0
  23. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/__main__.py +0 -0
  24. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/api/__init__.py +0 -0
  25. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/api/app.py +0 -0
  26. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/api/auth.py +0 -0
  27. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/api/mcp_sse.py +0 -0
  28. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/api/router.py +0 -0
  29. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/api/schemas.py +0 -0
  30. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/__init__.py +0 -0
  31. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/config_manager.py +0 -0
  32. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/hook_manager.py +0 -0
  33. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/project_config.py +0 -0
  34. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/registry_commands.py +0 -0
  35. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/setup_macos.py +0 -0
  36. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/simulator.py +0 -0
  37. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/visualizer.py +0 -0
  38. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/__init__.py +0 -0
  39. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/bundle_registry.py +0 -0
  40. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/cgc_bundle.py +0 -0
  41. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database.py +0 -0
  42. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_falkordb.py +0 -0
  43. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
  44. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_kuzu.py +0 -0
  45. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_ladybug.py +0 -0
  46. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_nornic.py +0 -0
  47. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/falkor_worker.py +0 -0
  48. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/graph_query.py +0 -0
  49. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/jobs.py +0 -0
  50. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/simulator.py +0 -0
  51. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/core/watcher.py +0 -0
  52. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/prompts.py +0 -0
  53. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/server.py +0 -0
  54. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/stdlibs.py +0 -0
  55. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/__init__.py +0 -0
  56. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
  57. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
  58. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
  59. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/graph_builder.py +0 -0
  60. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
  61. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
  62. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
  63. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
  64. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
  65. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/constants.py +0 -0
  66. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
  67. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
  68. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
  69. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
  70. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/persistence/writer.py +0 -0
  71. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/pipeline.py +0 -0
  72. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/pre_scan.py +0 -0
  73. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
  74. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/resolution/calls.py +0 -0
  75. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +0 -0
  76. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +0 -0
  77. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/sanitize.py +0 -0
  78. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/schema.py +0 -0
  79. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/schema_contract.py +0 -0
  80. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/scip_pipeline.py +0 -0
  81. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
  82. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/c.py +0 -0
  83. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/cpp.py +0 -0
  84. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/csharp.py +0 -0
  85. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/css.py +0 -0
  86. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/dart.py +0 -0
  87. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/elisp.py +0 -0
  88. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/elixir.py +0 -0
  89. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/go.py +0 -0
  90. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/gradle.py +0 -0
  91. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/haskell.py +0 -0
  92. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/html.py +0 -0
  93. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/java.py +0 -0
  94. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/javascript.py +0 -0
  95. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
  96. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/lua.py +0 -0
  97. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/maven.py +0 -0
  98. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
  99. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/perl.py +0 -0
  100. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/php.py +0 -0
  101. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/python.py +0 -0
  102. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/ruby.py +0 -0
  103. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/rust.py +0 -0
  104. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/scala.py +0 -0
  105. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/sfc_common.py +0 -0
  106. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/solidity.py +0 -0
  107. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/solidity_remappings.py +0 -0
  108. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/svelte.py +0 -0
  109. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/swift.py +0 -0
  110. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/typescript.py +0 -0
  111. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
  112. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/vue.py +0 -0
  113. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/package_resolver.py +0 -0
  114. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
  115. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
  116. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
  117. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
  118. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
  119. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
  120. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
  121. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
  122. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
  123. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
  124. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
  125. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
  126. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
  127. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
  128. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/solidity_toolkit.py +0 -0
  129. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
  130. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
  131. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/report_generator.py +0 -0
  132. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/scip_indexer.py +0 -0
  133. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/scip_pb2.py +0 -0
  134. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/system.py +0 -0
  135. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/tree_sitter_parser.py +0 -0
  136. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/type_utils.py +0 -0
  137. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/cypher_ddl.py +0 -0
  138. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/cypher_readonly.py +0 -0
  139. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/debug_log.py +0 -0
  140. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/gcf_encoder.py +0 -0
  141. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/git_utils.py +0 -0
  142. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/path_ignore.py +0 -0
  143. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/path_sandbox.py +0 -0
  144. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/repo_path.py +0 -0
  145. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/secret_scanner.py +0 -0
  146. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/tool_limits.py +0 -0
  147. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/tree_sitter_manager.py +0 -0
  148. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
  149. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
  150. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
  151. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
  152. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
  153. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +0 -0
  154. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +0 -0
  155. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +0 -0
  156. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +0 -0
  157. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
  158. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
  159. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
  160. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/index.html +0 -0
  161. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/logo-icon.svg +0 -0
  162. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/logo.svg +0 -0
  163. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
  164. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
  165. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/robots.txt +0 -0
  166. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
  167. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
  168. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
  169. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
  170. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
  171. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
  172. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
  173. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
  174. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
  175. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
  176. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
  177. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
  178. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
  179. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
  180. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
  181. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
  182. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
  183. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
  184. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
  185. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
  186. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
  187. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
  188. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/requires.txt +0 -0
  189. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/top_level.txt +0 -0
  190. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/tests/test_issue_806_fix.py +0 -0
  191. {codegraphcontext-0.6.8 → codegraphcontext-0.6.9}/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.9
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codegraphcontext"
3
- version = "0.6.8"
3
+ version = "0.6.9"
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
@@ -657,44 +665,13 @@ def _render_offline_visualization(
657
665
  def _ident(value) -> Optional[str]:
658
666
  return None if value is None else str(value)
659
667
 
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")
668
+ # Backend shape handling which driver returns what, and why each spelling
669
+ # has to be accepted lives in utils/graph_shapes, shared with the live
670
+ # web renderer in viz/server.py so the two cannot drift apart again.
671
+ _meta = graph_shapes.meta
672
+ _has_meta = graph_shapes.has_meta
673
+ _is_relationship = graph_shapes.is_relationship
674
+ _is_node = graph_shapes.is_node
698
675
 
699
676
  def _node_payload(value) -> Dict[str, Any]:
700
677
  if hasattr(value, "labels"):
@@ -709,10 +686,19 @@ def _render_offline_visualization(
709
686
  node_id = _meta(value, "_id")
710
687
  if node_id is None:
711
688
  node_id = props.get("path") or props.get("name")
689
+
690
+ name = props.get("name") or props.get("path") or ""
691
+ if name == "<module>":
692
+ _fpath = props.get("path") or props.get("file_path") or ""
693
+ if _fpath:
694
+ name = Path(_fpath).name
695
+ else:
696
+ name = "<module>"
697
+
712
698
  return {
713
699
  "id": _ident(node_id),
714
700
  "label": label,
715
- "name": props.get("name") or props.get("path") or "",
701
+ "name": name,
716
702
  "file_path": props.get("path", ""),
717
703
  "line_number": props.get("line_number"),
718
704
  }
@@ -2546,16 +2546,17 @@ def find_by_decorator_search(
2546
2546
 
2547
2547
  @find_app.command("argument")
2548
2548
  def find_by_argument_search(
2549
- argument: str = typer.Argument(..., help="Argument/parameter name to search for"),
2549
+ argument: str = typer.Argument(..., help="Argument/parameter name or type to search for"),
2550
2550
  file: Optional[str] = typer.Option(None, "--file", "-f", help="Specific file path"),
2551
2551
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
2552
2552
  ):
2553
2553
  """
2554
- Find functions that take a specific argument/parameter.
2554
+ Find functions that take a specific argument/parameter name or type.
2555
2555
 
2556
2556
  Examples:
2557
2557
  cgc find argument password
2558
2558
  cgc find argument user_id --file src/auth.py
2559
+ cgc find argument OrderFilter
2559
2560
  """
2560
2561
  _load_credentials()
2561
2562
  services = _initialize_services(context)
@@ -2571,7 +2572,7 @@ def find_by_argument_search(
2571
2572
  results = results[:req_limit]
2572
2573
 
2573
2574
  if not results:
2574
- console.print(f"[yellow]No functions found with argument '{argument}'[/yellow]")
2575
+ console.print(f"[yellow]No functions found with argument name or type '{argument}'[/yellow]")
2575
2576
  return
2576
2577
 
2577
2578
  table = Table(show_header=True, header_style="bold magenta", box=box.ROUNDED)
@@ -3635,6 +3636,8 @@ def datasource_mysql(
3635
3636
  database: str = typer.Option(..., "--database", "-d", help="Database / schema name"),
3636
3637
  name: Optional[str] = typer.Option(None, "--name", "-n", help="Logical datasource name (default: mysql-<database>)"),
3637
3638
  env: str = typer.Option("production", "--env", "-e", help="Deployment environment label"),
3639
+ ssl_verify: bool = typer.Option(False, "--ssl-verify", help="Connect over TLS and verify the server certificate (#1094)"),
3640
+ ssl_ca_certs: Optional[str] = typer.Option(None, "--ssl-ca-certs", help="CA bundle path for --ssl-verify (default: system trust store)"),
3638
3641
  context: Optional[str] = typer.Option(None, "--context", "-c", help="CGC context to use"),
3639
3642
  ):
3640
3643
  """Ingest Aurora MySQL schema (tables + columns) and write to the code graph.
@@ -3650,7 +3653,8 @@ def datasource_mysql(
3650
3653
  console.print(f"[cyan]Connecting to Aurora MySQL at {host}:{port}/{database}...[/cyan]")
3651
3654
  try:
3652
3655
  result = mysql_ingest(host=host, port=port, user=user, password=password,
3653
- database=database, name=name, env=env)
3656
+ database=database, name=name, env=env,
3657
+ ssl_verify=ssl_verify, ssl_ca_certs=ssl_ca_certs)
3654
3658
  except Exception as exc:
3655
3659
  console.print(f"[red]Failed to connect / ingest:[/red] {exc}")
3656
3660
  raise typer.Exit(1)
@@ -3672,6 +3676,8 @@ def datasource_cassandra(
3672
3676
  password: Optional[str] = typer.Option(None, "--password", "-P", help="Cassandra password", hide_input=True),
3673
3677
  name: Optional[str] = typer.Option(None, "--name", "-n", help="Logical datasource name (default: cassandra-<keyspace>)"),
3674
3678
  env: str = typer.Option("production", "--env", "-e", help="Deployment environment label"),
3679
+ ssl_verify: bool = typer.Option(False, "--ssl-verify", help="Connect over TLS and verify the server certificate (#1094)"),
3680
+ ssl_ca_certs: Optional[str] = typer.Option(None, "--ssl-ca-certs", help="CA bundle path for --ssl-verify (default: system trust store)"),
3675
3681
  context: Optional[str] = typer.Option(None, "--context", "-c", help="CGC context to use"),
3676
3682
  ):
3677
3683
  """Ingest Cassandra keyspace schema (tables + columns) and write to the code graph.
@@ -3688,7 +3694,8 @@ def datasource_cassandra(
3688
3694
  console.print(f"[cyan]Connecting to Cassandra at {hosts}/{keyspace}...[/cyan]")
3689
3695
  try:
3690
3696
  result = cassandra_ingest(hosts=hosts, port=port, keyspace=keyspace,
3691
- username=username, password=password, name=name, env=env)
3697
+ username=username, password=password, name=name, env=env,
3698
+ ssl_verify=ssl_verify, ssl_ca_certs=ssl_ca_certs)
3692
3699
  except Exception as exc:
3693
3700
  console.print(f"[red]Failed to connect / ingest:[/red] {exc}")
3694
3701
  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)
@@ -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",
@@ -635,35 +635,36 @@ class CodeFinder:
635
635
  return results
636
636
 
637
637
  def find_functions_by_argument(self, argument_name: str, path: Optional[str] = None, repo_path: Optional[str] = None, limit: Optional[int] = None) -> List[Dict]:
638
- """Find functions that take a specific argument name."""
638
+ """Find functions that take a specific argument name or type."""
639
639
  repo_path = self._normalize_repo_path_filter(repo_path)
640
640
  with self.driver.session() as session:
641
+ path_filter = "AND f.path = $path" if path else ""
641
642
  repo_filter = "AND f.path STARTS WITH $repo_path" if repo_path else ""
642
643
  limit_clause = "LIMIT $limit" if limit is not None else ""
643
644
  params = {"argument_name": argument_name, "repo_path": repo_path}
644
- if limit is not None:
645
- params["limit"] = limit
646
645
  if path:
647
646
  params["path"] = path
648
- query = f"""
649
- MATCH (f:Function)-[:HAS_PARAMETER]->(p:Parameter)
650
- WHERE p.name = $argument_name AND f.path = $path {repo_filter}
651
- RETURN f.name AS function_name, f.path AS path, f.line_number AS line_number,
652
- f.docstring AS docstring, f.is_dependency AS is_dependency
653
- ORDER BY f.is_dependency ASC, f.path, f.line_number
654
- {limit_clause}
655
- """
656
- result = session.run(query, **params)
657
- else:
658
- query = f"""
659
- MATCH (f:Function)-[:HAS_PARAMETER]->(p:Parameter)
660
- WHERE p.name = $argument_name {repo_filter}
661
- RETURN f.name AS function_name, f.path AS path, f.line_number AS line_number,
662
- f.docstring AS docstring, f.is_dependency AS is_dependency
663
- ORDER BY f.is_dependency ASC, f.path, f.line_number
664
- {limit_clause}
665
- """
666
- result = session.run(query, **params)
647
+ if limit is not None:
648
+ params["limit"] = limit
649
+
650
+ # A WHERE attached to an OPTIONAL MATCH only constrains the
651
+ # optional part — it can never filter f, so the original form
652
+ # returned EVERY function for any search term. Filter f itself
653
+ # after materializing the optional parameter match.
654
+ query = f"""
655
+ MATCH (f:Function)
656
+ WHERE 1=1 {path_filter} {repo_filter}
657
+ OPTIONAL MATCH (f)-[:HAS_PARAMETER]->(p:Parameter {{name: $argument_name}})
658
+ WITH DISTINCT f, p
659
+ WHERE p IS NOT NULL
660
+ OR (f.arg_types IS NOT NULL AND $argument_name IN f.arg_types)
661
+ RETURN DISTINCT f.name AS function_name, f.path AS path,
662
+ f.line_number AS line_number, f.docstring AS docstring,
663
+ f.is_dependency AS is_dependency
664
+ ORDER BY is_dependency ASC, path, line_number
665
+ {limit_clause}
666
+ """
667
+ result = session.run(query, **params)
667
668
  return result.data()
668
669
 
669
670
  def find_functions_by_decorator(self, decorator_name: str, path: Optional[str] = None, repo_path: Optional[str] = None, limit: Optional[int] = None) -> List[Dict]: