codegraphcontext 0.6.7__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.
- {codegraphcontext-0.6.7/src/codegraphcontext.egg-info → codegraphcontext-0.6.9}/PKG-INFO +1 -1
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/pyproject.toml +1 -1
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/cli_helpers.py +53 -41
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/main.py +12 -5
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/setup_wizard.py +69 -3
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/cgcignore.py +41 -1
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_embedded_kuzu.py +3 -2
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tool_definitions.py +1 -1
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/code_finder.py +23 -22
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +119 -100
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/datasources/mysql_ingester.py +143 -121
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/graph_builder.py +10 -1
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/management_handlers.py +4 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/scip_pipeline.py +53 -1
- codegraphcontext-0.6.9/src/codegraphcontext/utils/graph_shapes.py +123 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/visualize_graph.py +11 -3
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/server.py +22 -11
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9/src/codegraphcontext.egg-info}/PKG-INFO +1 -1
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/SOURCES.txt +1 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/LICENSE +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/MANIFEST.in +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/README.md +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/setup.cfg +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/__main__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/api/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/api/app.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/api/auth.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/api/mcp_sse.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/api/router.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/api/schemas.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/config_manager.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/hook_manager.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/project_config.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/registry_commands.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/setup_macos.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/simulator.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/cli/visualizer.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/bundle_registry.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/cgc_bundle.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_falkordb.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_kuzu.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_ladybug.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/database_nornic.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/falkor_worker.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/graph_query.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/jobs.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/simulator.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/core/watcher.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/prompts.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/server.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/stdlibs.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/constants.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/persistence/writer.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/pipeline.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/pre_scan.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/resolution/calls.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/sanitize.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/schema.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/schema_contract.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/c.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/cpp.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/csharp.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/css.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/dart.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/elisp.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/elixir.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/go.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/gradle.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/haskell.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/html.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/java.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/javascript.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/lua.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/maven.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/perl.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/php.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/python.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/ruby.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/rust.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/scala.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/sfc_common.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/solidity.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/solidity_remappings.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/svelte.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/swift.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/typescript.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/languages/vue.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/package_resolver.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/solidity_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/report_generator.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/scip_indexer.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/scip_pb2.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/system.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/tree_sitter_parser.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/tools/type_utils.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/cypher_ddl.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/cypher_readonly.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/debug_log.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/gcf_encoder.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/git_utils.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/path_ignore.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/path_sandbox.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/repo_path.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/secret_scanner.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/tool_limits.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/utils/tree_sitter_manager.py +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/index.html +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/logo-icon.svg +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/logo.svg +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/robots.txt +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/requires.txt +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/src/codegraphcontext.egg-info/top_level.txt +0 -0
- {codegraphcontext-0.6.7 → codegraphcontext-0.6.9}/tests/test_issue_806_fix.py +0 -0
- {codegraphcontext-0.6.7 → 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.
|
|
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.
|
|
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
|
-
|
|
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
|
|
@@ -351,7 +359,7 @@ def index_helper(path: str, context: Optional[str] = None, no_progress: bool = F
|
|
|
351
359
|
file_count = record["file_count"] if record else 0
|
|
352
360
|
|
|
353
361
|
if file_count > 0:
|
|
354
|
-
expected = graph_builder.estimate_processing_time(path_obj) if path_obj.is_dir() else None
|
|
362
|
+
expected = graph_builder.estimate_processing_time(path_obj, cgcignore_path=ctx.cgcignore_path) if path_obj.is_dir() else None
|
|
355
363
|
expected_file_count = expected[0] if expected else None
|
|
356
364
|
if expected_file_count is None or file_count >= expected_file_count:
|
|
357
365
|
console.print(f"[yellow]Repository '{path}' is already indexed with {file_count} files. Skipping.[/yellow]")
|
|
@@ -361,6 +369,32 @@ def index_helper(path: str, context: Optional[str] = None, no_progress: bool = F
|
|
|
361
369
|
console.print(
|
|
362
370
|
f"[yellow]Repository '{path}' has only {file_count} of {expected_file_count} files indexed. Continuing.[/yellow]"
|
|
363
371
|
)
|
|
372
|
+
# Name the gap: without this, a pipeline that can never
|
|
373
|
+
# produce nodes for some files loops on the message above
|
|
374
|
+
# forever with nothing actionable (#1673).
|
|
375
|
+
try:
|
|
376
|
+
from codegraphcontext.tools.indexing.discovery import discover_files_to_index
|
|
377
|
+
discovered, _ = discover_files_to_index(
|
|
378
|
+
path_obj,
|
|
379
|
+
cgcignore_path=ctx.cgcignore_path,
|
|
380
|
+
supported_extensions=set(graph_builder.parsers.keys()),
|
|
381
|
+
)
|
|
382
|
+
with db_manager.get_driver().session() as s2:
|
|
383
|
+
res2 = s2.run(
|
|
384
|
+
"MATCH (r:Repository {path: $path})-[:CONTAINS*]->(f:File) RETURN DISTINCT f.path AS p",
|
|
385
|
+
path=repo_path_str,
|
|
386
|
+
)
|
|
387
|
+
have = {row["p"] for row in res2 if row.get("p")}
|
|
388
|
+
missing = [
|
|
389
|
+
str(f) for f in discovered
|
|
390
|
+
if str(f.resolve()) not in have and f.resolve().as_posix() not in have
|
|
391
|
+
]
|
|
392
|
+
if missing:
|
|
393
|
+
shown = ", ".join(Path(m).name for m in missing[:5])
|
|
394
|
+
more = f" (+{len(missing) - 5} more)" if len(missing) > 5 else ""
|
|
395
|
+
console.print(f"[dim]Missing: {shown}{more}[/dim]")
|
|
396
|
+
except Exception:
|
|
397
|
+
pass
|
|
364
398
|
else:
|
|
365
399
|
console.print(f"[yellow]Repository '{path}' exists but has no files (likely interrupted). Re-indexing...[/yellow]")
|
|
366
400
|
except Exception as e:
|
|
@@ -631,44 +665,13 @@ def _render_offline_visualization(
|
|
|
631
665
|
def _ident(value) -> Optional[str]:
|
|
632
666
|
return None if value is None else str(value)
|
|
633
667
|
|
|
634
|
-
#
|
|
635
|
-
#
|
|
636
|
-
#
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
def _has_meta(d: dict, key: str) -> bool:
|
|
643
|
-
return key in d or key.upper() in d
|
|
644
|
-
|
|
645
|
-
# Neo4j returns driver objects carrying .labels / .type that support
|
|
646
|
-
# dict()/Mapping access. FalkorDB's own driver objects also carry
|
|
647
|
-
# .labels on nodes, but are NOT dict-convertible — their properties live
|
|
648
|
-
# in a plain `.properties` dict, and its Edge exposes `.relation` /
|
|
649
|
-
# `.src_node` / `.dest_node` instead of `.type` / `.start_node` /
|
|
650
|
-
# `.end_node`. Kùzu and Ladybug return plain dicts carrying _label plus
|
|
651
|
-
# _src/_dst. Check the driver attributes first — a driver object may
|
|
652
|
-
# also be dict-like.
|
|
653
|
-
def _is_relationship(value) -> bool:
|
|
654
|
-
if hasattr(value, "labels"):
|
|
655
|
-
return False
|
|
656
|
-
if hasattr(value, "type"):
|
|
657
|
-
return True
|
|
658
|
-
if hasattr(value, "relation") and hasattr(value, "src_node"):
|
|
659
|
-
return True
|
|
660
|
-
return isinstance(value, dict) and _has_meta(value, "_src") and _has_meta(value, "_dst")
|
|
661
|
-
|
|
662
|
-
def _is_node(value) -> bool:
|
|
663
|
-
if hasattr(value, "labels"):
|
|
664
|
-
return True
|
|
665
|
-
if hasattr(value, "type"):
|
|
666
|
-
return False
|
|
667
|
-
if hasattr(value, "relation") and hasattr(value, "src_node"):
|
|
668
|
-
return False
|
|
669
|
-
# Kùzu relationships also carry _label, so _src/_dst is what
|
|
670
|
-
# distinguishes them from nodes.
|
|
671
|
-
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
|
|
672
675
|
|
|
673
676
|
def _node_payload(value) -> Dict[str, Any]:
|
|
674
677
|
if hasattr(value, "labels"):
|
|
@@ -683,10 +686,19 @@ def _render_offline_visualization(
|
|
|
683
686
|
node_id = _meta(value, "_id")
|
|
684
687
|
if node_id is None:
|
|
685
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
|
+
|
|
686
698
|
return {
|
|
687
699
|
"id": _ident(node_id),
|
|
688
700
|
"label": label,
|
|
689
|
-
"name":
|
|
701
|
+
"name": name,
|
|
690
702
|
"file_path": props.get("path", ""),
|
|
691
703
|
"line_number": props.get("line_number"),
|
|
692
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
|
-
|
|
531
|
+
raw = target_path.read_text()
|
|
532
|
+
try:
|
|
533
|
+
settings = json.loads(raw)
|
|
534
|
+
except json.JSONDecodeError:
|
|
488
535
|
try:
|
|
489
|
-
settings = json.
|
|
536
|
+
settings = json.loads(_strip_jsonc(raw))
|
|
537
|
+
had_comments = True
|
|
490
538
|
except json.JSONDecodeError:
|
|
491
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
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]:
|