codegraphcontext 0.6.3__tar.gz → 0.6.4__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.3/src/codegraphcontext.egg-info → codegraphcontext-0.6.4}/PKG-INFO +1 -1
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/pyproject.toml +1 -1
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/main.py +30 -13
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/persistence/writer.py +95 -38
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +83 -6
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/csharp.py +20 -1
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/dart.py +12 -5
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/python.py +9 -1
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/ruby.py +11 -3
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/rust.py +58 -24
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/scala.py +1 -1
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4/src/codegraphcontext.egg-info}/PKG-INFO +1 -1
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/LICENSE +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/MANIFEST.in +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/README.md +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/setup.cfg +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/__main__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/api/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/api/app.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/api/auth.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/api/mcp_sse.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/api/router.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/api/schemas.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/cli_helpers.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/config_manager.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/hook_manager.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/project_config.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/registry_commands.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/setup_macos.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/setup_wizard.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/simulator.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/visualizer.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/bundle_registry.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/cgc_bundle.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/cgcignore.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/database.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/database_embedded_kuzu.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/database_falkordb.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/database_kuzu.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/database_ladybug.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/database_nornic.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/falkor_worker.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/graph_query.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/jobs.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/simulator.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/core/watcher.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/prompts.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/server.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/stdlibs.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tool_definitions.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/code_finder.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/datasources/mysql_ingester.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/graph_builder.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/handlers/management_handlers.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/constants.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/pipeline.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/pre_scan.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/resolution/calls.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/sanitize.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/schema.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/schema_contract.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/scip_pipeline.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/c.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/cpp.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/css.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/elisp.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/elixir.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/go.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/gradle.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/haskell.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/html.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/java.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/javascript.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/lua.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/maven.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/perl.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/php.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/sfc_common.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/solidity.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/solidity_remappings.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/svelte.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/swift.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/typescript.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/vue.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/package_resolver.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/solidity_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/report_generator.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/scip_indexer.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/scip_pb2.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/system.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/tree_sitter_parser.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/type_utils.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/cypher_ddl.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/cypher_readonly.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/debug_log.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/gcf_encoder.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/git_utils.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/path_ignore.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/path_sandbox.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/repo_path.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/secret_scanner.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/tool_limits.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/tree_sitter_manager.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/utils/visualize_graph.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/index.html +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/logo-icon.svg +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/logo.svg +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/robots.txt +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/viz/server.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext.egg-info/SOURCES.txt +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext.egg-info/requires.txt +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext.egg-info/top_level.txt +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/tests/test_issue_806_fix.py +0 -0
- {codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/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.4
|
|
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.4"
|
|
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"
|
|
@@ -1178,14 +1178,22 @@ def diagram(
|
|
|
1178
1178
|
if level not in ("file", "call"):
|
|
1179
1179
|
console.print(f"[red]Unknown --level '{level}' (expected file or call)[/red]")
|
|
1180
1180
|
raise typer.Exit(code=2)
|
|
1181
|
+
# stdout carries only the diagram; init chatter goes to stderr for the
|
|
1182
|
+
# init window only (restored after — a permanent rebind leaks a closed
|
|
1183
|
+
# stream into later in-process invocations).
|
|
1184
|
+
import sys as _sys
|
|
1185
|
+
from . import cli_helpers as _cli_helpers
|
|
1186
|
+
# NB: the .file property GETTER materializes the current (possibly
|
|
1187
|
+
# transient, CliRunner-captured) stream; the dynamic state lives in
|
|
1188
|
+
# ._file, which is None while the console follows sys.stdout live.
|
|
1189
|
+
_prev_console_file = _cli_helpers.console._file
|
|
1181
1190
|
if output is None:
|
|
1182
|
-
# stdout carries only the diagram; init chatter goes to stderr.
|
|
1183
|
-
import sys as _sys
|
|
1184
|
-
from . import cli_helpers as _cli_helpers
|
|
1185
1191
|
_cli_helpers.console.file = _sys.stderr
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1192
|
+
try:
|
|
1193
|
+
_load_credentials()
|
|
1194
|
+
services = _initialize_services(context)
|
|
1195
|
+
finally:
|
|
1196
|
+
_cli_helpers.console._file = _prev_console_file
|
|
1189
1197
|
if not all(services[:3]):
|
|
1190
1198
|
raise typer.Exit(code=1)
|
|
1191
1199
|
db_manager, graph_builder, code_finder = services[:3]
|
|
@@ -3018,15 +3026,24 @@ def analyze_complexity(
|
|
|
3018
3026
|
if output_format not in ("text", "json", "csv"):
|
|
3019
3027
|
console.print(f"[red]Unknown --format '{output_format}' (expected text, json or csv)[/red]")
|
|
3020
3028
|
raise typer.Exit(code=2)
|
|
3029
|
+
# stdout must carry ONLY the parseable document in machine formats: the
|
|
3030
|
+
# service-init chatter from cli_helpers prints to stdout, so reroute that
|
|
3031
|
+
# console to stderr FOR THE INIT WINDOW ONLY (`--format json | jq .`).
|
|
3032
|
+
# The rebind must be restored — a permanent one leaks a closed stream into
|
|
3033
|
+
# later in-process invocations (CliRunner-based tests).
|
|
3034
|
+
import sys as _sys
|
|
3035
|
+
from . import cli_helpers as _cli_helpers
|
|
3036
|
+
# NB: the .file property GETTER materializes the current (possibly
|
|
3037
|
+
# transient, CliRunner-captured) stream; the dynamic state lives in
|
|
3038
|
+
# ._file, which is None while the console follows sys.stdout live.
|
|
3039
|
+
_prev_console_file = _cli_helpers.console._file
|
|
3021
3040
|
if output_format in ("json", "csv"):
|
|
3022
|
-
# stdout must carry ONLY the parseable document: the service-init
|
|
3023
|
-
# chatter from cli_helpers prints to stdout, so reroute that console
|
|
3024
|
-
# to stderr before initializing anything (`--format json | jq .`).
|
|
3025
|
-
import sys as _sys
|
|
3026
|
-
from . import cli_helpers as _cli_helpers
|
|
3027
3041
|
_cli_helpers.console.file = _sys.stderr
|
|
3028
|
-
|
|
3029
|
-
|
|
3042
|
+
try:
|
|
3043
|
+
_load_credentials()
|
|
3044
|
+
services = _initialize_services(context)
|
|
3045
|
+
finally:
|
|
3046
|
+
_cli_helpers.console._file = _prev_console_file
|
|
3030
3047
|
if not all(services[:3]):
|
|
3031
3048
|
raise typer.Exit(code=1)
|
|
3032
3049
|
db_manager, graph_builder, code_finder = services[:3]
|
|
@@ -1137,6 +1137,8 @@ class GraphWriter:
|
|
|
1137
1137
|
)
|
|
1138
1138
|
batch_size = 500
|
|
1139
1139
|
backend = get_backend_type(self.driver, self._db_manager)
|
|
1140
|
+
labels = ("Class", "Trait", "Interface", "Struct", "Enum", "Union", "Record", "Mixin", "Extension", "Module", "Object", "Variable")
|
|
1141
|
+
|
|
1140
1142
|
def _work(session):
|
|
1141
1143
|
# Dedupe identical rows first: parsers can emit the same
|
|
1142
1144
|
# (child, parent) record more than once, and while Neo4j's MERGE
|
|
@@ -1156,8 +1158,6 @@ class GraphWriter:
|
|
|
1156
1158
|
internal_batch = [r for r in deduped_batch if r.get("resolved_parent_file_path") != "__external__"]
|
|
1157
1159
|
external_batch = [r for r in deduped_batch if r.get("resolved_parent_file_path") == "__external__"]
|
|
1158
1160
|
|
|
1159
|
-
labels = ("Class", "Trait", "Interface", "Struct", "Enum", "Union", "Record", "Mixin", "Extension", "Module", "Object", "Variable")
|
|
1160
|
-
|
|
1161
1161
|
def _label_is_populated(label: str) -> bool:
|
|
1162
1162
|
# An empty node table can never match, so skip the pair entirely.
|
|
1163
1163
|
# If the existence probe itself fails for any reason, fall back to
|
|
@@ -1170,52 +1170,109 @@ class GraphWriter:
|
|
|
1170
1170
|
except Exception:
|
|
1171
1171
|
return True
|
|
1172
1172
|
|
|
1173
|
+
# Probed once (~12 queries) and reused by the *fallback* enumerations
|
|
1174
|
+
# further down. Deliberately NOT applied to `pair_groups`: those
|
|
1175
|
+
# (child_label, parent_label) pairs are derived from the rows
|
|
1176
|
+
# themselves, so they are never empty -- probing them would be pure
|
|
1177
|
+
# overhead, and a stale or lazily-created label table would make the
|
|
1178
|
+
# probe silently drop real INHERITS edges.
|
|
1173
1179
|
populated_labels = {label for label in labels if _label_is_populated(label)}
|
|
1174
1180
|
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1181
|
+
def _chunks(rows):
|
|
1182
|
+
for i in range(0, len(rows), batch_size):
|
|
1183
|
+
yield rows[i:i + batch_size]
|
|
1184
|
+
|
|
1185
|
+
def _run_internal(rows, child_label, parent_label):
|
|
1178
1186
|
child_cypher = _cypher_label(child_label, backend)
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1187
|
+
parent_cypher = _cypher_label(parent_label, backend)
|
|
1188
|
+
query = f"""
|
|
1189
|
+
UNWIND $batch AS row
|
|
1190
|
+
MATCH (child:{child_cypher} {{name: row.child_name, path: row.path}})
|
|
1191
|
+
MATCH (parent:{parent_cypher} {{name: row.parent_name, path: row.resolved_parent_file_path}})
|
|
1192
|
+
MERGE (child)-[r:INHERITS]->(parent)
|
|
1193
|
+
SET r.confidence_label = coalesce(row.confidence_label, 'EXTRACTED')
|
|
1194
|
+
"""
|
|
1195
|
+
for chunk in _chunks(rows):
|
|
1183
1196
|
try:
|
|
1184
|
-
session.run(
|
|
1185
|
-
f"""
|
|
1186
|
-
UNWIND $batch AS row
|
|
1187
|
-
MATCH (child:{child_cypher} {{name: row.child_name, path: row.path}})
|
|
1188
|
-
MATCH (parent:{parent_cypher} {{name: row.parent_name, path: row.resolved_parent_file_path}})
|
|
1189
|
-
MERGE (child)-[r:INHERITS]->(parent)
|
|
1190
|
-
SET r.confidence_label = coalesce(row.confidence_label, 'EXTRACTED')
|
|
1191
|
-
""",
|
|
1192
|
-
batch=internal_batch,
|
|
1193
|
-
)
|
|
1197
|
+
session.run(query, batch=chunk)
|
|
1194
1198
|
except Exception as e:
|
|
1199
|
+
# A label absent in this backend fails to bind for the whole
|
|
1200
|
+
# (child,parent) group; skip it exactly like the old per-pair loop.
|
|
1195
1201
|
if _is_binder_exception(e):
|
|
1196
|
-
|
|
1202
|
+
return
|
|
1197
1203
|
raise e
|
|
1198
1204
|
|
|
1199
|
-
|
|
1200
|
-
if child_label not in populated_labels:
|
|
1201
|
-
continue
|
|
1205
|
+
def _run_external(rows, child_label):
|
|
1202
1206
|
child_cypher = _cypher_label(child_label, backend)
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
batch=
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
raise e
|
|
1207
|
+
query = f"""
|
|
1208
|
+
UNWIND $batch AS row
|
|
1209
|
+
MATCH (child:{child_cypher} {{name: row.child_name, path: row.path}})
|
|
1210
|
+
MERGE (parent:ExternalClass {{name: row.parent_name}})
|
|
1211
|
+
MERGE (child)-[r:INHERITS]->(parent)
|
|
1212
|
+
SET r.confidence_label = coalesce(row.confidence_label, 'INFERRED')
|
|
1213
|
+
"""
|
|
1214
|
+
for chunk in _chunks(rows):
|
|
1215
|
+
try:
|
|
1216
|
+
session.run(query, batch=chunk)
|
|
1217
|
+
except Exception as e:
|
|
1218
|
+
if _is_binder_exception(e):
|
|
1219
|
+
return
|
|
1220
|
+
raise e
|
|
1218
1221
|
|
|
1222
|
+
# Group internal rows by the labels resolution pinned down, so only the
|
|
1223
|
+
# (child_label, parent_label) pairs that actually occur run — instead of a
|
|
1224
|
+
# 12x12 brute force that re-scans the full batch for every combination.
|
|
1225
|
+
# both labels known -> one exact query per (child, parent) pair
|
|
1226
|
+
# child known only -> enumerate parent labels over just those rows
|
|
1227
|
+
# neither -> full 12x12 (rare: ambiguous (name,path) label collision)
|
|
1228
|
+
# Rows never gain a label they wouldn't have matched, and unknown/ambiguous
|
|
1229
|
+
# cases fall back to enumeration, so the produced edge set is unchanged.
|
|
1230
|
+
pair_groups: Dict[tuple, List[Dict[str, Any]]] = {}
|
|
1231
|
+
child_only_groups: Dict[str, List[Dict[str, Any]]] = {}
|
|
1232
|
+
legacy_rows: List[Dict[str, Any]] = []
|
|
1233
|
+
for row in internal_batch:
|
|
1234
|
+
cl = row.get("child_label")
|
|
1235
|
+
pl = row.get("parent_label")
|
|
1236
|
+
if cl and pl:
|
|
1237
|
+
pair_groups.setdefault((cl, pl), []).append(row)
|
|
1238
|
+
elif cl:
|
|
1239
|
+
child_only_groups.setdefault(cl, []).append(row)
|
|
1240
|
+
else:
|
|
1241
|
+
legacy_rows.append(row)
|
|
1242
|
+
|
|
1243
|
+
for (cl, pl), rows in pair_groups.items():
|
|
1244
|
+
_run_internal(rows, cl, pl)
|
|
1245
|
+
for cl, rows in child_only_groups.items():
|
|
1246
|
+
for pl in labels:
|
|
1247
|
+
if pl not in populated_labels:
|
|
1248
|
+
continue
|
|
1249
|
+
_run_internal(rows, cl, pl)
|
|
1250
|
+
if legacy_rows:
|
|
1251
|
+
for cl in labels:
|
|
1252
|
+
if cl not in populated_labels:
|
|
1253
|
+
continue
|
|
1254
|
+
for pl in labels:
|
|
1255
|
+
if pl not in populated_labels:
|
|
1256
|
+
continue
|
|
1257
|
+
_run_internal(legacy_rows, cl, pl)
|
|
1258
|
+
|
|
1259
|
+
# External parents (ExternalClass): group by known child label; fall back to
|
|
1260
|
+
# enumerating child labels for any label-less rows.
|
|
1261
|
+
ext_by_child: Dict[str, List[Dict[str, Any]]] = {}
|
|
1262
|
+
ext_legacy: List[Dict[str, Any]] = []
|
|
1263
|
+
for row in external_batch:
|
|
1264
|
+
cl = row.get("child_label")
|
|
1265
|
+
if cl:
|
|
1266
|
+
ext_by_child.setdefault(cl, []).append(row)
|
|
1267
|
+
else:
|
|
1268
|
+
ext_legacy.append(row)
|
|
1269
|
+
for cl, rows in ext_by_child.items():
|
|
1270
|
+
_run_external(rows, cl)
|
|
1271
|
+
if ext_legacy:
|
|
1272
|
+
for cl in labels:
|
|
1273
|
+
if cl not in populated_labels:
|
|
1274
|
+
continue
|
|
1275
|
+
_run_external(ext_legacy, cl)
|
|
1219
1276
|
|
|
1220
1277
|
for file_data in csharp_files:
|
|
1221
1278
|
self._create_csharp_inheritance_and_interfaces(session, file_data, imports_map)
|
|
@@ -6,6 +6,58 @@ from pathlib import Path
|
|
|
6
6
|
from typing import Any, Dict, List, Optional, Tuple
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
|
|
10
|
+
# Child construct list -> node label: the 8 kinds that can declare inheritance.
|
|
11
|
+
_INHERIT_KEY_TO_LABEL = {
|
|
12
|
+
"classes": "Class",
|
|
13
|
+
"structs": "Struct",
|
|
14
|
+
"traits": "Trait",
|
|
15
|
+
"interfaces": "Interface",
|
|
16
|
+
"mixins": "Mixin",
|
|
17
|
+
"enums": "Enum",
|
|
18
|
+
"extensions": "Extension",
|
|
19
|
+
"variables": "Variable",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
# All construct lists whose nodes can be an INHERITS parent, mapped to their label.
|
|
23
|
+
# Matches the 12 labels the writer enumerates. Used to attach exact child/parent
|
|
24
|
+
# labels to rows and to detect the rare (name, path) collisions where more than one
|
|
25
|
+
# node kind shares a name+path — those stay ambiguous so the writer falls back to
|
|
26
|
+
# full enumeration (keeping the produced edge set identical).
|
|
27
|
+
_NODE_KEY_TO_LABEL = {
|
|
28
|
+
"classes": "Class",
|
|
29
|
+
"traits": "Trait",
|
|
30
|
+
"interfaces": "Interface",
|
|
31
|
+
"structs": "Struct",
|
|
32
|
+
"enums": "Enum",
|
|
33
|
+
"unions": "Union",
|
|
34
|
+
"records": "Record",
|
|
35
|
+
"mixins": "Mixin",
|
|
36
|
+
"extensions": "Extension",
|
|
37
|
+
"modules": "Module",
|
|
38
|
+
"objects": "Object",
|
|
39
|
+
"variables": "Variable",
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _build_node_label_index(
|
|
44
|
+
all_file_data: List[Dict[str, Any]],
|
|
45
|
+
) -> Dict[str, Dict[str, set]]:
|
|
46
|
+
"""Map normalized path -> {name -> set(labels)} across all inheritance-eligible
|
|
47
|
+
node kinds. A (path, name) with exactly one label lets the writer target that
|
|
48
|
+
label directly; multiple labels leaves it ambiguous (writer enumerates)."""
|
|
49
|
+
index: Dict[str, Dict[str, set]] = {}
|
|
50
|
+
for file_data in all_file_data:
|
|
51
|
+
fpath = str(Path(file_data["path"]).resolve().as_posix())
|
|
52
|
+
per_file = index.setdefault(fpath, {})
|
|
53
|
+
for key, label in _NODE_KEY_TO_LABEL.items():
|
|
54
|
+
for item in file_data.get(key, []):
|
|
55
|
+
name = item.get("name")
|
|
56
|
+
if name:
|
|
57
|
+
per_file.setdefault(name, set()).add(label)
|
|
58
|
+
return index
|
|
59
|
+
|
|
60
|
+
|
|
9
61
|
def resolve_inheritance_link(
|
|
10
62
|
class_item: Dict[str, Any],
|
|
11
63
|
base_class_str: str,
|
|
@@ -13,6 +65,8 @@ def resolve_inheritance_link(
|
|
|
13
65
|
local_class_names: set,
|
|
14
66
|
local_imports: dict,
|
|
15
67
|
imports_map: dict,
|
|
68
|
+
child_label: Optional[str] = None,
|
|
69
|
+
node_label_index: Optional[Dict[str, Dict[str, set]]] = None,
|
|
16
70
|
) -> Optional[Dict[str, Any]]:
|
|
17
71
|
"""Resolve a single inheritance link. Returns row dict or None."""
|
|
18
72
|
import re
|
|
@@ -55,21 +109,41 @@ def resolve_inheritance_link(
|
|
|
55
109
|
if len(possible_paths) == 1:
|
|
56
110
|
resolved_path = possible_paths[0]
|
|
57
111
|
|
|
112
|
+
# Pin the child label only when this (path, name) is a single node kind. If more
|
|
113
|
+
# than one kind shares it, leave it off so the writer enumerates (byte-identical).
|
|
114
|
+
child_lbl = None
|
|
115
|
+
if child_label:
|
|
116
|
+
if node_label_index is None:
|
|
117
|
+
child_lbl = child_label
|
|
118
|
+
else:
|
|
119
|
+
present = node_label_index.get(caller_file_path, {}).get(class_item["name"])
|
|
120
|
+
if present and len(present) == 1 and child_label in present:
|
|
121
|
+
child_lbl = child_label
|
|
122
|
+
|
|
123
|
+
def _with_labels(row: Dict[str, Any], parent_path: str) -> Dict[str, Any]:
|
|
124
|
+
if child_lbl:
|
|
125
|
+
row["child_label"] = child_lbl
|
|
126
|
+
if node_label_index is not None:
|
|
127
|
+
plabels = node_label_index.get(parent_path, {}).get(target_class_name)
|
|
128
|
+
if plabels and len(plabels) == 1:
|
|
129
|
+
row["parent_label"] = next(iter(plabels))
|
|
130
|
+
return row
|
|
131
|
+
|
|
58
132
|
if resolved_path:
|
|
59
|
-
return {
|
|
133
|
+
return _with_labels({
|
|
60
134
|
"child_name": class_item["name"],
|
|
61
135
|
"path": caller_file_path,
|
|
62
136
|
"parent_name": target_class_name,
|
|
63
137
|
"resolved_parent_file_path": resolved_path,
|
|
64
138
|
"confidence_label": "EXTRACTED",
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
139
|
+
}, resolved_path)
|
|
140
|
+
return _with_labels({
|
|
67
141
|
"child_name": class_item["name"],
|
|
68
142
|
"path": caller_file_path,
|
|
69
143
|
"parent_name": target_class_name,
|
|
70
144
|
"resolved_parent_file_path": "__external__",
|
|
71
145
|
"confidence_label": "INFERRED",
|
|
72
|
-
}
|
|
146
|
+
}, "__external__")
|
|
73
147
|
|
|
74
148
|
|
|
75
149
|
|
|
@@ -79,6 +153,7 @@ def build_inheritance_and_csharp_files(
|
|
|
79
153
|
"""Returns (inheritance_batch_rows, csharp_file_data_list)."""
|
|
80
154
|
inheritance_batch: List[Dict[str, Any]] = []
|
|
81
155
|
csharp_files: List[Dict[str, Any]] = []
|
|
156
|
+
node_label_index = _build_node_label_index(all_file_data)
|
|
82
157
|
|
|
83
158
|
for file_data in all_file_data:
|
|
84
159
|
if file_data.get("lang") == "c_sharp":
|
|
@@ -87,7 +162,7 @@ def build_inheritance_and_csharp_files(
|
|
|
87
162
|
|
|
88
163
|
caller_file_path = str(Path(file_data["path"]).resolve().as_posix())
|
|
89
164
|
local_class_names = set()
|
|
90
|
-
for key in
|
|
165
|
+
for key in _INHERIT_KEY_TO_LABEL:
|
|
91
166
|
for item in file_data.get(key, []):
|
|
92
167
|
local_class_names.add(item["name"])
|
|
93
168
|
|
|
@@ -97,7 +172,7 @@ def build_inheritance_and_csharp_files(
|
|
|
97
172
|
if imp.get("name")
|
|
98
173
|
}
|
|
99
174
|
|
|
100
|
-
for key
|
|
175
|
+
for key, child_label in _INHERIT_KEY_TO_LABEL.items():
|
|
101
176
|
for class_item in file_data.get(key, []):
|
|
102
177
|
if not class_item.get("bases"):
|
|
103
178
|
continue
|
|
@@ -109,6 +184,8 @@ def build_inheritance_and_csharp_files(
|
|
|
109
184
|
local_class_names,
|
|
110
185
|
local_imports,
|
|
111
186
|
imports_map,
|
|
187
|
+
child_label=child_label,
|
|
188
|
+
node_label_index=node_label_index,
|
|
112
189
|
)
|
|
113
190
|
if resolved:
|
|
114
191
|
inheritance_batch.append(resolved)
|
{codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/csharp.py
RENAMED
|
@@ -308,7 +308,26 @@ class CSharpTreeSitterParser:
|
|
|
308
308
|
# Parse base list: ": BaseClass, IInterface1, IInterface2"
|
|
309
309
|
bases_text = bases_text.strip().lstrip(':').strip()
|
|
310
310
|
if bases_text:
|
|
311
|
-
|
|
311
|
+
# Split on TOP-LEVEL commas only: a naive split
|
|
312
|
+
# shredded multi-arg generics —
|
|
313
|
+
# `: Dictionary<string, int>` became two bases,
|
|
314
|
+
# 'Dictionary<string' and 'int>', creating
|
|
315
|
+
# INHERITS edges to nonexistent types (#1538).
|
|
316
|
+
raw_bases = []
|
|
317
|
+
depth = 0
|
|
318
|
+
current = []
|
|
319
|
+
for ch in bases_text:
|
|
320
|
+
if ch in "<([":
|
|
321
|
+
depth += 1
|
|
322
|
+
elif ch in ">)]":
|
|
323
|
+
depth = max(0, depth - 1)
|
|
324
|
+
if ch == "," and depth == 0:
|
|
325
|
+
raw_bases.append("".join(current).strip())
|
|
326
|
+
current = []
|
|
327
|
+
else:
|
|
328
|
+
current.append(ch)
|
|
329
|
+
if current:
|
|
330
|
+
raw_bases.append("".join(current).strip())
|
|
312
331
|
# records might have base calls like : Person(name, age)
|
|
313
332
|
# we want just Person
|
|
314
333
|
for rb in raw_bases:
|
{codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/dart.py
RENAMED
|
@@ -490,15 +490,22 @@ class DartTreeSitterParser:
|
|
|
490
490
|
if uri_node:
|
|
491
491
|
uri_text = self._get_node_text(uri_node).strip("'\"")
|
|
492
492
|
|
|
493
|
-
# Handle 'as' alias
|
|
493
|
+
# Handle 'as' alias. This grammar has no 'prefix' node
|
|
494
|
+
# (and no 'identifier' field on one): the alias is the bare
|
|
495
|
+
# identifier child following the 'as' keyword inside
|
|
496
|
+
# import_specification — the old lookup always came back
|
|
497
|
+
# empty, so `math.max(...)` could never be mapped to its
|
|
498
|
+
# import (#1538).
|
|
494
499
|
alias = None
|
|
495
500
|
for child in node.children:
|
|
496
501
|
if child.type == 'import_specification':
|
|
502
|
+
saw_as = False
|
|
497
503
|
for sub in child.children:
|
|
498
|
-
if sub.type == '
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
504
|
+
if sub.type == 'as':
|
|
505
|
+
saw_as = True
|
|
506
|
+
elif saw_as and sub.type == 'identifier':
|
|
507
|
+
alias = self._get_node_text(sub)
|
|
508
|
+
break
|
|
502
509
|
|
|
503
510
|
imports.append({
|
|
504
511
|
"name": uri_text,
|
{codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/python.py
RENAMED
|
@@ -455,7 +455,15 @@ class PythonTreeSitterParser:
|
|
|
455
455
|
imported_name = self._get_node_text(child)
|
|
456
456
|
|
|
457
457
|
if imported_name:
|
|
458
|
-
|
|
458
|
+
# `from . import x` has module_name '.', and the
|
|
459
|
+
# unconditional join produced '..x' — one package
|
|
460
|
+
# level too high, and no consumer strips leading
|
|
461
|
+
# dots (#1538). Bare-dot relatives join without
|
|
462
|
+
# the separator; dotted paths keep it.
|
|
463
|
+
if module_name.endswith('.'):
|
|
464
|
+
full_import_name = f"{module_name}{imported_name}"
|
|
465
|
+
else:
|
|
466
|
+
full_import_name = f"{module_name}.{imported_name}"
|
|
459
467
|
import_data = {
|
|
460
468
|
"name": imported_name,
|
|
461
469
|
"source": module_name,
|
{codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/ruby.py
RENAMED
|
@@ -6,9 +6,14 @@ from codegraphcontext.utils.tree_sitter_manager import execute_query
|
|
|
6
6
|
|
|
7
7
|
RUBY_QUERIES = {
|
|
8
8
|
"functions": """
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
[
|
|
10
|
+
(method
|
|
11
|
+
name: (identifier) @name
|
|
12
|
+
)
|
|
13
|
+
(singleton_method
|
|
14
|
+
name: (identifier) @name
|
|
15
|
+
)
|
|
16
|
+
] @function_node
|
|
12
17
|
""",
|
|
13
18
|
"classes": """
|
|
14
19
|
(class
|
|
@@ -584,6 +589,9 @@ def pre_scan_ruby(files: list[Path], parser_wrapper) -> dict:
|
|
|
584
589
|
(method
|
|
585
590
|
name: (identifier) @name
|
|
586
591
|
)
|
|
592
|
+
(singleton_method
|
|
593
|
+
name: (identifier) @name
|
|
594
|
+
)
|
|
587
595
|
"""
|
|
588
596
|
|
|
589
597
|
|
{codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/tools/languages/rust.py
RENAMED
|
@@ -289,33 +289,67 @@ class RustTreeSitterParser:
|
|
|
289
289
|
return structs, enums, traits
|
|
290
290
|
|
|
291
291
|
def _find_imports(self, root_node: Any) -> list[Dict[str, Any]]:
|
|
292
|
+
"""Walk `use` declarations structurally (#1538).
|
|
293
|
+
|
|
294
|
+
The old text-based version had two audit findings: a braced list
|
|
295
|
+
(`use std::collections::{HashMap, HashSet};`) kept only the LAST
|
|
296
|
+
name, and `full_import_name` was the raw source including the `use`
|
|
297
|
+
keyword and semicolon — written verbatim as the Module node name,
|
|
298
|
+
where no path-matching consumer could ever match it.
|
|
299
|
+
"""
|
|
292
300
|
imports = []
|
|
301
|
+
|
|
302
|
+
def _emit(name, full, alias, line):
|
|
303
|
+
imports.append({
|
|
304
|
+
"name": name,
|
|
305
|
+
"full_import_name": full,
|
|
306
|
+
"line_number": line,
|
|
307
|
+
"alias": alias,
|
|
308
|
+
})
|
|
309
|
+
|
|
310
|
+
def _last_segment(path_text):
|
|
311
|
+
seg = path_text.split("::")[-1].strip()
|
|
312
|
+
return seg or path_text
|
|
313
|
+
|
|
314
|
+
def _walk_use_arg(node, base, line):
|
|
315
|
+
"""base is the '::'-joined path prefix accumulated so far."""
|
|
316
|
+
t = node.type
|
|
317
|
+
text = self._get_node_text(node)
|
|
318
|
+
if t in ("identifier", "scoped_identifier", "crate", "self", "super"):
|
|
319
|
+
full = f"{base}::{text}" if base else text
|
|
320
|
+
_emit(_last_segment(full), full, None, line)
|
|
321
|
+
elif t == "use_as_clause":
|
|
322
|
+
inner = node.children[0]
|
|
323
|
+
alias_node = node.children[-1]
|
|
324
|
+
inner_text = self._get_node_text(inner)
|
|
325
|
+
full = f"{base}::{inner_text}" if base else inner_text
|
|
326
|
+
_emit(self._get_node_text(alias_node), full, self._get_node_text(alias_node), line)
|
|
327
|
+
elif t == "use_wildcard":
|
|
328
|
+
# use x::*; — child[0] is the path, if any (super/crate/self
|
|
329
|
+
# are their own node types, not identifiers)
|
|
330
|
+
path_children = [c for c in node.children if c.type in ("identifier", "scoped_identifier", "super", "crate", "self")]
|
|
331
|
+
prefix = self._get_node_text(path_children[0]) if path_children else ""
|
|
332
|
+
full_base = f"{base}::{prefix}" if base and prefix else (prefix or base)
|
|
333
|
+
_emit("*", f"{full_base}::*" if full_base else "*", None, line)
|
|
334
|
+
elif t == "scoped_use_list":
|
|
335
|
+
# <path> :: { list }
|
|
336
|
+
path_children = [c for c in node.children if c.type in ("identifier", "scoped_identifier", "super", "crate", "self")]
|
|
337
|
+
prefix = self._get_node_text(path_children[0]) if path_children else ""
|
|
338
|
+
new_base = f"{base}::{prefix}" if base and prefix else (prefix or base)
|
|
339
|
+
for c in node.children:
|
|
340
|
+
if c.type == "use_list":
|
|
341
|
+
_walk_use_arg(c, new_base, line)
|
|
342
|
+
elif t == "use_list":
|
|
343
|
+
for c in node.children:
|
|
344
|
+
if c.type not in ("{", "}", ","):
|
|
345
|
+
_walk_use_arg(c, base, line)
|
|
346
|
+
|
|
293
347
|
query_str = RUST_QUERIES["imports"]
|
|
294
348
|
for node, _ in execute_query(self.language, query_str, root_node):
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
if alias_match:
|
|
300
|
-
alias = alias_match.group(1)
|
|
301
|
-
name = alias
|
|
302
|
-
else:
|
|
303
|
-
cleaned_path = re.sub(r";$", "", full_import_name).strip()
|
|
304
|
-
last_part = cleaned_path.split("::")[-1]
|
|
305
|
-
if last_part.strip() == "*":
|
|
306
|
-
name = "*"
|
|
307
|
-
else:
|
|
308
|
-
name_match = re.findall(r"(\w+)", last_part)
|
|
309
|
-
name = name_match[-1] if name_match else last_part
|
|
310
|
-
|
|
311
|
-
imports.append(
|
|
312
|
-
{
|
|
313
|
-
"name": name,
|
|
314
|
-
"full_import_name": full_import_name,
|
|
315
|
-
"line_number": node.start_point[0] + 1,
|
|
316
|
-
"alias": alias,
|
|
317
|
-
}
|
|
318
|
-
)
|
|
349
|
+
line = node.start_point[0] + 1
|
|
350
|
+
for child in node.children:
|
|
351
|
+
if child.type not in ("use", ";"):
|
|
352
|
+
_walk_use_arg(child, "", line)
|
|
319
353
|
return imports
|
|
320
354
|
|
|
321
355
|
def _find_calls(self, root_node: Any) -> list[Dict[str, Any]]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraphcontext
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/config_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
{codegraphcontext-0.6.3 → codegraphcontext-0.6.4}/src/codegraphcontext/cli/project_config.py
RENAMED
|
File without changes
|