Skip to main content
prediction is the authoritative BENIGN or MALICIOUS verdict. For malicious results, typed outcome constants on BlockResult provide optional detail for application routing. The backend wire fields are prediction, primary_outcome, outcome_scores, detector_scores, and detector_counts. Handler functions such as continueNormally and redactAndSuppress in these examples belong to your application.

Prerequisites

Initialize the SDK client for your runtime and classify a boundary. The routing example below checks the TypeScript governance verdict. Python and Go typed results do not expose that verdict. For governance enforcement, use an integration that exposes and enforces that verdict.

Outcome taxonomy

Continue only when prediction is benign and no applicable governance policy blocks the request. For malicious results, route the primary outcome using this table. Block by default if the outcome is missing or unrecognized.

Route a TypeScript result

fw is the TypeScript client.

Expected result

A benign prediction invokes your continue handler. A governance-policy block is denied before the prediction is checked. A malicious prediction invokes the matching outcome handler, or the default blocking handler when no outcome matches.