Agent Armor API Reference
    Preparing search index...

    Interface DiagnosticsConfig

    Diagnostics callbacks, passed as config.on. Routes internal diagnostics to your own logging/alerting instead of console.warn. Fully opt-in: with no on config, behavior is identical to not having this feature — every event still reaches console.warn exactly as before.

    interface DiagnosticsConfig {
        audit?: (record: AuditRecord) => void;
        detectorSkipped?: (event: DetectorSkippedEvent) => void;
        error?: (event: ErrorEvent) => void;
        warn?: (event: WarnEvent) => void;
    }
    Index
    audit?: (record: AuditRecord) => void

    One durable record per scan decision — see AuditRecord.

    detectorSkipped?: (event: DetectorSkippedEvent) => void

    A detector was not loaded into the pipeline.

    error?: (event: ErrorEvent) => void

    Unexpected caught errors (a detector threw during scan).

    warn?: (event: WarnEvent) => void

    Expected-but-degraded conditions (ML unavailable, a config no-op, etc.).