<?php
/**
 * Plugin Name:       Ppok AI Toolkit
 * Plugin URI:        https://ppok-ai.com/plugins/ai-toolkit
 * Description:       Configures this WordPress site as a Model Context Protocol (MCP) endpoint, exposing site capabilities to AI assistants via a companion remote bridge (cf. Automattic/mcp-wordpress-remote).
 * Version:           0.4.0
 * Requires at least: 6.4
 * Requires PHP:      8.1
 * Author:            Ppok
 * Author URI:        https://ppok-ai.com
 * Text Domain:       ppok-ai-toolkit
 * Domain Path:       /languages
 * License:           GPL-2.0-or-later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 *
 * @package Ppok\AIToolkit
 * @license GPL-2.0-or-later
 *
 * Ppok AI Toolkit is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the Free
 * Software Foundation, either version 2 of the License, or (at your option) any
 * later version.
 *
 * NOTE ON LICENSING: This plugin contains two licensing zones. Files under
 * includes/lib/ that have no WordPress dependency are PROPRIETARY (see
 * LICENSE-PROPRIETARY.txt). Everything else interacts with WordPress core and
 * is GPL-2.0-or-later (see LICENSE-GPL.txt). See LICENSE.md for the policy.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

define( 'PPOK_AI_TOOLKIT_VERSION', '0.4.0' );
define( 'PPOK_AI_TOOLKIT_FILE', __FILE__ );
define( 'PPOK_AI_TOOLKIT_DIR', plugin_dir_path( __FILE__ ) );
define( 'PPOK_AI_TOOLKIT_URL', plugin_dir_url( __FILE__ ) );
define( 'PPOK_AI_TOOLKIT_BASENAME', plugin_basename( __FILE__ ) );

$ppok_ai_toolkit_autoload = PPOK_AI_TOOLKIT_DIR . 'vendor/autoload.php';
if ( file_exists( $ppok_ai_toolkit_autoload ) ) {
	require_once $ppok_ai_toolkit_autoload;
}

register_activation_hook( __FILE__, array( 'Ppok\\AIToolkit\\Activator', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Ppok\\AIToolkit\\Deactivator', 'deactivate' ) );

function ppok_ai_toolkit_run() {
	$plugin = new \Ppok\AIToolkit\Plugin();
	$plugin->run();
}
add_action( 'plugins_loaded', 'ppok_ai_toolkit_run' );
