Skip to main content

agentshield/analysis/composite_flow/
mod.rs

1//! Crate-private value-flow graph construction for composite findings.
2//!
3//! This module deliberately does not register a detector or add fields to the
4//! serialized IR. It proves the C.0 contracts needed by SHIELD-020 while the
5//! detector transport decision remains a separate API review.
6// C.0 module intentionally remains test-only until C.1 chooses detector transport.
7#![cfg_attr(
8    not(feature = "typescript"),
9    expect(
10        dead_code,
11        reason = "composite-flow types are exercised by the TypeScript analyzer only"
12    )
13)]
14
15pub(crate) mod ast;
16pub(crate) mod builder;
17pub(crate) mod guard;
18pub(crate) mod types;
19
20#[cfg(test)]
21mod tests;
22
23pub use types::*;
24
25#[cfg(feature = "typescript")]
26pub fn build_composite_flow_candidates(
27    tools: &[ToolFlowInput],
28    sources: &[SourceUnit<'_>],
29) -> Vec<CompositeFlowCandidate> {
30    builder::build(tools, sources)
31}
32
33#[cfg(not(feature = "typescript"))]
34pub fn build_composite_flow_candidates(
35    _tools: &[ToolFlowInput],
36    _sources: &[SourceUnit<'_>],
37) -> Vec<CompositeFlowCandidate> {
38    Vec::new()
39}