% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rules.R
\name{shieldr_result}
\alias{shieldr_result}
\title{Construct a \code{shieldr_result}}
\usage{
shieldr_result(output = NULL, audit, risk_summary, action)
}
\arguments{
\item{output}{Cleaned model output, or \code{NULL}.}

\item{audit}{A \code{shieldr_audit} object.}

\item{risk_summary}{Named numeric vector keyed by OWASP category.}

\item{action}{Final action. May be \code{"allow"}, \code{"redact"}, \code{"block"},
\code{"refuse"}, or \code{"escalate"}.}
}
\value{
A \code{shieldr_result} S3 object.
}
\description{
A \code{shieldr_result} is the high-level return value from \code{\link[=secure_chat]{secure_chat()}} and
\code{\link[=shield_ollama]{shield_ollama()}}.
}
\details{
\code{output} is \code{NULL} when the final action is \code{block}; otherwise it contains
the cleaned model output. \code{risk_summary} aggregates finding severity scores
by OWASP category across prompt, context, and output reports, capping each
category at \code{1.0}. This gives dashboards and audit logs a compact view of
which OWASP categories were triggered.
}
\examples{
aud <- shieldr_audit(NULL, NULL, NULL, "hello", NULL, 0, 1L, "allow")
shieldr_result(NULL, aud, numeric(), "allow")
}
