codegraphcontext 0.6.4__tar.gz → 0.6.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codegraphcontext-0.6.4/src/codegraphcontext.egg-info → codegraphcontext-0.6.5}/PKG-INFO +1 -1
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/pyproject.toml +1 -1
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/persistence/writer.py +24 -1
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/c.py +45 -29
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/csharp.py +27 -8
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/elixir.py +22 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/haskell.py +13 -4
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/java.py +26 -2
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/javascript.py +9 -1
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/php.py +34 -7
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/ruby.py +10 -5
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/rust.py +36 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/swift.py +27 -3
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5/src/codegraphcontext.egg-info}/PKG-INFO +1 -1
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/LICENSE +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/MANIFEST.in +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/README.md +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/setup.cfg +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/__main__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/api/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/api/app.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/api/auth.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/api/mcp_sse.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/api/router.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/api/schemas.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/cli_helpers.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/config_manager.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/hook_manager.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/main.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/project_config.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/registry_commands.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/setup_macos.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/setup_wizard.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/simulator.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/cli/visualizer.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/bundle_registry.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/cgc_bundle.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/cgcignore.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/database.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/database_embedded_kuzu.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/database_falkordb.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/database_kuzu.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/database_ladybug.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/database_nornic.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/falkor_worker.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/graph_query.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/jobs.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/simulator.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/core/watcher.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/prompts.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/server.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/stdlibs.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tool_definitions.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/code_finder.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/datasources/mysql_ingester.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/graph_builder.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/handlers/analysis_handlers.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/handlers/management_handlers.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/constants.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/pipeline.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/pre_scan.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/resolution/calls.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/sanitize.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/schema.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/schema_contract.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/scip_pipeline.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/cpp.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/css.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/dart.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/elisp.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/go.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/gradle.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/html.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/kotlin.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/lua.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/maven.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/perl.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/python.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/scala.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/sfc_common.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/solidity.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/solidity_remappings.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/svelte.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/typescript.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/vue.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/package_resolver.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/solidity_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/report_generator.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/scip_indexer.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/scip_pb2.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/system.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/tree_sitter_parser.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/type_utils.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/cypher_ddl.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/cypher_readonly.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/debug_log.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/gcf_encoder.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/git_utils.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/path_ignore.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/path_sandbox.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/repo_path.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/secret_scanner.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/tool_limits.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/tree_sitter_manager.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/utils/visualize_graph.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/index.html +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/logo-icon.svg +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/logo.svg +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/robots.txt +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/viz/server.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext.egg-info/SOURCES.txt +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext.egg-info/requires.txt +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext.egg-info/top_level.txt +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/tests/test_issue_806_fix.py +0 -0
- {codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/tests/test_mcp_sse.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraphcontext
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.5
|
|
4
4
|
Summary: An MCP server that indexes local code into a graph database to provide context to AI assistants.
|
|
5
5
|
Author-email: Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codegraphcontext"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.5"
|
|
4
4
|
description = "An MCP server that indexes local code into a graph database to provide context to AI assistants."
|
|
5
5
|
authors = [{ name = "Shashank Shekhar Singh", email = "shashankshekharsingh1205@gmail.com" }]
|
|
6
6
|
readme = "README.md"
|
|
@@ -68,6 +68,29 @@ _NAME_ONLY_MERGE_LABELS = {"Module", "DbTable", "ExternalClass"}
|
|
|
68
68
|
# repeated mentions, and merging them is exactly the pre-#1393 behaviour.
|
|
69
69
|
_COALESCE_SAME_KEY_LABELS = {"Variable"}
|
|
70
70
|
|
|
71
|
+
# Node types that mean "the enclosing declaration is a FUNCTION" across the
|
|
72
|
+
# tree-sitter grammars. The nested-function CONTAINS batch used to gate on the
|
|
73
|
+
# literal Python type 'function_definition', which only python.py emits — every
|
|
74
|
+
# other language that populated context_type (TS, and now JS) silently lost its
|
|
75
|
+
# nested-function containment edges (#1538).
|
|
76
|
+
_FUNCTION_CONTEXT_TYPES = {
|
|
77
|
+
"function_definition", # python, cpp, php
|
|
78
|
+
"function_declaration", # js/ts, go, kotlin, lua
|
|
79
|
+
"function_expression", # js/ts
|
|
80
|
+
"arrow_function", # js/ts
|
|
81
|
+
"generator_function", # js/ts
|
|
82
|
+
"generator_function_declaration", # js/ts
|
|
83
|
+
"method_definition", # js/ts
|
|
84
|
+
"method_declaration", # java, csharp, go
|
|
85
|
+
"constructor_declaration", # java
|
|
86
|
+
"local_function_statement", # csharp
|
|
87
|
+
"func_literal", # go
|
|
88
|
+
"function_item", # rust
|
|
89
|
+
"method", # ruby
|
|
90
|
+
"singleton_method", # ruby
|
|
91
|
+
"lambda_expression", # cpp, java
|
|
92
|
+
}
|
|
93
|
+
|
|
71
94
|
|
|
72
95
|
def _coalesce_same_key_items(items: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
|
|
73
96
|
"""Fold records sharing (name, line_number) into one, in write order."""
|
|
@@ -467,7 +490,7 @@ class GraphWriter:
|
|
|
467
490
|
"func_line": item["line_number"],
|
|
468
491
|
}
|
|
469
492
|
)
|
|
470
|
-
if item.get("context_type")
|
|
493
|
+
if item.get("context_type") in _FUNCTION_CONTEXT_TYPES:
|
|
471
494
|
outer_ctx = item.get("context")
|
|
472
495
|
is_seq = isinstance(outer_ctx, (tuple, list)) and outer_ctx
|
|
473
496
|
outer_name = outer_ctx[0] if is_seq else outer_ctx
|
|
@@ -139,9 +139,14 @@ C_QUERIES = {
|
|
|
139
139
|
)
|
|
140
140
|
""",
|
|
141
141
|
"macros": """
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
[
|
|
143
|
+
(preproc_def
|
|
144
|
+
name: (identifier) @name
|
|
145
|
+
)
|
|
146
|
+
(preproc_function_def
|
|
147
|
+
name: (identifier) @name
|
|
148
|
+
)
|
|
149
|
+
] @macro
|
|
145
150
|
""",
|
|
146
151
|
}
|
|
147
152
|
|
|
@@ -512,46 +517,53 @@ class CTreeSitterParser:
|
|
|
512
517
|
members: List[Dict[str, Any]] = []
|
|
513
518
|
seen_names: set[str] = set()
|
|
514
519
|
|
|
515
|
-
|
|
516
|
-
|
|
520
|
+
# One structural pass over every enum body (#1538). The old version
|
|
521
|
+
# had two compounding bugs: the `(enumerator)*` quantifier made only
|
|
522
|
+
# the FIRST enumerator of each enum match, and the whole-file query
|
|
523
|
+
# re-ran inside a per-enum loop with a global seen set — so the first
|
|
524
|
+
# enum claimed every member (`OK` from `enum Status` was emitted with
|
|
525
|
+
# enum_name 'Color').
|
|
526
|
+
enums_by_line = {
|
|
527
|
+
enum_cls.get("line_number"): enum_cls
|
|
528
|
+
for enum_cls in classes
|
|
529
|
+
if enum_cls.get("type") == "enum" and enum_cls.get("name")
|
|
530
|
+
}
|
|
531
|
+
for match in execute_query(
|
|
532
|
+
self.language, "(enum_specifier) @enum", root_node
|
|
533
|
+
):
|
|
534
|
+
enum_node = match[0]
|
|
535
|
+
enum_cls = enums_by_line.get(enum_node.start_point[0] + 1)
|
|
536
|
+
if not enum_cls:
|
|
517
537
|
continue
|
|
518
|
-
enum_name = enum_cls
|
|
519
|
-
|
|
538
|
+
enum_name = enum_cls["name"]
|
|
539
|
+
body = enum_node.child_by_field_name("body")
|
|
540
|
+
if body is None:
|
|
520
541
|
continue
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
""
|
|
525
|
-
|
|
526
|
-
body: (enumerator_list
|
|
527
|
-
(enumerator
|
|
528
|
-
name: (identifier) @member
|
|
529
|
-
)*
|
|
530
|
-
)
|
|
531
|
-
)
|
|
532
|
-
""",
|
|
533
|
-
root_node,
|
|
534
|
-
):
|
|
535
|
-
if match[1] != "member":
|
|
542
|
+
for child in body.children:
|
|
543
|
+
if child.type != "enumerator":
|
|
544
|
+
continue
|
|
545
|
+
name_node = child.child_by_field_name("name")
|
|
546
|
+
if name_node is None:
|
|
536
547
|
continue
|
|
537
|
-
member_name = self._get_node_text(
|
|
538
|
-
if member_name in seen_names:
|
|
548
|
+
member_name = self._get_node_text(name_node)
|
|
549
|
+
if (enum_name, member_name) in seen_names:
|
|
539
550
|
continue
|
|
540
|
-
seen_names.add(member_name)
|
|
551
|
+
seen_names.add((enum_name, member_name))
|
|
541
552
|
members.append({
|
|
542
553
|
"name": member_name,
|
|
543
554
|
"enum_name": enum_name,
|
|
544
555
|
"enum_line_number": enum_cls.get("line_number"),
|
|
545
|
-
"line_number":
|
|
556
|
+
"line_number": name_node.start_point[0] + 1,
|
|
546
557
|
"lang": self.language_name,
|
|
547
558
|
"is_dependency": False,
|
|
548
559
|
})
|
|
549
560
|
|
|
550
561
|
x_macro_members = self._find_xmacro_enum_members(source_code, classes, macros)
|
|
551
562
|
for member in x_macro_members:
|
|
552
|
-
|
|
563
|
+
key = (member.get("enum_name"), member["name"])
|
|
564
|
+
if key in seen_names:
|
|
553
565
|
continue
|
|
554
|
-
seen_names.add(
|
|
566
|
+
seen_names.add(key)
|
|
555
567
|
members.append(member)
|
|
556
568
|
|
|
557
569
|
return members
|
|
@@ -752,10 +764,14 @@ class CTreeSitterParser:
|
|
|
752
764
|
|
|
753
765
|
context, context_type, _ = self._get_parent_context(macro_node)
|
|
754
766
|
|
|
767
|
+
# A preproc node's end_point includes the trailing newline
|
|
768
|
+
# (lands at column 0 of the NEXT row), so +1 double-counts.
|
|
769
|
+
end_row = macro_node.end_point[0]
|
|
770
|
+
end_col = macro_node.end_point[1]
|
|
755
771
|
macro_data = {
|
|
756
772
|
"name": name,
|
|
757
773
|
"line_number": node.start_point[0] + 1,
|
|
758
|
-
"end_line":
|
|
774
|
+
"end_line": end_row if end_col == 0 else end_row + 1,
|
|
759
775
|
"value": value,
|
|
760
776
|
"params": params,
|
|
761
777
|
"context": context,
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/csharp.py
RENAMED
|
@@ -230,11 +230,16 @@ class CSharpTreeSitterParser:
|
|
|
230
230
|
params_node = params_captures[0][0]
|
|
231
231
|
parameters = self._extract_parameters(params_node)
|
|
232
232
|
|
|
233
|
-
# Extract attributes applied to this function
|
|
233
|
+
# Extract attributes applied to this function.
|
|
234
|
+
# attribute_list nodes are CHILDREN of the declaration
|
|
235
|
+
# (never its parent), so the old parent check was
|
|
236
|
+
# always false and attributes stayed [] (#1538).
|
|
234
237
|
attributes = []
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
+
for child in node.children:
|
|
239
|
+
if child.type == "attribute_list":
|
|
240
|
+
for attr in child.children:
|
|
241
|
+
if attr.type == "attribute":
|
|
242
|
+
attributes.append(self._get_node_text(attr))
|
|
238
243
|
|
|
239
244
|
# Find containing class/struct/interface
|
|
240
245
|
class_context = self._find_containing_type(node, source_code)
|
|
@@ -245,7 +250,9 @@ class CSharpTreeSitterParser:
|
|
|
245
250
|
"name": func_name,
|
|
246
251
|
"args": parameters,
|
|
247
252
|
"attributes": attributes,
|
|
248
|
-
|
|
253
|
+
# The declaration line, not the first attribute's
|
|
254
|
+
# (python.py's decorated_definition convention).
|
|
255
|
+
"line_number": name_node.start_point[0] + 1,
|
|
249
256
|
"end_line": end_line,
|
|
250
257
|
"path": str(path),
|
|
251
258
|
"lang": self.language_name,
|
|
@@ -491,8 +498,11 @@ class CSharpTreeSitterParser:
|
|
|
491
498
|
call_name = self._get_node_text(node)
|
|
492
499
|
line_number = node.start_point[0] + 1
|
|
493
500
|
|
|
494
|
-
#
|
|
495
|
-
|
|
501
|
+
# Dedupe per CALL SITE, not per (name, line): keying on
|
|
502
|
+
# name_line dropped distinct calls to the same function on
|
|
503
|
+
# one line — `Math.Max(Clamp(a), Clamp(b))` recorded ONE
|
|
504
|
+
# Clamp (#1538). The node's byte offset separates them.
|
|
505
|
+
call_key = (call_name, line_number, node.start_byte)
|
|
496
506
|
if call_key in seen_calls:
|
|
497
507
|
continue
|
|
498
508
|
seen_calls.add(call_key)
|
|
@@ -504,7 +514,16 @@ class CSharpTreeSitterParser:
|
|
|
504
514
|
|
|
505
515
|
# Get context
|
|
506
516
|
context_name, context_type, context_line = self._get_parent_context(node)
|
|
507
|
-
|
|
517
|
+
# A call's first enclosing declaration is its METHOD, so
|
|
518
|
+
# `'class' in context_type` was always false and every
|
|
519
|
+
# call's class_context was None (#1538). Walk again for
|
|
520
|
+
# class-like ancestors only, cpp-style.
|
|
521
|
+
cls_name, _cls_type, cls_line = self._get_parent_context(
|
|
522
|
+
node,
|
|
523
|
+
types=("class_declaration", "struct_declaration",
|
|
524
|
+
"record_declaration", "interface_declaration"),
|
|
525
|
+
)
|
|
526
|
+
class_context = (cls_name, cls_line) if cls_name else None
|
|
508
527
|
|
|
509
528
|
call_data = {
|
|
510
529
|
"name": call_name,
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/elixir.py
RENAMED
|
@@ -465,6 +465,28 @@ class ElixirTreeSitterParser:
|
|
|
465
465
|
"is_dependency": False,
|
|
466
466
|
})
|
|
467
467
|
|
|
468
|
+
# A `def hello(x) do ... end` is itself a `call` node whose arguments
|
|
469
|
+
# contain the SIGNATURE as a nested call. Recursing blindly recorded
|
|
470
|
+
# every definition head as an invocation — a false self-recursive
|
|
471
|
+
# CALLS edge on every Elixir function (#1538). For definition calls,
|
|
472
|
+
# skip the signature and recurse only into the body.
|
|
473
|
+
if node.type == 'call':
|
|
474
|
+
head_identifier = next(
|
|
475
|
+
(c for c in node.children if c.type == 'identifier'), None
|
|
476
|
+
)
|
|
477
|
+
head_target = self._get_node_text(head_identifier) if head_identifier else None
|
|
478
|
+
if head_target in FUNCTION_KEYWORDS:
|
|
479
|
+
for child in node.children:
|
|
480
|
+
if child.type == 'do_block':
|
|
481
|
+
self._find_calls_recursive(child, calls)
|
|
482
|
+
elif child.type == 'arguments':
|
|
483
|
+
# Skip the signature (the first nested call) but keep
|
|
484
|
+
# the inline `, do: body` keywords — that IS the body.
|
|
485
|
+
for arg in child.children:
|
|
486
|
+
if arg.type != 'call':
|
|
487
|
+
self._find_calls_recursive(arg, calls)
|
|
488
|
+
return
|
|
489
|
+
|
|
468
490
|
for child in node.children:
|
|
469
491
|
self._find_calls_recursive(child, calls)
|
|
470
492
|
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/haskell.py
RENAMED
|
@@ -201,13 +201,17 @@ class HaskellTreeSitterParser:
|
|
|
201
201
|
"lang": self.language_name,
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
def
|
|
204
|
+
def _apply_callee(self, apply_node: Any) -> Optional[Any]:
|
|
205
205
|
fn = apply_node.child_by_field_name("function")
|
|
206
206
|
while fn and fn.type == "apply":
|
|
207
207
|
fn = fn.child_by_field_name("function")
|
|
208
208
|
if not fn or fn.type not in ("variable", "constructor"):
|
|
209
209
|
return None
|
|
210
|
-
return
|
|
210
|
+
return fn
|
|
211
|
+
|
|
212
|
+
def _apply_callee_name(self, apply_node: Any) -> Optional[str]:
|
|
213
|
+
fn = self._apply_callee(apply_node)
|
|
214
|
+
return (self._get_node_text(fn) or None) if fn is not None else None
|
|
211
215
|
|
|
212
216
|
def _parse_instances(
|
|
213
217
|
self, captures: List[Tuple[Any, str]], source_code: str, path: Path
|
|
@@ -448,10 +452,15 @@ class HaskellTreeSitterParser:
|
|
|
448
452
|
for node, cap in captures:
|
|
449
453
|
if cap != "apply_node" or node.type != "apply":
|
|
450
454
|
continue
|
|
451
|
-
|
|
455
|
+
callee = self._apply_callee(node)
|
|
456
|
+
call_name = (self._get_node_text(callee) or None) if callee is not None else None
|
|
452
457
|
if not call_name:
|
|
453
458
|
continue
|
|
454
|
-
|
|
459
|
+
# Dedupe by the CALLEE node: curried application produces nested
|
|
460
|
+
# apply nodes with distinct spans for one call — `print (addTwo
|
|
461
|
+
# 1 2)` emitted addTwo twice at the same line (#1538). Both
|
|
462
|
+
# applies share the same callee identifier node.
|
|
463
|
+
key = (callee.start_byte, callee.end_byte)
|
|
455
464
|
if key in seen_calls:
|
|
456
465
|
continue
|
|
457
466
|
seen_calls.add(key)
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/java.py
RENAMED
|
@@ -270,9 +270,28 @@ class JavaTreeSitterParser:
|
|
|
270
270
|
"lang": self.language_name,
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
def _get_parent_context(self, node: Any) -> Tuple[Optional[str], Optional[str], Optional[int]]:
|
|
273
|
+
def _get_parent_context(self, node: Any, types: Optional[Tuple[str, ...]] = None) -> Tuple[Optional[str], Optional[str], Optional[int]]:
|
|
274
|
+
"""First enclosing declaration; pass `types` to look only for those.
|
|
275
|
+
|
|
276
|
+
A call inside a method always has the method as its FIRST enclosing
|
|
277
|
+
declaration, so without `types` the class branch below can never win —
|
|
278
|
+
which left every call's class_context structurally (None, None) and
|
|
279
|
+
the super()/same-name-method resolution paths dead (#1538). Callers
|
|
280
|
+
that want the enclosing class pass types=("class_declaration", ...),
|
|
281
|
+
the same pattern cpp.py uses.
|
|
282
|
+
"""
|
|
274
283
|
curr = node.parent
|
|
275
284
|
while curr:
|
|
285
|
+
if types is not None:
|
|
286
|
+
if curr.type in types:
|
|
287
|
+
name_node = curr.child_by_field_name("name")
|
|
288
|
+
return (
|
|
289
|
+
self._get_node_text(name_node) if name_node else None,
|
|
290
|
+
curr.type,
|
|
291
|
+
curr.start_point[0] + 1,
|
|
292
|
+
)
|
|
293
|
+
curr = curr.parent
|
|
294
|
+
continue
|
|
276
295
|
if curr.type in ("method_declaration", "constructor_declaration"):
|
|
277
296
|
name_node = curr.child_by_field_name("name")
|
|
278
297
|
return (
|
|
@@ -941,6 +960,11 @@ class JavaTreeSitterParser:
|
|
|
941
960
|
full_name = self._get_node_text(type_node)
|
|
942
961
|
|
|
943
962
|
ctx_name, ctx_type, ctx_line = self._get_parent_context(node)
|
|
963
|
+
cls_name, cls_type, cls_line = self._get_parent_context(
|
|
964
|
+
node,
|
|
965
|
+
types=("class_declaration", "interface_declaration",
|
|
966
|
+
"enum_declaration", "annotation_type_declaration"),
|
|
967
|
+
)
|
|
944
968
|
|
|
945
969
|
debug_log(f"Found call: {call_name} (full_name: {full_name}, inferred_obj_type: {inferred_obj_type}, args: {args}) in context {ctx_name}")
|
|
946
970
|
|
|
@@ -951,7 +975,7 @@ class JavaTreeSitterParser:
|
|
|
951
975
|
"args": args,
|
|
952
976
|
"inferred_obj_type": inferred_obj_type,
|
|
953
977
|
"context": (ctx_name, ctx_type, ctx_line),
|
|
954
|
-
"class_context": (
|
|
978
|
+
"class_context": (cls_name, cls_line) if cls_name else None,
|
|
955
979
|
"lang": self.language_name,
|
|
956
980
|
"is_dependency": False,
|
|
957
981
|
}
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/javascript.py
RENAMED
|
@@ -298,7 +298,7 @@ class JavascriptTreeSitterParser:
|
|
|
298
298
|
args = [self._get_node_text(data['single_param'])]
|
|
299
299
|
|
|
300
300
|
# Context & docstring
|
|
301
|
-
context, context_type,
|
|
301
|
+
context, context_type, context_line = self._get_parent_context(func_node)
|
|
302
302
|
class_context = context if context_type == 'class_declaration' else None
|
|
303
303
|
docstring = self._get_jsdoc_comment(func_node)
|
|
304
304
|
|
|
@@ -314,6 +314,14 @@ class JavascriptTreeSitterParser:
|
|
|
314
314
|
"end_line": func_node.end_point[0] + 1,
|
|
315
315
|
"args": args,
|
|
316
316
|
"class_context": class_context,
|
|
317
|
+
# context/context_type were computed and then dropped, so a
|
|
318
|
+
# nested function never got a CONTAINS edge to its enclosing
|
|
319
|
+
# function (#1538). Function rows carry context as a BARE NAME
|
|
320
|
+
# plus separate type/line fields — the tuple shape belongs to
|
|
321
|
+
# call rows only (python.py is the reference).
|
|
322
|
+
"context": context,
|
|
323
|
+
"context_type": context_type,
|
|
324
|
+
"context_line": context_line,
|
|
317
325
|
"lang": self.language_name,
|
|
318
326
|
"is_dependency": False,
|
|
319
327
|
"cyclomatic_complexity": self._calculate_complexity(func_node),
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/php.py
RENAMED
|
@@ -30,6 +30,10 @@ PHP_QUERIES = {
|
|
|
30
30
|
(trait_declaration
|
|
31
31
|
name: (name) @name
|
|
32
32
|
) @trait
|
|
33
|
+
|
|
34
|
+
(enum_declaration
|
|
35
|
+
name: (name) @name
|
|
36
|
+
) @enum
|
|
33
37
|
""",
|
|
34
38
|
# A top-level `use App\Models\User;` is a `namespace_use_declaration`.
|
|
35
39
|
# `use_declaration` is the *trait* use inside a class body (relied on at
|
|
@@ -153,7 +157,7 @@ class PhpTreeSitterParser:
|
|
|
153
157
|
def _get_parent_context(self, node: Any) -> Tuple[Optional[str], Optional[str], Optional[int]]:
|
|
154
158
|
curr = node.parent
|
|
155
159
|
while curr:
|
|
156
|
-
if curr.type in ("function_definition", "method_declaration", "class_declaration", "interface_declaration", "trait_declaration"):
|
|
160
|
+
if curr.type in ("function_definition", "method_declaration", "class_declaration", "interface_declaration", "trait_declaration", "enum_declaration"):
|
|
157
161
|
name_node = curr.child_by_field_name("name")
|
|
158
162
|
return (
|
|
159
163
|
self._get_node_text(name_node) if name_node else None,
|
|
@@ -166,12 +170,29 @@ class PhpTreeSitterParser:
|
|
|
166
170
|
def _get_enclosing_class_name(self, node: Any) -> Optional[str]:
|
|
167
171
|
curr = node.parent
|
|
168
172
|
while curr:
|
|
169
|
-
if curr.type in ("class_declaration", "interface_declaration", "trait_declaration"):
|
|
173
|
+
if curr.type in ("class_declaration", "interface_declaration", "trait_declaration", "enum_declaration"):
|
|
170
174
|
name_node = curr.child_by_field_name("name")
|
|
171
175
|
return self._get_node_text(name_node) if name_node else None
|
|
172
176
|
curr = curr.parent
|
|
173
177
|
return None
|
|
174
178
|
|
|
179
|
+
def _get_enclosing_class(self, node: Any) -> Optional[Tuple[str, int]]:
|
|
180
|
+
"""(name, line) of the enclosing class-like declaration, or None.
|
|
181
|
+
|
|
182
|
+
Calls previously emitted TWO shapes for class_context — a bare string
|
|
183
|
+
for ordinary calls and a dead (None, None) tuple for `new X()` (the
|
|
184
|
+
parent-context type is the enclosing *function*, never a class) — so
|
|
185
|
+
the tuple-consuming resolution paths never fired for PHP (#1538).
|
|
186
|
+
"""
|
|
187
|
+
curr = node.parent
|
|
188
|
+
while curr:
|
|
189
|
+
if curr.type in ("class_declaration", "interface_declaration", "trait_declaration", "enum_declaration"):
|
|
190
|
+
name_node = curr.child_by_field_name("name")
|
|
191
|
+
name = self._get_node_text(name_node) if name_node else None
|
|
192
|
+
return (name, curr.start_point[0] + 1) if name else None
|
|
193
|
+
curr = curr.parent
|
|
194
|
+
return None
|
|
195
|
+
|
|
175
196
|
def _get_node_text(self, node: Any) -> str:
|
|
176
197
|
if not node: return ""
|
|
177
198
|
return node.text.decode("utf-8")
|
|
@@ -266,7 +287,7 @@ class PhpTreeSitterParser:
|
|
|
266
287
|
"lang": self.language_name,
|
|
267
288
|
"context": context_name,
|
|
268
289
|
"context_type": context_type,
|
|
269
|
-
"class_context": context_name if context_type and ("class" in context_type or "interface" in context_type or "trait" in context_type) else None
|
|
290
|
+
"class_context": context_name if context_type and ("class" in context_type or "interface" in context_type or "trait" in context_type or "enum" in context_type) else None
|
|
270
291
|
}
|
|
271
292
|
|
|
272
293
|
if self.index_source:
|
|
@@ -287,7 +308,7 @@ class PhpTreeSitterParser:
|
|
|
287
308
|
seen_nodes = set()
|
|
288
309
|
|
|
289
310
|
for node, capture_name in captures:
|
|
290
|
-
if capture_name in ("class", "interface", "trait"):
|
|
311
|
+
if capture_name in ("class", "interface", "trait", "enum"):
|
|
291
312
|
node_id = (node.start_byte, node.end_byte, node.type)
|
|
292
313
|
if node_id in seen_nodes:
|
|
293
314
|
continue
|
|
@@ -350,6 +371,12 @@ class PhpTreeSitterParser:
|
|
|
350
371
|
interfaces.append(type_data)
|
|
351
372
|
elif capture_name == "trait":
|
|
352
373
|
traits.append(type_data)
|
|
374
|
+
elif capture_name == "enum":
|
|
375
|
+
# PHP 8.1 enums are class-likes: without this arm
|
|
376
|
+
# the captured row was silently dropped and enum
|
|
377
|
+
# methods became orphans (#1538).
|
|
378
|
+
type_data["node_type"] = "enum"
|
|
379
|
+
classes.append(type_data)
|
|
353
380
|
|
|
354
381
|
except Exception as e:
|
|
355
382
|
error_logger(f"Error parsing type in {path}: {e}")
|
|
@@ -398,7 +425,7 @@ class PhpTreeSitterParser:
|
|
|
398
425
|
"path": str(path),
|
|
399
426
|
"lang": self.language_name,
|
|
400
427
|
"context": ctx_name,
|
|
401
|
-
"class_context": ctx_name if ctx_type and ("class" in ctx_type or "interface" in ctx_type or "trait" in ctx_type) else None
|
|
428
|
+
"class_context": ctx_name if ctx_type and ("class" in ctx_type or "interface" in ctx_type or "trait" in ctx_type or "enum" in ctx_type) else None
|
|
402
429
|
})
|
|
403
430
|
except Exception as e:
|
|
404
431
|
continue
|
|
@@ -558,7 +585,7 @@ class PhpTreeSitterParser:
|
|
|
558
585
|
"args": args,
|
|
559
586
|
"inferred_obj_type": inferred_obj_type,
|
|
560
587
|
"context": (ctx_name, ctx_type, ctx_line),
|
|
561
|
-
"class_context": self.
|
|
588
|
+
"class_context": self._get_enclosing_class(node),
|
|
562
589
|
"lang": self.language_name,
|
|
563
590
|
"is_dependency": False,
|
|
564
591
|
}
|
|
@@ -607,7 +634,7 @@ class PhpTreeSitterParser:
|
|
|
607
634
|
"args": args,
|
|
608
635
|
"inferred_obj_type": None,
|
|
609
636
|
"context": (ctx_name, ctx_type, ctx_line),
|
|
610
|
-
"class_context": (
|
|
637
|
+
"class_context": self._get_enclosing_class(node),
|
|
611
638
|
"lang": self.language_name,
|
|
612
639
|
"is_dependency": False,
|
|
613
640
|
}
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/ruby.py
RENAMED
|
@@ -480,13 +480,18 @@ class RubyTreeSitterParser:
|
|
|
480
480
|
captures_by_call[call_id]['name'] = self._get_node_text(node)
|
|
481
481
|
|
|
482
482
|
elif capture_name == 'receiver':
|
|
483
|
-
|
|
483
|
+
# Field check, like the name branch: byte-range containment
|
|
484
|
+
# alone let nested calls steal each other's receiver —
|
|
485
|
+
# `logger.info(formatter.render(x))` recorded `info` with
|
|
486
|
+
# full_name "formatter.info" (#1538).
|
|
487
|
+
if node == call_node.child_by_field_name('receiver'):
|
|
488
|
+
captures_by_call[call_id]['receiver'] = self._get_node_text(node)
|
|
484
489
|
|
|
485
490
|
elif capture_name == 'args':
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
491
|
+
if node == call_node.child_by_field_name('arguments'):
|
|
492
|
+
args_text = self._get_node_text(node)
|
|
493
|
+
# Simple heuristic: split by comma
|
|
494
|
+
captures_by_call[call_id]['args'] = [a.strip() for a in args_text.strip("()").split(',') if a.strip()]
|
|
490
495
|
|
|
491
496
|
for call_data in captures_by_call.values():
|
|
492
497
|
call_node = call_data['node']
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/rust.py
RENAMED
|
@@ -150,6 +150,24 @@ class RustTreeSitterParser:
|
|
|
150
150
|
params.append(arg_str)
|
|
151
151
|
|
|
152
152
|
module_context = self._module_path_for_node(func_node)
|
|
153
|
+
|
|
154
|
+
# impl methods carried only module_context, so Point::new was
|
|
155
|
+
# never linked to Point and impl methods showed up as orphan
|
|
156
|
+
# functions (#1538). The impl_item's `type` field is the
|
|
157
|
+
# implementing type for both inherent (`impl Point`) and
|
|
158
|
+
# trait (`impl Draw for Point`) blocks.
|
|
159
|
+
class_context = None
|
|
160
|
+
class_context_line = None
|
|
161
|
+
curr = func_node.parent
|
|
162
|
+
while curr:
|
|
163
|
+
if curr.type == "impl_item":
|
|
164
|
+
type_node = curr.child_by_field_name("type")
|
|
165
|
+
if type_node is not None:
|
|
166
|
+
class_context = self._get_node_text(type_node)
|
|
167
|
+
class_context_line = curr.start_point[0] + 1
|
|
168
|
+
break
|
|
169
|
+
curr = curr.parent
|
|
170
|
+
|
|
153
171
|
func_data = {
|
|
154
172
|
"name": name,
|
|
155
173
|
"line_number": name_node.start_point[0] + 1,
|
|
@@ -157,6 +175,8 @@ class RustTreeSitterParser:
|
|
|
157
175
|
"params": params,
|
|
158
176
|
"args": params,
|
|
159
177
|
"module_context": module_context,
|
|
178
|
+
"class_context": class_context,
|
|
179
|
+
"class_context_line": class_context_line,
|
|
160
180
|
"is_extern": False,
|
|
161
181
|
"lang": self.language_name,
|
|
162
182
|
"is_dependency": False,
|
|
@@ -374,12 +394,28 @@ class RustTreeSitterParser:
|
|
|
374
394
|
if child.type not in ('(', ')', ','):
|
|
375
395
|
args.append(self._get_node_text(child))
|
|
376
396
|
|
|
397
|
+
# For `Type::method()` the scope is the receiver type — now
|
|
398
|
+
# that impl methods carry class_context (#1538), handing the
|
|
399
|
+
# scope to resolution lets it pick the RIGHT `new` among many
|
|
400
|
+
# same-named impl methods instead of guessing (or, worse,
|
|
401
|
+
# binding Arc::new/Box::new to an unrelated local `new`).
|
|
402
|
+
inferred_obj_type = None
|
|
403
|
+
if call_node and call_node.type == 'call_expression':
|
|
404
|
+
fn_node = call_node.child_by_field_name('function')
|
|
405
|
+
if fn_node is not None and fn_node.type == 'scoped_identifier':
|
|
406
|
+
scope_node = fn_node.child_by_field_name('path')
|
|
407
|
+
if scope_node is not None:
|
|
408
|
+
scope_text = self._get_node_text(scope_node)
|
|
409
|
+
# `Vec::<T>::new` styles: keep the last plain segment
|
|
410
|
+
inferred_obj_type = scope_text.split('::')[-1] or None
|
|
411
|
+
|
|
377
412
|
calls.append(
|
|
378
413
|
{
|
|
379
414
|
"name": call_name,
|
|
380
415
|
"full_name": self._get_node_text(call_node) if call_node else call_name,
|
|
381
416
|
"line_number": node.start_point[0] + 1,
|
|
382
417
|
"args": args,
|
|
418
|
+
"inferred_obj_type": inferred_obj_type,
|
|
383
419
|
"context": self._get_parent_context(node),
|
|
384
420
|
"lang": self.language_name,
|
|
385
421
|
"is_dependency": False,
|
{codegraphcontext-0.6.4 → codegraphcontext-0.6.5}/src/codegraphcontext/tools/languages/swift.py
RENAMED
|
@@ -127,9 +127,12 @@ class SwiftTreeSitterParser:
|
|
|
127
127
|
"lang": self.language_name,
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
def _get_parent_context(self, node: Any) -> Tuple[Optional[str], Optional[str], Optional[int]]:
|
|
130
|
+
def _get_parent_context(self, node: Any, types: Optional[Tuple[str, ...]] = None) -> Tuple[Optional[str], Optional[str], Optional[int]]:
|
|
131
131
|
curr = node.parent
|
|
132
132
|
while curr:
|
|
133
|
+
if types is not None and curr.type not in types:
|
|
134
|
+
curr = curr.parent
|
|
135
|
+
continue
|
|
133
136
|
if curr.type == "function_declaration":
|
|
134
137
|
name_node = curr.child_by_field_name("name")
|
|
135
138
|
if not name_node:
|
|
@@ -557,18 +560,39 @@ class SwiftTreeSitterParser:
|
|
|
557
560
|
inferred_type = vtype
|
|
558
561
|
break
|
|
559
562
|
|
|
563
|
+
# Both were audit findings (#1538): class_context was
|
|
564
|
+
# hardcoded (None, None) — dead for super/self resolution —
|
|
565
|
+
# and args was hardcoded [].
|
|
566
|
+
cls_name, _cls_type, cls_line = self._get_parent_context(
|
|
567
|
+
node,
|
|
568
|
+
types=("class_declaration", "struct_declaration",
|
|
569
|
+
"enum_declaration", "protocol_declaration",
|
|
570
|
+
"extension_declaration"),
|
|
571
|
+
)
|
|
572
|
+
args = []
|
|
573
|
+
for child in node.children:
|
|
574
|
+
if child.type == "call_suffix":
|
|
575
|
+
for va in child.children:
|
|
576
|
+
if va.type == "value_arguments":
|
|
577
|
+
for arg in va.children:
|
|
578
|
+
if arg.type == "value_argument":
|
|
579
|
+
args.append(self._get_node_text(arg))
|
|
580
|
+
|
|
560
581
|
calls.append({
|
|
561
582
|
"name": call_name,
|
|
562
583
|
"full_name": full_name,
|
|
563
584
|
"line_number": start_line,
|
|
564
|
-
"args":
|
|
585
|
+
"args": args,
|
|
565
586
|
"inferred_obj_type": inferred_type,
|
|
566
587
|
"context": (ctx_name, ctx_type, ctx_line),
|
|
567
|
-
"class_context": (
|
|
588
|
+
"class_context": (cls_name, cls_line) if cls_name else None,
|
|
568
589
|
"lang": self.language_name,
|
|
569
590
|
"is_dependency": False
|
|
570
591
|
})
|
|
571
592
|
except Exception as e:
|
|
593
|
+
# A bare continue swallowed every extraction failure with
|
|
594
|
+
# no trace at all (#1538); keep indexing but say so.
|
|
595
|
+
debug_log(f"Swift call extraction failed at line {node.start_point[0] + 1}: {e}")
|
|
572
596
|
continue
|
|
573
597
|
return calls
|
|
574
598
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraphcontext
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.5
|
|
4
4
|
Summary: An MCP server that indexes local code into a graph database to provide context to AI assistants.
|
|
5
5
|
Author-email: Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
|
|
6
6
|
License: MIT License
|
|
File without changes
|
|
File without changes
|
|
File without changes
|