devscout_rs/lib.rs
1//! Library support for the `devscout` code-indexing CLI.
2//!
3//! The parsing and extraction modules turn source files into fragments, the
4//! graph and resolution modules connect those fragments, and the query and
5//! rendering modules produce command results. The remaining modules locate
6//! repositories, persist artifacts, and implement CLI commands and hooks.
7//! `ARCHITECTURE.md` at the repository root maps every module to its
8//! responsibility and invariants and says where a change goes.
9
10/// `devscout audit --semantic`: scores `uses-member` graph edges against a
11/// Roslyn-derived oracle.
12pub mod audit;
13/// Command-line argument parsing and dispatch.
14pub mod cli;
15/// C# and TypeScript declaration and reference extraction.
16pub mod extract;
17/// Persisted graph and fragment data structures.
18pub mod graph;
19/// Agent-hook input processing.
20pub mod hookio;
21/// Repository initialization commands.
22pub mod initcmd;
23/// Manifest persistence, search, and index-freshness checks.
24pub mod manifest;
25/// Repository mapping and incremental fragment-cache updates.
26pub mod mapcmd;
27/// XAML and XML markup declaration and reference extraction.
28pub mod markup;
29/// Tree-sitter parsing and source-span collection.
30pub mod parse;
31/// C# conditional-compilation pre-pass: blanks the inactive arms of
32/// `#if`/`#elif`/`#else`/`#endif` groups before the source is parsed.
33pub mod preproc;
34/// Hand-scanned csproj/Directory.Build.props project model: discovery,
35/// project units, and reference closure.
36pub mod project;
37/// Graph queries and their result models.
38pub mod query;
39/// Text rendering for query results.
40pub mod render;
41/// Repository discovery and registry access.
42pub mod repo;
43/// Resolution of extracted C# fragments into a graph.
44pub mod resolve;
45/// SQLite-backed hook freshness and content stores.
46pub mod store;
47/// Symbol-name suggestions for unsuccessful queries.
48pub mod suggest;
49/// Query-verb telemetry: one JSON line per invocation under `SCOUT_TELEMETRY=1`.
50pub mod telemetry;
51/// Resolution of extracted TypeScript fragments into a graph.
52pub mod tsgraph;
53/// Source-tree walking and default file-purpose generation.
54pub mod walk;
55
56// Off every code path today: the crate feeds the grammar a UTF-16 view of
57// source, so tree-sitter node offsets already arrive as UTF-16 and
58// `parse::utf16_index` halves them instead of translating. Kept as a
59// unit-tested helper for a future caller that has to cross a UTF-8 buffer back
60// into that offset convention.
61/// UTF-8 to UTF-16 source-offset conversion.
62pub mod offsets;