% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rules.R
\name{shieldr_report}
\alias{shieldr_report}
\title{Construct a \code{shieldr_report}}
\usage{
shieldr_report(
  action,
  text_clean,
  findings,
  risk_score,
  policy,
  checks,
  timestamp = .now_iso(),
  tokens = NULL,
  metadata = list()
)
}
\arguments{
\item{action}{Resolved action: \code{"allow"}, \code{"redact"}, or \code{"block"}.}

\item{text_clean}{Cleaned or redacted text.}

\item{findings}{A list of finding lists.}

\item{risk_score}{Numeric risk score between 0 and 1.}

\item{policy}{Policy name.}

\item{checks}{Check mode used.}

\item{timestamp}{ISO8601 timestamp.}

\item{tokens}{Optional token count for the original text.}

\item{metadata}{Optional list of operational metadata.}
}
\value{
A \code{shieldr_report} S3 object.
}
\description{
A \code{shieldr_report} is the scanner result returned by \code{\link[=scan_prompt]{scan_prompt()}},
\code{\link[=scan_context]{scan_context()}}, and \code{\link[=scan_output]{scan_output()}}.
}
\details{
Reports separate the cleaned text from the findings that explain why the
text was allowed, redacted, or blocked. \code{risk_score} is a deterministic
severity index from \code{0} to \code{1}; it is not a probability. The \code{checks} field
records whether the report came from deterministic rules, NLP checks, an LLM
reviewer, or a combined mode. \code{metadata} carries optional operational
details such as semantic reviewer parse errors, scanner settings, context row
indexes, source labels, tool names, or conversation roles.
}
\examples{
shieldr_report("allow", "hello", list(), 0, "custom", "rules")
}
