PR Vision v0.1.1: rename from peptide-geo-monitor + P2 fixes
- Exhaustive rename: PGM_ -> PRV_, pgm_ -> prv_, text domain and slug peptide-geo-monitor -> pr-vision, admin menu GEO Monitor -> PR Vision, main file peptide-geo-monitor.php -> pr-vision.php, DB table pgm_ai_visibility -> prv_ai_visibility. - P2-A: replace ltrim($host,'www.') character-mask with str_starts_with/substr prefix strip in PRV_Citation_Detector. Adds test coverage for wikipedia.org, webmd.com survival. - P2-B: drop continue-on-error: true from PHPCS CI step; WordPress Coding Standards now gates the build. - P2-C: remove dead in-run cache from PRV_Probe_Runner::run(); each (peptide, intent, model) triplet is visited once per run, cache hit is structurally impossible. - Version bump 0.1.0 -> 0.1.1 + CHANGELOG [0.1.1] entry. Agent-Session: pr-vision rename v0.1.1
This commit is contained in:
68
pr-vision.php
Normal file
68
pr-vision.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: PR Vision
|
||||
* Plugin URI: https://peptiderepo.com
|
||||
* Description: Weekly server-side LLM probes for AI-visibility (GEO) tracking. Records whether peptiderepo.com is cited by LLMs across core peptides, stores time-series, and renders an admin trendline + standings table.
|
||||
* Version: 0.1.1
|
||||
* Author: peptiderepo
|
||||
* Author URI: https://peptiderepo.com
|
||||
* License: GPL-2.0-or-later
|
||||
* Text Domain: pr-vision
|
||||
* Requires PHP: 8.1
|
||||
*
|
||||
* @see ARCHITECTURE.md — Full data flow and file tree.
|
||||
* @see CONVENTIONS.md — Naming patterns and extension guide.
|
||||
* @see CONTEXT.md — Domain glossary incl. the visibility score formula.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/* ── Constants ────────────────────────────────────────────────────────── */
|
||||
|
||||
define( 'PRV_VERSION', '0.1.1' );
|
||||
define( 'PRV_PLUGIN_FILE', __FILE__ );
|
||||
define( 'PRV_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
define( 'PRV_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'PRV_SCHEMA_VERSION', 1 );
|
||||
|
||||
/** @var int Maximum HTTP retries for LLM API calls. */
|
||||
define( 'PRV_MAX_RETRIES', 3 );
|
||||
|
||||
/** @var int API request timeout in seconds. */
|
||||
define( 'PRV_API_TIMEOUT_SECONDS', 60 );
|
||||
|
||||
/** @var int Base backoff delay (seconds) between retries. */
|
||||
define( 'PRV_RETRY_BASE_DELAY_SECONDS', 2 );
|
||||
|
||||
/** @var float Default monthly budget cap in USD. */
|
||||
define( 'PRV_DEFAULT_MONTHLY_BUDGET_USD', 5.0 );
|
||||
|
||||
/** @var string WP-Cron hook name for the weekly probe run. */
|
||||
define( 'PRV_CRON_HOOK', 'prv_weekly_probe' );
|
||||
|
||||
/** @var string The site we are tracking citations for. */
|
||||
define( 'PRV_TARGET_DOMAIN', 'peptiderepo.com' );
|
||||
|
||||
/* ── Autoloader ───────────────────────────────────────────────────────── */
|
||||
|
||||
require_once PRV_PLUGIN_DIR . 'includes/core/class-prv-autoloader.php';
|
||||
PRV_Autoloader::register();
|
||||
|
||||
/* ── Activation / Deactivation ────────────────────────────────────────── */
|
||||
|
||||
register_activation_hook( __FILE__, array( 'PRV_Activator', 'activate' ) );
|
||||
register_deactivation_hook( __FILE__, array( 'PRV_Deactivator', 'deactivate' ) );
|
||||
|
||||
/* ── Boot ──────────────────────────────────────────────────────────────── */
|
||||
|
||||
add_action(
|
||||
'plugins_loaded',
|
||||
static function (): void {
|
||||
$plugin = new PRV_Plugin();
|
||||
$plugin->init();
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user