codegraphcontext 0.5.6__tar.gz → 0.5.8__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.5.6/src/codegraphcontext.egg-info → codegraphcontext-0.5.8}/PKG-INFO +11 -3
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/README.md +9 -2
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/pyproject.toml +3 -2
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/config_manager.py +8 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/main.py +205 -25
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/cgc_bundle.py +424 -20
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/code_finder.py +188 -64
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/handlers/analysis_handlers.py +7 -13
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/handlers/indexing_handlers.py +19 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/handlers/management_handlers.py +3 -3
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/persistence/writer.py +29 -2
- codegraphcontext-0.5.8/src/codegraphcontext/tools/indexing/sanitize.py +120 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/scip_pipeline.py +8 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/c.py +34 -7
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/cpp.py +62 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/csharp.py +83 -1
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/javascript.py +68 -4
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/kotlin.py +31 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/ruby.py +56 -20
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/package_resolver.py +9 -1
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +2 -2
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/report_generator.py +14 -1
- codegraphcontext-0.5.8/src/codegraphcontext/utils/secret_scanner.py +167 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/tree_sitter_manager.py +31 -4
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8/src/codegraphcontext.egg-info}/PKG-INFO +11 -3
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext.egg-info/SOURCES.txt +1 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext.egg-info/requires.txt +1 -0
- codegraphcontext-0.5.6/src/codegraphcontext/tools/indexing/sanitize.py +0 -42
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/LICENSE +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/MANIFEST.in +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/setup.cfg +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/__main__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/api/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/api/app.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/api/auth.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/api/mcp_sse.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/api/router.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/api/schemas.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/cli_helpers.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/hook_manager.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/project_config.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/registry_commands.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/setup_macos.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/setup_wizard.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/simulator.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/visualizer.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/bundle_registry.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/cgcignore.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/database.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/database_embedded_kuzu.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/database_falkordb.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/database_kuzu.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/database_ladybug.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/database_nornic.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/falkor_worker.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/graph_query.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/jobs.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/simulator.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/core/watcher.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/prompts.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/server.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/stdlibs.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tool_definitions.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/datasources/mysql_ingester.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/graph_builder.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/constants.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/pipeline.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/pre_scan.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/resolution/calls.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/schema.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/schema_contract.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/css.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/dart.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/elisp.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/elixir.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/go.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/gradle.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/haskell.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/html.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/java.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/lua.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/maven.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/perl.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/php.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/python.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/rust.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/scala.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/sfc_common.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/solidity.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/solidity_remappings.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/svelte.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/swift.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/typescript.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/languages/vue.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/solidity_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/scip_indexer.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/scip_pb2.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/system.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/tree_sitter_parser.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/tools/type_utils.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/cypher_ddl.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/cypher_readonly.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/debug_log.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/gcf_encoder.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/git_utils.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/path_ignore.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/path_sandbox.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/repo_path.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/tool_limits.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/utils/visualize_graph.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/index.html +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/logo-icon.svg +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/logo.svg +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/robots.txt +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/viz/server.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext.egg-info/top_level.txt +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/tests/test_issue_806_fix.py +0 -0
- {codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/tests/test_mcp_sse.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codegraphcontext
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.8
|
|
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
|
|
@@ -65,6 +65,7 @@ Requires-Dist: ladybug; sys_platform == "win32" or (sys_platform != "win32" and
|
|
|
65
65
|
Requires-Dist: mcp<2,>=1.0.0
|
|
66
66
|
Requires-Dist: fastapi>=0.100.0
|
|
67
67
|
Requires-Dist: uvicorn>=0.22.0
|
|
68
|
+
Requires-Dist: cryptography>=42.0.0
|
|
68
69
|
Provides-Extra: parsing
|
|
69
70
|
Requires-Dist: tree-sitter<0.26.0,>=0.24.0; extra == "parsing"
|
|
70
71
|
Requires-Dist: tree-sitter-language-pack<2.0,>=1.6; extra == "parsing"
|
|
@@ -359,6 +360,13 @@ Each language parser extracts functions, classes, methods, parameters, inheritan
|
|
|
359
360
|
|
|
360
361
|
**Solidity notes:** `.sol` uses Tree-sitter via `tree-sitter-language-pack` (no SCIP). Supports Foundry remappings, modifier invocations, `using Lib for T`, and `emit` / custom-error `revert` as CALLS. See `docs/docs/contributing_languages.md` § Solidity.
|
|
361
362
|
|
|
363
|
+
**Kotlin notes:** Annotations are recorded on functions and classes as `decorators`, retaining
|
|
364
|
+
their arguments (`@Preview(showBackground = true)`). This makes `find_dead_code`'s
|
|
365
|
+
`exclude_decorated_with` usable on Kotlin and Android codebases — for example excluding
|
|
366
|
+
`Composable`, `Preview`, `Test` and `Provides`. That filter matches on functions, so class-level
|
|
367
|
+
annotations do not affect it. Annotations on interfaces, objects, constructors, parameters and
|
|
368
|
+
properties are not yet recorded.
|
|
369
|
+
|
|
362
370
|
---
|
|
363
371
|
|
|
364
372
|
## Database Options
|
|
@@ -372,8 +380,8 @@ CodeGraphContext supports multiple graph database backends to suit your environm
|
|
|
372
380
|
| **Platform** | **All (Windows Native, macOS, Linux)** | **All (Windows Native, macOS, Linux)** | Unix-only (Linux/macOS/WSL) | All Platforms |
|
|
373
381
|
| **Use Case** | Desktop, IDE, Local development | Custom research projects | Specialized Unix development | Enterprise, Massive graphs |
|
|
374
382
|
| **Requirement**| `pip install kuzu` | `pip install ladybug` | `pip install falkordblite` | Neo4j Server / Docker / Nornic Cloud |
|
|
375
|
-
| **Speed** | ⚡ Extremely Fast | ⚡ Fast | 🚀 Scalable |
|
|
376
|
-
| **Persistence**| Yes (to disk) | Yes (to disk) | Yes (to disk) |
|
|
383
|
+
| **Speed** | ⚡ Extremely Fast | ⚡ Fast | 🚀 Scalable | 🌐 Network-dependent |
|
|
384
|
+
| **Persistence**| Yes (to disk) | Yes (to disk) | Yes (to disk) | Yes (server-side) |
|
|
377
385
|
|
|
378
386
|
---
|
|
379
387
|
|
|
@@ -261,6 +261,13 @@ Each language parser extracts functions, classes, methods, parameters, inheritan
|
|
|
261
261
|
|
|
262
262
|
**Solidity notes:** `.sol` uses Tree-sitter via `tree-sitter-language-pack` (no SCIP). Supports Foundry remappings, modifier invocations, `using Lib for T`, and `emit` / custom-error `revert` as CALLS. See `docs/docs/contributing_languages.md` § Solidity.
|
|
263
263
|
|
|
264
|
+
**Kotlin notes:** Annotations are recorded on functions and classes as `decorators`, retaining
|
|
265
|
+
their arguments (`@Preview(showBackground = true)`). This makes `find_dead_code`'s
|
|
266
|
+
`exclude_decorated_with` usable on Kotlin and Android codebases — for example excluding
|
|
267
|
+
`Composable`, `Preview`, `Test` and `Provides`. That filter matches on functions, so class-level
|
|
268
|
+
annotations do not affect it. Annotations on interfaces, objects, constructors, parameters and
|
|
269
|
+
properties are not yet recorded.
|
|
270
|
+
|
|
264
271
|
---
|
|
265
272
|
|
|
266
273
|
## Database Options
|
|
@@ -274,8 +281,8 @@ CodeGraphContext supports multiple graph database backends to suit your environm
|
|
|
274
281
|
| **Platform** | **All (Windows Native, macOS, Linux)** | **All (Windows Native, macOS, Linux)** | Unix-only (Linux/macOS/WSL) | All Platforms |
|
|
275
282
|
| **Use Case** | Desktop, IDE, Local development | Custom research projects | Specialized Unix development | Enterprise, Massive graphs |
|
|
276
283
|
| **Requirement**| `pip install kuzu` | `pip install ladybug` | `pip install falkordblite` | Neo4j Server / Docker / Nornic Cloud |
|
|
277
|
-
| **Speed** | ⚡ Extremely Fast | ⚡ Fast | 🚀 Scalable |
|
|
278
|
-
| **Persistence**| Yes (to disk) | Yes (to disk) | Yes (to disk) |
|
|
284
|
+
| **Speed** | ⚡ Extremely Fast | ⚡ Fast | 🚀 Scalable | 🌐 Network-dependent |
|
|
285
|
+
| **Persistence**| Yes (to disk) | Yes (to disk) | Yes (to disk) | Yes (server-side) |
|
|
279
286
|
|
|
280
287
|
---
|
|
281
288
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codegraphcontext"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.8"
|
|
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"
|
|
@@ -81,7 +81,8 @@ dependencies = [
|
|
|
81
81
|
# Lift this once mcp_sse.py is ported to the 2.x server API.
|
|
82
82
|
"mcp>=1.0.0,<2",
|
|
83
83
|
"fastapi>=0.100.0",
|
|
84
|
-
"uvicorn>=0.22.0"
|
|
84
|
+
"uvicorn>=0.22.0",
|
|
85
|
+
"cryptography>=42.0.0"
|
|
85
86
|
]
|
|
86
87
|
|
|
87
88
|
[project.optional-dependencies]
|
{codegraphcontext-0.5.6 → codegraphcontext-0.5.8}/src/codegraphcontext/cli/config_manager.py
RENAMED
|
@@ -129,6 +129,7 @@ DEFAULT_CONFIG = {
|
|
|
129
129
|
"CGC_EMBEDDING_BATCH_SIZE": "256",
|
|
130
130
|
# Default fuzzy matching behavior for `cgc find name` (overridable per-command with --fuzzy/--no-fuzzy)
|
|
131
131
|
"FUZZY_SEARCH": "true",
|
|
132
|
+
"REDACT_SECRETS": "false",
|
|
132
133
|
# Default LLM model names used for graph queries when no value is explicitly configured
|
|
133
134
|
"OPENAI_MODEL": "gpt-4o",
|
|
134
135
|
"ANTHROPIC_MODEL": "claude-3-5-sonnet-20241022",
|
|
@@ -206,6 +207,12 @@ CONFIG_DESCRIPTIONS = {
|
|
|
206
207
|
"Enable fuzzy matching by default for `cgc find name` (true|false). "
|
|
207
208
|
"Per-invocation overrides are available via --fuzzy / --no-fuzzy."
|
|
208
209
|
),
|
|
210
|
+
"REDACT_SECRETS": (
|
|
211
|
+
"Scan string literals and variable values for likely secrets (API keys, tokens, "
|
|
212
|
+
"passwords, connection strings) during indexing and replace them with [REDACTED] "
|
|
213
|
+
"before writing to the graph database. When false (default), secrets are still "
|
|
214
|
+
"detected and a warning is logged, but values are stored verbatim."
|
|
215
|
+
),
|
|
209
216
|
"OPENAI_MODEL": (
|
|
210
217
|
"Default OpenAI model used for graph queries. "
|
|
211
218
|
"Requires OPENAI_API_KEY environment variable. "
|
|
@@ -243,6 +250,7 @@ CONFIG_VALIDATORS = {
|
|
|
243
250
|
"ENABLE_VECTOR_RESOLVE": ["true", "false"],
|
|
244
251
|
"CGC_EMBEDDING_MODEL": ["local", "openai"],
|
|
245
252
|
"FUZZY_SEARCH": ["true", "false"],
|
|
253
|
+
"REDACT_SECRETS": ["true", "false"],
|
|
246
254
|
}
|
|
247
255
|
|
|
248
256
|
SUPPORTED_DATABASES: List[str] = CONFIG_VALIDATORS["DEFAULT_DATABASE"]
|
|
@@ -46,6 +46,7 @@ from .cli_helpers import (
|
|
|
46
46
|
setup_scip_helper,
|
|
47
47
|
)
|
|
48
48
|
from .hook_manager import HookError, get_hook_status, install_hooks, uninstall_hooks
|
|
49
|
+
from codegraphcontext.utils.tool_limits import get_tool_result_limit
|
|
49
50
|
|
|
50
51
|
# Set the log level for the noisy neo4j, asyncio, and urllib3 loggers to keep the output clean.
|
|
51
52
|
# Get the log level from config, defaulting to WARNING
|
|
@@ -708,6 +709,8 @@ def bundle_export(
|
|
|
708
709
|
output: str = typer.Argument(..., help="Output path for the .cgc bundle file"),
|
|
709
710
|
repo: Optional[str] = typer.Option(None, "--repo", "-r", help="Specific repository path to export (default: export all)"),
|
|
710
711
|
no_stats: bool = typer.Option(False, "--no-stats", help="Skip statistics generation"),
|
|
712
|
+
sign_key: Optional[str] = typer.Option(None, "--sign-key", envvar="CGC_BUNDLE_SIGN_KEY", help="HMAC signing key (or set CGC_BUNDLE_SIGN_KEY)"),
|
|
713
|
+
encrypt_password: Optional[str] = typer.Option(None, "--encrypt-password", envvar="CGC_BUNDLE_PASSWORD", help="Encrypt bundle with this password (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
|
|
711
714
|
context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
|
|
712
715
|
):
|
|
713
716
|
"""
|
|
@@ -723,12 +726,23 @@ def bundle_export(
|
|
|
723
726
|
"""
|
|
724
727
|
_load_credentials()
|
|
725
728
|
from codegraphcontext.core.cgc_bundle import CGCBundle
|
|
726
|
-
|
|
729
|
+
|
|
730
|
+
# Typer resolves defaults only when *it* invokes the command. Called as a
|
|
731
|
+
# plain function (tests/integration/test_parser_goldens.py does this, as can
|
|
732
|
+
# any programmatic caller), an omitted option keeps its OptionInfo sentinel
|
|
733
|
+
# -- which is truthy, so `if sign_key:` passes and `sign_key.encode()` then
|
|
734
|
+
# raises AttributeError. These two are normalized rather than merely
|
|
735
|
+
# forwarded because they are the only options here that get dereferenced.
|
|
736
|
+
if not isinstance(sign_key, (str, type(None))):
|
|
737
|
+
sign_key = None
|
|
738
|
+
if not isinstance(encrypt_password, (str, type(None))):
|
|
739
|
+
encrypt_password = None
|
|
740
|
+
|
|
727
741
|
services = _initialize_services(context)
|
|
728
742
|
if not all(services[:3]):
|
|
729
743
|
raise typer.Exit(code=1)
|
|
730
744
|
db_manager, _, code_finder = services[:3]
|
|
731
|
-
|
|
745
|
+
|
|
732
746
|
try:
|
|
733
747
|
output_path = Path(output)
|
|
734
748
|
repo_path = Path(repo).resolve() if repo else None
|
|
@@ -743,7 +757,9 @@ def bundle_export(
|
|
|
743
757
|
success, message = bundle.export_to_bundle(
|
|
744
758
|
output_path,
|
|
745
759
|
repo_path=repo_path,
|
|
746
|
-
include_stats=not no_stats
|
|
760
|
+
include_stats=not no_stats,
|
|
761
|
+
sign_key=sign_key,
|
|
762
|
+
encrypt_password=encrypt_password,
|
|
747
763
|
)
|
|
748
764
|
|
|
749
765
|
if success:
|
|
@@ -778,6 +794,8 @@ def _confirm_bundle_clear(clear: bool, yes: bool) -> bool:
|
|
|
778
794
|
def bundle_import(
|
|
779
795
|
bundle_file: str = typer.Argument(..., help="Path to the .cgc bundle file to import"),
|
|
780
796
|
clear: bool = typer.Option(False, "--clear", help="Clear existing graph data before importing"),
|
|
797
|
+
password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
|
|
798
|
+
verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
|
|
781
799
|
yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation when using --clear"),
|
|
782
800
|
context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
|
|
783
801
|
):
|
|
@@ -814,7 +832,9 @@ def bundle_import(
|
|
|
814
832
|
bundle = CGCBundle(db_manager)
|
|
815
833
|
success, message = bundle.import_from_bundle(
|
|
816
834
|
bundle_path,
|
|
817
|
-
clear_existing=clear
|
|
835
|
+
clear_existing=clear,
|
|
836
|
+
password=password,
|
|
837
|
+
verify_key=verify_key,
|
|
818
838
|
)
|
|
819
839
|
|
|
820
840
|
if success:
|
|
@@ -826,10 +846,117 @@ def bundle_import(
|
|
|
826
846
|
finally:
|
|
827
847
|
db_manager.close_driver()
|
|
828
848
|
|
|
849
|
+
@bundle_app.command("verify")
|
|
850
|
+
def bundle_verify(
|
|
851
|
+
bundle_file: str = typer.Argument(..., help="Path to the .cgc bundle file to verify"),
|
|
852
|
+
password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
|
|
853
|
+
verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
|
|
854
|
+
):
|
|
855
|
+
"""Verify bundle structure, checksums, optional signature, and encryption envelope."""
|
|
856
|
+
from codegraphcontext.core.cgc_bundle import CGCBundle
|
|
857
|
+
|
|
858
|
+
bundle = CGCBundle(None)
|
|
859
|
+
success, message = bundle.verify_bundle(Path(bundle_file), password=password, verify_key=verify_key)
|
|
860
|
+
if success:
|
|
861
|
+
console.print(f"[bold green]Bundle verified:[/bold green] {message}")
|
|
862
|
+
else:
|
|
863
|
+
console.print(f"[bold red]Bundle verification failed:[/bold red] {message}")
|
|
864
|
+
raise typer.Exit(code=1)
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
@bundle_app.command("inspect")
|
|
868
|
+
def bundle_inspect(
|
|
869
|
+
bundle_file: str = typer.Argument(..., help="Path to the .cgc bundle file to inspect"),
|
|
870
|
+
password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
|
|
871
|
+
verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
|
|
872
|
+
json_output: bool = typer.Option(False, "--json", help="Print raw JSON inspection output"),
|
|
873
|
+
):
|
|
874
|
+
"""Inspect bundle metadata without importing it."""
|
|
875
|
+
from codegraphcontext.core.cgc_bundle import CGCBundle
|
|
876
|
+
|
|
877
|
+
bundle = CGCBundle(None)
|
|
878
|
+
success, info = bundle.inspect_bundle(Path(bundle_file), password=password, verify_key=verify_key)
|
|
879
|
+
if not success:
|
|
880
|
+
console.print(f"[bold red]Inspect failed:[/bold red] {info.get('error', 'unknown error')}")
|
|
881
|
+
raise typer.Exit(code=1)
|
|
882
|
+
if json_output:
|
|
883
|
+
console.print_json(data=info)
|
|
884
|
+
return
|
|
885
|
+
|
|
886
|
+
metadata = info.get("metadata", {})
|
|
887
|
+
stats = info.get("stats", {})
|
|
888
|
+
graph_metrics = metadata.get("graph_metrics", {})
|
|
889
|
+
table = Table(title=f"Bundle: {Path(bundle_file).name}", show_header=False)
|
|
890
|
+
table.add_column("Field", style="cyan")
|
|
891
|
+
table.add_column("Value", overflow="fold")
|
|
892
|
+
table.add_row("Repository", str(metadata.get("repo", "unknown")))
|
|
893
|
+
table.add_row("Name", str(metadata.get("name", Path(bundle_file).name)))
|
|
894
|
+
table.add_row("Format", str(metadata.get("format_version", metadata.get("cgc_version", "unknown"))))
|
|
895
|
+
table.add_row("Exported", str(metadata.get("exported_at", "unknown")))
|
|
896
|
+
table.add_row("Nodes", str(graph_metrics.get("total_nodes", stats.get("node_count", "unknown"))))
|
|
897
|
+
table.add_row("Edges", str(graph_metrics.get("total_edges", stats.get("edge_count", "unknown"))))
|
|
898
|
+
table.add_row("Encrypted", "yes" if info.get("encrypted") else "no")
|
|
899
|
+
table.add_row("Signed", "yes" if info.get("signed") else "no")
|
|
900
|
+
table.add_row("Valid", "yes" if info.get("valid") else f"no ({info.get('validation')})")
|
|
901
|
+
console.print(table)
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
@bundle_app.command("diff")
|
|
905
|
+
def bundle_diff(
|
|
906
|
+
left_bundle: str = typer.Argument(..., help="Older/base .cgc bundle"),
|
|
907
|
+
right_bundle: str = typer.Argument(..., help="Newer/target .cgc bundle"),
|
|
908
|
+
left_password: Optional[str] = typer.Option(None, "--left-password", help="Password for the left encrypted bundle", hide_input=True),
|
|
909
|
+
right_password: Optional[str] = typer.Option(None, "--right-password", help="Password for the right encrypted bundle", hide_input=True),
|
|
910
|
+
left_verify_key: Optional[str] = typer.Option(None, "--left-verify-key", help="HMAC verification key for the left signed bundle"),
|
|
911
|
+
right_verify_key: Optional[str] = typer.Option(None, "--right-verify-key", help="HMAC verification key for the right signed bundle"),
|
|
912
|
+
json_output: bool = typer.Option(False, "--json", help="Print raw JSON diff output"),
|
|
913
|
+
limit: int = typer.Option(20, "--limit", help="Maximum changed keys to show per category"),
|
|
914
|
+
):
|
|
915
|
+
"""Compare two .cgc bundles without importing them."""
|
|
916
|
+
from codegraphcontext.core.cgc_bundle import CGCBundle
|
|
917
|
+
|
|
918
|
+
bundle = CGCBundle(None)
|
|
919
|
+
success, diff = bundle.diff_bundles(
|
|
920
|
+
Path(left_bundle),
|
|
921
|
+
Path(right_bundle),
|
|
922
|
+
left_password=left_password or os.environ.get("CGC_BUNDLE_PASSWORD"),
|
|
923
|
+
right_password=right_password or os.environ.get("CGC_BUNDLE_PASSWORD"),
|
|
924
|
+
left_verify_key=left_verify_key or os.environ.get("CGC_BUNDLE_VERIFY_KEY"),
|
|
925
|
+
right_verify_key=right_verify_key or os.environ.get("CGC_BUNDLE_VERIFY_KEY"),
|
|
926
|
+
)
|
|
927
|
+
if not success:
|
|
928
|
+
console.print(f"[bold red]Diff failed:[/bold red] {diff.get('error', 'unknown error')}")
|
|
929
|
+
raise typer.Exit(code=1)
|
|
930
|
+
if json_output:
|
|
931
|
+
console.print_json(data=diff)
|
|
932
|
+
return
|
|
933
|
+
|
|
934
|
+
table = Table(title="Bundle Diff")
|
|
935
|
+
table.add_column("Category", style="cyan")
|
|
936
|
+
table.add_column("Added", justify="right", style="green")
|
|
937
|
+
table.add_column("Removed", justify="right", style="red")
|
|
938
|
+
table.add_column("Changed", justify="right", style="yellow")
|
|
939
|
+
for category in ("nodes", "edges"):
|
|
940
|
+
item = diff[category]
|
|
941
|
+
table.add_row(category, str(len(item["added"])), str(len(item["removed"])), str(len(item["changed"])))
|
|
942
|
+
console.print(table)
|
|
943
|
+
|
|
944
|
+
for category in ("nodes", "edges"):
|
|
945
|
+
item = diff[category]
|
|
946
|
+
samples = []
|
|
947
|
+
for label in ("added", "removed", "changed"):
|
|
948
|
+
values = item[label][:limit]
|
|
949
|
+
if values:
|
|
950
|
+
samples.append(f"[bold]{category} {label}[/bold]\n" + "\n".join(f" {value}" for value in values))
|
|
951
|
+
if samples:
|
|
952
|
+
console.print("\n".join(samples))
|
|
953
|
+
|
|
829
954
|
@bundle_app.command("load")
|
|
830
955
|
def bundle_load(
|
|
831
956
|
bundle_name: str = typer.Argument(..., help="Bundle name or path to load (e.g., 'numpy' or 'numpy.cgc')"),
|
|
832
957
|
clear: bool = typer.Option(False, "--clear", help="Clear existing graph data before loading"),
|
|
958
|
+
password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
|
|
959
|
+
verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
|
|
833
960
|
yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation when using --clear"),
|
|
834
961
|
context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
|
|
835
962
|
):
|
|
@@ -852,7 +979,7 @@ def bundle_load(
|
|
|
852
979
|
|
|
853
980
|
# If it's an absolute path or has .cgc extension and exists, use it directly
|
|
854
981
|
if bundle_path.is_absolute() or (bundle_path.suffix == '.cgc' and bundle_path.exists()):
|
|
855
|
-
bundle_import(str(bundle_path), clear=clear, yes=yes, context=context)
|
|
982
|
+
bundle_import(str(bundle_path), clear=clear, password=password, verify_key=verify_key, yes=yes, context=context)
|
|
856
983
|
return
|
|
857
984
|
|
|
858
985
|
# Add .cgc extension if not present
|
|
@@ -862,7 +989,7 @@ def bundle_load(
|
|
|
862
989
|
# Check if exists locally
|
|
863
990
|
if bundle_path.exists():
|
|
864
991
|
console.print(f"[dim]Found local bundle: {bundle_path}[/dim]")
|
|
865
|
-
bundle_import(str(bundle_path), clear=clear, yes=yes, context=context)
|
|
992
|
+
bundle_import(str(bundle_path), clear=clear, password=password, verify_key=verify_key, yes=yes, context=context)
|
|
866
993
|
return
|
|
867
994
|
|
|
868
995
|
# Try to download from registry
|
|
@@ -880,7 +1007,7 @@ def bundle_load(
|
|
|
880
1007
|
|
|
881
1008
|
if downloaded_path:
|
|
882
1009
|
# Import the downloaded bundle
|
|
883
|
-
bundle_import(downloaded_path, clear=clear, yes=yes, context=context)
|
|
1010
|
+
bundle_import(downloaded_path, clear=clear, password=password, verify_key=verify_key, yes=yes, context=context)
|
|
884
1011
|
else:
|
|
885
1012
|
console.print(f"[bold red]Failed to download bundle '{name}'[/bold red]")
|
|
886
1013
|
raise typer.Exit(code=1)
|
|
@@ -1008,22 +1135,33 @@ def export_shortcut(
|
|
|
1008
1135
|
output: str = typer.Argument(..., help="Output path for the .cgc bundle file"),
|
|
1009
1136
|
repo: Optional[str] = typer.Option(None, "--repo", "-r", help="Specific repository path to export"),
|
|
1010
1137
|
no_stats: bool = typer.Option(False, "--no-stats", help="Skip generating statistics in the bundle"),
|
|
1138
|
+
sign_key: Optional[str] = typer.Option(None, "--sign-key", envvar="CGC_BUNDLE_SIGN_KEY", help="HMAC signing key (or set CGC_BUNDLE_SIGN_KEY)"),
|
|
1139
|
+
encrypt_password: Optional[str] = typer.Option(None, "--encrypt-password", envvar="CGC_BUNDLE_PASSWORD", help="Encrypt bundle with this password (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
|
|
1011
1140
|
context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
|
|
1012
1141
|
):
|
|
1013
1142
|
"""Shortcut for 'cgc bundle export'"""
|
|
1014
|
-
bundle_export(
|
|
1143
|
+
bundle_export(
|
|
1144
|
+
output=output,
|
|
1145
|
+
repo=repo,
|
|
1146
|
+
no_stats=no_stats,
|
|
1147
|
+
sign_key=sign_key,
|
|
1148
|
+
encrypt_password=encrypt_password,
|
|
1149
|
+
context=context,
|
|
1150
|
+
)
|
|
1015
1151
|
|
|
1016
1152
|
@app.command("load", rich_help_panel="Bundle Shortcuts")
|
|
1017
1153
|
def load_shortcut(
|
|
1018
1154
|
bundle_name: str = typer.Argument(..., help="Bundle name or path to load"),
|
|
1019
1155
|
clear: bool = typer.Option(False, "--clear", help="Clear existing graph data before loading"),
|
|
1156
|
+
password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
|
|
1157
|
+
verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
|
|
1020
1158
|
yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation when using --clear"),
|
|
1021
1159
|
context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
|
|
1022
1160
|
):
|
|
1023
1161
|
"""Shortcut for 'cgc bundle load'"""
|
|
1024
|
-
# Must pass
|
|
1162
|
+
# Must pass every option explicitly: invoked as a plain function, Typer does not
|
|
1025
1163
|
# resolve defaults, so an omitted parameter keeps its OptionInfo sentinel.
|
|
1026
|
-
bundle_load(bundle_name, clear, yes=yes, context=context)
|
|
1164
|
+
bundle_load(bundle_name, clear, password=password, verify_key=verify_key, yes=yes, context=context)
|
|
1027
1165
|
|
|
1028
1166
|
# ============================================================================
|
|
1029
1167
|
# REGISTRY COMMAND GROUP - Browse and Download Bundles
|
|
@@ -1124,7 +1262,7 @@ def registry_download(
|
|
|
1124
1262
|
|
|
1125
1263
|
if load and bundle_path:
|
|
1126
1264
|
console.print("\n[cyan]Loading bundle...[/cyan]")
|
|
1127
|
-
bundle_import(bundle_path, clear=False, yes=False, context=None)
|
|
1265
|
+
bundle_import(bundle_path, clear=False, password=None, verify_key=None, yes=False, context=None)
|
|
1128
1266
|
|
|
1129
1267
|
@registry_app.command("request")
|
|
1130
1268
|
def registry_request(
|
|
@@ -2274,7 +2412,11 @@ def find_by_decorator_search(
|
|
|
2274
2412
|
db_manager, graph_builder, code_finder = services[:3]
|
|
2275
2413
|
|
|
2276
2414
|
try:
|
|
2277
|
-
|
|
2415
|
+
req_limit = get_tool_result_limit("find_functions_by_decorator")
|
|
2416
|
+
results = code_finder.find_functions_by_decorator(decorator, file, limit=req_limit + 1 if req_limit is not None else None)
|
|
2417
|
+
truncated = bool(req_limit and len(results) > req_limit)
|
|
2418
|
+
if truncated:
|
|
2419
|
+
results = results[:req_limit]
|
|
2278
2420
|
|
|
2279
2421
|
if not results:
|
|
2280
2422
|
console.print(f"[yellow]No functions found with decorator '@{decorator}'[/yellow]")
|
|
@@ -2299,6 +2441,8 @@ def find_by_decorator_search(
|
|
|
2299
2441
|
|
|
2300
2442
|
console.print(f"[cyan]Found {len(results)} function(s) with decorator '@{decorator}':[/cyan]")
|
|
2301
2443
|
console.print(table)
|
|
2444
|
+
if truncated:
|
|
2445
|
+
console.print(f"[dim]... truncated ({req_limit} shown), more exist[/dim]")
|
|
2302
2446
|
finally:
|
|
2303
2447
|
db_manager.close_driver()
|
|
2304
2448
|
|
|
@@ -2322,7 +2466,11 @@ def find_by_argument_search(
|
|
|
2322
2466
|
db_manager, graph_builder, code_finder = services[:3]
|
|
2323
2467
|
|
|
2324
2468
|
try:
|
|
2325
|
-
|
|
2469
|
+
req_limit = get_tool_result_limit("find_functions_by_argument")
|
|
2470
|
+
results = code_finder.find_functions_by_argument(argument, file, limit=req_limit + 1 if req_limit is not None else None)
|
|
2471
|
+
truncated = bool(req_limit and len(results) > req_limit)
|
|
2472
|
+
if truncated:
|
|
2473
|
+
results = results[:req_limit]
|
|
2326
2474
|
|
|
2327
2475
|
if not results:
|
|
2328
2476
|
console.print(f"[yellow]No functions found with argument '{argument}'[/yellow]")
|
|
@@ -2344,6 +2492,8 @@ def find_by_argument_search(
|
|
|
2344
2492
|
|
|
2345
2493
|
console.print(f"[cyan]Found {len(results)} function(s) with argument '{argument}':[/cyan]")
|
|
2346
2494
|
console.print(table)
|
|
2495
|
+
if truncated:
|
|
2496
|
+
console.print(f"[dim]... truncated ({req_limit} shown), more exist[/dim]")
|
|
2347
2497
|
finally:
|
|
2348
2498
|
db_manager.close_driver()
|
|
2349
2499
|
|
|
@@ -2378,7 +2528,11 @@ def analyze_calls(
|
|
|
2378
2528
|
db_manager, graph_builder, code_finder = services[:3]
|
|
2379
2529
|
|
|
2380
2530
|
try:
|
|
2381
|
-
|
|
2531
|
+
req_limit = get_tool_result_limit("find_callees")
|
|
2532
|
+
results = code_finder.what_does_function_call(function, file, limit=req_limit + 1 if req_limit is not None else None)
|
|
2533
|
+
truncated = bool(req_limit and len(results) > req_limit)
|
|
2534
|
+
if truncated:
|
|
2535
|
+
results = results[:req_limit]
|
|
2382
2536
|
|
|
2383
2537
|
if not results:
|
|
2384
2538
|
console.print(f"[yellow]No function calls found for '{function}'[/yellow]")
|
|
@@ -2407,7 +2561,10 @@ def analyze_calls(
|
|
|
2407
2561
|
|
|
2408
2562
|
console.print(f"\n[bold cyan]Function '{function}' calls:[/bold cyan]")
|
|
2409
2563
|
console.print(table)
|
|
2410
|
-
|
|
2564
|
+
if truncated:
|
|
2565
|
+
console.print(f"\n[dim]Total: {len(results)} function(s) (truncated, {req_limit}+ exist)[/dim]")
|
|
2566
|
+
else:
|
|
2567
|
+
console.print(f"\n[dim]Total: {len(results)} function(s)[/dim]")
|
|
2411
2568
|
finally:
|
|
2412
2569
|
db_manager.close_driver()
|
|
2413
2570
|
|
|
@@ -2434,7 +2591,11 @@ def analyze_callers(
|
|
|
2434
2591
|
db_manager, graph_builder, code_finder = services[:3]
|
|
2435
2592
|
|
|
2436
2593
|
try:
|
|
2437
|
-
|
|
2594
|
+
req_limit = get_tool_result_limit("find_callers")
|
|
2595
|
+
results = code_finder.who_calls_function(function, file, limit=req_limit + 1 if req_limit is not None else None)
|
|
2596
|
+
truncated = bool(req_limit and len(results) > req_limit)
|
|
2597
|
+
if truncated:
|
|
2598
|
+
results = results[:req_limit]
|
|
2438
2599
|
|
|
2439
2600
|
if not results:
|
|
2440
2601
|
console.print(f"[yellow]No callers found for '{function}'[/yellow]")
|
|
@@ -2465,7 +2626,10 @@ def analyze_callers(
|
|
|
2465
2626
|
|
|
2466
2627
|
console.print(f"\n[bold cyan]Functions that call '{function}':[/bold cyan]")
|
|
2467
2628
|
console.print(table)
|
|
2468
|
-
|
|
2629
|
+
if truncated:
|
|
2630
|
+
console.print(f"\n[dim]Total: {len(results)} caller(s) (truncated, {req_limit}+ exist)[/dim]")
|
|
2631
|
+
else:
|
|
2632
|
+
console.print(f"\n[dim]Total: {len(results)} caller(s)[/dim]")
|
|
2469
2633
|
finally:
|
|
2470
2634
|
db_manager.close_driver()
|
|
2471
2635
|
|
|
@@ -2495,7 +2659,11 @@ def analyze_chain(
|
|
|
2495
2659
|
db_manager, graph_builder, code_finder = services[:3]
|
|
2496
2660
|
|
|
2497
2661
|
try:
|
|
2498
|
-
|
|
2662
|
+
req_limit = get_tool_result_limit("call_chain")
|
|
2663
|
+
results = code_finder.find_function_call_chain(from_func, to_func, max_depth, from_file, to_file, limit=req_limit + 1 if req_limit is not None else None)
|
|
2664
|
+
truncated = bool(req_limit and len(results) > req_limit)
|
|
2665
|
+
if truncated:
|
|
2666
|
+
results = results[:req_limit]
|
|
2499
2667
|
|
|
2500
2668
|
if not results:
|
|
2501
2669
|
console.print(f"[yellow]No call chain found between '{from_func}' and '{to_func}' within depth {max_depth}[/yellow]")
|
|
@@ -2830,15 +2998,18 @@ def analyze_complexity(
|
|
|
2830
2998
|
|
|
2831
2999
|
@analyze_app.command("dead-code")
|
|
2832
3000
|
def analyze_dead_code(
|
|
2833
|
-
path: Optional[str] = typer.Argument(None, help="
|
|
3001
|
+
path: Optional[str] = typer.Argument(None, help="Repository path to scope the analysis to"),
|
|
2834
3002
|
exclude_decorators: Optional[str] = typer.Option(None, "--exclude", "-e", help="Comma-separated decorators to exclude"),
|
|
2835
3003
|
context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
|
|
2836
3004
|
):
|
|
2837
3005
|
"""
|
|
2838
|
-
Find potentially unused functions
|
|
2839
|
-
|
|
3006
|
+
Find potentially unused functions.
|
|
3007
|
+
|
|
3008
|
+
Without a path the whole database is scanned, which on a shared graph
|
|
3009
|
+
reports dead code from every indexed repository. Pass a path to scope it.
|
|
3010
|
+
|
|
2840
3011
|
Example:
|
|
2841
|
-
cgc analyze dead-code
|
|
3012
|
+
cgc analyze dead-code .
|
|
2842
3013
|
cgc analyze dead-code --exclude route,task,api
|
|
2843
3014
|
"""
|
|
2844
3015
|
_load_credentials()
|
|
@@ -2849,8 +3020,11 @@ def analyze_dead_code(
|
|
|
2849
3020
|
|
|
2850
3021
|
try:
|
|
2851
3022
|
exclude_list = exclude_decorators.split(',') if exclude_decorators else []
|
|
2852
|
-
|
|
2853
|
-
|
|
3023
|
+
# `path` was accepted and then dropped, so running inside one repository
|
|
3024
|
+
# still reported dead code from every repository in the database.
|
|
3025
|
+
repo_path = Path(path).resolve().as_posix() if path else None
|
|
3026
|
+
results = code_finder.find_dead_code(exclude_list, repo_path=repo_path)
|
|
3027
|
+
|
|
2854
3028
|
unused_funcs = results.get('potentially_unused_functions', [])
|
|
2855
3029
|
|
|
2856
3030
|
if not unused_funcs:
|
|
@@ -2902,7 +3076,11 @@ def analyze_overrides(
|
|
|
2902
3076
|
db_manager, graph_builder, code_finder = services[:3]
|
|
2903
3077
|
|
|
2904
3078
|
try:
|
|
2905
|
-
|
|
3079
|
+
req_limit = get_tool_result_limit("overrides")
|
|
3080
|
+
results = code_finder.find_function_overrides(function_name, limit=req_limit + 1 if req_limit is not None else None)
|
|
3081
|
+
truncated = bool(req_limit and len(results) > req_limit)
|
|
3082
|
+
if truncated:
|
|
3083
|
+
results = results[:req_limit]
|
|
2906
3084
|
|
|
2907
3085
|
if not results:
|
|
2908
3086
|
console.print(f"[yellow]No implementations found for function '{function_name}'[/yellow]")
|
|
@@ -2931,6 +3109,8 @@ def analyze_overrides(
|
|
|
2931
3109
|
|
|
2932
3110
|
console.print(f"\n[bold cyan]Found {len(results)} implementation(s) of '{function_name}':[/bold cyan]")
|
|
2933
3111
|
console.print(table)
|
|
3112
|
+
if truncated:
|
|
3113
|
+
console.print(f"[dim]... truncated ({req_limit} shown), more exist[/dim]")
|
|
2934
3114
|
finally:
|
|
2935
3115
|
db_manager.close_driver()
|
|
2936
3116
|
|