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:
peptiderepo
2026-06-15 17:07:08 +07:00
committed by GitHub
parent 2f4c1b2c72
commit 2e2c72cac6
37 changed files with 3246 additions and 325 deletions

View File

@@ -16,10 +16,14 @@ declare(strict_types=1);
*
* Who triggers: plugins_loaded action (pr-vision.php).
* Dependencies: PRV_Upgrader, PRV_Cron, PRV_Admin_Page, PRV_Settings_Page,
* PRV_Collector_Registry.
* PRV_Settings_Controller, PRV_Costs_Page, PRV_Call_Log_Page,
* PRV_Call_Detail_Ajax, PRV_Prune_Cron, PRV_Collector_Registry.
*
* @see ARCHITECTURE.md -- Boot sequence diagram.
* @see class-prv-upgrader.php -- Runs migrations on every boot.
* @see ARCHITECTURE.md -- Boot sequence diagram.
* @see class-prv-upgrader.php -- Runs migrations on every boot.
* @see class-prv-costs-page.php -- [v0.3.0] Costs admin sub-page.
* @see class-prv-call-log-page.php -- [v0.3.0] Call Log admin sub-page.
* @see class-prv-prune-cron.php -- [v0.3.0] Daily prune cron.
* @package PrVision
*/
class PRV_Plugin {
@@ -43,12 +47,24 @@ class PRV_Plugin {
$cron = new PRV_Cron();
$cron->register_hooks();
$prune = new PRV_Prune_Cron();
$prune->register_hooks();
if ( is_admin() ) {
$page = new PRV_Admin_Page();
$page->register_hooks();
$settings = new PRV_Settings_Page();
$settings->register_hooks();
$costs = new PRV_Costs_Page();
$costs->register_hooks();
$call_log = new PRV_Call_Log_Page();
$call_log->register_hooks();
$ajax = new PRV_Call_Detail_Ajax();
$ajax->register_hooks();
}
// Register the v1 AI-visibility collector + panel.