Skip to main content

Module types

Module types 

Source
Expand description

Verdict + ancillary response types per Client spec rev1 §2.4 + App Rev 4 §4.1 Vector verdict shape.

All fields default-tolerant via #[serde(default)] so the SDK can consume partial responses during cycle-3 → cycle-N spec evolution without forcing a recompile-and-redeploy on every App-side schema widening.

Structs§

AuditEntry
One audit log entry returned from GET /v1/audit.
AuditResponse
Response from GET /v1/audit. Mirrors the App-side AuditResponse in cleanlib-app::verbs. See AuditEntry for the CLEANLIB-366 field-name alignment note.
AuditWindow
Query-window echo returned inside AuditResponse::window. Mirrors the App-side AuditWindow — echoes the caller’s since / until filter values verbatim (or None when the filter was omitted).
AvailabilityBlock
Cycle-15 honesty signal block on the SDK Verdict shape. Mirrors the App wire-shape cleanlib_core::AvailabilityBlock. Option<bool>-style passthrough for degraded_stale so pre-cycle-15 payloads (without the block) deserialize cleanly.
PackageRef
One package identity for policy-preview / scan requests.
PolicyDecision
Per-package decision returned from /v1/policy/preview or embedded in audit entries.
PolicyPreviewRequest
Body of POST /v1/policy/preview — packages + optional hypothetical policy override (JSON-shaped; YAML-source customers convert client-side).
PolicyPreviewResponse
Response from POST /v1/policy/preview.
PreviousVerdict
Prior-verdict comparison. Surfaces when the CleanLibrary App has a stored prior verdict for the same (ecosystem, package, version) that differs from the current one — useful for AI agents and dashboards that want to flag verdict-state changes since the last fetch. Sister-shape with cleanlib_sdk_go::PreviousVerdict and cleanlib-core::PreviousVerdict in the App.
ScanRequest
Body of POST /v1/scan — a batch of package coordinates, no policy.
ScanResponse
Response from POST /v1/scan. One ScanResult per requested package.
ScanResult
One entry of the POST /v1/scan response. Mirrors the App’s verbs::ScanResult wire shape: the package coordinate is flattened (ecosystem / package / version) alongside an optional verdict (present on success) or error string (per-package partial failure — the App resolves each package independently and never fails the whole batch on one miss).
Verdict