*/ public static function capability_rows(): array { return [ ['title' => __('Read this site locally', 'agentic-bridge'), 'detail' => __('Run local readiness checks, inspect findings and keep evidence on this site.', 'agentic-bridge'), 'available' => true, 'local' => true], ['title' => __('Review and undo a safe change', 'agentic-bridge'), 'detail' => __('Local review, rollback and evidence controls remain available without AI credits.', 'agentic-bridge'), 'available' => true, 'local' => true], ['title' => __('Track hosted monitoring', 'agentic-bridge'), 'detail' => __('A Pro, Growth or Agency package may unlock hosted monitoring after an approved connection.', 'agentic-bridge'), 'available' => TheDotDevAgenticBridge_Entitlements::can_cloud_sync(), 'local' => false], ['title' => __('Use hosted AI assistance', 'agentic-bridge'), 'detail' => __('Hosted AI is optional. Each request needs its own data preview and consent, and uses separate AI credits.', 'agentic-bridge'), 'available' => false, 'local' => false, 'lock' => 'credits'], ]; } /** * Read-only display catalogue. Checkout and entitlement activation happen * outside WordPress; this catalogue must never imply an instant unlock. * * @return list}> */ public static function package_catalog(): array { return [ [ 'id' => TheDotDevAgenticBridge_Entitlements::PLAN_FREE, 'title' => __('Free Agent Ready Check', 'agentic-bridge'), 'price' => __('$0', 'agentic-bridge'), 'annual' => __('No payment required', 'agentic-bridge'), 'detail' => __('Keep the local readiness workflow on this WordPress site.', 'agentic-bridge'), 'features' => [ __('1 WordPress site and 1 monthly recheck', 'agentic-bridge'), __('Basic score, findings and plain-English evidence', 'agentic-bridge'), __('Local pages, answers, artifacts and safety controls', 'agentic-bridge'), ], ], [ 'id' => TheDotDevAgenticBridge_Entitlements::PLAN_PRO, 'title' => __('Agentic Bridge Pro', 'agentic-bridge'), 'price' => __('$49/month', 'agentic-bridge'), 'annual' => __('or $490/year', 'agentic-bridge'), 'detail' => __('For one site that needs the approved publishing workflow and hosted evidence history.', 'agentic-bridge'), 'features' => [ __('1 site and 4 monthly rechecks', 'agentic-bridge'), __('30-day history and 12-month report retention', 'agentic-bridge'), __('Approval and publishing workflow', 'agentic-bridge'), ], ], [ 'id' => TheDotDevAgenticBridge_Entitlements::PLAN_GROWTH, 'title' => __('Agentic Bridge Growth', 'agentic-bridge'), 'price' => __('$99/month', 'agentic-bridge'), 'annual' => __('or $990/year', 'agentic-bridge'), 'detail' => __('For teams managing up to three sites with a broader approved hosted workflow.', 'agentic-bridge'), 'features' => [ __('3 sites and 30 monthly rechecks', 'agentic-bridge'), __('90-day history and 24-month report retention', 'agentic-bridge'), __('Everything in Pro', 'agentic-bridge'), ], ], [ 'id' => TheDotDevAgenticBridge_Entitlements::PLAN_AGENCY, 'title' => __('Agency Bridge', 'agentic-bridge'), 'price' => __('$499/month', 'agentic-bridge'), 'annual' => __('or $4,990/year ยท includes up to 10 sites', 'agentic-bridge'), 'detail' => __('For agencies that need approved multi-site client reporting and oversight.', 'agentic-bridge'), 'features' => [ __('Up to 10 sites and fair-use checks', 'agentic-bridge'), __('365-day history and 36-month report retention', 'agentic-bridge'), __('Extra sites are $39/month per site', 'agentic-bridge'), ], ], ]; } public static function render(): void { if (!current_user_can('manage_options')) { wp_die(esc_html__('You do not have permission to access this page.', 'agentic-bridge')); } $plan = TheDotDevAgenticBridge_Entitlements::plan_id(); $rows = self::capability_rows(); $catalog = self::package_catalog(); $upgrade_url = TheDotDevAgenticBridge_Entitlements::upgrade_url(); $connected = TheDotDevAgenticBridge_Storage::is_connected(); $snapshot = TheDotDevAgenticBridge_Entitlements::snapshot(); $setup_url = TheDotDevAgenticBridge_Admin::setup_url(); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Sanitized admin notice flash query args. $thedotdev_agentic_bridge_notice = isset($_GET['thedotdev_agentic_bridge_notice']) ? sanitize_text_field(wp_unslash((string) $_GET['thedotdev_agentic_bridge_notice'])) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Sanitized admin notice flash query args. $thedotdev_agentic_bridge_notice_type = isset($_GET['thedotdev_agentic_bridge_notice_type']) ? sanitize_key((string) wp_unslash($_GET['thedotdev_agentic_bridge_notice_type'])) : 'success'; $thedotdev_agentic_bridge_is_s2 = is_array(TheDotDevAgenticBridge_Readiness_Store::latest()); if (TheDotDevAgenticBridge_V2_Presentation::is_enabled()) { TheDotDevAgenticBridge_V2_Presentation::render_plans(get_defined_vars()); return; } require THEDOTDEV_AGENTIC_BRIDGE_PLUGIN_DIR . 'views/plans-ai-usage.php'; } }