coderadar-rs 0.9.4__tar.gz → 0.12.0__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.
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/Cargo.lock +4 -3
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/Cargo.toml +4 -2
- coderadar_rs-0.12.0/PKG-INFO +563 -0
- coderadar_rs-0.12.0/README.md +523 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/Cargo.toml +3 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/python.scm +11 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/clones/apted.rs +1 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/clones/mod.rs +293 -38
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/extract/decorators.rs +4 -2
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/extract/single_pass.rs +483 -171
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/extract/tagger.rs +2 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/extract/walker.rs +366 -19
- coderadar_rs-0.12.0/core_indexer/src/ffi_config.rs +359 -0
- coderadar_rs-0.12.0/core_indexer/src/ffi_convert.rs +317 -0
- coderadar_rs-0.12.0/core_indexer/src/ffi_git.rs +62 -0
- coderadar_rs-0.12.0/core_indexer/src/ffi_synthetic.rs +275 -0
- coderadar_rs-0.12.0/core_indexer/src/ffi_watcher.rs +106 -0
- coderadar_rs-0.12.0/core_indexer/src/fs/mod.rs +100 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/call_graph.rs +6 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/centrality.rs +4 -4
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/cfg.rs +1 -6
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/cold_start.rs +21 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/config.rs +44 -34
- coderadar_rs-0.12.0/core_indexer/src/graph/deadcode/entry_points.rs +950 -0
- coderadar_rs-0.12.0/core_indexer/src/graph/deadcode/mod.rs +807 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/deadcode/reachability.rs +9 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/embeddings.rs +88 -17
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/import_graph.rs +6 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/indexing.rs +20 -4
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/inheritance.rs +1 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/mod.rs +18 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/module_resolution.rs +386 -138
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/mro.rs +4 -7
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/persistence.rs +227 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/projection_ops.rs +118 -20
- coderadar_rs-0.12.0/core_indexer/src/graph/receiver_types.rs +527 -0
- coderadar_rs-0.12.0/core_indexer/src/graph/resolve_calls.rs +965 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/rta_lite.rs +115 -3
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/call_graph_tests.rs +20 -6
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/embedding_tests.rs +32 -8
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/import_graph_tests.rs +1 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/indexing_tests.rs +22 -22
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/inheritance_tests.rs +12 -15
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/mod.rs +1 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/persistence_tests.rs +2 -2
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/projection_tests.rs +144 -8
- coderadar_rs-0.12.0/core_indexer/src/graph/tests/suffix_winner_tests.rs +139 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/traversal_tests.rs +8 -8
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/traversal.rs +52 -1
- coderadar_rs-0.12.0/core_indexer/src/graph/update_diff.rs +163 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/lib.rs +886 -1076
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/mutation/edit.rs +1 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/mutation/indent.rs +1 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/mutation/mod.rs +309 -44
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/mutation/write_guard.rs +8 -3
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/query/exec.rs +626 -69
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/query/grammar.pest +12 -5
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/query/grammar.rs +152 -24
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/query/mod.rs +1 -0
- coderadar_rs-0.12.0/core_indexer/src/query/schema.rs +669 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/resolve/cache.rs +6 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/resolve/mod.rs +4 -2
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/resolve/orchestrator.rs +14 -2
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/scaffold/mod.rs +65 -13
- coderadar_rs-0.12.0/core_indexer/src/scaffold/secrets.rs +204 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/const_eval.rs +0 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/engine.rs +128 -62
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/dead_branch.rs +1 -1
- coderadar_rs-0.12.0/core_indexer/src/smells/rules/dead_code.rs +55 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/long_parameter_list.rs +20 -4
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/types.rs +5 -2
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/storage.rs +959 -35
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/types.rs +205 -18
- coderadar_rs-0.12.0/core_indexer/tests/repro_walk_retired.rs +398 -0
- coderadar_rs-0.12.0/py_agent/src/coderadar/__init__.py +1831 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/agent/graphrag.py +5 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/cli.py +734 -459
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/coldstart.py +67 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/config.py +25 -3
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/embedding/__init__.py +8 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/embedding/dedup.py +45 -2
- coderadar_rs-0.12.0/py_agent/src/coderadar/framework.py +247 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/lsp/pool.py +4 -0
- coderadar_rs-0.12.0/py_agent/src/coderadar/markers.py +60 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/mcp/lazy.py +1 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/mcp/roots.py +4 -53
- coderadar_rs-0.12.0/py_agent/src/coderadar/mcp/server.py +1582 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/mcp/startup.py +1 -1
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/mutation/tool_router.py +6 -2
- coderadar_rs-0.12.0/py_agent/src/coderadar/ops.py +1627 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/project_state.py +1 -1
- coderadar_rs-0.12.0/py_agent/src/coderadar/render.py +1032 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/resolution.py +51 -7
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/visualizers/call_graph.py +3 -3
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/visualizers/graphviz_viz.py +3 -3
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/visualizers/mermaid.py +5 -5
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/pyproject.toml +10 -2
- coderadar_rs-0.9.4/PKG-INFO +0 -755
- coderadar_rs-0.9.4/README.md +0 -717
- coderadar_rs-0.9.4/core_indexer/src/fs/mod.rs +0 -3
- coderadar_rs-0.9.4/core_indexer/src/graph/deadcode/entry_points.rs +0 -295
- coderadar_rs-0.9.4/core_indexer/src/graph/deadcode/mod.rs +0 -452
- coderadar_rs-0.9.4/core_indexer/src/graph/resolve_calls.rs +0 -464
- coderadar_rs-0.9.4/core_indexer/src/scaffold/secrets.rs +0 -48
- coderadar_rs-0.9.4/core_indexer/src/smells/rules/dead_code.rs +0 -41
- coderadar_rs-0.9.4/py_agent/src/coderadar/__init__.py +0 -1145
- coderadar_rs-0.9.4/py_agent/src/coderadar/mcp/server.py +0 -2967
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/LICENSE +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/bash.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/c.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/clojure.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/cmake.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/cpp.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/csharp.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/dart.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/dockerfile.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/elisp.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/elixir.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/erlang.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/fsharp.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/go.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/graphql.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/groovy.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/haskell.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/hcl.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/java.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/javascript.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/julia.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/kotlin.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/lua.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/nix.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/objc.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/ocaml.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/perl.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/php.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/powershell.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/protobuf.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/r.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/ruby.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/rust.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/scala.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/shell.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/sql.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/swift.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/systemverilog.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/typescript.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/verilog.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/queries/zig.scm +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/clones/lsh_index.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/clones/minhash.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/clones/tokens.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/extract/docstring.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/extract/mod.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/extract/spans.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/fs/git.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/fs/watcher.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/mro_tests.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/graph/tests/query_compile_tests.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/resolve/import_graph.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/resolve/signature.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/scoring/mod.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/metrics.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/mod.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/profile.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rule.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/brain_method.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/data_class.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/deep_nesting.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/excessive_returns.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/god_class.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/high_cyclomatic_complexity.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/intra_dead_statements.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/long_method.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/mod.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/smells/rules/too_many_fields.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/core_indexer/src/update/wal.rs +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/agent/__init__.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/excludes.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/lsp/__init__.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/mcp/__init__.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/mcp/lifecycle.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/mutation/__init__.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/query/__init__.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/query/cache.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/query/executor.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/query/planner.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/__init__.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/actix.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/aspnet.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/base.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/django.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/exports.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/express.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/fastapi.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/flask.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/go.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/laravel.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/nestjs.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/rails.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/reactrouter.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/springboot.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/resolvers/vuerouter.py +0 -0
- {coderadar_rs-0.9.4 → coderadar_rs-0.12.0}/py_agent/src/coderadar/visualizers/__init__.py +0 -0
|
@@ -445,7 +445,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
|
445
445
|
|
|
446
446
|
[[package]]
|
|
447
447
|
name = "core_indexer"
|
|
448
|
-
version = "0.
|
|
448
|
+
version = "0.12.0"
|
|
449
449
|
dependencies = [
|
|
450
450
|
"crossbeam-channel",
|
|
451
451
|
"dashmap",
|
|
@@ -1640,14 +1640,15 @@ dependencies = [
|
|
|
1640
1640
|
|
|
1641
1641
|
[[package]]
|
|
1642
1642
|
name = "macrame-db"
|
|
1643
|
-
version = "0.
|
|
1643
|
+
version = "0.19.1"
|
|
1644
1644
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1645
|
-
checksum = "
|
|
1645
|
+
checksum = "0fc96106daf8ad49216f956120cb3a6ad0d60bae3c2f118282d6d3eef1411f9b"
|
|
1646
1646
|
dependencies = [
|
|
1647
1647
|
"bincode",
|
|
1648
1648
|
"libsql",
|
|
1649
1649
|
"serde",
|
|
1650
1650
|
"serde_json",
|
|
1651
|
+
"sha2",
|
|
1651
1652
|
"thiserror 1.0.69",
|
|
1652
1653
|
"tokio",
|
|
1653
1654
|
"tracing",
|
|
@@ -3,8 +3,10 @@ members = ["core_indexer"]
|
|
|
3
3
|
resolver = "2"
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.12.0"
|
|
7
7
|
edition = "2021"
|
|
8
8
|
license = "MIT"
|
|
9
|
-
|
|
9
|
+
authors = ["CodeRadar Team"]
|
|
10
|
+
homepage = "https://opticswolf.github.io/coderadar/"
|
|
10
11
|
repository = "https://github.com/opticsWolf/coderadar"
|
|
12
|
+
documentation = "https://opticswolf.github.io/coderadar/"
|
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: coderadar-rs
|
|
3
|
+
Version: 0.12.0
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
|
+
Classifier: Programming Language :: Rust
|
|
12
|
+
Requires-Dist: pydantic>=2.0
|
|
13
|
+
Requires-Dist: click>=8.0
|
|
14
|
+
Requires-Dist: rich>=13.0
|
|
15
|
+
Requires-Dist: fastembed>=0.3
|
|
16
|
+
Requires-Dist: litellm>=1.0
|
|
17
|
+
Requires-Dist: grep-ast>=0.2
|
|
18
|
+
Requires-Dist: structlog>=23.0
|
|
19
|
+
Requires-Dist: mcp>=1.0.0
|
|
20
|
+
Requires-Dist: pytest>=7.0 ; extra == 'dev'
|
|
21
|
+
Requires-Dist: pytest-asyncio>=0.21 ; extra == 'dev'
|
|
22
|
+
Requires-Dist: hypothesis>=6.0 ; extra == 'dev'
|
|
23
|
+
Requires-Dist: mypy>=1.0 ; extra == 'dev'
|
|
24
|
+
Requires-Dist: ruff==0.16.5 ; extra == 'dev'
|
|
25
|
+
Requires-Dist: jedi>=0.19 ; extra == 'dev'
|
|
26
|
+
Requires-Dist: graphviz>=0.20 ; extra == 'visualizers'
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Provides-Extra: visualizers
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Summary: Live semantic graph of your codebase — incremental, queryable, LLM-writable
|
|
31
|
+
Home-Page: https://opticswolf.github.io/coderadar/
|
|
32
|
+
Author: CodeRadar Team
|
|
33
|
+
License: MIT
|
|
34
|
+
Requires-Python: >=3.10
|
|
35
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
36
|
+
Project-URL: Documentation, https://opticswolf.github.io/coderadar/
|
|
37
|
+
Project-URL: Homepage, https://opticswolf.github.io/coderadar/
|
|
38
|
+
Project-URL: Repository, https://github.com/opticsWolf/coderadar
|
|
39
|
+
|
|
40
|
+
# CodeRadar v0.12.0
|
|
41
|
+
|
|
42
|
+
[](https://github.com/opticsWolf/coderadar/actions/workflows/ci.yml)
|
|
43
|
+
[](https://pypi.org/project/coderadar-rs/)
|
|
44
|
+
[](https://pypi.org/project/coderadar-rs/)
|
|
45
|
+
[](https://www.rust-lang.org)
|
|
46
|
+
[](LICENSE)
|
|
47
|
+
[]()
|
|
48
|
+
[](https://opticswolf.github.io/coderadar/)
|
|
49
|
+
|
|
50
|
+
[Homepage](https://github.com/opticsWolf/coderadar) · [Repository](https://github.com/opticsWolf/coderadar)
|
|
51
|
+
|
|
52
|
+
**Live semantic graph of your codebase — incremental, queryable, LLM-writable.**
|
|
53
|
+
|
|
54
|
+
CodeRadar maintains an incrementally updatable graph of your code's logical structure, enabling LLMs and developer tools to both **query** and **safely rewrite** code through a unified pipeline.
|
|
55
|
+
|
|
56
|
+
## Why CodeRadar
|
|
57
|
+
|
|
58
|
+
CodeGraph pioneered the semantic code graph for agents — CodeRadar builds on that foundation with capabilities CodeGraph doesn't have:
|
|
59
|
+
|
|
60
|
+
| Capability | CodeGraph | CodeRadar |
|
|
61
|
+
|-----------|-----------|-----------|
|
|
62
|
+
| **Mutate code** | ❌ Read-only | ✅ AST-aware body replacement, indent preservation, WriteGuard safety |
|
|
63
|
+
| **Static analysis suite** | ❌ | ✅ Dead-code detection with confidence tiers, Type-1–3 clone detection with TED verification, scaffolding/secrets scan, CFG metrics, harmonic centrality |
|
|
64
|
+
| **Temporal queries** | ❌ | ✅ Macrame bitemporal DB — query the graph as it existed at any point in time |
|
|
65
|
+
| **Rewrite safety** | ❌ | ✅ Dry-run mutation plans, stale-write rejection, automatic rollback on tainted updates |
|
|
66
|
+
| **Semantic fallback resolution** | ❌ | ✅ L4 embedding-based resolution when structural resolution fails |
|
|
67
|
+
| **Python-native embedding** | ❌ | ✅ Native Python integration for embeddings, GraphRAG, and ML pipelines |
|
|
68
|
+
| **Zero runtime boot** | 1.4s Node.js startup | ✅ <50ms — Python process is already warm |
|
|
69
|
+
| **LLM-driven refactoring** | ❌ | ✅ `replace_body()` — LLM proposes, CodeRadar validates, applies, and rolls back on error |
|
|
70
|
+
|
|
71
|
+
**The key insight:** CodeGraph answers "what is this codebase?" — CodeRadar answers that **and** "what was it yesterday?" **and** "what would it look like if I changed X?" **and** "apply that change safely."
|
|
72
|
+
|
|
73
|
+
## Performance
|
|
74
|
+
|
|
75
|
+
Head-to-head benchmarks (N=5 median, lower is better):
|
|
76
|
+
|
|
77
|
+
| Codebase | Files | Lang | CodeRadar | CodeGraph 1.5.0 | Ratio |
|
|
78
|
+
|----------|-------|------|-----------|-----------------|-------|
|
|
79
|
+
| CodeRadar self | 84 | Python+Rust | 554ms | 1,434ms | **0.39×** (faster) |
|
|
80
|
+
| codegraph-main | 558 | TypeScript | 12,232ms | 6,970ms | 1.75× |
|
|
81
|
+
|
|
82
|
+
CodeRadar wins on small-to-medium Python/Rust projects due to zero runtime boot overhead. On large TypeScript codebases, CodeGraph's hand-written per-language Rust walkers and flat-buffer emission are still faster than the generic `.scm`-query engine, but the gap narrowed from 2.77× to 1.75×. The optimization backlog lives in `docs/open-items.md` §2.8 (the old `performance-roadmap.md` was retired into the knowledge graph).
|
|
83
|
+
|
|
84
|
+
## Architecture
|
|
85
|
+
|
|
86
|
+
> Full system design: [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) ·
|
|
87
|
+
> Operator cheat sheet: [`docs/QUICKREF.md`](docs/QUICKREF.md).
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
Surfaces (MCP 26 tools, CLI, Python CodeGraph — one name per op)
|
|
91
|
+
│
|
|
92
|
+
ops.py (shared validated op layer) + synthetic-edge bridge
|
|
93
|
+
│
|
|
94
|
+
Rust _core (single-pass extraction, 41 grammars, resolve cascade L1-L4,
|
|
95
|
+
query engine, mutation plans, smells, clones, snapshots)
|
|
96
|
+
│
|
|
97
|
+
Macrame 0.19 ledger (bitemporal facts) + SQLite hot store
|
|
98
|
+
+ sha256 blobs + archive sibling + FTS5 + Phase-1 vector keys
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
| Metric | Value |
|
|
102
|
+
|--------|-------|
|
|
103
|
+
| **Languages indexed** | 41 (12 Tier 1, 29 Tier 2, 330+ Tier 3) |
|
|
104
|
+
| **Tests** | 1512 passing (434 Rust + 1078 Python) |
|
|
105
|
+
| **Operations** | One name per graph operation on every surface that serves it: MCP tool `coderadar_<op>`, CLI command `coderadar <op>` (hyphenated), `CodeGraph.<op>()` — 26 ops (25 graph operations + `set_project` project switching, CLI: `-C`): explore, node, search, affected, resolve, query, search_similar, compute_embeddings, module_children, callers, callees, diagnose, as_of, traverse, get_smells, dead_code, find_clones, find_scaffolding, replace_body, update_signature, rename, create_entity, reindex, update_file, status, set_project. `search_symbols` (keyword search) and `archive` (retention) are Python-API-only by design; `visualize`, `shell`, `git`, `exclude`, `watch`, `init`, `load-snapshot`, `store-repair` stay CLI-side (local-process concerns) — see the step-4 surface verdict in the v0.12 deviations log |
|
|
106
|
+
| **Query surface** | Pest structural + Macrame agent traversals + vector search |
|
|
107
|
+
| **Frameworks** | Django, Flask, FastAPI, Go, Actix, Express, Spring Boot, Laravel, ASP.NET, Rails, NestJS, Vue Router, React Router |
|
|
108
|
+
| **Agents** | MCP server over stdio — finds the project root, indexes in the background, and exits with its client |
|
|
109
|
+
|
|
110
|
+
## Quick Start
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pip install coderadar-rs
|
|
114
|
+
|
|
115
|
+
# Write .coderadar.toml, create the store, run the first analysis
|
|
116
|
+
coderadar init
|
|
117
|
+
|
|
118
|
+
# Every MCP tool `coderadar_<op>` is the command `coderadar <op>`
|
|
119
|
+
# (underscores become hyphens), with the same arguments and the same text.
|
|
120
|
+
# Run from anywhere inside the project, or name it with -C.
|
|
121
|
+
coderadar explore UserService.create # source + call paths
|
|
122
|
+
coderadar resolve "/users/:id" # route → handler (any framework spelling)
|
|
123
|
+
coderadar query "functions where is_async == true"
|
|
124
|
+
coderadar affected "src/services.py::UserService.create"
|
|
125
|
+
coderadar traverse "src/auth.py::validate_user" --direction upstream
|
|
126
|
+
coderadar get-smells --rule-id god-class
|
|
127
|
+
coderadar -C ../other-project status
|
|
128
|
+
|
|
129
|
+
# Edits print a diff; --apply writes it
|
|
130
|
+
coderadar rename "src/auth.py::validate_user" is_valid_user
|
|
131
|
+
coderadar rename "src/auth.py::validate_user" is_valid_user --apply
|
|
132
|
+
|
|
133
|
+
# Scripts: --format json prints the data instead of the text
|
|
134
|
+
coderadar dead-code --min-confidence 0.8 --format json
|
|
135
|
+
|
|
136
|
+
# Keep the index current
|
|
137
|
+
coderadar update-file src/auth.py # one file (a deleted file is dropped)
|
|
138
|
+
coderadar reindex # changed files; --full for everything
|
|
139
|
+
coderadar watch src/ --debounce 50
|
|
140
|
+
|
|
141
|
+
# Visualize (hierarchy, dependencies, call-graph)
|
|
142
|
+
coderadar visualize call-graph --format graphviz -o calls.dot
|
|
143
|
+
|
|
144
|
+
# Serve the graph to an MCP client (Claude Code, Cursor, ...)
|
|
145
|
+
coderadar mcp serve
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
> **0.13 removal notice.** The old CLI spellings (`analyze`, `rebuild`,
|
|
149
|
+
> `update`, `stats`, `blame`, `git-clean`, `git-diff`) still work but are
|
|
150
|
+
> hidden; they are removed in 0.13. Use `reindex`, `update-file`, `status`,
|
|
151
|
+
> and `git blame` / `git is-clean` / `git diff`.
|
|
152
|
+
|
|
153
|
+
## Python API
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
import coderadar
|
|
157
|
+
|
|
158
|
+
# Index into memory. `coderadar init` is what creates the persistent store —
|
|
159
|
+
# analyze only writes to one that already exists, so a wrong path cannot
|
|
160
|
+
# leave a `.coderadar/` behind for the next root lookup to find.
|
|
161
|
+
graph = coderadar.analyze("src/")
|
|
162
|
+
|
|
163
|
+
# The same operations as methods. They return data (dicts, lists,
|
|
164
|
+
# dataclasses); the MCP tools and CLI commands render the same data as text.
|
|
165
|
+
# Failures raise coderadar.ops.OpError subclasses (NotFound, InvalidRequest, …).
|
|
166
|
+
|
|
167
|
+
# Source plus call paths for named symbols
|
|
168
|
+
result = graph.explore(symbols=["UserService.create"])
|
|
169
|
+
|
|
170
|
+
# Query
|
|
171
|
+
for row in graph.query("functions where caller_count == 0"):
|
|
172
|
+
print(row["id"])
|
|
173
|
+
|
|
174
|
+
# One entity, its direct neighbours, the blast radius
|
|
175
|
+
entity = graph.node("src/services.py::UserService.create", include_neighbors=True)
|
|
176
|
+
callers = graph.callers("views.py::user_detail") # includes framework edges
|
|
177
|
+
impact = graph.affected("src/auth.py::validate_user", max_depth=3)
|
|
178
|
+
|
|
179
|
+
# Walk calls / imports / extends / overrides (edge_kinds=None walks all four);
|
|
180
|
+
# full entity rows, the start node at depth 0
|
|
181
|
+
rows = graph.traverse("src/auth.py::validate_user", direction="upstream", max_depth=3)
|
|
182
|
+
|
|
183
|
+
# Edits are dry runs unless dry_run=False: {"plan", "result", "note"}
|
|
184
|
+
outcome = graph.replace_body(
|
|
185
|
+
"src/auth.py::validate_user",
|
|
186
|
+
" return bool(re.match(r'^[^@]+@[^@]+$', email))",
|
|
187
|
+
)
|
|
188
|
+
print(outcome["plan"].diff_preview)
|
|
189
|
+
graph.rename("src/auth.py::validate_user", "is_valid_user", dry_run=False)
|
|
190
|
+
|
|
191
|
+
# Sync a changed (or deleted) file
|
|
192
|
+
report = graph.update_file("src/core/engine.py")
|
|
193
|
+
|
|
194
|
+
# Analyses and housekeeping
|
|
195
|
+
smells = graph.get_smells(rule_id="god-class")
|
|
196
|
+
dead = graph.dead_code(min_confidence=0.8)
|
|
197
|
+
print(graph.status())
|
|
198
|
+
|
|
199
|
+
# Temporal queries (Macrame bitemporal)
|
|
200
|
+
past = graph.as_of("2026-08-01T00:00:00Z")
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Entity IDs
|
|
204
|
+
|
|
205
|
+
Stored ids are canonical root-relative form: `<relative-path>::<Qualified.name>`
|
|
206
|
+
with forward slashes and no `./` prefix
|
|
207
|
+
(`src/auth.py::validate_user`) — one spelling on every platform, so ids
|
|
208
|
+
saved in a snapshot, baseline or CI artefact on one OS resolve on another.
|
|
209
|
+
The form is minted at write time by every path (analyze, `update_file`, the
|
|
210
|
+
store migration), so `analyze(".")` and `analyze(<abs-root>)` produce
|
|
211
|
+
identical keys. Pasted variants (absolute paths, backslashes, a leading
|
|
212
|
+
`./`) still resolve at every tool boundary, but prefer the canonical form in
|
|
213
|
+
scripts. A store written before 0.10 spells ids the old way
|
|
214
|
+
(`.\src\auth.py::validate_user`); `load` refuses it rather than serving a
|
|
215
|
+
half-broken graph, and the next analyze re-keys it (`coderadar store-repair`
|
|
216
|
+
reports the count).
|
|
217
|
+
|
|
218
|
+
## MCP Server
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
coderadar mcp serve # walks up from the cwd looking for the project
|
|
222
|
+
coderadar mcp serve --path . # or say where it is
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"mcpServers": {
|
|
228
|
+
"coderadar": {
|
|
229
|
+
"command": "uv",
|
|
230
|
+
"args": ["run", "coderadar", "mcp", "serve"]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
The server key is yours: `"cr"` works identically and keeps client
|
|
237
|
+
configs short. Tool names keep the full `coderadar_` prefix either way —
|
|
238
|
+
the key names the server, the prefix names the tools.
|
|
239
|
+
|
|
240
|
+
MCP clients launch servers from wherever they happen to be, so the server does
|
|
241
|
+
not assume the cwd is the project:
|
|
242
|
+
|
|
243
|
+
- **Finding the project.** `rootUri` and `workspaceFolders` are LSP concepts
|
|
244
|
+
and do not exist in MCP, so the ladder is what MCP actually offers — the
|
|
245
|
+
client's `roots/list`, then `--path`, then the cwd. Each candidate is walked
|
|
246
|
+
*up* looking for a `.coderadar/` or `.coderadar.toml` marker, stopping before
|
|
247
|
+
the home directory. A confirmed root on a lower rung beats an unconfirmed one
|
|
248
|
+
higher up: a marker on disk says where the project is, while a client root
|
|
249
|
+
says where the client is.
|
|
250
|
+
- **Asking the client.** `roots/list` is a server-to-client request and
|
|
251
|
+
awaiting one during `initialize` deadlocks, so it is asked lazily on the
|
|
252
|
+
first tool call — once, and only if nothing on disk confirmed the root.
|
|
253
|
+
- **Entity-id grammar.** Every tool speaks one id shape:
|
|
254
|
+
`<relative-path>::<Qualified.name>` — project-root-relative, forward
|
|
255
|
+
slashes, no dot prefix (`app/helpers.py::combine`; methods as
|
|
256
|
+
`File::Class.member`, modules as `File::module`). Read paths also accept
|
|
257
|
+
absolute paths, backslashes, and a leading `./`, and a dotted qualified
|
|
258
|
+
name (`app.helpers.combine`) resolves when a module prefix matches;
|
|
259
|
+
`external::name` marks a callee outside the index (it resolves nothing
|
|
260
|
+
further). Search `kind` is one of `function | class | type_alias |
|
|
261
|
+
constant | module | import`; smell `strictness` is `strict | normal |
|
|
262
|
+
loose` — anything else errors instead of returning empty.
|
|
263
|
+
- **Same directory as the index.** The process moves onto the resolved root
|
|
264
|
+
before indexing, because entity ids are canonical root-relative form
|
|
265
|
+
(`src/auth.py::validate_user`) and every read helper — Rust or Python
|
|
266
|
+
— resolves them against the recorded indexed root, never the cwd.
|
|
267
|
+
- **Fast handshake.** Indexing runs on a background thread; a tool call that
|
|
268
|
+
arrives early waits, then reports elapsed seconds rather than answering from
|
|
269
|
+
a half-built graph. While waiting, heartbeats (`[coderadar] indexing … Ns
|
|
270
|
+
elapsed`) go to stderr every few seconds (`CODERADAR_INDEX_HEARTBEAT`) —
|
|
271
|
+
never silent, never an answer from a half-built graph.
|
|
272
|
+
- **Saying where it looked.** A "no index" reply names the directory being
|
|
273
|
+
served and how that directory was chosen, so an agent pointed at the wrong
|
|
274
|
+
project can say so.
|
|
275
|
+
- **One project at a time.** Every tool takes an optional `project_path`; a path
|
|
276
|
+
inside the served project (a file, a subdirectory, or the root itself) is
|
|
277
|
+
accepted via nearest-marker resolution; another project is refused with the
|
|
278
|
+
reason, not quietly answered from the wrong codebase.
|
|
279
|
+
- **Switching projects without restarting.** `coderadar_set_project` re-runs
|
|
280
|
+
startup against a new root from inside a tool call: that project's config
|
|
281
|
+
and mutation policy take effect, indexing restarts in the background, and an
|
|
282
|
+
explicit switch outranks the client's declared workspace for the rest of the
|
|
283
|
+
connection.
|
|
284
|
+
- **Not outliving the client.** Handshake timeout, parent-process watchdog, and
|
|
285
|
+
teardown when stdin closes.
|
|
286
|
+
- **Tool names are prefixed by the client.** Clients usually namespace tools
|
|
287
|
+
as `<server>_<tool>`, so a server registered as `coderadar` shows them as
|
|
288
|
+
`coderadar_coderadar_explore` and so on (or as `coderadar_explore` under a
|
|
289
|
+
gateway that merges servers). Call tools by the name the client
|
|
290
|
+
advertises, not the bare names used in this README
|
|
291
|
+
(CODERADAR_BUGS_QUIRKS.md #10).
|
|
292
|
+
- **Default excludes.** The file walk skips a 15-directory build-output
|
|
293
|
+
baseline (`.venv/`, `node_modules/`, `target/`, `dist/`, `build/`,
|
|
294
|
+
`__pycache__/`, `.git/`, …) on top of `.gitignore` and `[project] exclude`,
|
|
295
|
+
and one shared matcher enforces it in every pass — walker, star exports,
|
|
296
|
+
framework extraction, watcher, and staleness — so generated artifacts never
|
|
297
|
+
pollute counts or smells. `coderadar exclude list|add|remove` edits the
|
|
298
|
+
config; `--exclude` narrows a single `reindex`; `coderadar status`
|
|
299
|
+
prints the effective stack.
|
|
300
|
+
|
|
301
|
+
## Language Support
|
|
302
|
+
|
|
303
|
+
| Tier | Languages | Resolution | Mutation |
|
|
304
|
+
|------|-----------|------------|----------|
|
|
305
|
+
| **Tier 1** | Python, TypeScript, JavaScript, Rust, Go, Java, C, C++, Ruby, PHP, C#, Kotlin | Import → Signature → Framework | Full tool suite |
|
|
306
|
+
| **Tier 2** | Swift, Scala, Lua, Elixir, Zig, R, Bash, Dart, Protobuf, Dockerfile, SQL, HCL, CMake, GraphQL, Erlang, Haskell, **Nix, Shell, Groovy, Perl, SystemVerilog, OCaml, Clojure, F#, Verilog, Julia, PowerShell, Emacs Lisp, Objective-C** | Import → Signature | replace_body, create_entity |
|
|
307
|
+
| **Tier 3** | HTML, CSS, YAML, TOML, JSON, Markdown + 280 more | Signature Match only | replace_body, create_entity |
|
|
308
|
+
|
|
309
|
+
## Resolution Cascade
|
|
310
|
+
|
|
311
|
+
| Layer | Method | Confidence | Languages |
|
|
312
|
+
|-------|--------|------------|-----------|
|
|
313
|
+
| L1 | Import + Scope | 0.80–0.89 | All |
|
|
314
|
+
| L2 | Signature Match | 0.40–0.79 | All |
|
|
315
|
+
| L3 | Framework Resolvers | 0.80–1.00 | Python, Go, Rust |
|
|
316
|
+
| L4 | Embedding (Python) | 0.20–0.39 | Python |
|
|
317
|
+
| L5 | LSP Override | — | **Planned** — not wired into the cascade |
|
|
318
|
+
|
|
319
|
+
> **L5 (LSP Override) is planned, not shipped.** `py_agent/src/coderadar/lsp/` holds a server pool and an override type, but no production path reaches them — the resolution cascade runs L1–L4 only. The row is kept here because the layer numbering is referenced throughout the specs; it will move to shipped when the override is wired behind its config flag.
|
|
320
|
+
|
|
321
|
+
> **Stack Graphs (L1 in the v3.3 spec) was deferred to post-v1 and its placeholder module has been removed.** CodeGraph ships 30+ languages at production scale with zero Stack Graphs dependency — compiler-grade scope disambiguation is not required for MCP agent use cases.
|
|
322
|
+
|
|
323
|
+
## Framework Resolvers
|
|
324
|
+
|
|
325
|
+
CodeRadar detects and extracts framework-specific patterns that tree-sitter can't see:
|
|
326
|
+
|
|
327
|
+
| Framework | Language | Detection | Extracted Patterns |
|
|
328
|
+
|-----------|----------|-----------|-------------------|
|
|
329
|
+
| **Django** | Python | `manage.py` | `path()` routes, DRF `router.register()`, admin registrations, `.as_view()` handlers |
|
|
330
|
+
| **Flask** | Python | `@app.route` | Route decorators, Flask-RESTful `add_resource()`, Blueprint registration |
|
|
331
|
+
| **FastAPI** | Python | `APIRouter` | `@app.get()`/`@router.post()` routes, `Depends()` injection chains, `include_router()` |
|
|
332
|
+
| **Go** | Go | `go.mod` | `gin.GET()`, `mux.HandleFunc()`, Chi/Echo/Fiber route patterns |
|
|
333
|
+
| **Actix** | Rust | `Cargo.toml` | `App::new().route()`, `web::resource()`, `#[get]`/`#[post]` attribute macros |
|
|
334
|
+
| **Express** | JS/TS | `package.json` | `app.get()`, `router.post()`, chained `.route()` builder, `app.use()` middleware |
|
|
335
|
+
| **Spring Boot** | Java | `pom.xml`/`build.gradle` | `@GetMapping`, `@PostMapping`, `@RequestMapping(method=...)`, class-level `@RequestMapping` prefix, `[controller]` token replacement |
|
|
336
|
+
| **Laravel** | PHP | `composer.json` | `Route::get()`, `Route::resource()`, `Route::group()` prefix propagation, `[Controller::class, 'method']` array + `'Controller@method'` string syntax |
|
|
337
|
+
| **ASP.NET** | C# | `.csproj`/`.sln` | `[HttpGet]`, `[HttpPost]`, `[Route("api/[controller]")]` token replacement, Minimal API `app.MapGet()` |
|
|
338
|
+
| **Rails** | Ruby | `Gemfile` | `has_many`/`belongs_to`/`has_one` associations, `before_action`/`after_action` callbacks |
|
|
339
|
+
| **NestJS** | TS | `package.json` | `@Controller` route prefix, `@Get`/`@Post` routes, `@Module` dependency edges |
|
|
340
|
+
| **Vue Router** | JS/TS | `package.json` | `createRouter` route objects, lazy `import()` component resolution, `addRoute` dynamic routes |
|
|
341
|
+
| **React Router** | JSX/TSX | `package.json` | JSX `<Route>` declarations, v6 data router objects, `<Link>`/`<NavLink>` navigation tracking |
|
|
342
|
+
|
|
343
|
+
Framework edges are registered in the Rust graph — agents can trace from URL patterns to handler functions via `callers()` / `callees()`.
|
|
344
|
+
|
|
345
|
+
## v0.12.0 Highlights — history becomes real
|
|
346
|
+
|
|
347
|
+
Source history, keyword search, framework routes, Rust resolution, and
|
|
348
|
+
agent enablement — the full v0.12 plan per its release gate (see
|
|
349
|
+
`CHANGELOG.md`).
|
|
350
|
+
|
|
351
|
+
- **Source history in blobs (DR-25).** Every indexed generation puts its
|
|
352
|
+
bytes as SHA-256 content-addressed blobs (`macrame-db` 0.19); the digest
|
|
353
|
+
rides `extra.coderadar.source_blob`, diffs compute on read.
|
|
354
|
+
`Snapshot.read_bytes` serves exact bytes-at-T (CRLF included), `read_source`
|
|
355
|
+
the display form; missing blobs are `ContentUnavailable`, distinct from
|
|
356
|
+
absent-at-T. `[retention] archive_after_days` moves cold bytes to a
|
|
357
|
+
sibling archive file (hot+cold backup + restore tested); analyze never
|
|
358
|
+
auto-archives. Default-on-with-notice (DR-30): blob counts on every
|
|
359
|
+
report surface are the notice; kill-switch
|
|
360
|
+
`[database] store_source_blobs=false`.
|
|
361
|
+
- **FTS5 keyword search (DR-34).** `search_symbols()` over
|
|
362
|
+
trigger-maintained `concepts_fts` — escaped-by-default, live-only,
|
|
363
|
+
single-digit milliseconds; Python-API-only by design.
|
|
364
|
+
- **Framework routes (DR-10).** Routes are canonical `route` concepts with
|
|
365
|
+
persisted route→handler edges; `resolve /users/:id` follows them, with
|
|
366
|
+
zero tree walks at steady state.
|
|
367
|
+
- **Rust cross-module resolution (DR-13).** `use` parsing (groups, globs,
|
|
368
|
+
aliases, `crate`/`super`/`self` roots) + `::` call chains; `Self::assoc`
|
|
369
|
+
and `Enum::Variant` resolve; self-corpus asserted edges 999 → 1320,
|
|
370
|
+
dead-code findings 100 → 57.
|
|
371
|
+
- **Embeddings Phase 1 (DR-11).** Model id + preprocessing in the dedup key,
|
|
372
|
+
write/query dimension gates, `recompute` flag on every surface;
|
|
373
|
+
persistence stays 0.13.
|
|
374
|
+
- **Agent enablement (P2).** `skills/coderadar-mcp` + `skills/coderadar-cli`
|
|
375
|
+
(repo source of truth, registry drift-tested), release-gate history proof
|
|
376
|
+
(`as_of` → old/new names *and* bytes), read-path discipline pinned.
|
|
377
|
+
- **Upstream fix.** `macrame-db` 0.19.1 repairs the historical loader
|
|
378
|
+
(opticsWolf/Macrame#3) via the bitemporal composition; the rename-fixture
|
|
379
|
+
reproducer is green and un-ignored, production stays on the state fold by
|
|
380
|
+
decision.
|
|
381
|
+
|
|
382
|
+
## Feature highlights — v0.5 → v0.11
|
|
383
|
+
|
|
384
|
+
Everything below shipped before v0.12 and still holds. Per-version detail
|
|
385
|
+
lives in `CHANGELOG.md`; the numbers are CI-guarded (1512 tests and
|
|
386
|
+
counting, clippy/ruff/fmt green and blocking, 100/100 resolution
|
|
387
|
+
precision-recall on the benchmark corpus).
|
|
388
|
+
|
|
389
|
+
**Index & serve.** Single-pass tree-sitter extraction (41 grammars: 12
|
|
390
|
+
Tier-1 with signature tests, 29 Tier-2), parallel pipeline, per-file
|
|
391
|
+
incremental `update_file` plus a debounced file watcher. The MCP server and
|
|
392
|
+
CLI cold-start from the Macrame ledger instead of re-indexing every session
|
|
393
|
+
(`build_graph`: load + refresh changed files only); the last project per
|
|
394
|
+
launch directory persists across restarts. Canonical forward-slash ids on
|
|
395
|
+
every path, one shared exclude matcher, `store-repair` + auto-retirement for
|
|
396
|
+
legacy rows, `-C/--project` with marker walk-up from any subdirectory.
|
|
397
|
+
|
|
398
|
+
**Resolution.** `self` attribute calls, typed locals and constructor results
|
|
399
|
+
resolve to real edges; relative imports, aliases, function-local imports,
|
|
400
|
+
module initializers, and transitive re-export chains all produce edges.
|
|
401
|
+
Thirteen framework resolvers (Django, Flask, FastAPI, Express, Rails,
|
|
402
|
+
NestJS, Vue/React Router, …) register route → handler edges in the graph.
|
|
403
|
+
Cross-file MRO with populated subclasses/importers/overrides indexes.
|
|
404
|
+
Rename rewrites attribute call sites and cascades base/override renames;
|
|
405
|
+
what the graph cannot resolve is reported as `unverified_sites`, never
|
|
406
|
+
silently skipped.
|
|
407
|
+
|
|
408
|
+
**Read.** A real query language (`functions where …`, generated reference,
|
|
409
|
+
"did you mean" on unknown fields) next to multi-token `search_entities`,
|
|
410
|
+
embedding `search_similar`, whole-graph `traverse` over all four asserted
|
|
411
|
+
edge kinds with honest `unresolved` targets, temporal `as_of`, blast-radius
|
|
412
|
+
`affected` (centrality-ranked), and `diagnose`. Misses say which tokens
|
|
413
|
+
were tried and where to look next.
|
|
414
|
+
|
|
415
|
+
**Analysis.** Twelve smell rules with confidence tiers and strictness
|
|
416
|
+
profiles; deterministic token→MinHash→LSH→TED clone detection
|
|
417
|
+
(byte-identical across processes); reachability dead code from an
|
|
418
|
+
entry-point ladder (framework decorators, protocol members, public API,
|
|
419
|
+
`pyproject` scripts, `__all__`) with evidence and distances — self-corpus
|
|
420
|
+
findings fell 269 → 121 as resolution improved while recall held 99.97 %.
|
|
421
|
+
CFG metrics, harmonic centrality, and a scaffolding/secrets scanner
|
|
422
|
+
round it out.
|
|
423
|
+
|
|
424
|
+
**Mutate.** Plan-then-apply with byte-span verification: every edit carries
|
|
425
|
+
a content hash (stale writes rejected), the written file must parse
|
|
426
|
+
(failures diagnose, never silently apply), docstrings survive body replace,
|
|
427
|
+
and method renames cascade. Dry-run unless applied; the allow-list is
|
|
428
|
+
root-anchored; the watcher's write guard skips the engine's own writes.
|
|
429
|
+
|
|
430
|
+
**Surfaces.** 26 operations, one name each — `coderadar_<op>` (MCP),
|
|
431
|
+
`coderadar <op>` (CLI), `CodeGraph.<op>()` — all calling one shared `ops`
|
|
432
|
+
function, pinned by parity tests. CLI takes `--format json`, logs to
|
|
433
|
+
stderr (exit 2 bad input, 1 otherwise), pipes UTF-8 everywhere; `status`
|
|
434
|
+
reports project, config, store, and freshness.
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
### Renamed in v0.11 (removed in 0.13)
|
|
438
|
+
|
|
439
|
+
Old names still work with a `DeprecationWarning` or a stderr note, hidden from `--help`.
|
|
440
|
+
Update client allow-lists and scripts that call tools by name: the 17 `codegraph_*` tools are now `coderadar_*`, and `node`/`affected` take `entity_id`.
|
|
441
|
+
|
|
442
|
+
| Old | New |
|
|
443
|
+
|-----|-----|
|
|
444
|
+
| `coderadar analyze PATH` / `rebuild PATH` | `coderadar -C PATH reindex --full` |
|
|
445
|
+
| `coderadar update FILE` | `coderadar update-file FILE` |
|
|
446
|
+
| `coderadar stats` | `coderadar status` |
|
|
447
|
+
| `coderadar blame` / `git-clean` / `git-diff` | `coderadar git blame` / `git is-clean` / `git diff` |
|
|
448
|
+
| `coderadar traverse --depth/--edges` | `--max-depth/--edge-kinds` |
|
|
449
|
+
| `CodeGraph.find` | `CodeGraph.node` |
|
|
450
|
+
| `CodeGraph.callers_of` / `callees_of` | `callers` / `callees` |
|
|
451
|
+
| `CodeGraph.plan_body_replacement` / `plan_signature_update` | `plan_replace_body` / `plan_update_signature` |
|
|
452
|
+
| `CodeGraph.explore(start_id=…, max_depth=…)` (call-graph walk) | `CodeGraph.traverse` |
|
|
453
|
+
| `CodeGraph.traverse(edge_types=…)` | `edge_kinds=…` |
|
|
454
|
+
|
|
455
|
+
> **Upgrading from 0.9.x:** old-spelling stores are refused with the migration hint;
|
|
456
|
+
> `reindex` (or a cold start, which does it automatically) re-keys them.
|
|
457
|
+
|
|
458
|
+
## Project Structure
|
|
459
|
+
|
|
460
|
+
```
|
|
461
|
+
core_indexer/ # Rust core
|
|
462
|
+
queries/ # 41 .scm query files (one per Tier-1/2 language)
|
|
463
|
+
src/
|
|
464
|
+
extract/ # Tree-sitter: tagger (query cursor) + walker (hierarchy) + docstring + decorators
|
|
465
|
+
update/ # Incremental diff + patch + WAL
|
|
466
|
+
resolve/ # Resolution cascade (import_graph, orchestrator, signature, cache)
|
|
467
|
+
query/ # Pest grammar + execution engine
|
|
468
|
+
mutation/ # AST-aware refactoring (rope, indent, unified diffs, WriteGuard)
|
|
469
|
+
fs/ # File watcher (notify) + git integration
|
|
470
|
+
graph/ # In-memory ProjectedGraph, parallel extraction, reverse indexes,
|
|
471
|
+
# call/import/inheritance resolution, traversal, persistence,
|
|
472
|
+
# dead-code reachability + RTA-lite (deadcode/, rta_lite.rs),
|
|
473
|
+
# structured CFG (cfg.rs), harmonic centrality (centrality.rs)
|
|
474
|
+
clones/ # Token-level clone detection: normalized tokens, MinHash + banded
|
|
475
|
+
# LSH, Type-1/2/3 funnel, Zhang–Shasha TED verification (apted.rs)
|
|
476
|
+
scaffold/ # AI-scaffolding detector tables + secrets scanner
|
|
477
|
+
smells/ # Native code-smell engine (metrics pass, 12 rules incl. dead-code /
|
|
478
|
+
# dead-branch / intra-dead-statements, engine, registry,
|
|
479
|
+
# strictness profiles, tri-state const evaluator)
|
|
480
|
+
storage.rs # Macrame concept/edge persistence
|
|
481
|
+
lib.rs # PyO3 FFI bindings
|
|
482
|
+
|
|
483
|
+
py_agent/src/coderadar/ # Python layer
|
|
484
|
+
resolvers/ # 13 framework resolvers: Django, Flask, FastAPI, Go, Actix, Express, Spring Boot, Laravel, ASP.NET, Rails, NestJS, Vue Router, React Router
|
|
485
|
+
embedding/ # Content-addressed dedup
|
|
486
|
+
agent/ # GraphRAG query pipeline
|
|
487
|
+
lsp/ # Persistent LSP warm pool
|
|
488
|
+
mutation/ # Tool router for LLM
|
|
489
|
+
mcp/ # MCP server
|
|
490
|
+
server.py # 26 tools + guidance
|
|
491
|
+
roots.py # project-root ladder and marker walk-up
|
|
492
|
+
startup.py # background index, ensure_ready()
|
|
493
|
+
lazy.py # roots/list retry on the first tool call
|
|
494
|
+
lifecycle.py # handshake timeout, parent watchdog, teardown
|
|
495
|
+
query/ # Query planner + templates + cache
|
|
496
|
+
visualizers/ # Mermaid + Graphviz (SCC cycle highlighting)
|
|
497
|
+
|
|
498
|
+
docs/ # Live doc set: ARCHITECTURE.md (system design),
|
|
499
|
+
# QUICKREF.md (operator cheat sheet), v0.12 trio +
|
|
500
|
+
# deviations, store-and-retention, query-language
|
|
501
|
+
# (generated), smell reference, open-items,
|
|
502
|
+
# BUGS_QUIRKS. Retired docs live in OKFgraph.
|
|
503
|
+
tests/ # 1078 Python tests (E2E incl. dead-code/clones/scaffold/CFG/
|
|
504
|
+
# centrality/dead-branch/RTA goldens, mutation E2E, MCP,
|
|
505
|
+
# framework resolvers, ingest parity, benchmarks)
|
|
506
|
+
mcp/ # Root resolution, background init, lifecycle, project_path
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
## Configuration
|
|
510
|
+
|
|
511
|
+
`.coderadar.toml` at the project root is the only configuration file; `coderadar init` writes a starter one. Every key in it is read by something, and `coderadar reindex` prints a line naming any key it could not use, so a stale or misspelled setting says so instead of sitting silent.
|
|
512
|
+
|
|
513
|
+
```toml
|
|
514
|
+
# .coderadar.toml
|
|
515
|
+
[project]
|
|
516
|
+
# Omitted, the whole project root is walked. Set it and the walk is confined
|
|
517
|
+
# to these subdirectories — an empty index is the usual sign of a typo here.
|
|
518
|
+
# roots = ["src/", "tests/"]
|
|
519
|
+
exclude = ["**/__pycache__/**", "**/.venv/**"]
|
|
520
|
+
|
|
521
|
+
[database]
|
|
522
|
+
path = ".coderadar/store/coderadar.db"
|
|
523
|
+
# Source-blob write path (§1.9, default-on-with-notice per DR-30):
|
|
524
|
+
# blob counts on every report surface are the notice; `false` is the
|
|
525
|
+
# kill-switch. `blob_exclude` unions with the secret belt (*.env et al).
|
|
526
|
+
store_source_blobs = true
|
|
527
|
+
# blob_exclude = ["**/secrets/**"]
|
|
528
|
+
|
|
529
|
+
[retention]
|
|
530
|
+
# Days-hot cutoff (§3.4): archive blobs older than this on explicit
|
|
531
|
+
# `CodeGraph.archive()` / `ops.archive()` only — analyze never
|
|
532
|
+
# auto-archives. Unset (default) means no file default.
|
|
533
|
+
# archive_after_days = 30
|
|
534
|
+
|
|
535
|
+
[embedding]
|
|
536
|
+
# Indexing and search must name the same model: a dimension mismatch produces
|
|
537
|
+
# confident nonsense rather than an error.
|
|
538
|
+
model = "BAAI/bge-small-en-v1.5"
|
|
539
|
+
dimension = 384
|
|
540
|
+
|
|
541
|
+
[watch]
|
|
542
|
+
debounce_ms = 100
|
|
543
|
+
max_file_size_bytes = 1048576
|
|
544
|
+
|
|
545
|
+
[mutation]
|
|
546
|
+
enabled = true
|
|
547
|
+
default_dry_run = true
|
|
548
|
+
allow = ["src/", "lib/", "tests/", "scripts/"]
|
|
549
|
+
deny = [".git/", ".coderadar/", "/migrations/", "/*.lock", "/generated/"]
|
|
550
|
+
|
|
551
|
+
[resolution]
|
|
552
|
+
min_confidence = 0.3
|
|
553
|
+
|
|
554
|
+
[resolution.import_graph]
|
|
555
|
+
max_import_depth = 3
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
`[resolution.signature]` and `[query]` are accepted and stored but not yet read on any live path — they wait on the code that would consume them. `[resolution.lsp]` is accepted by the schema and deliberately absent from the starter file: the pool it configures is never constructed, so a value there would only be noise.
|
|
559
|
+
|
|
560
|
+
## License
|
|
561
|
+
|
|
562
|
+
MIT — incorporates techniques from [CodeGraph](https://github.com/opticsWolf/codegraph) (MIT License).
|
|
563
|
+
|