| 1 |
<?php |
| 2 |
/** |
| 3 |
* AI-FSI module (spec 026-ai-fsi). |
| 4 |
* |
| 5 |
* AI content generation workflow + conversational UI. PHP: AIContent.php's remaining |
| 6 |
* `/ai-content/*` routes (modify-content, ai-update, ai-update-preview, generate-tagline, |
| 7 |
* chatbot-conversation, attachments — `search_images`/`/images` already extracted to |
| 8 |
* modules/image-replace in spec 023). Relocated verbatim from includes/API/AIContent.php |
| 9 |
* — behavior byte-identical (same routes, params, HMAC/header-auth permission logic). |
| 10 |
* |
| 11 |
* @package Templately |
| 12 |
*/ |
| 13 |
|
| 14 |
namespace Templately\Modules\AiFsi; |
| 15 |
|
| 16 |
use Templately\Core\Module_Base; |
| 17 |
use Templately\Modules\AiFsi\REST\AIContent; |
| 18 |
|
| 19 |
class Module extends Module_Base { |
| 20 |
|
| 21 |
public function get_name(): string { |
| 22 |
return 'ai-fsi'; |
| 23 |
} |
| 24 |
|
| 25 |
public function get_dependencies(): array { |
| 26 |
// REST/AIContent.php uses full-site-import's Utils/AIUtils/SessionData/ |
| 27 |
// SignatureVerifier/WXR_Parser at request time (spec 025). (image-replace stays |
| 28 |
// baselined — that's a JS-only build-time import, PHP boot order has no bearing.) |
| 29 |
return [ 'full-site-import' ]; |
| 30 |
} |
| 31 |
|
| 32 |
public function register_rest_routes(): void { |
| 33 |
AIContent::get_instance()->register_routes(); |
| 34 |
} |
| 35 |
} |
| 36 |
|