Skip to main content

Module trust_report

Module trust_report 

Source
Expand description

Opt-in periodic trust report.

A digest of what the agent actually did over the reporting window — task runs, completion-contract verdicts, token spend, guardrail interventions, delivery/recovery health — delivered to every control chat. Rendering is a pure function over a snapshot struct; the loop only gathers, formats, delivers, and records the last-sent marker in db_meta so cadence survives restarts. No LLM calls are involved.

Structs§

TrustReportData
Everything one report renders, gathered up front so formatting is pure.

Functions§

format_trust_report
report_due
True when the persisted last-sent marker is at least interval_days old (or absent/unparseable — a fresh install reports on the first tick).
run_trust_report_once
One cadence check: send the report to every control chat when due. Returns true when a report was delivered to at least one chat.
spawn_trust_report