Commit a560aac
feat(entrypoints): framework-aware detection for Python, Rust, Solidity
Stage 2 of entrypoint detection. Covers the highest-value syntactic
markers across three languages:
Python:
- Flask/FastAPI/aiohttp HTTP decorators (@app.route, @router.get, etc.)
- Click/Typer CLI commands (@click.command, @app.command on Typer)
- Celery task handlers (@app.task, @shared_task)
Rust:
- actix-web/rocket HTTP attributes (#[get("/")], #[post("/")], etc.)
- FFI exports (#[no_mangle] and pub extern "C")
- Async main entrypoints (#[tokio::main], #[actix_web::main])
Solidity:
- External/public function visibility
- fallback()/receive() signatures (detector ready; parser doesn't emit
these nodes yet — test documents the deferred parser gap)
Detection runs automatically between the main() heuristic and
pyproject-script passes in QueryEngine.from_directory. A shared
_SourceCache avoids re-reading files for each node.
Adds docs/entrypoint-patterns.md — a reference document covering all
17 supported languages with detection signals, trust/asset defaults,
grep-ready patterns, and gotchas. Serves as the spec for the remaining
detectors (JS/TS/Go/Java/PHP/Ruby/C#/C/C++/Haskell/Erlang/Cairo/Circom/
Miden) which are planned as follow-ups.
13 new tests covering every framework detector plus a regression guard
for the Solidity parser gap.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 751199a commit a560aac
3 files changed
Lines changed: 1360 additions & 2 deletions
0 commit comments