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

@@ -20,6 +20,8 @@ declare(strict_types=1);
*
* @see class-prv-model-registry.php -- Migration v2 implementation.
* @see class-prv-config-version.php -- Scoring-config versioning.
* @see class-prv-call-meta-table.php -- [v0.3.0] Per-call metadata table.
* @see class-prv-call-io-table.php -- [v0.3.0] Per-call I/O table (prunable).
* @see class-prv-plugin.php -- Calls PRV_Upgrader::run().
* @package PrVision
*/
@@ -34,7 +36,12 @@ class PRV_Upgrader {
*/
public static function run(): void {
PRV_Table_Manager::create_table();
// v0.3.0: per-call cost/metadata + I/O tables.
PRV_Call_Meta_Table::create_table();
PRV_Call_Io_Table::create_table();
PRV_Model_Registry::run_migration_v2();
PRV_Config_Version::maybe_seed_initial_version();
// v0.3.0: seed retention default if not set.
add_option( 'prv_io_retention_days', PRV_IO_RETENTION_DEFAULT_DAYS );
}
}