Skip to content

You are currently viewing documentation for0.1.0-alpha.2

Findings, events and verdicts

Subscribe or inspect recent events

sdk.on(kind, listener) returns an unsubscribe callback in both languages. Node sdk.recent() returns a readonly event array; Python returns a tuple. buffer defaults to 100 and bounds recent local metadata. Listener faults are contained. An audit destination needs separate configuration: recent events are not a durable archive.

Event names

Use the event type to choose handling; do not treat absence of an event as a clean bill of health.

typeInterpretationDeveloper action
driftConfigured inspection reported drift.Inspect phase, class and verdict; observe leaves the call unchanged.
repairA repair was applied by the configured trusted path.Inspect evidence and changed fields; a proposal alone is insufficient.
blockedPolicy halted the call.Distinguish pre-dispatch request halt from completed response halt.
bypassInspection was unavailable or skipped.Preserve original outcome and investigate readiness/scope.
errorDiagnostic error metadata.Inspect the outcome separately from this diagnostic.

Event fields and language differences

Both Event types expose type, tool, mode, phase and optional verdict. Node uses latencyUs, driftClass, auditId and byte_identical, with optional reason and side. Python uses latency_us, drift_class, audit_id and byte_identical. Latency is diagnostic timing, not an SLA. Optional evidence may be absent; do not invent an artifact URL or treat it as successful retention.

Verdict reference

Verdict contains halt, bypassed, findings, detectors and malformed. Node class corresponds to Python drift_class. Optional confidence, feedback and repair describe additional evidence. Node exposes eligibleDetectors, suppressedDetectors and detectorKinds when supplied; the Python Verdict does not expose those detector arrays. A detector count is not a finding count, and a zero finding count does not establish that inspection was eligible or configured.

Errors preserve phase and outcome

AgindowSetupError identifies deterministic misuse before execution. AgindowDriftError exposes tool, mode, phase, verdict and outcome for policy halts. Node also exposes code, hint, driftClass, driftId and auditUrl; Python uses drift_class, drift_id and audit_url. Original upstream failures propagate; policy wrapping retains a cause where available. Inspect a completed response outcome before considering another write.