v0.3.0 — cost accountability + LLM call audit trail (#7)
Per-call recording of cost and I/O for every LLM probe. New tables prv_call_meta (schema v3) and prv_call_io. New admin pages: Costs (spend drill-down vs $5 cap) and Call Log (paginated + detail drawer). 90-day I/O retention prune via prv_daily_prune cron. P0 security: key never stored; gateway client exposes HTTP status only.
QA APPROVED 2026-06-15 SHA 09dc6db9ce
This commit is contained in:
@@ -137,6 +137,20 @@ class PRV_Config {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the I/O retention window in days.
|
||||
*
|
||||
* Raw prompt + response text in prv_call_io is pruned after this many days.
|
||||
* Cost/metadata in prv_call_meta is kept indefinitely.
|
||||
*
|
||||
* @return int Days; minimum 1, default PRV_IO_RETENTION_DEFAULT_DAYS.
|
||||
*/
|
||||
public static function get_io_retention_days(): int {
|
||||
$val = (int) get_option( 'prv_io_retention_days', PRV_IO_RETENTION_DEFAULT_DAYS );
|
||||
return max( 1, $val );
|
||||
}
|
||||
|
||||
/**
|
||||
* Default set of ~12 high-interest peptides (slug + human-readable label).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user