code-graph-rag 0.0.589__tar.gz → 0.0.662__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.
- {code_graph_rag-0.0.589/code_graph_rag.egg-info → code_graph_rag-0.0.662}/PKG-INFO +38 -2
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/PYPI_README.md +35 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/README.md +10 -7
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662/code_graph_rag.egg-info}/PKG-INFO +38 -2
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/code_graph_rag.egg-info/SOURCES.txt +27 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/code_graph_rag.egg-info/entry_points.txt +3 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/code_graph_rag.egg-info/requires.txt +2 -1
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/cli.py +13 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/cli_help.py +106 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/config.py +18 -24
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/__init__.py +1 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_cpp.py +1 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_dart.py +17 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_go.py +1 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_js.py +3 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_lua.py +6 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_php.py +24 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_python.py +3 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_rust.py +30 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/core.py +13 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/graph.py +21 -1
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/languages.py +9 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/security.py +6 -0
- code_graph_rag-0.0.662/codebase_rag/constants/trace.py +173 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/cypher_queries.py +31 -2
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/docker-compose.yaml +5 -1
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/graph_updater.py +180 -27
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/logs.py +26 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parser_fingerprint.py +9 -6
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/call_processor.py +27 -2
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/call_resolver.py +50 -5
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/identity.py +6 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/mixin.py +110 -38
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/contract_linking.py +4 -4
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/csharp/type_inference.py +18 -40
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/definition_processor.py +18 -2
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/dispatch_registry.py +28 -63
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/factory.py +2 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/flow_access/processor.py +1566 -201
- code_graph_rag-0.0.662/codebase_rag/parsers/frontends/__init__.py +55 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/frontends/csharp.py +63 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/frontends/go.py +63 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/frontends/protocol.py +175 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/frontends/registry.py +27 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/function_ingest.py +38 -7
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/go/type_inference.py +104 -1
- code_graph_rag-0.0.662/codebase_rag/parsers/go_frontend/__init__.py +27 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/go_frontend/frontend.py +285 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/go_frontend/gotypes/go.mod +10 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/go_frontend/gotypes/go.sum +8 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/go_frontend/gotypes/main.go +313 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/import_processor.py +50 -25
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/io_access/__init__.py +8 -1
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/io_access/descriptor.py +173 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/io_access/extract.py +71 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/io_access/models.py +13 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/io_access/processor.py +21 -36
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/io_access/registry.py +244 -45
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/rs/utils.py +7 -0
- code_graph_rag-0.0.662/codebase_rag/parsers/semantic_call_join.py +79 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/structure_processor.py +4 -2
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/type_inference.py +21 -3
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/utils.py +420 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/prompts.py +19 -9
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/providers/base.py +1 -4
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/shell_command.py +6 -0
- code_graph_rag-0.0.662/codebase_rag/trace/__init__.py +1 -0
- code_graph_rag-0.0.662/codebase_rag/trace/cli.py +495 -0
- code_graph_rag-0.0.662/codebase_rag/trace/cpuprofile.py +280 -0
- code_graph_rag-0.0.662/codebase_rag/trace/ebpf_pprof.py +442 -0
- code_graph_rag-0.0.662/codebase_rag/trace/ingest.py +211 -0
- code_graph_rag-0.0.662/codebase_rag/trace/instrumented.py +304 -0
- code_graph_rag-0.0.662/codebase_rag/trace/pprof.py +357 -0
- code_graph_rag-0.0.662/codebase_rag/trace/pytest_plugin.py +111 -0
- code_graph_rag-0.0.662/codebase_rag/trace/records.py +195 -0
- code_graph_rag-0.0.662/codebase_rag/trace/resolution.py +576 -0
- code_graph_rag-0.0.662/codebase_rag/trace/rust_pprof.py +154 -0
- code_graph_rag-0.0.662/codebase_rag/trace/sourcemap.py +336 -0
- code_graph_rag-0.0.662/codebase_rag/trace/speedscope.py +226 -0
- code_graph_rag-0.0.662/codebase_rag/trace/tracer.py +177 -0
- code_graph_rag-0.0.662/codebase_rag/trace/xdebug.py +186 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/utils/path_utils.py +14 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/pyproject.toml +9 -2
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/LICENSE +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/cgr/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/code_graph_rag.egg-info/dependency_links.txt +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/code_graph_rag.egg-info/top_level.txt +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_analyzer.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/c.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/cpp.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/csharp.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/dart.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/go.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/java.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/javascript.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/lua.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/php.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/python.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/ruby.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/rust.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/scala.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/tsx.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/patterns/typescript.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/c.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/cpp.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/csharp.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/dart.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/go.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/java.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/javascript.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/lua.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/php.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/python.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/ruby.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/rust.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/scala.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/tsx.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/security/typescript.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/c.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/cpp.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/csharp.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/dart.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/go.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/java.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/javascript.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/lua.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/php.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/python.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/ruby.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/rust.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/scala.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/tsx.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/analyzers/ast_grep_rules/smells/typescript.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/ast_cache.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/capture.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/cgr_state.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_csharp.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_java.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_nodes.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/ast_scala.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/build.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/cli.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/deadcode_roots.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/deps.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/fqn_specs.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/health.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/lang_tooling.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/mcp.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/providers.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/stdlib_types.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/constants/structural.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/dead_code.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/decorators.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/embedder.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/exceptions.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/flow_verdict.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/function_registry.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/graph_audit.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/graph_loader.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/language_spec.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/main.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/mcp/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/mcp/client.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/mcp/server.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/mcp/tools.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/models.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parser_loader.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/ast_grep_patterns/ruby.yaml +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/ast_grep_tier.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/cpp_modules.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/method_override.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/node_type.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/parent_extraction.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/relationships.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/class_ingest/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/contracts.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/cpp/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/cpp/preproc_recovery.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/cpp/type_inference.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/cpp/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/cpp_frontend/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/cpp_frontend/constants.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/cpp_frontend/frontend.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/cpp_frontend/qn.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/csharp/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/csharp/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/csharp_frontend/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/csharp_frontend/frontend.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.cs +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/csharp_frontend/roslyn/Frontend.csproj +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/csharp_frontend/roslyn/Program.cs +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/dart/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/dart/type_inference.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/dart/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/dependency_parser.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/endpoint_prefixes.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/endpoint_routes.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/endpoints.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/export_detection.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/flow_access/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/flow_access/constants.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/go/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/go/module_paths.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/go/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/base.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/cpp.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/java.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/js_ts.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/lua.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/php.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/protocol.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/python.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/registry.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/handlers/rust.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/io_access/constants.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/java/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/java/method_resolver.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/java/type_inference.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/java/type_resolver.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/java/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/java/variable_analyzer.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/js_ts/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/js_ts/ingest.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/js_ts/module_paths.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/js_ts/module_system.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/js_ts/type_inference.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/js_ts/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/lua/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/lua/type_inference.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/lua/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/py/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/py/ast_analyzer.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/py/expression_analyzer.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/py/type_inference.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/py/utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/py/variable_analyzer.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/python_source_roots.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/rpc_exposure.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/rs/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/rs/type_inference.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/parsers/stdlib_extractor.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/path_filters.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/providers/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/providers/litellm.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/readme_sections.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/schema_builder.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/schemas.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/services/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/services/anthropic_token_counter.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/services/filtering.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/services/graph_service.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/services/llm.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/services/protobuf_service.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/services/resource_cleanup.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/services/usage_cost.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/stack/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/stack/cli.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/stack/constants.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/stack/health.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/stack/manager.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tool_errors.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/ast_grep_service.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/code_retrieval.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/codebase_query.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/directory_lister.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/file_editor.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/file_reader.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/file_writer.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/health_checker.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/language.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/semantic_search.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/structural_editor.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/structural_search.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/tool_descriptions.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/tools/web_search.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/types_defs.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/unixcoder.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/utils/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/utils/dependencies.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/utils/fqn_resolver.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/utils/rich_markdown.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/utils/source_extraction.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/utils/token_utils.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/vector_store.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/workspaces/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/workspaces/cli.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/workspaces/constants.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/workspaces/models.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codebase_rag/workspaces/storage.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codec/__init__.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codec/schema_pb2.py +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/codec/schema_pb2.pyi +0 -0
- {code_graph_rag-0.0.589 → code_graph_rag-0.0.662}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-graph-rag
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.662
|
|
4
4
|
Summary: The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Keywords: rag,retrieval-augmented-generation,knowledge-graph,code-analysis,tree-sitter,mcp,mcp-server,llm,graph-database,semantic-search,codebase,memgraph,developer-tools,monorepo
|
|
@@ -33,11 +33,12 @@ Requires-Dist: typer>=0.21.1
|
|
|
33
33
|
Requires-Dist: rich>=14.2.0
|
|
34
34
|
Requires-Dist: prompt-toolkit>=3.0.52
|
|
35
35
|
Requires-Dist: diff-match-patch>=20241021
|
|
36
|
-
Requires-Dist: click>=8.3.
|
|
36
|
+
Requires-Dist: click>=8.3.3
|
|
37
37
|
Requires-Dist: protobuf>=6.33.5
|
|
38
38
|
Requires-Dist: defusedxml>=0.7.1
|
|
39
39
|
Requires-Dist: huggingface-hub[hf-xet]>=1.7.2
|
|
40
40
|
Requires-Dist: pathspec>=1.0.4
|
|
41
|
+
Requires-Dist: pygments>=2.20.0
|
|
41
42
|
Provides-Extra: test
|
|
42
43
|
Requires-Dist: pytest>=8.4.1; extra == "test"
|
|
43
44
|
Requires-Dist: pytest-asyncio>=1.0.0; extra == "test"
|
|
@@ -88,6 +89,7 @@ Point it at a repository and it reads every source file, extracts functions, cla
|
|
|
88
89
|
- Trace data flow through assignments, calls, and I/O sinks via `FLOWS_TO` taint edges.
|
|
89
90
|
- Optimise code against language best practices or your own coding standards.
|
|
90
91
|
- Find dead code by walking call and reference edges from entry points.
|
|
92
|
+
- Overlay runtime behaviour: trace a test run (or pull production eBPF profiles) and merge the calls that actually happened into the graph, exposing dispatch that static analysis cannot see.
|
|
91
93
|
- Group several repositories into a named workspace and query them as one graph.
|
|
92
94
|
- Trace calls between microservices: route decorators become endpoint templates, and HTTP client URLs resolve to the handlers that serve them, linking services across project boundaries.
|
|
93
95
|
|
|
@@ -188,6 +190,40 @@ cgr status # stack state and last sync per proje
|
|
|
188
190
|
cgr doctor # check dependencies and configuration
|
|
189
191
|
```
|
|
190
192
|
|
|
193
|
+
## Runtime Call Tracing
|
|
194
|
+
|
|
195
|
+
Static analysis cannot see calls through interfaces, reflection, registries, or framework routing. `cgr trace` records which functions actually called which while your code runs (typically the test suite) and merges the observations into the graph as `CALLS` edges with dynamic provenance: `dynamic: true`, observed call counts, the workloads (tests) that exercised each edge, and `static_missed: true` where no static edge existed.
|
|
196
|
+
|
|
197
|
+
Index the repository first (`cgr start --repo-path ./my-project --update-graph`), then:
|
|
198
|
+
|
|
199
|
+
**Python** (a pytest plugin ships with the package, inert unless enabled):
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
cd ./my-project
|
|
203
|
+
pytest --cgr-trace # writes cgr-trace.jsonl
|
|
204
|
+
cgr trace ingest cgr-trace.jsonl --repo-path . # merge into the graph
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Node.js / TypeScript** (V8's built-in profiler, no agent needed; source maps are followed back to the original TypeScript):
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
node --cpu-prof --cpu-prof-name=run.cpuprofile app.js
|
|
211
|
+
cgr trace convert run.cpuprofile --repo-path ./my-project --workload smoke
|
|
212
|
+
cgr trace ingest cgr-trace.jsonl --repo-path ./my-project
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Production overlay** (eBPF continuous profilers: Parca, Pyroscope, OpenTelemetry). Fetch a pprof over HTTP and convert it in one step, re-anchoring build paths to your checkout:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
cgr trace pull "https://parca.example/query?...&format=pprof" \
|
|
219
|
+
--repo-path ./my-project --language go \
|
|
220
|
+
--path-map /build/src/=./my-project/src/ \
|
|
221
|
+
--label endpoint --header "Authorization=Bearer $TOKEN"
|
|
222
|
+
cgr trace ingest cgr-trace.jsonl --repo-path ./my-project
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The JVM (Java, Scala), .NET, PHP, Lua, Dart, Go, Rust, and C/C++ each have a recording recipe in the [Dynamic Call Tracing guide](https://docs.code-graph-rag.com/guide/dynamic-tracing/). Ingest is idempotent, so a cron'd `pull` plus `ingest` keeps a continuously refreshing production overlay. The absence of a dynamic edge never means dead code; it only means the traced workload did not exercise that path.
|
|
226
|
+
|
|
191
227
|
## MCP Server
|
|
192
228
|
|
|
193
229
|
Run `cgr mcp-server` to serve the tools over stdio or HTTP for Claude Code and other MCP clients. The MCP surface registers:
|
|
@@ -13,6 +13,7 @@ Point it at a repository and it reads every source file, extracts functions, cla
|
|
|
13
13
|
- Trace data flow through assignments, calls, and I/O sinks via `FLOWS_TO` taint edges.
|
|
14
14
|
- Optimise code against language best practices or your own coding standards.
|
|
15
15
|
- Find dead code by walking call and reference edges from entry points.
|
|
16
|
+
- Overlay runtime behaviour: trace a test run (or pull production eBPF profiles) and merge the calls that actually happened into the graph, exposing dispatch that static analysis cannot see.
|
|
16
17
|
- Group several repositories into a named workspace and query them as one graph.
|
|
17
18
|
- Trace calls between microservices: route decorators become endpoint templates, and HTTP client URLs resolve to the handlers that serve them, linking services across project boundaries.
|
|
18
19
|
|
|
@@ -113,6 +114,40 @@ cgr status # stack state and last sync per proje
|
|
|
113
114
|
cgr doctor # check dependencies and configuration
|
|
114
115
|
```
|
|
115
116
|
|
|
117
|
+
## Runtime Call Tracing
|
|
118
|
+
|
|
119
|
+
Static analysis cannot see calls through interfaces, reflection, registries, or framework routing. `cgr trace` records which functions actually called which while your code runs (typically the test suite) and merges the observations into the graph as `CALLS` edges with dynamic provenance: `dynamic: true`, observed call counts, the workloads (tests) that exercised each edge, and `static_missed: true` where no static edge existed.
|
|
120
|
+
|
|
121
|
+
Index the repository first (`cgr start --repo-path ./my-project --update-graph`), then:
|
|
122
|
+
|
|
123
|
+
**Python** (a pytest plugin ships with the package, inert unless enabled):
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
cd ./my-project
|
|
127
|
+
pytest --cgr-trace # writes cgr-trace.jsonl
|
|
128
|
+
cgr trace ingest cgr-trace.jsonl --repo-path . # merge into the graph
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Node.js / TypeScript** (V8's built-in profiler, no agent needed; source maps are followed back to the original TypeScript):
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
node --cpu-prof --cpu-prof-name=run.cpuprofile app.js
|
|
135
|
+
cgr trace convert run.cpuprofile --repo-path ./my-project --workload smoke
|
|
136
|
+
cgr trace ingest cgr-trace.jsonl --repo-path ./my-project
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Production overlay** (eBPF continuous profilers: Parca, Pyroscope, OpenTelemetry). Fetch a pprof over HTTP and convert it in one step, re-anchoring build paths to your checkout:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
cgr trace pull "https://parca.example/query?...&format=pprof" \
|
|
143
|
+
--repo-path ./my-project --language go \
|
|
144
|
+
--path-map /build/src/=./my-project/src/ \
|
|
145
|
+
--label endpoint --header "Authorization=Bearer $TOKEN"
|
|
146
|
+
cgr trace ingest cgr-trace.jsonl --repo-path ./my-project
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The JVM (Java, Scala), .NET, PHP, Lua, Dart, Go, Rust, and C/C++ each have a recording recipe in the [Dynamic Call Tracing guide](https://docs.code-graph-rag.com/guide/dynamic-tracing/). Ingest is idempotent, so a cron'd `pull` plus `ingest` keeps a continuously refreshing production overlay. The absence of a dynamic edge never means dead code; it only means the traced workload did not exercise that path.
|
|
150
|
+
|
|
116
151
|
## MCP Server
|
|
117
152
|
|
|
118
153
|
Run `cgr mcp-server` to serve the tools over stdio or HTTP for Claude Code and other MCP clients. The MCP surface registers:
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<!-- Bitbucket strips <picture>/<source> tags, so we use a single light-mode <img>. Restore the theme-aware <picture> block below when the GitHub account is reinstated:
|
|
3
2
|
<picture>
|
|
4
|
-
<source
|
|
5
|
-
<source
|
|
6
|
-
<img src="assets/logo-
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark-any.png">
|
|
4
|
+
<source media="(prefers-color-scheme: light)" srcset="assets/logo-light-any.png">
|
|
5
|
+
<img src="assets/logo-light-any.png" alt="Code-Graph-RAG Logo" width="480">
|
|
7
6
|
</picture>
|
|
8
|
-
|
|
9
|
-
<
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<a href="https://trendshift.io/repositories/99619" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/99619" alt="vitali87/code-graph-rag | Trendshift" width="250" height="55"/></a>
|
|
10
|
+
</p>
|
|
10
11
|
|
|
11
12
|
<p>
|
|
12
13
|
<!-- Badges below are commented out while the GitHub account is suspended. Restore them when the account is reinstated.
|
|
@@ -71,9 +72,9 @@ Code-Graph-RAG parses a multi-language codebase with Tree-sitter, builds a knowl
|
|
|
71
72
|
## Latest News 🔥
|
|
72
73
|
|
|
73
74
|
<!-- SECTION:latest_news -->
|
|
75
|
+
- **Runtime Call Tracing**: A dynamic tracer runs your code (typically the test suite) and merges the calls that actually happened into the graph as `CALLS` edges (flagged where static analysis missed them), so dispatch through interfaces, virtual methods, function pointers, reflection, and framework routing becomes visible. Convert a run from Python, the JVM, Node.js, .NET, PHP, Lua, Dart, Go, Rust, or C/C++ with `cgr trace`, or ingest production pprof profiles from an eBPF continuous profiler (Parca, Pyroscope, OpenTelemetry) with `cgr trace convert --format ebpf`.
|
|
74
76
|
- **Ruby Support**: Ruby joins the graph through a new pluggable ast-grep tier that adds a language from a single YAML pattern file, emitting `Module`, `Function`, and `Class` nodes plus import edges without a hand-written parser.
|
|
75
77
|
- **Structural Search & Replace**: Find and rewrite code by AST pattern with ast-grep, exposed as agent tools so you can match and transform structure across the whole codebase instead of relying on text or regex.
|
|
76
|
-
- **Data-Flow Tracing**: New `FLOWS_TO` taint edges follow values through assignments, function calls, and I/O sinks, with coverage across C#, Java, C, and Go.
|
|
77
78
|
<!-- /SECTION:latest_news -->
|
|
78
79
|
|
|
79
80
|
See [NEWS.md](NEWS.md) for the full history.
|
|
@@ -88,6 +89,7 @@ Point Code-Graph-RAG at a repository and it reads every source file, extracts fu
|
|
|
88
89
|
- Optimise code against language best practices or your own coding standards.
|
|
89
90
|
- Find dead code by walking call and reference edges from entry points.
|
|
90
91
|
- Search and rewrite structurally by AST pattern with ast-grep.
|
|
92
|
+
- Overlay runtime behaviour: trace a test run (or pull production eBPF profiles) with `cgr trace` and merge the calls that actually happened into the graph, exposing dispatch that static analysis cannot see.
|
|
91
93
|
|
|
92
94
|
## How It Works
|
|
93
95
|
|
|
@@ -157,6 +159,7 @@ Code-Graph-RAG runs as an [MCP](https://modelcontextprotocol.io) server so Claud
|
|
|
157
159
|
- [Interactive Querying](docs/guide/interactive-querying.md)
|
|
158
160
|
- [Code Optimisation](docs/guide/code-optimization.md)
|
|
159
161
|
- [Dead Code Detection](docs/guide/dead-code.md)
|
|
162
|
+
- [Dynamic Call Tracing](docs/guide/dynamic-tracing.md)
|
|
160
163
|
- [Graph Export](docs/guide/graph-export.md)
|
|
161
164
|
- [Real-Time Updates](docs/guide/realtime-updates.md)
|
|
162
165
|
- [MCP Server](docs/guide/mcp-server.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: code-graph-rag
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.662
|
|
4
4
|
Summary: The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Keywords: rag,retrieval-augmented-generation,knowledge-graph,code-analysis,tree-sitter,mcp,mcp-server,llm,graph-database,semantic-search,codebase,memgraph,developer-tools,monorepo
|
|
@@ -33,11 +33,12 @@ Requires-Dist: typer>=0.21.1
|
|
|
33
33
|
Requires-Dist: rich>=14.2.0
|
|
34
34
|
Requires-Dist: prompt-toolkit>=3.0.52
|
|
35
35
|
Requires-Dist: diff-match-patch>=20241021
|
|
36
|
-
Requires-Dist: click>=8.3.
|
|
36
|
+
Requires-Dist: click>=8.3.3
|
|
37
37
|
Requires-Dist: protobuf>=6.33.5
|
|
38
38
|
Requires-Dist: defusedxml>=0.7.1
|
|
39
39
|
Requires-Dist: huggingface-hub[hf-xet]>=1.7.2
|
|
40
40
|
Requires-Dist: pathspec>=1.0.4
|
|
41
|
+
Requires-Dist: pygments>=2.20.0
|
|
41
42
|
Provides-Extra: test
|
|
42
43
|
Requires-Dist: pytest>=8.4.1; extra == "test"
|
|
43
44
|
Requires-Dist: pytest-asyncio>=1.0.0; extra == "test"
|
|
@@ -88,6 +89,7 @@ Point it at a repository and it reads every source file, extracts functions, cla
|
|
|
88
89
|
- Trace data flow through assignments, calls, and I/O sinks via `FLOWS_TO` taint edges.
|
|
89
90
|
- Optimise code against language best practices or your own coding standards.
|
|
90
91
|
- Find dead code by walking call and reference edges from entry points.
|
|
92
|
+
- Overlay runtime behaviour: trace a test run (or pull production eBPF profiles) and merge the calls that actually happened into the graph, exposing dispatch that static analysis cannot see.
|
|
91
93
|
- Group several repositories into a named workspace and query them as one graph.
|
|
92
94
|
- Trace calls between microservices: route decorators become endpoint templates, and HTTP client URLs resolve to the handlers that serve them, linking services across project boundaries.
|
|
93
95
|
|
|
@@ -188,6 +190,40 @@ cgr status # stack state and last sync per proje
|
|
|
188
190
|
cgr doctor # check dependencies and configuration
|
|
189
191
|
```
|
|
190
192
|
|
|
193
|
+
## Runtime Call Tracing
|
|
194
|
+
|
|
195
|
+
Static analysis cannot see calls through interfaces, reflection, registries, or framework routing. `cgr trace` records which functions actually called which while your code runs (typically the test suite) and merges the observations into the graph as `CALLS` edges with dynamic provenance: `dynamic: true`, observed call counts, the workloads (tests) that exercised each edge, and `static_missed: true` where no static edge existed.
|
|
196
|
+
|
|
197
|
+
Index the repository first (`cgr start --repo-path ./my-project --update-graph`), then:
|
|
198
|
+
|
|
199
|
+
**Python** (a pytest plugin ships with the package, inert unless enabled):
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
cd ./my-project
|
|
203
|
+
pytest --cgr-trace # writes cgr-trace.jsonl
|
|
204
|
+
cgr trace ingest cgr-trace.jsonl --repo-path . # merge into the graph
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Node.js / TypeScript** (V8's built-in profiler, no agent needed; source maps are followed back to the original TypeScript):
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
node --cpu-prof --cpu-prof-name=run.cpuprofile app.js
|
|
211
|
+
cgr trace convert run.cpuprofile --repo-path ./my-project --workload smoke
|
|
212
|
+
cgr trace ingest cgr-trace.jsonl --repo-path ./my-project
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Production overlay** (eBPF continuous profilers: Parca, Pyroscope, OpenTelemetry). Fetch a pprof over HTTP and convert it in one step, re-anchoring build paths to your checkout:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
cgr trace pull "https://parca.example/query?...&format=pprof" \
|
|
219
|
+
--repo-path ./my-project --language go \
|
|
220
|
+
--path-map /build/src/=./my-project/src/ \
|
|
221
|
+
--label endpoint --header "Authorization=Bearer $TOKEN"
|
|
222
|
+
cgr trace ingest cgr-trace.jsonl --repo-path ./my-project
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The JVM (Java, Scala), .NET, PHP, Lua, Dart, Go, Rust, and C/C++ each have a recording recipe in the [Dynamic Call Tracing guide](https://docs.code-graph-rag.com/guide/dynamic-tracing/). Ingest is idempotent, so a cron'd `pull` plus `ingest` keeps a continuously refreshing production overlay. The absence of a dynamic edge never means dead code; it only means the traced workload did not exercise that path.
|
|
226
|
+
|
|
191
227
|
## MCP Server
|
|
192
228
|
|
|
193
229
|
Run `cgr mcp-server` to serve the tools over stdio or HTTP for Claude Code and other MCP clients. The MCP surface registers:
|
|
@@ -117,6 +117,7 @@ codebase_rag/constants/providers.py
|
|
|
117
117
|
codebase_rag/constants/security.py
|
|
118
118
|
codebase_rag/constants/stdlib_types.py
|
|
119
119
|
codebase_rag/constants/structural.py
|
|
120
|
+
codebase_rag/constants/trace.py
|
|
120
121
|
codebase_rag/mcp/__init__.py
|
|
121
122
|
codebase_rag/mcp/client.py
|
|
122
123
|
codebase_rag/mcp/server.py
|
|
@@ -139,6 +140,7 @@ codebase_rag/parsers/function_ingest.py
|
|
|
139
140
|
codebase_rag/parsers/import_processor.py
|
|
140
141
|
codebase_rag/parsers/python_source_roots.py
|
|
141
142
|
codebase_rag/parsers/rpc_exposure.py
|
|
143
|
+
codebase_rag/parsers/semantic_call_join.py
|
|
142
144
|
codebase_rag/parsers/stdlib_extractor.py
|
|
143
145
|
codebase_rag/parsers/structure_processor.py
|
|
144
146
|
codebase_rag/parsers/type_inference.py
|
|
@@ -175,10 +177,20 @@ codebase_rag/parsers/dart/utils.py
|
|
|
175
177
|
codebase_rag/parsers/flow_access/__init__.py
|
|
176
178
|
codebase_rag/parsers/flow_access/constants.py
|
|
177
179
|
codebase_rag/parsers/flow_access/processor.py
|
|
180
|
+
codebase_rag/parsers/frontends/__init__.py
|
|
181
|
+
codebase_rag/parsers/frontends/csharp.py
|
|
182
|
+
codebase_rag/parsers/frontends/go.py
|
|
183
|
+
codebase_rag/parsers/frontends/protocol.py
|
|
184
|
+
codebase_rag/parsers/frontends/registry.py
|
|
178
185
|
codebase_rag/parsers/go/__init__.py
|
|
179
186
|
codebase_rag/parsers/go/module_paths.py
|
|
180
187
|
codebase_rag/parsers/go/type_inference.py
|
|
181
188
|
codebase_rag/parsers/go/utils.py
|
|
189
|
+
codebase_rag/parsers/go_frontend/__init__.py
|
|
190
|
+
codebase_rag/parsers/go_frontend/frontend.py
|
|
191
|
+
codebase_rag/parsers/go_frontend/gotypes/go.mod
|
|
192
|
+
codebase_rag/parsers/go_frontend/gotypes/go.sum
|
|
193
|
+
codebase_rag/parsers/go_frontend/gotypes/main.go
|
|
182
194
|
codebase_rag/parsers/handlers/__init__.py
|
|
183
195
|
codebase_rag/parsers/handlers/base.py
|
|
184
196
|
codebase_rag/parsers/handlers/cpp.py
|
|
@@ -253,6 +265,21 @@ codebase_rag/tools/structural_editor.py
|
|
|
253
265
|
codebase_rag/tools/structural_search.py
|
|
254
266
|
codebase_rag/tools/tool_descriptions.py
|
|
255
267
|
codebase_rag/tools/web_search.py
|
|
268
|
+
codebase_rag/trace/__init__.py
|
|
269
|
+
codebase_rag/trace/cli.py
|
|
270
|
+
codebase_rag/trace/cpuprofile.py
|
|
271
|
+
codebase_rag/trace/ebpf_pprof.py
|
|
272
|
+
codebase_rag/trace/ingest.py
|
|
273
|
+
codebase_rag/trace/instrumented.py
|
|
274
|
+
codebase_rag/trace/pprof.py
|
|
275
|
+
codebase_rag/trace/pytest_plugin.py
|
|
276
|
+
codebase_rag/trace/records.py
|
|
277
|
+
codebase_rag/trace/resolution.py
|
|
278
|
+
codebase_rag/trace/rust_pprof.py
|
|
279
|
+
codebase_rag/trace/sourcemap.py
|
|
280
|
+
codebase_rag/trace/speedscope.py
|
|
281
|
+
codebase_rag/trace/tracer.py
|
|
282
|
+
codebase_rag/trace/xdebug.py
|
|
256
283
|
codebase_rag/utils/__init__.py
|
|
257
284
|
codebase_rag/utils/dependencies.py
|
|
258
285
|
codebase_rag/utils/fqn_resolver.py
|
|
@@ -13,11 +13,12 @@ typer>=0.21.1
|
|
|
13
13
|
rich>=14.2.0
|
|
14
14
|
prompt-toolkit>=3.0.52
|
|
15
15
|
diff-match-patch>=20241021
|
|
16
|
-
click>=8.3.
|
|
16
|
+
click>=8.3.3
|
|
17
17
|
protobuf>=6.33.5
|
|
18
18
|
defusedxml>=0.7.1
|
|
19
19
|
huggingface-hub[hf-xet]>=1.7.2
|
|
20
20
|
pathspec>=1.0.4
|
|
21
|
+
pygments>=2.20.0
|
|
21
22
|
|
|
22
23
|
[ast-grep]
|
|
23
24
|
ast-grep-py>=0.44.0
|
|
@@ -45,6 +45,7 @@ from .stack.constants import StackState
|
|
|
45
45
|
from .stack.manager import StackError
|
|
46
46
|
from .tools.health_checker import HealthChecker
|
|
47
47
|
from .tools.language import cli as language_cli
|
|
48
|
+
from .trace.cli import cli as trace_cli
|
|
48
49
|
from .types_defs import DeadCodeConfig, DeadCodeRow, ResultRow
|
|
49
50
|
from .utils.path_utils import derive_project_name, resolve_repo_path
|
|
50
51
|
from .vector_store import clear_all_embeddings, delete_project_embeddings
|
|
@@ -952,6 +953,18 @@ def workspace_command(ctx: typer.Context) -> None:
|
|
|
952
953
|
_run_delegated_group(workspace_cli, ctx)
|
|
953
954
|
|
|
954
955
|
|
|
956
|
+
@app.command(
|
|
957
|
+
name=ch.CLICommandName.TRACE,
|
|
958
|
+
help=ch.CMD_TRACE,
|
|
959
|
+
short_help=ch.CMD_TRACE,
|
|
960
|
+
add_help_option=False,
|
|
961
|
+
context_settings=_DELEGATED_GROUP_CONTEXT,
|
|
962
|
+
rich_help_panel=ch.PANEL_GRAPH,
|
|
963
|
+
)
|
|
964
|
+
def trace_command(ctx: typer.Context) -> None:
|
|
965
|
+
_run_delegated_group(trace_cli, ctx)
|
|
966
|
+
|
|
967
|
+
|
|
955
968
|
@app.command(
|
|
956
969
|
name=ch.CLICommandName.HELP,
|
|
957
970
|
help=ch.CMD_HELP,
|
|
@@ -15,6 +15,7 @@ class CLICommandName(StrEnum):
|
|
|
15
15
|
DELETE_PROJECT = "delete-project"
|
|
16
16
|
DAEMON = "daemon"
|
|
17
17
|
WORKSPACE = "workspace"
|
|
18
|
+
TRACE = "trace"
|
|
18
19
|
STOP = "stop"
|
|
19
20
|
STATUS = "status"
|
|
20
21
|
HELP = "help"
|
|
@@ -67,6 +68,11 @@ CMD_WORKSPACE_SHOW = "Show the repositories and project names in a workspace"
|
|
|
67
68
|
CMD_WORKSPACE_ADD_REPO = "Add a repository to a workspace"
|
|
68
69
|
CMD_WORKSPACE_REMOVE_REPO = "Remove a repository from a workspace by path"
|
|
69
70
|
|
|
71
|
+
CMD_TRACE = "Ingest runtime call traces as dynamic CALLS edges"
|
|
72
|
+
CMD_TRACE_GROUP = CMD_TRACE
|
|
73
|
+
CMD_TRACE_INGEST = "Resolve a trace file against a project and write dynamic edges"
|
|
74
|
+
CMD_TRACE_CONVERT = "Convert a V8 .cpuprofile (node --cpu-prof) to a trace file"
|
|
75
|
+
|
|
70
76
|
CMD_STOP = "Stop the shared stack (alias for cgr daemon down)"
|
|
71
77
|
CMD_STATUS = "Show stack state and the last sync time for each project"
|
|
72
78
|
|
|
@@ -94,6 +100,105 @@ EXAMPLES_HELP = "EXAMPLES\n\n cgr help start\n\n cgr help daemon logs"
|
|
|
94
100
|
EPILOG_LANGUAGE = "Run 'cgr help language COMMAND' for command-specific help."
|
|
95
101
|
EPILOG_DAEMON = "Run 'cgr help daemon COMMAND' for command-specific help."
|
|
96
102
|
EPILOG_WORKSPACE = "Run 'cgr help workspace COMMAND' for command-specific help."
|
|
103
|
+
EPILOG_TRACE = "Run 'cgr help trace COMMAND' for command-specific help."
|
|
104
|
+
|
|
105
|
+
HELP_TRACE_REPO_PATH = (
|
|
106
|
+
"Repository the trace was recorded against. Used to derive the project "
|
|
107
|
+
"name and re-anchor traced file paths."
|
|
108
|
+
)
|
|
109
|
+
HELP_TRACE_PROJECT_NAME = (
|
|
110
|
+
"Project name to ingest into. Defaults to the name derived from --repo-path."
|
|
111
|
+
)
|
|
112
|
+
EXAMPLES_TRACE_INGEST = (
|
|
113
|
+
"EXAMPLE\n\n pytest --cgr-trace\n\n"
|
|
114
|
+
" cgr trace ingest cgr-trace.jsonl --repo-path ./my-repo"
|
|
115
|
+
)
|
|
116
|
+
HELP_TRACE_OUTPUT = "Where to write the converted trace file."
|
|
117
|
+
HELP_TRACE_WORKLOAD = "Workload label to attach to every converted record."
|
|
118
|
+
HELP_TRACE_INCLUDE = (
|
|
119
|
+
"Comma-separated namespace prefixes to keep (dotnet-trace speedscope "
|
|
120
|
+
"profiles carry no file paths, so scoping is by name)."
|
|
121
|
+
)
|
|
122
|
+
HELP_TRACE_LANGUAGE = (
|
|
123
|
+
"Override the auto-detected source language. Rust pprof profiles share Go's "
|
|
124
|
+
"gzipped-protobuf format, so pass 'rust' to demangle them as Rust."
|
|
125
|
+
)
|
|
126
|
+
HELP_TRACE_FORMAT = (
|
|
127
|
+
"Force a profile format instead of auto-detecting it. Use 'ebpf' for pprof "
|
|
128
|
+
"profiles from an eBPF continuous profiler (Parca, Pyroscope, OTel, perf)."
|
|
129
|
+
)
|
|
130
|
+
HELP_TRACE_PATH_MAP = (
|
|
131
|
+
"Re-anchor a production build path to the repo, as BUILD_PREFIX=REPO_PREFIX. "
|
|
132
|
+
"Repeatable; applied before the in-repo check (ebpf format)."
|
|
133
|
+
)
|
|
134
|
+
HELP_TRACE_BUILD_ID = (
|
|
135
|
+
"Keep only frames from the mapping with this build id or binary filename "
|
|
136
|
+
"(ebpf format); other binaries are seen through."
|
|
137
|
+
)
|
|
138
|
+
HELP_TRACE_SERVICE = (
|
|
139
|
+
"Keep only samples whose label matches, as KEY=VALUE (ebpf format)."
|
|
140
|
+
)
|
|
141
|
+
HELP_TRACE_LABEL = (
|
|
142
|
+
"Sample label whose value becomes each edge's workload (ebpf format)."
|
|
143
|
+
)
|
|
144
|
+
HELP_TRACE_COMMIT = (
|
|
145
|
+
"The commit the profiled binary was built from; warns if it differs from "
|
|
146
|
+
"the repository HEAD at convert time (ebpf format)."
|
|
147
|
+
)
|
|
148
|
+
CMD_TRACE_PULL = (
|
|
149
|
+
"Download a pprof profile from an eBPF continuous profiler over HTTP and "
|
|
150
|
+
"convert it (Parca download, Pyroscope render?format=pprof, or any URL)."
|
|
151
|
+
)
|
|
152
|
+
HELP_TRACE_PULL_SAVE = (
|
|
153
|
+
"Keep the downloaded pprof at this path; by default it is removed after conversion."
|
|
154
|
+
)
|
|
155
|
+
HELP_TRACE_PULL_HEADER = (
|
|
156
|
+
"Extra HTTP request header as NAME=VALUE (e.g. Authorization=Bearer TOKEN); "
|
|
157
|
+
"repeatable."
|
|
158
|
+
)
|
|
159
|
+
HELP_TRACE_PULL_TIMEOUT = "HTTP request timeout in seconds (default 60)."
|
|
160
|
+
ERR_TRACE_PULL_BAD_URL = "Unsupported URL {url}; expected an http:// or https:// URL."
|
|
161
|
+
# The header value can be a bearer token, so it is never echoed back.
|
|
162
|
+
ERR_TRACE_PULL_BAD_HEADER = (
|
|
163
|
+
"Invalid --header; expected NAME=VALUE (for example Authorization=Bearer TOKEN)."
|
|
164
|
+
)
|
|
165
|
+
ERR_TRACE_PULL_FAILED = "Could not download {url}: {error}."
|
|
166
|
+
ERR_TRACE_PULL_TOO_LARGE = (
|
|
167
|
+
"Profile at {url} exceeds the maximum download size (256 MB)."
|
|
168
|
+
)
|
|
169
|
+
ERR_TRACE_PULL_SAVE_EQUALS_OUTPUT = (
|
|
170
|
+
"--save and --output must be different paths (--output holds the converted "
|
|
171
|
+
"trace, --save the downloaded profile)."
|
|
172
|
+
)
|
|
173
|
+
EXAMPLES_TRACE_PULL = (
|
|
174
|
+
"EXAMPLE\n\n"
|
|
175
|
+
" cgr trace pull https://parca.example/api/... \\\n"
|
|
176
|
+
" --repo-path ./my-repo --build-id 8f3a \\\n"
|
|
177
|
+
" --path-map /build/src/=./my-repo/src/ \\\n"
|
|
178
|
+
" --header Authorization=Bearer $TOKEN\n\n"
|
|
179
|
+
" cgr trace ingest cgr-trace.jsonl --repo-path ./my-repo"
|
|
180
|
+
)
|
|
181
|
+
ERR_TRACE_CONVERT_BAD_FORMAT = "Unknown --format '{format}'; supported: ebpf."
|
|
182
|
+
ERR_TRACE_CONVERT_BAD_PATH_MAP = (
|
|
183
|
+
"Invalid --path-map '{value}'; expected BUILD_PREFIX=REPO_PREFIX."
|
|
184
|
+
)
|
|
185
|
+
ERR_TRACE_CONVERT_BAD_SERVICE = "Invalid --service '{value}'; expected KEY=VALUE."
|
|
186
|
+
MSG_TRACE_COMMIT_MISMATCH = (
|
|
187
|
+
"Profiled commit {profiled} differs from repository HEAD {head}; edges may "
|
|
188
|
+
"resolve against moved or renamed code."
|
|
189
|
+
)
|
|
190
|
+
ERR_TRACE_CONVERT_BAD_LANGUAGE = (
|
|
191
|
+
"Unknown --language '{language}'; supported override values: {supported}."
|
|
192
|
+
)
|
|
193
|
+
ERR_TRACE_CONVERT_NEEDS_REPO = "V8 cpuprofiles need --repo-path to scope frames."
|
|
194
|
+
ERR_TRACE_CONVERT_NEEDS_INCLUDE = (
|
|
195
|
+
"speedscope profiles need --include namespace prefixes to scope frames."
|
|
196
|
+
)
|
|
197
|
+
EXAMPLES_TRACE_CONVERT = (
|
|
198
|
+
"EXAMPLE\n\n node --cpu-prof --cpu-prof-name=run.cpuprofile app.js\n\n"
|
|
199
|
+
" cgr trace convert run.cpuprofile --repo-path ./my-repo\n\n"
|
|
200
|
+
" cgr trace ingest cgr-trace.jsonl --repo-path ./my-repo"
|
|
201
|
+
)
|
|
97
202
|
|
|
98
203
|
HELP_WORKSPACE_DESCRIPTION = "Optional short description for the workspace."
|
|
99
204
|
HELP_WORKSPACE_FORCE = "Overwrite an existing workspace with the same name."
|
|
@@ -235,6 +340,7 @@ CLI_COMMANDS: dict[CLICommandName, str] = {
|
|
|
235
340
|
CLICommandName.DELETE_PROJECT: CMD_DELETE_PROJECT,
|
|
236
341
|
CLICommandName.LANGUAGE: CMD_LANGUAGE,
|
|
237
342
|
CLICommandName.DAEMON: CMD_DAEMON,
|
|
343
|
+
CLICommandName.TRACE: CMD_TRACE,
|
|
238
344
|
CLICommandName.WORKSPACE: CMD_WORKSPACE,
|
|
239
345
|
CLICommandName.STOP: CMD_STOP,
|
|
240
346
|
CLICommandName.STATUS: CMD_STATUS,
|
|
@@ -17,7 +17,11 @@ from . import exceptions as ex
|
|
|
17
17
|
from . import logs
|
|
18
18
|
from .types_defs import CgrignorePatterns, ModelConfigKwargs
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# Load only the configuration file in the invocation directory. The default
|
|
21
|
+
# python-dotenv discovery walks parent directories, which can silently import
|
|
22
|
+
# credentials from an unrelated workspace (and makes tests depend on the
|
|
23
|
+
# caller's directory layout).
|
|
24
|
+
load_dotenv(dotenv_path=Path.cwd() / ".env")
|
|
21
25
|
|
|
22
26
|
|
|
23
27
|
class ApiKeyInfoEntry(TypedDict):
|
|
@@ -200,7 +204,14 @@ class AppConfig(BaseSettings):
|
|
|
200
204
|
# HYBRID needs a dotnet SDK + a restorable .csproj/.sln and degrades without
|
|
201
205
|
# them. HYBRID augments (base-vs-interface, overload and extension binding,
|
|
202
206
|
# partial-class identity); tree-sitter stays the standalone-correct backbone.
|
|
203
|
-
|
|
207
|
+
# Default to tree-sitter so indexing an untrusted repository never auto-invokes
|
|
208
|
+
# MSBuild/Roslyn; opt into AUTO/HYBRID/ROSLYN explicitly (security, #1231).
|
|
209
|
+
CSHARP_FRONTEND: cs.CSharpFrontend = cs.CSharpFrontend.TREESITTER
|
|
210
|
+
# Opt-in go/packages semantic layer for Go (issue #1179). AUTO uses it where a
|
|
211
|
+
# go toolchain is on PATH and degrades to pure tree-sitter otherwise. GOTYPES
|
|
212
|
+
# augments exact first-party call binding and external-site suppression;
|
|
213
|
+
# tree-sitter stays the standalone-correct backbone.
|
|
214
|
+
GO_FRONTEND: cs.GoFrontend = cs.GoFrontend.AUTO
|
|
204
215
|
CAPTURE_FUNCTION_LOCAL_DEFINITIONS: bool = Field(
|
|
205
216
|
True, validation_alias="CGR_CAPTURE_LOCAL_DEFINITIONS"
|
|
206
217
|
)
|
|
@@ -238,35 +249,18 @@ class AppConfig(BaseSettings):
|
|
|
238
249
|
"tee",
|
|
239
250
|
}
|
|
240
251
|
)
|
|
252
|
+
# Only commands that cannot accept filesystem paths are approval-free.
|
|
253
|
+
# Filesystem and Git reads require approval because their path syntaxes can
|
|
254
|
+
# escape the project root (absolute paths, traversal, symlinks, git -C, and
|
|
255
|
+
# --git-dir). Project-confined read/search tools should be preferred instead.
|
|
241
256
|
SHELL_READ_ONLY_COMMANDS: frozenset[str] = frozenset(
|
|
242
257
|
{
|
|
243
|
-
"ls",
|
|
244
|
-
"cat",
|
|
245
|
-
"find",
|
|
246
258
|
"pwd",
|
|
247
|
-
"rg",
|
|
248
259
|
"echo",
|
|
249
|
-
"wc",
|
|
250
|
-
"head",
|
|
251
|
-
"tail",
|
|
252
|
-
"sort",
|
|
253
|
-
"uniq",
|
|
254
|
-
"cut",
|
|
255
260
|
"tr",
|
|
256
261
|
}
|
|
257
262
|
)
|
|
258
|
-
SHELL_SAFE_GIT_SUBCOMMANDS: frozenset[str] = frozenset(
|
|
259
|
-
{
|
|
260
|
-
"status",
|
|
261
|
-
"log",
|
|
262
|
-
"diff",
|
|
263
|
-
"show",
|
|
264
|
-
"ls-files",
|
|
265
|
-
"remote",
|
|
266
|
-
"config",
|
|
267
|
-
"branch",
|
|
268
|
-
}
|
|
269
|
-
)
|
|
263
|
+
SHELL_SAFE_GIT_SUBCOMMANDS: frozenset[str] = frozenset()
|
|
270
264
|
|
|
271
265
|
QDRANT_DB_PATH: str = "./.qdrant_code_embeddings"
|
|
272
266
|
QDRANT_URL: str | None = None
|
|
@@ -18,6 +18,7 @@ class CppNodeType(StrEnum):
|
|
|
18
18
|
TEMPLATE_DECLARATION = "template_declaration"
|
|
19
19
|
CLASS_SPECIFIER = "class_specifier"
|
|
20
20
|
FUNCTION_DECLARATOR = "function_declarator"
|
|
21
|
+
VARIADIC_PARAMETER = "variadic_parameter"
|
|
21
22
|
POINTER_DECLARATOR = "pointer_declarator"
|
|
22
23
|
REFERENCE_DECLARATOR = "reference_declarator"
|
|
23
24
|
# An attribute MACRO before a definition (`JSON_HEDLEY_NON_NULL(3)
|
|
@@ -80,6 +80,23 @@ TS_DART_INITIALIZED_IDENTIFIER = "initialized_identifier"
|
|
|
80
80
|
TS_DART_INITIALIZED_VARIABLE_DEFINITION = "initialized_variable_definition"
|
|
81
81
|
TS_DART_FORMAL_PARAMETER = "formal_parameter"
|
|
82
82
|
|
|
83
|
+
# FLOWS_TO lean-walk node types (issue #1173). Dart has no call-expression node:
|
|
84
|
+
# calls/members/bindings are flat sibling `selector` chains reconstructed by the
|
|
85
|
+
# dart/utils.py helpers (dart_call_name, dart_member_read_name, dart_body_node).
|
|
86
|
+
TS_DART_STRING_LITERAL = "string_literal"
|
|
87
|
+
TS_DART_INDEX_SELECTOR = "index_selector"
|
|
88
|
+
TS_DART_ASSIGNMENT_EXPRESSION = "assignment_expression"
|
|
89
|
+
TS_DART_EXPRESSION_STATEMENT = "expression_statement"
|
|
90
|
+
TS_DART_LOCAL_VARIABLE_DECLARATION = "local_variable_declaration"
|
|
91
|
+
TS_DART_ASSIGNABLE_EXPRESSION = "assignable_expression"
|
|
92
|
+
TS_DART_FORMAL_PARAMETER_LIST = "formal_parameter_list"
|
|
93
|
+
TS_DART_SWITCH_STATEMENT_CASE = "switch_statement_case"
|
|
94
|
+
TS_DART_SWITCH_STATEMENT_DEFAULT = "switch_statement_default"
|
|
95
|
+
TS_DART_TEMPLATE_SUBSTITUTION = "template_substitution"
|
|
96
|
+
# `[String m]` (optional positional) and `{String? m}` (named) both wrap their
|
|
97
|
+
# `formal_parameter`s in an `optional_formal_parameters` node (issue #1173).
|
|
98
|
+
TS_DART_OPTIONAL_FORMAL_PARAMETERS = "optional_formal_parameters"
|
|
99
|
+
|
|
83
100
|
# Type/class-like declarations (all captured as @class)
|
|
84
101
|
TS_DART_CLASS_DEFINITION = "class_definition"
|
|
85
102
|
TS_DART_MIXIN_DECLARATION = "mixin_declaration"
|
|
@@ -20,6 +20,7 @@ TS_GO_FIELD_DECLARATION = "field_declaration"
|
|
|
20
20
|
TS_GO_FIELD_IDENTIFIER = "field_identifier"
|
|
21
21
|
TS_GO_INTERFACE_TYPE = "interface_type"
|
|
22
22
|
TS_GO_PARAMETER_DECLARATION = "parameter_declaration"
|
|
23
|
+
TS_GO_VARIADIC_PARAMETER_DECLARATION = "variadic_parameter_declaration"
|
|
23
24
|
TS_GO_FUNC_LITERAL = "func_literal"
|
|
24
25
|
TS_GO_SOURCE_FILE = "source_file"
|
|
25
26
|
TS_GO_FUNCTION_DECLARATION = "function_declaration"
|
|
@@ -84,6 +84,9 @@ TS_GET_ACCESSOR_KEYWORD = "get"
|
|
|
84
84
|
TS_ARROW_FUNCTION = "arrow_function"
|
|
85
85
|
TS_REQUIRED_PARAMETER = "required_parameter"
|
|
86
86
|
TS_OPTIONAL_PARAMETER = "optional_parameter"
|
|
87
|
+
# TypeScript `this` pseudo-parameter (`function f(this: T, ...)`): a type-only
|
|
88
|
+
# annotation, not a runtime argument, so it occupies no positional slot.
|
|
89
|
+
TS_THIS_PARAMETER = "this"
|
|
87
90
|
TS_ASSIGNMENT_PATTERN = "assignment_pattern"
|
|
88
91
|
TS_JS_ASSIGNMENT_EXPRESSION = "assignment_expression"
|
|
89
92
|
# A class field holding a value (`log = noop`); `name` is the property, `value`
|
|
@@ -5,6 +5,7 @@ from .ast_nodes import TS_STRING, TS_STRING_LITERAL
|
|
|
5
5
|
LUA_STRING_TYPES = (TS_STRING, TS_STRING_LITERAL)
|
|
6
6
|
|
|
7
7
|
TS_DOT_INDEX_EXPRESSION = "dot_index_expression"
|
|
8
|
+
TS_LUA_BRACKET_INDEX_EXPRESSION = "bracket_index_expression"
|
|
8
9
|
TS_LUA_VARIABLE_DECLARATION = "variable_declaration"
|
|
9
10
|
TS_LUA_ASSIGNMENT_STATEMENT = "assignment_statement"
|
|
10
11
|
TS_LUA_VARIABLE_LIST = "variable_list"
|
|
@@ -12,6 +13,11 @@ TS_LUA_EXPRESSION_LIST = "expression_list"
|
|
|
12
13
|
TS_LUA_FUNCTION_CALL = "function_call"
|
|
13
14
|
TS_LUA_METHOD_INDEX_EXPRESSION = "method_index_expression"
|
|
14
15
|
TS_LUA_IDENTIFIER = "identifier"
|
|
16
|
+
TS_LUA_STRING_CONTENT = "string_content"
|
|
17
|
+
TS_LUA_BLOCK = "block"
|
|
18
|
+
# `dot_index_expression` / `bracket_index_expression` field names: the accessed
|
|
19
|
+
# table is `table`, the member/key is `field`.
|
|
20
|
+
TS_LUA_FIELD_TABLE = "table"
|
|
15
21
|
TS_LUA_LOCAL_STATEMENT = "local_statement"
|
|
16
22
|
LUA_STATEMENT_SUFFIX = "statement"
|
|
17
23
|
LUA_DEFAULT_VAR_TYPES = (TS_LUA_IDENTIFIER,)
|